' );\n\n\t\t\t\t// dom\n\t\t\t\t$newLabel.append( $label.html() );\n\t\t\t\t$newTable.append( $newWrap );\n\t\t\t\t$newInput.append( $newTable );\n\t\t\t\t$input.append( $newLabel );\n\t\t\t\t$input.append( $newInput );\n\n\t\t\t\t// modify\n\t\t\t\t$label.remove();\n\t\t\t\t$wrap.remove();\n\t\t\t\t$input.attr( 'colspan', 2 );\n\n\t\t\t\t// update vars\n\t\t\t\t$label = $newLabel;\n\t\t\t\t$input = $newInput;\n\t\t\t\t$wrap = $newWrap;\n\t\t\t}\n\n\t\t\t// add classes\n\t\t\t$field.addClass( 'acf-accordion' );\n\t\t\t$label.addClass( 'acf-accordion-title' );\n\t\t\t$input.addClass( 'acf-accordion-content' );\n\n\t\t\t// index\n\t\t\ti++;\n\n\t\t\t// multi-expand\n\t\t\tif ( this.get( 'multi_expand' ) ) {\n\t\t\t\t$field.attr( 'multi-expand', 1 );\n\t\t\t}\n\n\t\t\t// open\n\t\t\tvar order = acf.getPreference( 'this.accordions' ) || [];\n\t\t\tif ( order[ i - 1 ] !== undefined ) {\n\t\t\t\tthis.set( 'open', order[ i - 1 ] );\n\t\t\t}\n\n\t\t\tif ( this.get( 'open' ) ) {\n\t\t\t\t$field.addClass( '-open' );\n\t\t\t\t$input.css( 'display', 'block' ); // needed for accordion to close smoothly\n\t\t\t}\n\n\t\t\t// add icon\n\t\t\t$label.prepend(\n\t\t\t\taccordionManager.iconHtml( { open: this.get( 'open' ) } )\n\t\t\t);\n\n\t\t\t// classes\n\t\t\t// - remove 'inside' which is a #poststuff WP class\n\t\t\tvar $parent = $field.parent();\n\t\t\t$wrap.addClass( $parent.hasClass( '-left' ) ? '-left' : '' );\n\t\t\t$wrap.addClass( $parent.hasClass( '-clear' ) ? '-clear' : '' );\n\n\t\t\t// append\n\t\t\t$wrap.append(\n\t\t\t\t$field.nextUntil( '.acf-field-accordion', '.acf-field' )\n\t\t\t);\n\n\t\t\t// clean up\n\t\t\t$wrap.removeAttr( 'data-open data-multi_expand data-endpoint' );\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n\n\t/**\n\t * accordionManager\n\t *\n\t * Events manager for the acf accordion\n\t *\n\t * @date\t14/2/18\n\t * @since\t5.6.9\n\t *\n\t * @param\tvoid\n\t * @return\tvoid\n\t */\n\n\tvar accordionManager = new acf.Model( {\n\t\tactions: {\n\t\t\tunload: 'onUnload',\n\t\t},\n\n\t\tevents: {\n\t\t\t'click .acf-accordion-title': 'onClick',\n\t\t\t'invalidField .acf-accordion': 'onInvalidField',\n\t\t},\n\n\t\tisOpen: function ( $el ) {\n\t\t\treturn $el.hasClass( '-open' );\n\t\t},\n\n\t\ttoggle: function ( $el ) {\n\t\t\tif ( this.isOpen( $el ) ) {\n\t\t\t\tthis.close( $el );\n\t\t\t} else {\n\t\t\t\tthis.open( $el );\n\t\t\t}\n\t\t},\n\n\t\ticonHtml: function ( props ) {\n\t\t\t// Use SVG inside Gutenberg editor.\n\t\t\tif ( acf.isGutenberg() ) {\n\t\t\t\tif ( props.open ) {\n\t\t\t\t\treturn '
';\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\topen: function ( $el ) {\n\t\t\tvar duration = acf.isGutenberg() ? 0 : 300;\n\n\t\t\t// open\n\t\t\t$el.find( '.acf-accordion-content:first' )\n\t\t\t\t.slideDown( duration )\n\t\t\t\t.css( 'display', 'block' );\n\t\t\t$el.find( '.acf-accordion-icon:first' ).replaceWith(\n\t\t\t\tthis.iconHtml( { open: true } )\n\t\t\t);\n\t\t\t$el.addClass( '-open' );\n\n\t\t\t// action\n\t\t\tacf.doAction( 'show', $el );\n\n\t\t\t// close siblings\n\t\t\tif ( ! $el.attr( 'multi-expand' ) ) {\n\t\t\t\t$el.siblings( '.acf-accordion.-open' ).each( function () {\n\t\t\t\t\taccordionManager.close( $( this ) );\n\t\t\t\t} );\n\t\t\t}\n\t\t},\n\n\t\tclose: function ( $el ) {\n\t\t\tvar duration = acf.isGutenberg() ? 0 : 300;\n\n\t\t\t// close\n\t\t\t$el.find( '.acf-accordion-content:first' ).slideUp( duration );\n\t\t\t$el.find( '.acf-accordion-icon:first' ).replaceWith(\n\t\t\t\tthis.iconHtml( { open: false } )\n\t\t\t);\n\t\t\t$el.removeClass( '-open' );\n\n\t\t\t// action\n\t\t\tacf.doAction( 'hide', $el );\n\t\t},\n\n\t\tonClick: function ( e, $el ) {\n\t\t\t// prevent Defailt\n\t\t\te.preventDefault();\n\n\t\t\t// open close\n\t\t\tthis.toggle( $el.parent() );\n\t\t},\n\n\t\tonInvalidField: function ( e, $el ) {\n\t\t\t// bail early if already focused\n\t\t\tif ( this.busy ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// disable functionality for 1sec (allow next validation to work)\n\t\t\tthis.busy = true;\n\t\t\tthis.setTimeout( function () {\n\t\t\t\tthis.busy = false;\n\t\t\t}, 1000 );\n\n\t\t\t// open accordion\n\t\t\tthis.open( $el );\n\t\t},\n\n\t\tonUnload: function ( e ) {\n\t\t\t// vars\n\t\t\tvar order = [];\n\n\t\t\t// loop\n\t\t\t$( '.acf-accordion' ).each( function () {\n\t\t\t\tvar open = $( this ).hasClass( '-open' ) ? 1 : 0;\n\t\t\t\torder.push( open );\n\t\t\t} );\n\n\t\t\t// set\n\t\t\tif ( order.length ) {\n\t\t\t\tacf.setPreference( 'this.accordions', order );\n\t\t\t}\n\t\t},\n\t} );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'button_group',\n\n\t\tevents: {\n\t\t\t'click input[type=\"radio\"]': 'onClick',\n\t\t},\n\n\t\t$control: function () {\n\t\t\treturn this.$( '.acf-button-group' );\n\t\t},\n\n\t\t$input: function () {\n\t\t\treturn this.$( 'input:checked' );\n\t\t},\n\n\t\tsetValue: function ( val ) {\n\t\t\tthis.$( 'input[value=\"' + val + '\"]' )\n\t\t\t\t.prop( 'checked', true )\n\t\t\t\t.trigger( 'change' );\n\t\t},\n\n\t\tonClick: function ( e, $el ) {\n\t\t\t// vars\n\t\t\tvar $label = $el.parent( 'label' );\n\t\t\tvar selected = $label.hasClass( 'selected' );\n\n\t\t\t// remove previous selected\n\t\t\tthis.$( '.selected' ).removeClass( 'selected' );\n\n\t\t\t// add active class\n\t\t\t$label.addClass( 'selected' );\n\n\t\t\t// allow null\n\t\t\tif ( this.get( 'allow_null' ) && selected ) {\n\t\t\t\t$label.removeClass( 'selected' );\n\t\t\t\t$el.prop( 'checked', false ).trigger( 'change' );\n\t\t\t}\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'checkbox',\n\n\t\tevents: {\n\t\t\t'change input': 'onChange',\n\t\t\t'click .acf-add-checkbox': 'onClickAdd',\n\t\t\t'click .acf-checkbox-toggle': 'onClickToggle',\n\t\t\t'click .acf-checkbox-custom': 'onClickCustom',\n\t\t},\n\n\t\t$control: function () {\n\t\t\treturn this.$( '.acf-checkbox-list' );\n\t\t},\n\n\t\t$toggle: function () {\n\t\t\treturn this.$( '.acf-checkbox-toggle' );\n\t\t},\n\n\t\t$input: function () {\n\t\t\treturn this.$( 'input[type=\"hidden\"]' );\n\t\t},\n\n\t\t$inputs: function () {\n\t\t\treturn this.$( 'input[type=\"checkbox\"]' ).not(\n\t\t\t\t'.acf-checkbox-toggle'\n\t\t\t);\n\t\t},\n\n\t\tgetValue: function () {\n\t\t\tvar val = [];\n\t\t\tthis.$( ':checked' ).each( function () {\n\t\t\t\tval.push( $( this ).val() );\n\t\t\t} );\n\t\t\treturn val.length ? val : false;\n\t\t},\n\n\t\tonChange: function ( e, $el ) {\n\t\t\t// Vars.\n\t\t\tvar checked = $el.prop( 'checked' );\n\t\t\tvar $label = $el.parent( 'label' );\n\t\t\tvar $toggle = this.$toggle();\n\n\t\t\t// Add or remove \"selected\" class.\n\t\t\tif ( checked ) {\n\t\t\t\t$label.addClass( 'selected' );\n\t\t\t} else {\n\t\t\t\t$label.removeClass( 'selected' );\n\t\t\t}\n\n\t\t\t// Update toggle state if all inputs are checked.\n\t\t\tif ( $toggle.length ) {\n\t\t\t\tvar $inputs = this.$inputs();\n\n\t\t\t\t// all checked\n\t\t\t\tif ( $inputs.not( ':checked' ).length == 0 ) {\n\t\t\t\t\t$toggle.prop( 'checked', true );\n\t\t\t\t} else {\n\t\t\t\t\t$toggle.prop( 'checked', false );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tonClickAdd: function ( e, $el ) {\n\t\t\tvar html =\n\t\t\t\t'
';\n\t\t\t$el.parent( 'li' ).before( html );\n\t\t\t$el.parent( 'li' )\n\t\t\t\t.parent()\n\t\t\t\t.find( 'input[type=\"text\"]' )\n\t\t\t\t.last()\n\t\t\t\t.focus();\n\t\t},\n\n\t\tonClickToggle: function ( e, $el ) {\n\t\t\t// Vars.\n\t\t\tvar checked = $el.prop( 'checked' );\n\t\t\tvar $inputs = this.$( 'input[type=\"checkbox\"]' );\n\t\t\tvar $labels = this.$( 'label' );\n\n\t\t\t// Update \"checked\" state.\n\t\t\t$inputs.prop( 'checked', checked );\n\n\t\t\t// Add or remove \"selected\" class.\n\t\t\tif ( checked ) {\n\t\t\t\t$labels.addClass( 'selected' );\n\t\t\t} else {\n\t\t\t\t$labels.removeClass( 'selected' );\n\t\t\t}\n\t\t},\n\n\t\tonClickCustom: function ( e, $el ) {\n\t\t\tvar checked = $el.prop( 'checked' );\n\t\t\tvar $text = $el.next( 'input[type=\"text\"]' );\n\n\t\t\t// checked\n\t\t\tif ( checked ) {\n\t\t\t\t$text.prop( 'disabled', false );\n\n\t\t\t\t// not checked\n\t\t\t} else {\n\t\t\t\t$text.prop( 'disabled', true );\n\n\t\t\t\t// remove\n\t\t\t\tif ( $text.val() == '' ) {\n\t\t\t\t\t$el.parent( 'li' ).remove();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'color_picker',\n\n\t\twait: 'load',\n\n\t\tevents: {\n\t\t\tduplicateField: 'onDuplicate',\n\t\t},\n\n\t\t$control: function () {\n\t\t\treturn this.$( '.acf-color-picker' );\n\t\t},\n\n\t\t$input: function () {\n\t\t\treturn this.$( 'input[type=\"hidden\"]' );\n\t\t},\n\n\t\t$inputText: function () {\n\t\t\treturn this.$( 'input[type=\"text\"]' );\n\t\t},\n\n\t\tsetValue: function ( val ) {\n\t\t\t// update input (with change)\n\t\t\tacf.val( this.$input(), val );\n\n\t\t\t// update iris\n\t\t\tthis.$inputText().iris( 'color', val );\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\t// vars\n\t\t\tvar $input = this.$input();\n\t\t\tvar $inputText = this.$inputText();\n\n\t\t\t// event\n\t\t\tvar onChange = function ( e ) {\n\t\t\t\t// timeout is required to ensure the $input val is correct\n\t\t\t\tsetTimeout( function () {\n\t\t\t\t\tacf.val( $input, $inputText.val() );\n\t\t\t\t}, 1 );\n\t\t\t};\n\n\t\t\t// args\n\t\t\tvar args = {\n\t\t\t\tdefaultColor: false,\n\t\t\t\tpalettes: true,\n\t\t\t\thide: true,\n\t\t\t\tchange: onChange,\n\t\t\t\tclear: onChange,\n\t\t\t};\n\n\t\t\t// filter\n\t\t\tvar args = acf.applyFilters( 'color_picker_args', args, this );\n\n\t\t\t// initialize\n\t\t\t$inputText.wpColorPicker( args );\n\t\t},\n\n\t\tonDuplicate: function ( e, $el, $duplicate ) {\n\t\t\t// The wpColorPicker library does not provide a destroy method.\n\t\t\t// Manually reset DOM by replacing elements back to their original state.\n\t\t\t$colorPicker = $duplicate.find( '.wp-picker-container' );\n\t\t\t$inputText = $duplicate.find( 'input[type=\"text\"]' );\n\t\t\t$colorPicker.replaceWith( $inputText );\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'date_picker',\n\n\t\tevents: {\n\t\t\t'blur input[type=\"text\"]': 'onBlur',\n\t\t\tduplicateField: 'onDuplicate',\n\t\t},\n\n\t\t$control: function () {\n\t\t\treturn this.$( '.acf-date-picker' );\n\t\t},\n\n\t\t$input: function () {\n\t\t\treturn this.$( 'input[type=\"hidden\"]' );\n\t\t},\n\n\t\t$inputText: function () {\n\t\t\treturn this.$( 'input[type=\"text\"]' );\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\t// save_format: compatibility with ACF < 5.0.0\n\t\t\tif ( this.has( 'save_format' ) ) {\n\t\t\t\treturn this.initializeCompatibility();\n\t\t\t}\n\n\t\t\t// vars\n\t\t\tvar $input = this.$input();\n\t\t\tvar $inputText = this.$inputText();\n\n\t\t\t// args\n\t\t\tvar args = {\n\t\t\t\tdateFormat: this.get( 'date_format' ),\n\t\t\t\taltField: $input,\n\t\t\t\taltFormat: 'yymmdd',\n\t\t\t\tchangeYear: true,\n\t\t\t\tyearRange: '-100:+100',\n\t\t\t\tchangeMonth: true,\n\t\t\t\tshowButtonPanel: true,\n\t\t\t\tfirstDay: this.get( 'first_day' ),\n\t\t\t};\n\n\t\t\t// filter\n\t\t\targs = acf.applyFilters( 'date_picker_args', args, this );\n\n\t\t\t// add date picker\n\t\t\tacf.newDatePicker( $inputText, args );\n\n\t\t\t// action\n\t\t\tacf.doAction( 'date_picker_init', $inputText, args, this );\n\t\t},\n\n\t\tinitializeCompatibility: function () {\n\t\t\t// vars\n\t\t\tvar $input = this.$input();\n\t\t\tvar $inputText = this.$inputText();\n\n\t\t\t// get and set value from alt field\n\t\t\t$inputText.val( $input.val() );\n\n\t\t\t// args\n\t\t\tvar args = {\n\t\t\t\tdateFormat: this.get( 'date_format' ),\n\t\t\t\taltField: $input,\n\t\t\t\taltFormat: this.get( 'save_format' ),\n\t\t\t\tchangeYear: true,\n\t\t\t\tyearRange: '-100:+100',\n\t\t\t\tchangeMonth: true,\n\t\t\t\tshowButtonPanel: true,\n\t\t\t\tfirstDay: this.get( 'first_day' ),\n\t\t\t};\n\n\t\t\t// filter for 3rd party customization\n\t\t\targs = acf.applyFilters( 'date_picker_args', args, this );\n\n\t\t\t// backup\n\t\t\tvar dateFormat = args.dateFormat;\n\n\t\t\t// change args.dateFormat\n\t\t\targs.dateFormat = this.get( 'save_format' );\n\n\t\t\t// add date picker\n\t\t\tacf.newDatePicker( $inputText, args );\n\n\t\t\t// now change the format back to how it should be.\n\t\t\t$inputText.datepicker( 'option', 'dateFormat', dateFormat );\n\n\t\t\t// action for 3rd party customization\n\t\t\tacf.doAction( 'date_picker_init', $inputText, args, this );\n\t\t},\n\n\t\tonBlur: function () {\n\t\t\tif ( ! this.$inputText().val() ) {\n\t\t\t\tacf.val( this.$input(), '' );\n\t\t\t}\n\t\t},\n\n\t\tonDuplicate: function ( e, $el, $duplicate ) {\n\t\t\t$duplicate\n\t\t\t\t.find( 'input[type=\"text\"]' )\n\t\t\t\t.removeClass( 'hasDatepicker' )\n\t\t\t\t.removeAttr( 'id' );\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n\n\t// manager\n\tvar datePickerManager = new acf.Model( {\n\t\tpriority: 5,\n\t\twait: 'ready',\n\t\tinitialize: function () {\n\t\t\t// vars\n\t\t\tvar locale = acf.get( 'locale' );\n\t\t\tvar rtl = acf.get( 'rtl' );\n\t\t\tvar l10n = acf.get( 'datePickerL10n' );\n\n\t\t\t// bail early if no l10n\n\t\t\tif ( ! l10n ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// bail early if no datepicker library\n\t\t\tif ( typeof $.datepicker === 'undefined' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// rtl\n\t\t\tl10n.isRTL = rtl;\n\n\t\t\t// append\n\t\t\t$.datepicker.regional[ locale ] = l10n;\n\t\t\t$.datepicker.setDefaults( l10n );\n\t\t},\n\t} );\n\n\t// add\n\tacf.newDatePicker = function ( $input, args ) {\n\t\t// bail early if no datepicker library\n\t\tif ( typeof $.datepicker === 'undefined' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// defaults\n\t\targs = args || {};\n\n\t\t// initialize\n\t\t$input.datepicker( args );\n\n\t\t// wrap the datepicker (only if it hasn't already been wrapped)\n\t\tif ( $( 'body > #ui-datepicker-div' ).exists() ) {\n\t\t\t$( 'body > #ui-datepicker-div' ).wrap(\n\t\t\t\t'
'\n\t\t\t);\n\t\t}\n\t};\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.models.DatePickerField.extend( {\n\t\ttype: 'date_time_picker',\n\n\t\t$control: function () {\n\t\t\treturn this.$( '.acf-date-time-picker' );\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\t// vars\n\t\t\tvar $input = this.$input();\n\t\t\tvar $inputText = this.$inputText();\n\n\t\t\t// args\n\t\t\tvar args = {\n\t\t\t\tdateFormat: this.get( 'date_format' ),\n\t\t\t\ttimeFormat: this.get( 'time_format' ),\n\t\t\t\taltField: $input,\n\t\t\t\taltFieldTimeOnly: false,\n\t\t\t\taltFormat: 'yy-mm-dd',\n\t\t\t\taltTimeFormat: 'HH:mm:ss',\n\t\t\t\tchangeYear: true,\n\t\t\t\tyearRange: '-100:+100',\n\t\t\t\tchangeMonth: true,\n\t\t\t\tshowButtonPanel: true,\n\t\t\t\tfirstDay: this.get( 'first_day' ),\n\t\t\t\tcontrolType: 'select',\n\t\t\t\toneLine: true,\n\t\t\t};\n\n\t\t\t// filter\n\t\t\targs = acf.applyFilters( 'date_time_picker_args', args, this );\n\n\t\t\t// add date time picker\n\t\t\tacf.newDateTimePicker( $inputText, args );\n\n\t\t\t// action\n\t\t\tacf.doAction( 'date_time_picker_init', $inputText, args, this );\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n\n\t// manager\n\tvar dateTimePickerManager = new acf.Model( {\n\t\tpriority: 5,\n\t\twait: 'ready',\n\t\tinitialize: function () {\n\t\t\t// vars\n\t\t\tvar locale = acf.get( 'locale' );\n\t\t\tvar rtl = acf.get( 'rtl' );\n\t\t\tvar l10n = acf.get( 'dateTimePickerL10n' );\n\n\t\t\t// bail early if no l10n\n\t\t\tif ( ! l10n ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// bail early if no datepicker library\n\t\t\tif ( typeof $.timepicker === 'undefined' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// rtl\n\t\t\tl10n.isRTL = rtl;\n\n\t\t\t// append\n\t\t\t$.timepicker.regional[ locale ] = l10n;\n\t\t\t$.timepicker.setDefaults( l10n );\n\t\t},\n\t} );\n\n\t// add\n\tacf.newDateTimePicker = function ( $input, args ) {\n\t\t// bail early if no datepicker library\n\t\tif ( typeof $.timepicker === 'undefined' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// defaults\n\t\targs = args || {};\n\n\t\t// initialize\n\t\t$input.datetimepicker( args );\n\n\t\t// wrap the datepicker (only if it hasn't already been wrapped)\n\t\tif ( $( 'body > #ui-datepicker-div' ).exists() ) {\n\t\t\t$( 'body > #ui-datepicker-div' ).wrap(\n\t\t\t\t'
'\n\t\t\t);\n\t\t}\n\t};\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.models.ImageField.extend( {\n\t\ttype: 'file',\n\n\t\t$control: function () {\n\t\t\treturn this.$( '.acf-file-uploader' );\n\t\t},\n\n\t\t$input: function () {\n\t\t\treturn this.$( 'input[type=\"hidden\"]:first' );\n\t\t},\n\n\t\tvalidateAttachment: function ( attachment ) {\n\t\t\t// defaults\n\t\t\tattachment = attachment || {};\n\n\t\t\t// WP attachment\n\t\t\tif ( attachment.id !== undefined ) {\n\t\t\t\tattachment = attachment.attributes;\n\t\t\t}\n\n\t\t\t// args\n\t\t\tattachment = acf.parseArgs( attachment, {\n\t\t\t\turl: '',\n\t\t\t\talt: '',\n\t\t\t\ttitle: '',\n\t\t\t\tfilename: '',\n\t\t\t\tfilesizeHumanReadable: '',\n\t\t\t\ticon: '/wp-includes/images/media/default.png',\n\t\t\t} );\n\n\t\t\t// return\n\t\t\treturn attachment;\n\t\t},\n\n\t\trender: function ( attachment ) {\n\t\t\t// vars\n\t\t\tattachment = this.validateAttachment( attachment );\n\n\t\t\t// update image\n\t\t\tthis.$( 'img' ).attr( {\n\t\t\t\tsrc: attachment.icon,\n\t\t\t\talt: attachment.alt,\n\t\t\t\ttitle: attachment.title,\n\t\t\t} );\n\n\t\t\t// update elements\n\t\t\tthis.$( '[data-name=\"title\"]' ).text( attachment.title );\n\t\t\tthis.$( '[data-name=\"filename\"]' )\n\t\t\t\t.text( attachment.filename )\n\t\t\t\t.attr( 'href', attachment.url );\n\t\t\tthis.$( '[data-name=\"filesize\"]' ).text(\n\t\t\t\tattachment.filesizeHumanReadable\n\t\t\t);\n\n\t\t\t// vars\n\t\t\tvar val = attachment.id || '';\n\n\t\t\t// update val\n\t\t\tacf.val( this.$input(), val );\n\n\t\t\t// update class\n\t\t\tif ( val ) {\n\t\t\t\tthis.$control().addClass( 'has-value' );\n\t\t\t} else {\n\t\t\t\tthis.$control().removeClass( 'has-value' );\n\t\t\t}\n\t\t},\n\n\t\tselectAttachment: function () {\n\t\t\t// vars\n\t\t\tvar parent = this.parent();\n\t\t\tvar multiple = parent && parent.get( 'type' ) === 'repeater';\n\n\t\t\t// new frame\n\t\t\tvar frame = acf.newMediaPopup( {\n\t\t\t\tmode: 'select',\n\t\t\t\ttitle: acf.__( 'Select File' ),\n\t\t\t\tfield: this.get( 'key' ),\n\t\t\t\tmultiple: multiple,\n\t\t\t\tlibrary: this.get( 'library' ),\n\t\t\t\tallowedTypes: this.get( 'mime_types' ),\n\t\t\t\tselect: $.proxy( function ( attachment, i ) {\n\t\t\t\t\tif ( i > 0 ) {\n\t\t\t\t\t\tthis.append( attachment, parent );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.render( attachment );\n\t\t\t\t\t}\n\t\t\t\t}, this ),\n\t\t\t} );\n\t\t},\n\n\t\teditAttachment: function () {\n\t\t\t// vars\n\t\t\tvar val = this.val();\n\n\t\t\t// bail early if no val\n\t\t\tif ( ! val ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// popup\n\t\t\tvar frame = acf.newMediaPopup( {\n\t\t\t\tmode: 'edit',\n\t\t\t\ttitle: acf.__( 'Edit File' ),\n\t\t\t\tbutton: acf.__( 'Update File' ),\n\t\t\t\tattachment: val,\n\t\t\t\tfield: this.get( 'key' ),\n\t\t\t\tselect: $.proxy( function ( attachment, i ) {\n\t\t\t\t\tthis.render( attachment );\n\t\t\t\t}, this ),\n\t\t\t} );\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'google_map',\n\n\t\tmap: false,\n\n\t\twait: 'load',\n\n\t\tevents: {\n\t\t\t'click a[data-name=\"clear\"]': 'onClickClear',\n\t\t\t'click a[data-name=\"locate\"]': 'onClickLocate',\n\t\t\t'click a[data-name=\"search\"]': 'onClickSearch',\n\t\t\t'keydown .search': 'onKeydownSearch',\n\t\t\t'keyup .search': 'onKeyupSearch',\n\t\t\t'focus .search': 'onFocusSearch',\n\t\t\t'blur .search': 'onBlurSearch',\n\t\t\tshowField: 'onShow',\n\t\t},\n\n\t\t$control: function () {\n\t\t\treturn this.$( '.acf-google-map' );\n\t\t},\n\n\t\t$search: function () {\n\t\t\treturn this.$( '.search' );\n\t\t},\n\n\t\t$canvas: function () {\n\t\t\treturn this.$( '.canvas' );\n\t\t},\n\n\t\tsetState: function ( state ) {\n\t\t\t// Remove previous state classes.\n\t\t\tthis.$control().removeClass( '-value -loading -searching' );\n\n\t\t\t// Determine auto state based of current value.\n\t\t\tif ( state === 'default' ) {\n\t\t\t\tstate = this.val() ? 'value' : '';\n\t\t\t}\n\n\t\t\t// Update state class.\n\t\t\tif ( state ) {\n\t\t\t\tthis.$control().addClass( '-' + state );\n\t\t\t}\n\t\t},\n\n\t\tgetValue: function () {\n\t\t\tvar val = this.$input().val();\n\t\t\tif ( val ) {\n\t\t\t\treturn JSON.parse( val );\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\n\t\tsetValue: function ( val, silent ) {\n\t\t\t// Convert input value.\n\t\t\tvar valAttr = '';\n\t\t\tif ( val ) {\n\t\t\t\tvalAttr = JSON.stringify( val );\n\t\t\t}\n\n\t\t\t// Update input (with change).\n\t\t\tacf.val( this.$input(), valAttr );\n\n\t\t\t// Bail early if silent update.\n\t\t\tif ( silent ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Render.\n\t\t\tthis.renderVal( val );\n\n\t\t\t/**\n\t\t\t * Fires immediately after the value has changed.\n\t\t\t *\n\t\t\t * @date\t12/02/2014\n\t\t\t * @since\t5.0.0\n\t\t\t *\n\t\t\t * @param\tobject|string val The new value.\n\t\t\t * @param\tobject map The Google Map isntance.\n\t\t\t * @param\tobject field The field instance.\n\t\t\t */\n\t\t\tacf.doAction( 'google_map_change', val, this.map, this );\n\t\t},\n\n\t\trenderVal: function ( val ) {\n\t\t\t// Value.\n\t\t\tif ( val ) {\n\t\t\t\tthis.setState( 'value' );\n\t\t\t\tthis.$search().val( val.address );\n\t\t\t\tthis.setPosition( val.lat, val.lng );\n\n\t\t\t\t// No value.\n\t\t\t} else {\n\t\t\t\tthis.setState( '' );\n\t\t\t\tthis.$search().val( '' );\n\t\t\t\tthis.map.marker.setVisible( false );\n\t\t\t}\n\t\t},\n\n\t\tnewLatLng: function ( lat, lng ) {\n\t\t\treturn new google.maps.LatLng(\n\t\t\t\tparseFloat( lat ),\n\t\t\t\tparseFloat( lng )\n\t\t\t);\n\t\t},\n\n\t\tsetPosition: function ( lat, lng ) {\n\t\t\t// Update marker position.\n\t\t\tthis.map.marker.setPosition( {\n\t\t\t\tlat: parseFloat( lat ),\n\t\t\t\tlng: parseFloat( lng ),\n\t\t\t} );\n\n\t\t\t// Show marker.\n\t\t\tthis.map.marker.setVisible( true );\n\n\t\t\t// Center map.\n\t\t\tthis.center();\n\t\t},\n\n\t\tcenter: function () {\n\t\t\t// Find marker position.\n\t\t\tvar position = this.map.marker.getPosition();\n\t\t\tif ( position ) {\n\t\t\t\tvar lat = position.lat();\n\t\t\t\tvar lng = position.lng();\n\n\t\t\t\t// Or find default settings.\n\t\t\t} else {\n\t\t\t\tvar lat = this.get( 'lat' );\n\t\t\t\tvar lng = this.get( 'lng' );\n\t\t\t}\n\n\t\t\t// Center map.\n\t\t\tthis.map.setCenter( {\n\t\t\t\tlat: parseFloat( lat ),\n\t\t\t\tlng: parseFloat( lng ),\n\t\t\t} );\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\t// Ensure Google API is loaded and then initialize map.\n\t\t\twithAPI( this.initializeMap.bind( this ) );\n\t\t},\n\n\t\tinitializeMap: function () {\n\t\t\t// Get value ignoring conditional logic status.\n\t\t\tvar val = this.getValue();\n\n\t\t\t// Construct default args.\n\t\t\tvar args = acf.parseArgs( val, {\n\t\t\t\tzoom: this.get( 'zoom' ),\n\t\t\t\tlat: this.get( 'lat' ),\n\t\t\t\tlng: this.get( 'lng' ),\n\t\t\t} );\n\n\t\t\t// Create Map.\n\t\t\tvar mapArgs = {\n\t\t\t\tscrollwheel: false,\n\t\t\t\tzoom: parseInt( args.zoom ),\n\t\t\t\tcenter: {\n\t\t\t\t\tlat: parseFloat( args.lat ),\n\t\t\t\t\tlng: parseFloat( args.lng ),\n\t\t\t\t},\n\t\t\t\tmapTypeId: google.maps.MapTypeId.ROADMAP,\n\t\t\t\tmarker: {\n\t\t\t\t\tdraggable: true,\n\t\t\t\t\traiseOnDrag: true,\n\t\t\t\t},\n\t\t\t\tautocomplete: {},\n\t\t\t};\n\t\t\tmapArgs = acf.applyFilters( 'google_map_args', mapArgs, this );\n\t\t\tvar map = new google.maps.Map( this.$canvas()[ 0 ], mapArgs );\n\n\t\t\t// Create Marker.\n\t\t\tvar markerArgs = acf.parseArgs( mapArgs.marker, {\n\t\t\t\tdraggable: true,\n\t\t\t\traiseOnDrag: true,\n\t\t\t\tmap: map,\n\t\t\t} );\n\t\t\tmarkerArgs = acf.applyFilters(\n\t\t\t\t'google_map_marker_args',\n\t\t\t\tmarkerArgs,\n\t\t\t\tthis\n\t\t\t);\n\t\t\tvar marker = new google.maps.Marker( markerArgs );\n\n\t\t\t// Maybe Create Autocomplete.\n\t\t\tvar autocomplete = false;\n\t\t\tif ( acf.isset( google, 'maps', 'places', 'Autocomplete' ) ) {\n\t\t\t\tvar autocompleteArgs = mapArgs.autocomplete || {};\n\t\t\t\tautocompleteArgs = acf.applyFilters(\n\t\t\t\t\t'google_map_autocomplete_args',\n\t\t\t\t\tautocompleteArgs,\n\t\t\t\t\tthis\n\t\t\t\t);\n\t\t\t\tautocomplete = new google.maps.places.Autocomplete(\n\t\t\t\t\tthis.$search()[ 0 ],\n\t\t\t\t\tautocompleteArgs\n\t\t\t\t);\n\t\t\t\tautocomplete.bindTo( 'bounds', map );\n\t\t\t}\n\n\t\t\t// Add map events.\n\t\t\tthis.addMapEvents( this, map, marker, autocomplete );\n\n\t\t\t// Append references.\n\t\t\tmap.acf = this;\n\t\t\tmap.marker = marker;\n\t\t\tmap.autocomplete = autocomplete;\n\t\t\tthis.map = map;\n\n\t\t\t// Set position.\n\t\t\tif ( val ) {\n\t\t\t\tthis.setPosition( val.lat, val.lng );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Fires immediately after the Google Map has been initialized.\n\t\t\t *\n\t\t\t * @date\t12/02/2014\n\t\t\t * @since\t5.0.0\n\t\t\t *\n\t\t\t * @param\tobject map The Google Map isntance.\n\t\t\t * @param\tobject marker The Google Map marker isntance.\n\t\t\t * @param\tobject field The field instance.\n\t\t\t */\n\t\t\tacf.doAction( 'google_map_init', map, marker, this );\n\t\t},\n\n\t\taddMapEvents: function ( field, map, marker, autocomplete ) {\n\t\t\t// Click map.\n\t\t\tgoogle.maps.event.addListener( map, 'click', function ( e ) {\n\t\t\t\tvar lat = e.latLng.lat();\n\t\t\t\tvar lng = e.latLng.lng();\n\t\t\t\tfield.searchPosition( lat, lng );\n\t\t\t} );\n\n\t\t\t// Drag marker.\n\t\t\tgoogle.maps.event.addListener( marker, 'dragend', function () {\n\t\t\t\tvar lat = this.getPosition().lat();\n\t\t\t\tvar lng = this.getPosition().lng();\n\t\t\t\tfield.searchPosition( lat, lng );\n\t\t\t} );\n\n\t\t\t// Autocomplete search.\n\t\t\tif ( autocomplete ) {\n\t\t\t\tgoogle.maps.event.addListener(\n\t\t\t\t\tautocomplete,\n\t\t\t\t\t'place_changed',\n\t\t\t\t\tfunction () {\n\t\t\t\t\t\tvar place = this.getPlace();\n\t\t\t\t\t\tfield.searchPlace( place );\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Detect zoom change.\n\t\t\tgoogle.maps.event.addListener( map, 'zoom_changed', function () {\n\t\t\t\tvar val = field.val();\n\t\t\t\tif ( val ) {\n\t\t\t\t\tval.zoom = map.getZoom();\n\t\t\t\t\tfield.setValue( val, true );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\n\t\tsearchPosition: function ( lat, lng ) {\n\t\t\t//console.log('searchPosition', lat, lng );\n\n\t\t\t// Start Loading.\n\t\t\tthis.setState( 'loading' );\n\n\t\t\t// Query Geocoder.\n\t\t\tvar latLng = { lat: lat, lng: lng };\n\t\t\tgeocoder.geocode(\n\t\t\t\t{ location: latLng },\n\t\t\t\tfunction ( results, status ) {\n\t\t\t\t\t//console.log('searchPosition', arguments );\n\n\t\t\t\t\t// End Loading.\n\t\t\t\t\tthis.setState( '' );\n\n\t\t\t\t\t// Status failure.\n\t\t\t\t\tif ( status !== 'OK' ) {\n\t\t\t\t\t\tthis.showNotice( {\n\t\t\t\t\t\t\ttext: acf\n\t\t\t\t\t\t\t\t.__( 'Location not found: %s' )\n\t\t\t\t\t\t\t\t.replace( '%s', status ),\n\t\t\t\t\t\t\ttype: 'warning',\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t// Success.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar val = this.parseResult( results[ 0 ] );\n\n\t\t\t\t\t\t// Override lat/lng to match user defined marker location.\n\t\t\t\t\t\t// Avoids issue where marker \"snaps\" to nearest result.\n\t\t\t\t\t\tval.lat = lat;\n\t\t\t\t\t\tval.lng = lng;\n\t\t\t\t\t\tthis.val( val );\n\t\t\t\t\t}\n\t\t\t\t}.bind( this )\n\t\t\t);\n\t\t},\n\n\t\tsearchPlace: function ( place ) {\n\t\t\t//console.log('searchPlace', place );\n\n\t\t\t// Bail early if no place.\n\t\t\tif ( ! place ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Selecting from the autocomplete dropdown will return a rich PlaceResult object.\n\t\t\t// Be sure to over-write the \"formatted_address\" value with the one displayed to the user for best UX.\n\t\t\tif ( place.geometry ) {\n\t\t\t\tplace.formatted_address = this.$search().val();\n\t\t\t\tvar val = this.parseResult( place );\n\t\t\t\tthis.val( val );\n\n\t\t\t\t// Searching a custom address will return an empty PlaceResult object.\n\t\t\t} else if ( place.name ) {\n\t\t\t\tthis.searchAddress( place.name );\n\t\t\t}\n\t\t},\n\n\t\tsearchAddress: function ( address ) {\n\t\t\t//console.log('searchAddress', address );\n\n\t\t\t// Bail early if no address.\n\t\t\tif ( ! address ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Allow \"lat,lng\" search.\n\t\t\tvar latLng = address.split( ',' );\n\t\t\tif ( latLng.length == 2 ) {\n\t\t\t\tvar lat = parseFloat( latLng[ 0 ] );\n\t\t\t\tvar lng = parseFloat( latLng[ 1 ] );\n\t\t\t\tif ( lat && lng ) {\n\t\t\t\t\treturn this.searchPosition( lat, lng );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start Loading.\n\t\t\tthis.setState( 'loading' );\n\n\t\t\t// Query Geocoder.\n\t\t\tgeocoder.geocode(\n\t\t\t\t{ address: address },\n\t\t\t\tfunction ( results, status ) {\n\t\t\t\t\t//console.log('searchPosition', arguments );\n\n\t\t\t\t\t// End Loading.\n\t\t\t\t\tthis.setState( '' );\n\n\t\t\t\t\t// Status failure.\n\t\t\t\t\tif ( status !== 'OK' ) {\n\t\t\t\t\t\tthis.showNotice( {\n\t\t\t\t\t\t\ttext: acf\n\t\t\t\t\t\t\t\t.__( 'Location not found: %s' )\n\t\t\t\t\t\t\t\t.replace( '%s', status ),\n\t\t\t\t\t\t\ttype: 'warning',\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t// Success.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar val = this.parseResult( results[ 0 ] );\n\n\t\t\t\t\t\t// Override address data with parameter allowing custom address to be defined in search.\n\t\t\t\t\t\tval.address = address;\n\n\t\t\t\t\t\t// Update value.\n\t\t\t\t\t\tthis.val( val );\n\t\t\t\t\t}\n\t\t\t\t}.bind( this )\n\t\t\t);\n\t\t},\n\n\t\tsearchLocation: function () {\n\t\t\t//console.log('searchLocation' );\n\n\t\t\t// Check HTML5 geolocation.\n\t\t\tif ( ! navigator.geolocation ) {\n\t\t\t\treturn alert(\n\t\t\t\t\tacf.__( 'Sorry, this browser does not support geolocation' )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Start Loading.\n\t\t\tthis.setState( 'loading' );\n\n\t\t\t// Query Geolocation.\n\t\t\tnavigator.geolocation.getCurrentPosition(\n\t\t\t\t// Success.\n\t\t\t\tfunction ( results ) {\n\t\t\t\t\t// End Loading.\n\t\t\t\t\tthis.setState( '' );\n\n\t\t\t\t\t// Search position.\n\t\t\t\t\tvar lat = results.coords.latitude;\n\t\t\t\t\tvar lng = results.coords.longitude;\n\t\t\t\t\tthis.searchPosition( lat, lng );\n\t\t\t\t}.bind( this ),\n\n\t\t\t\t// Failure.\n\t\t\t\tfunction ( error ) {\n\t\t\t\t\tthis.setState( '' );\n\t\t\t\t}.bind( this )\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * parseResult\n\t\t *\n\t\t * Returns location data for the given GeocoderResult object.\n\t\t *\n\t\t * @date\t15/10/19\n\t\t * @since\t5.8.6\n\t\t *\n\t\t * @param\tobject obj A GeocoderResult object.\n\t\t * @return\tobject\n\t\t */\n\t\tparseResult: function ( obj ) {\n\t\t\t// Construct basic data.\n\t\t\tvar result = {\n\t\t\t\taddress: obj.formatted_address,\n\t\t\t\tlat: obj.geometry.location.lat(),\n\t\t\t\tlng: obj.geometry.location.lng(),\n\t\t\t};\n\n\t\t\t// Add zoom level.\n\t\t\tresult.zoom = this.map.getZoom();\n\n\t\t\t// Add place ID.\n\t\t\tif ( obj.place_id ) {\n\t\t\t\tresult.place_id = obj.place_id;\n\t\t\t}\n\n\t\t\t// Add place name.\n\t\t\tif ( obj.name ) {\n\t\t\t\tresult.name = obj.name;\n\t\t\t}\n\n\t\t\t// Create search map for address component data.\n\t\t\tvar map = {\n\t\t\t\tstreet_number: [ 'street_number' ],\n\t\t\t\tstreet_name: [ 'street_address', 'route' ],\n\t\t\t\tcity: [ 'locality', 'postal_town' ],\n\t\t\t\tstate: [\n\t\t\t\t\t'administrative_area_level_1',\n\t\t\t\t\t'administrative_area_level_2',\n\t\t\t\t\t'administrative_area_level_3',\n\t\t\t\t\t'administrative_area_level_4',\n\t\t\t\t\t'administrative_area_level_5',\n\t\t\t\t],\n\t\t\t\tpost_code: [ 'postal_code' ],\n\t\t\t\tcountry: [ 'country' ],\n\t\t\t};\n\n\t\t\t// Loop over map.\n\t\t\tfor ( var k in map ) {\n\t\t\t\tvar keywords = map[ k ];\n\n\t\t\t\t// Loop over address components.\n\t\t\t\tfor ( var i = 0; i < obj.address_components.length; i++ ) {\n\t\t\t\t\tvar component = obj.address_components[ i ];\n\t\t\t\t\tvar component_type = component.types[ 0 ];\n\n\t\t\t\t\t// Look for matching component type.\n\t\t\t\t\tif ( keywords.indexOf( component_type ) !== -1 ) {\n\t\t\t\t\t\t// Append to result.\n\t\t\t\t\t\tresult[ k ] = component.long_name;\n\n\t\t\t\t\t\t// Append short version.\n\t\t\t\t\t\tif ( component.long_name !== component.short_name ) {\n\t\t\t\t\t\t\tresult[ k + '_short' ] = component.short_name;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Filters the parsed result.\n\t\t\t *\n\t\t\t * @date\t18/10/19\n\t\t\t * @since\t5.8.6\n\t\t\t *\n\t\t\t * @param\tobject result The parsed result value.\n\t\t\t * @param\tobject obj The GeocoderResult object.\n\t\t\t */\n\t\t\treturn acf.applyFilters(\n\t\t\t\t'google_map_result',\n\t\t\t\tresult,\n\t\t\t\tobj,\n\t\t\t\tthis.map,\n\t\t\t\tthis\n\t\t\t);\n\t\t},\n\n\t\tonClickClear: function () {\n\t\t\tthis.val( false );\n\t\t},\n\n\t\tonClickLocate: function () {\n\t\t\tthis.searchLocation();\n\t\t},\n\n\t\tonClickSearch: function () {\n\t\t\tthis.searchAddress( this.$search().val() );\n\t\t},\n\n\t\tonFocusSearch: function ( e, $el ) {\n\t\t\tthis.setState( 'searching' );\n\t\t},\n\n\t\tonBlurSearch: function ( e, $el ) {\n\t\t\t// Get saved address value.\n\t\t\tvar val = this.val();\n\t\t\tvar address = val ? val.address : '';\n\n\t\t\t// Remove 'is-searching' if value has not changed.\n\t\t\tif ( $el.val() === address ) {\n\t\t\t\tthis.setState( 'default' );\n\t\t\t}\n\t\t},\n\n\t\tonKeyupSearch: function ( e, $el ) {\n\t\t\t// Clear empty value.\n\t\t\tif ( ! $el.val() ) {\n\t\t\t\tthis.val( false );\n\t\t\t}\n\t\t},\n\n\t\t// Prevent form from submitting.\n\t\tonKeydownSearch: function ( e, $el ) {\n\t\t\tif ( e.which == 13 ) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$el.blur();\n\t\t\t}\n\t\t},\n\n\t\t// Center map once made visible.\n\t\tonShow: function () {\n\t\t\tif ( this.map ) {\n\t\t\t\tthis.setTimeout( this.center );\n\t\t\t}\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n\n\t// Vars.\n\tvar loading = false;\n\tvar geocoder = false;\n\n\t/**\n\t * withAPI\n\t *\n\t * Loads the Google Maps API library and troggers callback.\n\t *\n\t * @date\t28/3/19\n\t * @since\t5.7.14\n\t *\n\t * @param\tfunction callback The callback to excecute.\n\t * @return\tvoid\n\t */\n\n\tfunction withAPI( callback ) {\n\t\t// Check if geocoder exists.\n\t\tif ( geocoder ) {\n\t\t\treturn callback();\n\t\t}\n\n\t\t// Check if geocoder API exists.\n\t\tif ( acf.isset( window, 'google', 'maps', 'Geocoder' ) ) {\n\t\t\tgeocoder = new google.maps.Geocoder();\n\t\t\treturn callback();\n\t\t}\n\n\t\t// Geocoder will need to be loaded. Hook callback to action.\n\t\tacf.addAction( 'google_map_api_loaded', callback );\n\n\t\t// Bail early if already loading API.\n\t\tif ( loading ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// load api\n\t\tvar url = acf.get( 'google_map_api' );\n\t\tif ( url ) {\n\t\t\t// Set loading status.\n\t\t\tloading = true;\n\n\t\t\t// Load API\n\t\t\t$.ajax( {\n\t\t\t\turl: url,\n\t\t\t\tdataType: 'script',\n\t\t\t\tcache: true,\n\t\t\t\tsuccess: function () {\n\t\t\t\t\tgeocoder = new google.maps.Geocoder();\n\t\t\t\t\tacf.doAction( 'google_map_api_loaded' );\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t}\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'image',\n\n\t\t$control: function () {\n\t\t\treturn this.$( '.acf-image-uploader' );\n\t\t},\n\n\t\t$input: function () {\n\t\t\treturn this.$( 'input[type=\"hidden\"]:first' );\n\t\t},\n\n\t\tevents: {\n\t\t\t'click a[data-name=\"add\"]': 'onClickAdd',\n\t\t\t'click a[data-name=\"edit\"]': 'onClickEdit',\n\t\t\t'click a[data-name=\"remove\"]': 'onClickRemove',\n\t\t\t'change input[type=\"file\"]': 'onChange',\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\t// add attribute to form\n\t\t\tif ( this.get( 'uploader' ) === 'basic' ) {\n\t\t\t\tthis.$el\n\t\t\t\t\t.closest( 'form' )\n\t\t\t\t\t.attr( 'enctype', 'multipart/form-data' );\n\t\t\t}\n\t\t},\n\n\t\tvalidateAttachment: function ( attachment ) {\n\t\t\t// Use WP attachment attributes when available.\n\t\t\tif ( attachment && attachment.attributes ) {\n\t\t\t\tattachment = attachment.attributes;\n\t\t\t}\n\n\t\t\t// Apply defaults.\n\t\t\tattachment = acf.parseArgs( attachment, {\n\t\t\t\tid: 0,\n\t\t\t\turl: '',\n\t\t\t\talt: '',\n\t\t\t\ttitle: '',\n\t\t\t\tcaption: '',\n\t\t\t\tdescription: '',\n\t\t\t\twidth: 0,\n\t\t\t\theight: 0,\n\t\t\t} );\n\n\t\t\t// Override with \"preview size\".\n\t\t\tvar size = acf.isget(\n\t\t\t\tattachment,\n\t\t\t\t'sizes',\n\t\t\t\tthis.get( 'preview_size' )\n\t\t\t);\n\t\t\tif ( size ) {\n\t\t\t\tattachment.url = size.url;\n\t\t\t\tattachment.width = size.width;\n\t\t\t\tattachment.height = size.height;\n\t\t\t}\n\n\t\t\t// Return.\n\t\t\treturn attachment;\n\t\t},\n\n\t\trender: function ( attachment ) {\n\t\t\tattachment = this.validateAttachment( attachment );\n\n\t\t\t// Update DOM.\n\t\t\tthis.$( 'img' ).attr( {\n\t\t\t\tsrc: attachment.url,\n\t\t\t\talt: attachment.alt,\n\t\t\t} );\n\t\t\tif ( attachment.id ) {\n\t\t\t\tthis.val( attachment.id );\n\t\t\t\tthis.$control().addClass( 'has-value' );\n\t\t\t} else {\n\t\t\t\tthis.val( '' );\n\t\t\t\tthis.$control().removeClass( 'has-value' );\n\t\t\t}\n\t\t},\n\n\t\t// create a new repeater row and render value\n\t\tappend: function ( attachment, parent ) {\n\t\t\t// create function to find next available field within parent\n\t\t\tvar getNext = function ( field, parent ) {\n\t\t\t\t// find existing file fields within parent\n\t\t\t\tvar fields = acf.getFields( {\n\t\t\t\t\tkey: field.get( 'key' ),\n\t\t\t\t\tparent: parent.$el,\n\t\t\t\t} );\n\n\t\t\t\t// find the first field with no value\n\t\t\t\tfor ( var i = 0; i < fields.length; i++ ) {\n\t\t\t\t\tif ( ! fields[ i ].val() ) {\n\t\t\t\t\t\treturn fields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// return\n\t\t\t\treturn false;\n\t\t\t};\n\n\t\t\t// find existing file fields within parent\n\t\t\tvar field = getNext( this, parent );\n\n\t\t\t// add new row if no available field\n\t\t\tif ( ! field ) {\n\t\t\t\tparent.$( '.acf-button:last' ).trigger( 'click' );\n\t\t\t\tfield = getNext( this, parent );\n\t\t\t}\n\n\t\t\t// render\n\t\t\tif ( field ) {\n\t\t\t\tfield.render( attachment );\n\t\t\t}\n\t\t},\n\n\t\tselectAttachment: function () {\n\t\t\t// vars\n\t\t\tvar parent = this.parent();\n\t\t\tvar multiple = parent && parent.get( 'type' ) === 'repeater';\n\n\t\t\t// new frame\n\t\t\tvar frame = acf.newMediaPopup( {\n\t\t\t\tmode: 'select',\n\t\t\t\ttype: 'image',\n\t\t\t\ttitle: acf.__( 'Select Image' ),\n\t\t\t\tfield: this.get( 'key' ),\n\t\t\t\tmultiple: multiple,\n\t\t\t\tlibrary: this.get( 'library' ),\n\t\t\t\tallowedTypes: this.get( 'mime_types' ),\n\t\t\t\tselect: $.proxy( function ( attachment, i ) {\n\t\t\t\t\tif ( i > 0 ) {\n\t\t\t\t\t\tthis.append( attachment, parent );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.render( attachment );\n\t\t\t\t\t}\n\t\t\t\t}, this ),\n\t\t\t} );\n\t\t},\n\n\t\teditAttachment: function () {\n\t\t\t// vars\n\t\t\tvar val = this.val();\n\n\t\t\t// bail early if no val\n\t\t\tif ( ! val ) return;\n\n\t\t\t// popup\n\t\t\tvar frame = acf.newMediaPopup( {\n\t\t\t\tmode: 'edit',\n\t\t\t\ttitle: acf.__( 'Edit Image' ),\n\t\t\t\tbutton: acf.__( 'Update Image' ),\n\t\t\t\tattachment: val,\n\t\t\t\tfield: this.get( 'key' ),\n\t\t\t\tselect: $.proxy( function ( attachment, i ) {\n\t\t\t\t\tthis.render( attachment );\n\t\t\t\t}, this ),\n\t\t\t} );\n\t\t},\n\n\t\tremoveAttachment: function () {\n\t\t\tthis.render( false );\n\t\t},\n\n\t\tonClickAdd: function ( e, $el ) {\n\t\t\tthis.selectAttachment();\n\t\t},\n\n\t\tonClickEdit: function ( e, $el ) {\n\t\t\tthis.editAttachment();\n\t\t},\n\n\t\tonClickRemove: function ( e, $el ) {\n\t\t\tthis.removeAttachment();\n\t\t},\n\n\t\tonChange: function ( e, $el ) {\n\t\t\tvar $hiddenInput = this.$input();\n\n\t\t\tif ( ! $el.val() ) {\n\t\t\t\t$hiddenInput.val( '' );\n\t\t\t}\n\n\t\t\tacf.getFileInputData( $el, function ( data ) {\n\t\t\t\t$hiddenInput.val( $.param( data ) );\n\t\t\t} );\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'link',\n\n\t\tevents: {\n\t\t\t'click a[data-name=\"add\"]': 'onClickEdit',\n\t\t\t'click a[data-name=\"edit\"]': 'onClickEdit',\n\t\t\t'click a[data-name=\"remove\"]': 'onClickRemove',\n\t\t\t'change .link-node': 'onChange',\n\t\t},\n\n\t\t$control: function () {\n\t\t\treturn this.$( '.acf-link' );\n\t\t},\n\n\t\t$node: function () {\n\t\t\treturn this.$( '.link-node' );\n\t\t},\n\n\t\tgetValue: function () {\n\t\t\t// vars\n\t\t\tvar $node = this.$node();\n\n\t\t\t// return false if empty\n\t\t\tif ( ! $node.attr( 'href' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn {\n\t\t\t\ttitle: $node.html(),\n\t\t\t\turl: $node.attr( 'href' ),\n\t\t\t\ttarget: $node.attr( 'target' ),\n\t\t\t};\n\t\t},\n\n\t\tsetValue: function ( val ) {\n\t\t\t// default\n\t\t\tval = acf.parseArgs( val, {\n\t\t\t\ttitle: '',\n\t\t\t\turl: '',\n\t\t\t\ttarget: '',\n\t\t\t} );\n\n\t\t\t// vars\n\t\t\tvar $div = this.$control();\n\t\t\tvar $node = this.$node();\n\n\t\t\t// remove class\n\t\t\t$div.removeClass( '-value -external' );\n\n\t\t\t// add class\n\t\t\tif ( val.url ) $div.addClass( '-value' );\n\t\t\tif ( val.target === '_blank' ) $div.addClass( '-external' );\n\n\t\t\t// update text\n\t\t\tthis.$( '.link-title' ).html( val.title );\n\t\t\tthis.$( '.link-url' ).attr( 'href', val.url ).html( val.url );\n\n\t\t\t// update node\n\t\t\t$node.html( val.title );\n\t\t\t$node.attr( 'href', val.url );\n\t\t\t$node.attr( 'target', val.target );\n\n\t\t\t// update inputs\n\t\t\tthis.$( '.input-title' ).val( val.title );\n\t\t\tthis.$( '.input-target' ).val( val.target );\n\t\t\tthis.$( '.input-url' ).val( val.url ).trigger( 'change' );\n\t\t},\n\n\t\tonClickEdit: function ( e, $el ) {\n\t\t\tacf.wpLink.open( this.$node() );\n\t\t},\n\n\t\tonClickRemove: function ( e, $el ) {\n\t\t\tthis.setValue( false );\n\t\t},\n\n\t\tonChange: function ( e, $el ) {\n\t\t\t// get the changed value\n\t\t\tvar val = this.getValue();\n\n\t\t\t// update inputs\n\t\t\tthis.setValue( val );\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n\n\t// manager\n\tacf.wpLink = new acf.Model( {\n\t\tgetNodeValue: function () {\n\t\t\tvar $node = this.get( 'node' );\n\t\t\treturn {\n\t\t\t\ttitle: acf.decode( $node.html() ),\n\t\t\t\turl: $node.attr( 'href' ),\n\t\t\t\ttarget: $node.attr( 'target' ),\n\t\t\t};\n\t\t},\n\n\t\tsetNodeValue: function ( val ) {\n\t\t\tvar $node = this.get( 'node' );\n\t\t\t$node.text( val.title );\n\t\t\t$node.attr( 'href', val.url );\n\t\t\t$node.attr( 'target', val.target );\n\t\t\t$node.trigger( 'change' );\n\t\t},\n\n\t\tgetInputValue: function () {\n\t\t\treturn {\n\t\t\t\ttitle: $( '#wp-link-text' ).val(),\n\t\t\t\turl: $( '#wp-link-url' ).val(),\n\t\t\t\ttarget: $( '#wp-link-target' ).prop( 'checked' )\n\t\t\t\t\t? '_blank'\n\t\t\t\t\t: '',\n\t\t\t};\n\t\t},\n\n\t\tsetInputValue: function ( val ) {\n\t\t\t$( '#wp-link-text' ).val( val.title );\n\t\t\t$( '#wp-link-url' ).val( val.url );\n\t\t\t$( '#wp-link-target' ).prop( 'checked', val.target === '_blank' );\n\t\t},\n\n\t\topen: function ( $node ) {\n\t\t\t// add events\n\t\t\tthis.on( 'wplink-open', 'onOpen' );\n\t\t\tthis.on( 'wplink-close', 'onClose' );\n\n\t\t\t// set node\n\t\t\tthis.set( 'node', $node );\n\n\t\t\t// create textarea\n\t\t\tvar $textarea = $(\n\t\t\t\t'
'\n\t\t\t);\n\t\t\t$( 'body' ).append( $textarea );\n\n\t\t\t// vars\n\t\t\tvar val = this.getNodeValue();\n\n\t\t\t// open popup\n\t\t\twpLink.open( 'acf-link-textarea', val.url, val.title, null );\n\t\t},\n\n\t\tonOpen: function () {\n\t\t\t// always show title (WP will hide title if empty)\n\t\t\t$( '#wp-link-wrap' ).addClass( 'has-text-field' );\n\n\t\t\t// set inputs\n\t\t\tvar val = this.getNodeValue();\n\t\t\tthis.setInputValue( val );\n\n\t\t\t// Update button text.\n\t\t\tif ( val.url && wpLinkL10n ) {\n\t\t\t\t$( '#wp-link-submit' ).val( wpLinkL10n.update );\n\t\t\t}\n\t\t},\n\n\t\tclose: function () {\n\t\t\twpLink.close();\n\t\t},\n\n\t\tonClose: function () {\n\t\t\t// Bail early if no node.\n\t\t\t// Needed due to WP triggering this event twice.\n\t\t\tif ( ! this.has( 'node' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Determine context.\n\t\t\tvar $submit = $( '#wp-link-submit' );\n\t\t\tvar isSubmit = $submit.is( ':hover' ) || $submit.is( ':focus' );\n\n\t\t\t// Set value\n\t\t\tif ( isSubmit ) {\n\t\t\t\tvar val = this.getInputValue();\n\t\t\t\tthis.setNodeValue( val );\n\t\t\t}\n\n\t\t\t// Cleanup.\n\t\t\tthis.off( 'wplink-open' );\n\t\t\tthis.off( 'wplink-close' );\n\t\t\t$( '#acf-link-textarea' ).remove();\n\t\t\tthis.set( 'node', null );\n\t\t},\n\t} );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'oembed',\n\n\t\tevents: {\n\t\t\t'click [data-name=\"clear-button\"]': 'onClickClear',\n\t\t\t'keypress .input-search': 'onKeypressSearch',\n\t\t\t'keyup .input-search': 'onKeyupSearch',\n\t\t\t'change .input-search': 'onChangeSearch',\n\t\t},\n\n\t\t$control: function () {\n\t\t\treturn this.$( '.acf-oembed' );\n\t\t},\n\n\t\t$input: function () {\n\t\t\treturn this.$( '.input-value' );\n\t\t},\n\n\t\t$search: function () {\n\t\t\treturn this.$( '.input-search' );\n\t\t},\n\n\t\tgetValue: function () {\n\t\t\treturn this.$input().val();\n\t\t},\n\n\t\tgetSearchVal: function () {\n\t\t\treturn this.$search().val();\n\t\t},\n\n\t\tsetValue: function ( val ) {\n\t\t\t// class\n\t\t\tif ( val ) {\n\t\t\t\tthis.$control().addClass( 'has-value' );\n\t\t\t} else {\n\t\t\t\tthis.$control().removeClass( 'has-value' );\n\t\t\t}\n\n\t\t\tacf.val( this.$input(), val );\n\t\t},\n\n\t\tshowLoading: function ( show ) {\n\t\t\tacf.showLoading( this.$( '.canvas' ) );\n\t\t},\n\n\t\thideLoading: function () {\n\t\t\tacf.hideLoading( this.$( '.canvas' ) );\n\t\t},\n\n\t\tmaybeSearch: function () {\n\t\t\t// vars\n\t\t\tvar prevUrl = this.val();\n\t\t\tvar url = this.getSearchVal();\n\n\t\t\t// no value\n\t\t\tif ( ! url ) {\n\t\t\t\treturn this.clear();\n\t\t\t}\n\n\t\t\t// fix missing 'http://' - causes the oembed code to error and fail\n\t\t\tif ( url.substr( 0, 4 ) != 'http' ) {\n\t\t\t\turl = 'http://' + url;\n\t\t\t}\n\n\t\t\t// bail early if no change\n\t\t\tif ( url === prevUrl ) return;\n\n\t\t\t// clear existing timeout\n\t\t\tvar timeout = this.get( 'timeout' );\n\t\t\tif ( timeout ) {\n\t\t\t\tclearTimeout( timeout );\n\t\t\t}\n\n\t\t\t// set new timeout\n\t\t\tvar callback = $.proxy( this.search, this, url );\n\t\t\tthis.set( 'timeout', setTimeout( callback, 300 ) );\n\t\t},\n\n\t\tsearch: function ( url ) {\n\t\t\t// ajax\n\t\t\tvar ajaxData = {\n\t\t\t\taction: 'acf/fields/oembed/search',\n\t\t\t\ts: url,\n\t\t\t\tfield_key: this.get( 'key' ),\n\t\t\t};\n\n\t\t\t// clear existing timeout\n\t\t\tvar xhr = this.get( 'xhr' );\n\t\t\tif ( xhr ) {\n\t\t\t\txhr.abort();\n\t\t\t}\n\n\t\t\t// loading\n\t\t\tthis.showLoading();\n\n\t\t\t// query\n\t\t\tvar xhr = $.ajax( {\n\t\t\t\turl: acf.get( 'ajaxurl' ),\n\t\t\t\tdata: acf.prepareForAjax( ajaxData ),\n\t\t\t\ttype: 'post',\n\t\t\t\tdataType: 'json',\n\t\t\t\tcontext: this,\n\t\t\t\tsuccess: function ( json ) {\n\t\t\t\t\t// error\n\t\t\t\t\tif ( ! json || ! json.html ) {\n\t\t\t\t\t\tjson = {\n\t\t\t\t\t\t\turl: false,\n\t\t\t\t\t\t\thtml: '',\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\t// update vars\n\t\t\t\t\tthis.val( json.url );\n\t\t\t\t\tthis.$( '.canvas-media' ).html( json.html );\n\t\t\t\t},\n\t\t\t\tcomplete: function () {\n\t\t\t\t\tthis.hideLoading();\n\t\t\t\t},\n\t\t\t} );\n\n\t\t\tthis.set( 'xhr', xhr );\n\t\t},\n\n\t\tclear: function () {\n\t\t\tthis.val( '' );\n\t\t\tthis.$search().val( '' );\n\t\t\tthis.$( '.canvas-media' ).html( '' );\n\t\t},\n\n\t\tonClickClear: function ( e, $el ) {\n\t\t\tthis.clear();\n\t\t},\n\n\t\tonKeypressSearch: function ( e, $el ) {\n\t\t\tif ( e.which == 13 ) {\n\t\t\t\te.preventDefault();\n\t\t\t\tthis.maybeSearch();\n\t\t\t}\n\t\t},\n\n\t\tonKeyupSearch: function ( e, $el ) {\n\t\t\tif ( $el.val() ) {\n\t\t\t\tthis.maybeSearch();\n\t\t\t}\n\t\t},\n\n\t\tonChangeSearch: function ( e, $el ) {\n\t\t\tthis.maybeSearch();\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.models.SelectField.extend( {\n\t\ttype: 'page_link',\n\t} );\n\n\tacf.registerFieldType( Field );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.models.SelectField.extend( {\n\t\ttype: 'post_object',\n\t} );\n\n\tacf.registerFieldType( Field );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'radio',\n\n\t\tevents: {\n\t\t\t'click input[type=\"radio\"]': 'onClick',\n\t\t},\n\n\t\t$control: function () {\n\t\t\treturn this.$( '.acf-radio-list' );\n\t\t},\n\n\t\t$input: function () {\n\t\t\treturn this.$( 'input:checked' );\n\t\t},\n\n\t\t$inputText: function () {\n\t\t\treturn this.$( 'input[type=\"text\"]' );\n\t\t},\n\n\t\tgetValue: function () {\n\t\t\tvar val = this.$input().val();\n\t\t\tif ( val === 'other' && this.get( 'other_choice' ) ) {\n\t\t\t\tval = this.$inputText().val();\n\t\t\t}\n\t\t\treturn val;\n\t\t},\n\n\t\tonClick: function ( e, $el ) {\n\t\t\t// vars\n\t\t\tvar $label = $el.parent( 'label' );\n\t\t\tvar selected = $label.hasClass( 'selected' );\n\t\t\tvar val = $el.val();\n\n\t\t\t// remove previous selected\n\t\t\tthis.$( '.selected' ).removeClass( 'selected' );\n\n\t\t\t// add active class\n\t\t\t$label.addClass( 'selected' );\n\n\t\t\t// allow null\n\t\t\tif ( this.get( 'allow_null' ) && selected ) {\n\t\t\t\t$label.removeClass( 'selected' );\n\t\t\t\t$el.prop( 'checked', false ).trigger( 'change' );\n\t\t\t\tval = false;\n\t\t\t}\n\n\t\t\t// other\n\t\t\tif ( this.get( 'other_choice' ) ) {\n\t\t\t\t// enable\n\t\t\t\tif ( val === 'other' ) {\n\t\t\t\t\tthis.$inputText().prop( 'disabled', false );\n\n\t\t\t\t\t// disable\n\t\t\t\t} else {\n\t\t\t\t\tthis.$inputText().prop( 'disabled', true );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'range',\n\n\t\tevents: {\n\t\t\t'input input[type=\"range\"]': 'onChange',\n\t\t\t'change input': 'onChange',\n\t\t},\n\n\t\t$input: function () {\n\t\t\treturn this.$( 'input[type=\"range\"]' );\n\t\t},\n\n\t\t$inputAlt: function () {\n\t\t\treturn this.$( 'input[type=\"number\"]' );\n\t\t},\n\n\t\tsetValue: function ( val ) {\n\t\t\tthis.busy = true;\n\n\t\t\t// Update range input (with change).\n\t\t\tacf.val( this.$input(), val );\n\n\t\t\t// Update alt input (without change).\n\t\t\t// Read in input value to inherit min/max validation.\n\t\t\tacf.val( this.$inputAlt(), this.$input().val(), true );\n\n\t\t\tthis.busy = false;\n\t\t},\n\n\t\tonChange: function ( e, $el ) {\n\t\t\tif ( ! this.busy ) {\n\t\t\t\tthis.setValue( $el.val() );\n\t\t\t}\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'relationship',\n\n\t\tevents: {\n\t\t\t'keypress [data-filter]': 'onKeypressFilter',\n\t\t\t'change [data-filter]': 'onChangeFilter',\n\t\t\t'keyup [data-filter]': 'onChangeFilter',\n\t\t\t'click .choices-list .acf-rel-item': 'onClickAdd',\n\t\t\t'keypress .choices-list .acf-rel-item': 'onKeypressFilter',\n\t\t\t'keypress .values-list .acf-rel-item': 'onKeypressFilter',\n\t\t\t'click [data-name=\"remove_item\"]': 'onClickRemove',\n\t\t},\n\n\t\t$control: function () {\n\t\t\treturn this.$( '.acf-relationship' );\n\t\t},\n\n\t\t$list: function ( list ) {\n\t\t\treturn this.$( '.' + list + '-list' );\n\t\t},\n\n\t\t$listItems: function ( list ) {\n\t\t\treturn this.$list( list ).find( '.acf-rel-item' );\n\t\t},\n\n\t\t$listItem: function ( list, id ) {\n\t\t\treturn this.$list( list ).find(\n\t\t\t\t'.acf-rel-item[data-id=\"' + id + '\"]'\n\t\t\t);\n\t\t},\n\n\t\tgetValue: function () {\n\t\t\tvar val = [];\n\t\t\tthis.$listItems( 'values' ).each( function () {\n\t\t\t\tval.push( $( this ).data( 'id' ) );\n\t\t\t} );\n\t\t\treturn val.length ? val : false;\n\t\t},\n\n\t\tnewChoice: function ( props ) {\n\t\t\treturn [\n\t\t\t\t'
',\n\t\t\t].join( '' );\n\t\t},\n\n\t\tnewValue: function ( props ) {\n\t\t\treturn [\n\t\t\t\t'
',\n\t\t\t].join( '' );\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\t// Delay initialization until \"interacted with\" or \"in view\".\n\t\t\tvar delayed = this.proxy(\n\t\t\t\tacf.once( function () {\n\t\t\t\t\t// Add sortable.\n\t\t\t\t\tthis.$list( 'values' ).sortable( {\n\t\t\t\t\t\titems: 'li',\n\t\t\t\t\t\tforceHelperSize: true,\n\t\t\t\t\t\tforcePlaceholderSize: true,\n\t\t\t\t\t\tscroll: true,\n\t\t\t\t\t\tupdate: this.proxy( function () {\n\t\t\t\t\t\t\tthis.$input().trigger( 'change' );\n\t\t\t\t\t\t} ),\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Avoid browser remembering old scroll position and add event.\n\t\t\t\t\tthis.$list( 'choices' )\n\t\t\t\t\t\t.scrollTop( 0 )\n\t\t\t\t\t\t.on( 'scroll', this.proxy( this.onScrollChoices ) );\n\n\t\t\t\t\t// Fetch choices.\n\t\t\t\t\tthis.fetch();\n\t\t\t\t} )\n\t\t\t);\n\n\t\t\t// Bind \"interacted with\".\n\t\t\tthis.$el.one( 'mouseover', delayed );\n\t\t\tthis.$el.one( 'focus', 'input', delayed );\n\n\t\t\t// Bind \"in view\".\n\t\t\tacf.onceInView( this.$el, delayed );\n\t\t},\n\n\t\tonScrollChoices: function ( e ) {\n\t\t\t// bail early if no more results\n\t\t\tif ( this.get( 'loading' ) || ! this.get( 'more' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Scrolled to bottom\n\t\t\tvar $list = this.$list( 'choices' );\n\t\t\tvar scrollTop = Math.ceil( $list.scrollTop() );\n\t\t\tvar scrollHeight = Math.ceil( $list[ 0 ].scrollHeight );\n\t\t\tvar innerHeight = Math.ceil( $list.innerHeight() );\n\t\t\tvar paged = this.get( 'paged' ) || 1;\n\t\t\tif ( scrollTop + innerHeight >= scrollHeight ) {\n\t\t\t\t// update paged\n\t\t\t\tthis.set( 'paged', paged + 1 );\n\n\t\t\t\t// fetch\n\t\t\t\tthis.fetch();\n\t\t\t}\n\t\t},\n\n\t\tonKeypressFilter: function ( e, $el ) {\n\t\t\t// Receive enter key when selecting relationship items.\n\t\t\tif ( $el.hasClass( 'acf-rel-item-add' ) && e.which == 13 ) {\n\t\t\t\tthis.onClickAdd(e, $el);\n\t\t\t}\n\t\t\t// Receive enter key when removing relationship items.\n\t\t\tif ( $el.hasClass( 'acf-rel-item-remove' ) && e.which == 13 ) {\n\t\t\t\tthis.onClickRemove(e, $el);\n\t\t\t}\n\t\t\t// don't submit form\n\t\t\tif ( e.which == 13 ) {\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t},\n\n\t\tonChangeFilter: function ( e, $el ) {\n\t\t\t// vars\n\t\t\tvar val = $el.val();\n\t\t\tvar filter = $el.data( 'filter' );\n\n\t\t\t// Bail early if filter has not changed\n\t\t\tif ( this.get( filter ) === val ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// update attr\n\t\t\tthis.set( filter, val );\n\n\t\t\t// reset paged\n\t\t\tthis.set( 'paged', 1 );\n\n\t\t\t// fetch\n\t\t\tif ( $el.is( 'select' ) ) {\n\t\t\t\tthis.fetch();\n\n\t\t\t\t// search must go through timeout\n\t\t\t} else {\n\t\t\t\tthis.maybeFetch();\n\t\t\t}\n\t\t},\n\n\t\tonClickAdd: function ( e, $el ) {\n\t\t\t// vars\n\t\t\tvar val = this.val();\n\t\t\tvar max = parseInt( this.get( 'max' ) );\n\n\t\t\t// can be added?\n\t\t\tif ( $el.hasClass( 'disabled' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// validate\n\t\t\tif ( max > 0 && val && val.length >= max ) {\n\t\t\t\t// add notice\n\t\t\t\tthis.showNotice( {\n\t\t\t\t\ttext: acf\n\t\t\t\t\t\t.__( 'Maximum values reached ( {max} values )' )\n\t\t\t\t\t\t.replace( '{max}', max ),\n\t\t\t\t\ttype: 'warning',\n\t\t\t\t} );\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// disable\n\t\t\t$el.addClass( 'disabled' );\n\n\t\t\t// add\n\t\t\tvar html = this.newValue( {\n\t\t\t\tid: $el.data( 'id' ),\n\t\t\t\ttext: $el.html(),\n\t\t\t} );\n\t\t\tthis.$list( 'values' ).append( html );\n\n\t\t\t// trigger change\n\t\t\tthis.$input().trigger( 'change' );\n\t\t},\n\n\t\tonClickRemove: function ( e, $el ) {\n\t\t\t// Prevent default here because generic handler wont be triggered.\n\t\t\te.preventDefault();\n\n\t\t\tlet $span;\n\t\t\t// Behavior if triggered from tabbed event.\n\t\t\tif ( $el.hasClass( 'acf-rel-item-remove' )) {\n\t\t\t\t$span = $el;\n\t\t\t} else {\n\t\t\t\t// Behavior if triggered through click event.\n\t\t\t\t$span = $el.parent();\n\t\t\t}\n\n\t\t\t// vars\n\t\t\tconst $li = $span.parent();\n\t\t\tconst id = $span.data( 'id' );\n\n\t\t\t// remove value\n\t\t\t$li.remove();\n\n\t\t\t// show choice\n\t\t\tthis.$listItem( 'choices', id ).removeClass( 'disabled' );\n\n\t\t\t// trigger change\n\t\t\tthis.$input().trigger( 'change' );\n\t\t},\n\n\t\tmaybeFetch: function () {\n\t\t\t// vars\n\t\t\tvar timeout = this.get( 'timeout' );\n\n\t\t\t// abort timeout\n\t\t\tif ( timeout ) {\n\t\t\t\tclearTimeout( timeout );\n\t\t\t}\n\n\t\t\t// fetch\n\t\t\ttimeout = this.setTimeout( this.fetch, 300 );\n\t\t\tthis.set( 'timeout', timeout );\n\t\t},\n\n\t\tgetAjaxData: function () {\n\t\t\t// load data based on element attributes\n\t\t\tvar ajaxData = this.$control().data();\n\t\t\tfor ( var name in ajaxData ) {\n\t\t\t\tajaxData[ name ] = this.get( name );\n\t\t\t}\n\n\t\t\t// extra\n\t\t\tajaxData.action = 'acf/fields/relationship/query';\n\t\t\tajaxData.field_key = this.get( 'key' );\n\n\t\t\t// Filter.\n\t\t\tajaxData = acf.applyFilters(\n\t\t\t\t'relationship_ajax_data',\n\t\t\t\tajaxData,\n\t\t\t\tthis\n\t\t\t);\n\n\t\t\t// return\n\t\t\treturn ajaxData;\n\t\t},\n\n\t\tfetch: function () {\n\t\t\t// abort XHR if this field is already loading AJAX data\n\t\t\tvar xhr = this.get( 'xhr' );\n\t\t\tif ( xhr ) {\n\t\t\t\txhr.abort();\n\t\t\t}\n\n\t\t\t// add to this.o\n\t\t\tvar ajaxData = this.getAjaxData();\n\n\t\t\t// clear html if is new query\n\t\t\tvar $choiceslist = this.$list( 'choices' );\n\t\t\tif ( ajaxData.paged == 1 ) {\n\t\t\t\t$choiceslist.html( '' );\n\t\t\t}\n\n\t\t\t// loading\n\t\t\tvar $loading = $(\n\t\t\t\t'
'\n\t\t\t);\n\t\t\t$choiceslist.append( $loading );\n\t\t\tthis.set( 'loading', true );\n\n\t\t\t// callback\n\t\t\tvar onComplete = function () {\n\t\t\t\tthis.set( 'loading', false );\n\t\t\t\t$loading.remove();\n\t\t\t};\n\n\t\t\tvar onSuccess = function ( json ) {\n\t\t\t\t// no results\n\t\t\t\tif ( ! json || ! json.results || ! json.results.length ) {\n\t\t\t\t\t// prevent pagination\n\t\t\t\t\tthis.set( 'more', false );\n\n\t\t\t\t\t// add message\n\t\t\t\t\tif ( this.get( 'paged' ) == 1 ) {\n\t\t\t\t\t\tthis.$list( 'choices' ).append(\n\t\t\t\t\t\t\t'
'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// return\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// set more (allows pagination scroll)\n\t\t\t\tthis.set( 'more', json.more );\n\n\t\t\t\t// get new results\n\t\t\t\tvar html = this.walkChoices( json.results );\n\t\t\t\tvar $html = $( html );\n\n\t\t\t\t// apply .disabled to left li's\n\t\t\t\tvar val = this.val();\n\t\t\t\tif ( val && val.length ) {\n\t\t\t\t\tval.map( function ( id ) {\n\t\t\t\t\t\t$html\n\t\t\t\t\t\t\t.find( '.acf-rel-item[data-id=\"' + id + '\"]' )\n\t\t\t\t\t\t\t.addClass( 'disabled' );\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t// append\n\t\t\t\t$choiceslist.append( $html );\n\n\t\t\t\t// merge together groups\n\t\t\t\tvar $prevLabel = false;\n\t\t\t\tvar $prevList = false;\n\n\t\t\t\t$choiceslist.find( '.acf-rel-label' ).each( function () {\n\t\t\t\t\tvar $label = $( this );\n\t\t\t\t\tvar $list = $label.siblings( 'ul' );\n\n\t\t\t\t\tif ( $prevLabel && $prevLabel.text() == $label.text() ) {\n\t\t\t\t\t\t$prevList.append( $list.children() );\n\t\t\t\t\t\t$( this ).parent().remove();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// update vars\n\t\t\t\t\t$prevLabel = $label;\n\t\t\t\t\t$prevList = $list;\n\t\t\t\t} );\n\t\t\t};\n\n\t\t\t// get results\n\t\t\tvar xhr = $.ajax( {\n\t\t\t\turl: acf.get( 'ajaxurl' ),\n\t\t\t\tdataType: 'json',\n\t\t\t\ttype: 'post',\n\t\t\t\tdata: acf.prepareForAjax( ajaxData ),\n\t\t\t\tcontext: this,\n\t\t\t\tsuccess: onSuccess,\n\t\t\t\tcomplete: onComplete,\n\t\t\t} );\n\n\t\t\t// set\n\t\t\tthis.set( 'xhr', xhr );\n\t\t},\n\n\t\twalkChoices: function ( data ) {\n\t\t\t// walker\n\t\t\tvar walk = function ( data ) {\n\t\t\t\t// vars\n\t\t\t\tvar html = '';\n\n\t\t\t\t// is array\n\t\t\t\tif ( $.isArray( data ) ) {\n\t\t\t\t\tdata.map( function ( item ) {\n\t\t\t\t\t\thtml += walk( item );\n\t\t\t\t\t} );\n\n\t\t\t\t\t// is item\n\t\t\t\t} else if ( $.isPlainObject( data ) ) {\n\t\t\t\t\t// group\n\t\t\t\t\tif ( data.children !== undefined ) {\n\t\t\t\t\t\thtml +=\n\t\t\t\t\t\t\t'
';\n\n\t\t\t\t\t\t// single\n\t\t\t\t\t} else {\n\t\t\t\t\t\thtml +=\n\t\t\t\t\t\t\t'
';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// return\n\t\t\t\treturn html;\n\t\t\t};\n\n\t\t\treturn walk( data );\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'select',\n\n\t\tselect2: false,\n\n\t\twait: 'load',\n\n\t\tevents: {\n\t\t\tremoveField: 'onRemove',\n\t\t\tduplicateField: 'onDuplicate',\n\t\t},\n\n\t\t$input: function () {\n\t\t\treturn this.$( 'select' );\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\t// vars\n\t\t\tvar $select = this.$input();\n\n\t\t\t// inherit data\n\t\t\tthis.inherit( $select );\n\n\t\t\t// select2\n\t\t\tif ( this.get( 'ui' ) ) {\n\t\t\t\t// populate ajax_data (allowing custom attribute to already exist)\n\t\t\t\tvar ajaxAction = this.get( 'ajax_action' );\n\t\t\t\tif ( ! ajaxAction ) {\n\t\t\t\t\tajaxAction = 'acf/fields/' + this.get( 'type' ) + '/query';\n\t\t\t\t}\n\n\t\t\t\t// select2\n\t\t\t\tthis.select2 = acf.newSelect2( $select, {\n\t\t\t\t\tfield: this,\n\t\t\t\t\tajax: this.get( 'ajax' ),\n\t\t\t\t\tmultiple: this.get( 'multiple' ),\n\t\t\t\t\tplaceholder: this.get( 'placeholder' ),\n\t\t\t\t\tallowNull: this.get( 'allow_null' ),\n\t\t\t\t\tajaxAction: ajaxAction,\n\t\t\t\t} );\n\t\t\t}\n\t\t},\n\n\t\tonRemove: function () {\n\t\t\tif ( this.select2 ) {\n\t\t\t\tthis.select2.destroy();\n\t\t\t}\n\t\t},\n\n\t\tonDuplicate: function ( e, $el, $duplicate ) {\n\t\t\tif ( this.select2 ) {\n\t\t\t\t$duplicate.find( '.select2-container' ).remove();\n\t\t\t\t$duplicate\n\t\t\t\t\t.find( 'select' )\n\t\t\t\t\t.removeClass( 'select2-hidden-accessible' );\n\t\t\t}\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n} )( jQuery );\n","( function ( $, undefined ) {\n\t// vars\n\tvar CONTEXT = 'tab';\n\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'tab',\n\n\t\twait: '',\n\n\t\ttabs: false,\n\n\t\ttab: false,\n\n\t\tevents: {\n\t\t\tduplicateField: 'onDuplicate',\n\t\t},\n\n\t\tfindFields: function () {\n\t\t\tlet filter = '.acf-field';\n\n\t\t\tif ( this.get( 'key' ) === 'acf_field_settings_tabs' ) {\n\t\t\t\tfilter = '.acf-field-settings-main';\n\t\t\t}\n\n\t\t\tif ( this.get( 'key' ) === 'acf_field_group_settings_tabs' ) {\n\t\t\t\tfilter = '.field-group-settings-tab';\n\t\t\t}\n\n\t\t\tif ( this.get( 'key' ) === 'acf_browse_fields_tabs' ) {\n\t\t\t\tfilter = '.acf-field-types-tab';\n\t\t\t}\n\n\t\t\treturn this.$el.nextUntil( '.acf-field-tab', filter );\n\t\t},\n\n\t\tgetFields: function () {\n\t\t\treturn acf.getFields( this.findFields() );\n\t\t},\n\n\t\tfindTabs: function () {\n\t\t\treturn this.$el.prevAll( '.acf-tab-wrap:first' );\n\t\t},\n\n\t\tfindTab: function () {\n\t\t\treturn this.$( '.acf-tab-button' );\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\t// bail early if is td\n\t\t\tif ( this.$el.is( 'td' ) ) {\n\t\t\t\tthis.events = {};\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// vars\n\t\t\tvar $tabs = this.findTabs();\n\t\t\tvar $tab = this.findTab();\n\t\t\tvar settings = acf.parseArgs( $tab.data(), {\n\t\t\t\tendpoint: false,\n\t\t\t\tplacement: '',\n\t\t\t\tbefore: this.$el,\n\t\t\t} );\n\n\t\t\t// create wrap\n\t\t\tif ( ! $tabs.length || settings.endpoint ) {\n\t\t\t\tthis.tabs = new Tabs( settings );\n\t\t\t} else {\n\t\t\t\tthis.tabs = $tabs.data( 'acf' );\n\t\t\t}\n\n\t\t\t// add tab\n\t\t\tthis.tab = this.tabs.addTab( $tab, this );\n\t\t},\n\n\t\tisActive: function () {\n\t\t\treturn this.tab.isActive();\n\t\t},\n\n\t\tshowFields: function () {\n\t\t\t// show fields\n\t\t\tthis.getFields().map( function ( field ) {\n\t\t\t\tfield.show( this.cid, CONTEXT );\n\t\t\t\tfield.hiddenByTab = false;\n\t\t\t}, this );\n\t\t},\n\n\t\thideFields: function () {\n\t\t\t// hide fields\n\t\t\tthis.getFields().map( function ( field ) {\n\t\t\t\tfield.hide( this.cid, CONTEXT );\n\t\t\t\tfield.hiddenByTab = this.tab;\n\t\t\t}, this );\n\t\t},\n\n\t\tshow: function ( lockKey ) {\n\t\t\t// show field and store result\n\t\t\tvar visible = acf.Field.prototype.show.apply( this, arguments );\n\n\t\t\t// check if now visible\n\t\t\tif ( visible ) {\n\t\t\t\t// show tab\n\t\t\t\tthis.tab.show();\n\n\t\t\t\t// check active tabs\n\t\t\t\tthis.tabs.refresh();\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn visible;\n\t\t},\n\n\t\thide: function ( lockKey ) {\n\t\t\t// hide field and store result\n\t\t\tvar hidden = acf.Field.prototype.hide.apply( this, arguments );\n\n\t\t\t// check if now hidden\n\t\t\tif ( hidden ) {\n\t\t\t\t// hide tab\n\t\t\t\tthis.tab.hide();\n\n\t\t\t\t// reset tabs if this was active\n\t\t\t\tif ( this.isActive() ) {\n\t\t\t\t\tthis.tabs.reset();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn hidden;\n\t\t},\n\n\t\tenable: function ( lockKey ) {\n\t\t\t// enable fields\n\t\t\tthis.getFields().map( function ( field ) {\n\t\t\t\tfield.enable( CONTEXT );\n\t\t\t} );\n\t\t},\n\n\t\tdisable: function ( lockKey ) {\n\t\t\t// disable fields\n\t\t\tthis.getFields().map( function ( field ) {\n\t\t\t\tfield.disable( CONTEXT );\n\t\t\t} );\n\t\t},\n\n\t\tonDuplicate: function ( e, $el, $duplicate ) {\n\t\t\tif ( this.isActive() ) {\n\t\t\t\t$duplicate.prevAll( '.acf-tab-wrap:first' ).remove();\n\t\t\t}\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n\n\t/**\n\t * tabs\n\t *\n\t * description\n\t *\n\t * @date\t8/2/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tvar i = 0;\n\tvar Tabs = acf.Model.extend( {\n\t\ttabs: [],\n\n\t\tactive: false,\n\n\t\tactions: {\n\t\t\trefresh: 'onRefresh',\n\t\t\tclose_field_object: 'onCloseFieldObject',\n\t\t},\n\n\t\tdata: {\n\t\t\tbefore: false,\n\t\t\tplacement: 'top',\n\t\t\tindex: 0,\n\t\t\tinitialized: false,\n\t\t},\n\n\t\tsetup: function ( settings ) {\n\t\t\t// data\n\t\t\t$.extend( this.data, settings );\n\n\t\t\t// define this prop to avoid scope issues\n\t\t\tthis.tabs = [];\n\t\t\tthis.active = false;\n\n\t\t\t// vars\n\t\t\tvar placement = this.get( 'placement' );\n\t\t\tvar $before = this.get( 'before' );\n\t\t\tvar $parent = $before.parent();\n\n\t\t\t// add sidebar for left placement\n\t\t\tif ( placement == 'left' && $parent.hasClass( 'acf-fields' ) ) {\n\t\t\t\t$parent.addClass( '-sidebar' );\n\t\t\t}\n\n\t\t\t// create wrap\n\t\t\tif ( $before.is( 'tr' ) ) {\n\t\t\t\tthis.$el = $(\n\t\t\t\t\t'
'\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tlet ulClass = 'acf-hl acf-tab-group';\n\n\t\t\t\tif ( this.get( 'key' ) === 'acf_field_settings_tabs' ) {\n\t\t\t\t\tulClass = 'acf-field-settings-tab-bar';\n\t\t\t\t}\n\n\t\t\t\tthis.$el = $(\n\t\t\t\t\t'
'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// append\n\t\t\t$before.before( this.$el );\n\n\t\t\t// set index\n\t\t\tthis.set( 'index', i, true );\n\t\t\ti++;\n\t\t},\n\n\t\tinitializeTabs: function () {\n\t\t\t// Bail if tabs are disabled.\n\t\t\tif (\n\t\t\t\t'acf_field_settings_tabs' === this.get( 'key' ) &&\n\t\t\t\t$( '#acf-field-group-fields' ).hasClass( 'hide-tabs' )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// find first visible tab\n\t\t\tvar tab = this.getVisible().shift();\n\n\t\t\t// remember previous tab state\n\t\t\tvar order = acf.getPreference( 'this.tabs' ) || [];\n\t\t\tvar groupIndex = this.get( 'index' );\n\t\t\tvar tabIndex = order[ groupIndex ];\n\n\t\t\tif ( this.tabs[ tabIndex ] && this.tabs[ tabIndex ].isVisible() ) {\n\t\t\t\ttab = this.tabs[ tabIndex ];\n\t\t\t}\n\n\t\t\t// select\n\t\t\tif ( tab ) {\n\t\t\t\tthis.selectTab( tab );\n\t\t\t} else {\n\t\t\t\tthis.closeTabs();\n\t\t\t}\n\n\t\t\t// set local variable used by tabsManager\n\t\t\tthis.set( 'initialized', true );\n\t\t},\n\n\t\tgetVisible: function () {\n\t\t\treturn this.tabs.filter( function ( tab ) {\n\t\t\t\treturn tab.isVisible();\n\t\t\t} );\n\t\t},\n\n\t\tgetActive: function () {\n\t\t\treturn this.active;\n\t\t},\n\n\t\tsetActive: function ( tab ) {\n\t\t\treturn ( this.active = tab );\n\t\t},\n\n\t\thasActive: function () {\n\t\t\treturn this.active !== false;\n\t\t},\n\n\t\tisActive: function ( tab ) {\n\t\t\tvar active = this.getActive();\n\t\t\treturn active && active.cid === tab.cid;\n\t\t},\n\n\t\tcloseActive: function () {\n\t\t\tif ( this.hasActive() ) {\n\t\t\t\tthis.closeTab( this.getActive() );\n\t\t\t}\n\t\t},\n\n\t\topenTab: function ( tab ) {\n\t\t\t// close existing tab\n\t\t\tthis.closeActive();\n\n\t\t\t// open\n\t\t\ttab.open();\n\n\t\t\t// set active\n\t\t\tthis.setActive( tab );\n\t\t},\n\n\t\tcloseTab: function ( tab ) {\n\t\t\t// close\n\t\t\ttab.close();\n\n\t\t\t// set active\n\t\t\tthis.setActive( false );\n\t\t},\n\n\t\tcloseTabs: function () {\n\t\t\tthis.tabs.map( this.closeTab, this );\n\t\t},\n\n\t\tselectTab: function ( tab ) {\n\t\t\t// close other tabs\n\t\t\tthis.tabs.map( function ( t ) {\n\t\t\t\tif ( tab.cid !== t.cid ) {\n\t\t\t\t\tthis.closeTab( t );\n\t\t\t\t}\n\t\t\t}, this );\n\n\t\t\t// open\n\t\t\tthis.openTab( tab );\n\t\t},\n\n\t\taddTab: function ( $a, field ) {\n\t\t\t// create
' );\n\n\t\t\t// add settings type class.\n\t\t\tvar classes = $a.attr( 'class' ).replace( 'acf-tab-button', '' );\n\t\t\t$li.addClass( classes );\n\n\t\t\t// append\n\t\t\tthis.$( 'ul' ).append( $li );\n\n\t\t\t// initialize\n\t\t\tvar tab = new Tab( {\n\t\t\t\t$el: $li,\n\t\t\t\tfield: field,\n\t\t\t\tgroup: this,\n\t\t\t} );\n\n\t\t\t// store\n\t\t\tthis.tabs.push( tab );\n\n\t\t\t// return\n\t\t\treturn tab;\n\t\t},\n\n\t\treset: function () {\n\t\t\t// close existing tab\n\t\t\tthis.closeActive();\n\n\t\t\t// find and active a tab\n\t\t\treturn this.refresh();\n\t\t},\n\n\t\trefresh: function () {\n\t\t\t// bail early if active already exists\n\t\t\tif ( this.hasActive() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// find next active tab\n\t\t\tvar tab = this.getVisible().shift();\n\t\t\t// open tab\n\t\t\tif ( tab ) {\n\t\t\t\tthis.openTab( tab );\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn tab;\n\t\t},\n\n\t\tonRefresh: function () {\n\t\t\t// only for left placements\n\t\t\tif ( this.get( 'placement' ) !== 'left' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// vars\n\t\t\tvar $parent = this.$el.parent();\n\t\t\tvar $list = this.$el.children( 'ul' );\n\t\t\tvar attribute = $parent.is( 'td' ) ? 'height' : 'min-height';\n\n\t\t\t// find height (minus 1 for border-bottom)\n\t\t\tvar height = $list.position().top + $list.outerHeight( true ) - 1;\n\n\t\t\t// add css\n\t\t\t$parent.css( attribute, height );\n\t\t},\n\n\t\tonCloseFieldObject: function ( fieldObject ) {\n\t\t\tconst tab = this.getVisible().find( ( item ) => {\n\t\t\t\tconst id = item.$el.closest( 'div[data-id]' ).data( 'id' );\n\t\t\t\tif ( fieldObject.data.id === id ) {\n\t\t\t\t\treturn item;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tif ( tab ) {\n\t\t\t\t// Wait for field group drawer to close\n\t\t\t\tsetTimeout( () => {\n\t\t\t\t\tthis.openTab( tab );\n\t\t\t\t}, 300 );\n\t\t\t}\n\t\t},\n\t} );\n\n\tvar Tab = acf.Model.extend( {\n\t\tgroup: false,\n\n\t\tfield: false,\n\n\t\tevents: {\n\t\t\t'click a': 'onClick',\n\t\t},\n\n\t\tindex: function () {\n\t\t\treturn this.$el.index();\n\t\t},\n\n\t\tisVisible: function () {\n\t\t\treturn acf.isVisible( this.$el );\n\t\t},\n\n\t\tisActive: function () {\n\t\t\treturn this.$el.hasClass( 'active' );\n\t\t},\n\n\t\topen: function () {\n\t\t\t// add class\n\t\t\tthis.$el.addClass( 'active' );\n\n\t\t\t// show field\n\t\t\tthis.field.showFields();\n\t\t},\n\n\t\tclose: function () {\n\t\t\t// remove class\n\t\t\tthis.$el.removeClass( 'active' );\n\n\t\t\t// hide field\n\t\t\tthis.field.hideFields();\n\t\t},\n\n\t\tonClick: function ( e, $el ) {\n\t\t\t// prevent default\n\t\t\te.preventDefault();\n\n\t\t\t// toggle\n\t\t\tthis.toggle();\n\t\t},\n\n\t\ttoggle: function () {\n\t\t\t// bail early if already active\n\t\t\tif ( this.isActive() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// toggle this tab\n\t\t\tthis.group.openTab( this );\n\t\t},\n\t} );\n\n\tvar tabsManager = new acf.Model( {\n\t\tpriority: 50,\n\n\t\tactions: {\n\t\t\tprepare: 'render',\n\t\t\tappend: 'render',\n\t\t\tunload: 'onUnload',\n\t\t\tshow: 'render',\n\t\t\tinvalid_field: 'onInvalidField',\n\t\t},\n\n\t\tfindTabs: function () {\n\t\t\treturn $( '.acf-tab-wrap' );\n\t\t},\n\n\t\tgetTabs: function () {\n\t\t\treturn acf.getInstances( this.findTabs() );\n\t\t},\n\n\t\trender: function ( $el ) {\n\t\t\tthis.getTabs().map( function ( tabs ) {\n\t\t\t\tif ( ! tabs.get( 'initialized' ) ) {\n\t\t\t\t\ttabs.initializeTabs();\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\n\t\tonInvalidField: function ( field ) {\n\t\t\t// bail early if busy\n\t\t\tif ( this.busy ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// ignore if not hidden by tab\n\t\t\tif ( ! field.hiddenByTab ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// toggle tab\n\t\t\tfield.hiddenByTab.toggle();\n\n\t\t\t// ignore other invalid fields\n\t\t\tthis.busy = true;\n\t\t\tthis.setTimeout( function () {\n\t\t\t\tthis.busy = false;\n\t\t\t}, 100 );\n\t\t},\n\n\t\tonUnload: function () {\n\t\t\t// vars\n\t\t\tvar order = [];\n\n\t\t\t// loop\n\t\t\tthis.getTabs().map( function ( group ) {\n\t\t\t\t// Do not save selected tab on field settings, or an acf-advanced-settings when unloading\n\t\t\t\tif (\n\t\t\t\t\tgroup.$el.children( '.acf-field-settings-tab-bar' )\n\t\t\t\t\t\t.length ||\n\t\t\t\t\tgroup.$el.parents( '#acf-advanced-settings.postbox' ).length\n\t\t\t\t) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tvar active = group.hasActive() ? group.getActive().index() : 0;\n\t\t\t\torder.push( active );\n\t\t\t} );\n\n\t\t\t// bail if no tabs\n\t\t\tif ( ! order.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// update\n\t\t\tacf.setPreference( 'this.tabs', order );\n\t\t},\n\t} );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'taxonomy',\n\n\t\tdata: {\n\t\t\tftype: 'select',\n\t\t},\n\n\t\tselect2: false,\n\n\t\twait: 'load',\n\n\t\tevents: {\n\t\t\t'click a[data-name=\"add\"]': 'onClickAdd',\n\t\t\t'click input[type=\"radio\"]': 'onClickRadio',\n\t\t\tremoveField: 'onRemove',\n\t\t},\n\n\t\t$control: function () {\n\t\t\treturn this.$( '.acf-taxonomy-field' );\n\t\t},\n\n\t\t$input: function () {\n\t\t\treturn this.getRelatedPrototype().$input.apply( this, arguments );\n\t\t},\n\n\t\tgetRelatedType: function () {\n\t\t\t// vars\n\t\t\tvar fieldType = this.get( 'ftype' );\n\n\t\t\t// normalize\n\t\t\tif ( fieldType == 'multi_select' ) {\n\t\t\t\tfieldType = 'select';\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn fieldType;\n\t\t},\n\n\t\tgetRelatedPrototype: function () {\n\t\t\treturn acf.getFieldType( this.getRelatedType() ).prototype;\n\t\t},\n\n\t\tgetValue: function () {\n\t\t\treturn this.getRelatedPrototype().getValue.apply( this, arguments );\n\t\t},\n\n\t\tsetValue: function () {\n\t\t\treturn this.getRelatedPrototype().setValue.apply( this, arguments );\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\tthis.getRelatedPrototype().initialize.apply( this, arguments );\n\t\t},\n\n\t\tonRemove: function () {\n\t\t\tvar proto = this.getRelatedPrototype();\n\t\t\tif ( proto.onRemove ) {\n\t\t\t\tproto.onRemove.apply( this, arguments );\n\t\t\t}\n\t\t},\n\n\t\tonClickAdd: function ( e, $el ) {\n\t\t\t// vars\n\t\t\tvar field = this;\n\t\t\tvar popup = false;\n\t\t\tvar $form = false;\n\t\t\tvar $name = false;\n\t\t\tvar $parent = false;\n\t\t\tvar $button = false;\n\t\t\tvar $message = false;\n\t\t\tvar notice = false;\n\n\t\t\t// step 1.\n\t\t\tvar step1 = function () {\n\t\t\t\t// popup\n\t\t\t\tpopup = acf.newPopup( {\n\t\t\t\t\ttitle: $el.attr( 'title' ),\n\t\t\t\t\tloading: true,\n\t\t\t\t\twidth: '300px',\n\t\t\t\t} );\n\n\t\t\t\t// ajax\n\t\t\t\tvar ajaxData = {\n\t\t\t\t\taction: 'acf/fields/taxonomy/add_term',\n\t\t\t\t\tfield_key: field.get( 'key' ),\n\t\t\t\t};\n\n\t\t\t\t// get HTML\n\t\t\t\t$.ajax( {\n\t\t\t\t\turl: acf.get( 'ajaxurl' ),\n\t\t\t\t\tdata: acf.prepareForAjax( ajaxData ),\n\t\t\t\t\ttype: 'post',\n\t\t\t\t\tdataType: 'html',\n\t\t\t\t\tsuccess: step2,\n\t\t\t\t} );\n\t\t\t};\n\n\t\t\t// step 2.\n\t\t\tvar step2 = function ( html ) {\n\t\t\t\t// update popup\n\t\t\t\tpopup.loading( false );\n\t\t\t\tpopup.content( html );\n\n\t\t\t\t// vars\n\t\t\t\t$form = popup.$( 'form' );\n\t\t\t\t$name = popup.$( 'input[name=\"term_name\"]' );\n\t\t\t\t$parent = popup.$( 'select[name=\"term_parent\"]' );\n\t\t\t\t$button = popup.$( '.acf-submit-button' );\n\n\t\t\t\t// focus\n\t\t\t\t$name.trigger( 'focus' );\n\n\t\t\t\t// submit form\n\t\t\t\tpopup.on( 'submit', 'form', step3 );\n\t\t\t};\n\n\t\t\t// step 3.\n\t\t\tvar step3 = function ( e, $el ) {\n\t\t\t\t// prevent\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopImmediatePropagation();\n\n\t\t\t\t// basic validation\n\t\t\t\tif ( $name.val() === '' ) {\n\t\t\t\t\t$name.trigger( 'focus' );\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// disable\n\t\t\t\tacf.startButtonLoading( $button );\n\n\t\t\t\t// ajax\n\t\t\t\tvar ajaxData = {\n\t\t\t\t\taction: 'acf/fields/taxonomy/add_term',\n\t\t\t\t\tfield_key: field.get( 'key' ),\n\t\t\t\t\tterm_name: $name.val(),\n\t\t\t\t\tterm_parent: $parent.length ? $parent.val() : 0,\n\t\t\t\t};\n\n\t\t\t\t$.ajax( {\n\t\t\t\t\turl: acf.get( 'ajaxurl' ),\n\t\t\t\t\tdata: acf.prepareForAjax( ajaxData ),\n\t\t\t\t\ttype: 'post',\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tsuccess: step4,\n\t\t\t\t} );\n\t\t\t};\n\n\t\t\t// step 4.\n\t\t\tvar step4 = function ( json ) {\n\t\t\t\t// enable\n\t\t\t\tacf.stopButtonLoading( $button );\n\n\t\t\t\t// remove prev notice\n\t\t\t\tif ( notice ) {\n\t\t\t\t\tnotice.remove();\n\t\t\t\t}\n\n\t\t\t\t// success\n\t\t\t\tif ( acf.isAjaxSuccess( json ) ) {\n\t\t\t\t\t// clear name\n\t\t\t\t\t$name.val( '' );\n\n\t\t\t\t\t// update term lists\n\t\t\t\t\tstep5( json.data );\n\n\t\t\t\t\t// notice\n\t\t\t\t\tnotice = acf.newNotice( {\n\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\ttext: acf.getAjaxMessage( json ),\n\t\t\t\t\t\ttarget: $form,\n\t\t\t\t\t\ttimeout: 2000,\n\t\t\t\t\t\tdismiss: false,\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\t// notice\n\t\t\t\t\tnotice = acf.newNotice( {\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\ttext: acf.getAjaxError( json ),\n\t\t\t\t\t\ttarget: $form,\n\t\t\t\t\t\ttimeout: 2000,\n\t\t\t\t\t\tdismiss: false,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t// focus\n\t\t\t\t$name.trigger( 'focus' );\n\t\t\t};\n\n\t\t\t// step 5.\n\t\t\tvar step5 = function ( term ) {\n\t\t\t\t// update parent dropdown\n\t\t\t\tvar $option = $(\n\t\t\t\t\t'
'\n\t\t\t\t);\n\t\t\t\tif ( term.term_parent ) {\n\t\t\t\t\t$parent\n\t\t\t\t\t\t.children( 'option[value=\"' + term.term_parent + '\"]' )\n\t\t\t\t\t\t.after( $option );\n\t\t\t\t} else {\n\t\t\t\t\t$parent.append( $option );\n\t\t\t\t}\n\n\t\t\t\t// add this new term to all taxonomy field\n\t\t\t\tvar fields = acf.getFields( {\n\t\t\t\t\ttype: 'taxonomy',\n\t\t\t\t} );\n\n\t\t\t\tfields.map( function ( otherField ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\totherField.get( 'taxonomy' ) == field.get( 'taxonomy' )\n\t\t\t\t\t) {\n\t\t\t\t\t\totherField.appendTerm( term );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\t// select\n\t\t\t\tfield.selectTerm( term.term_id );\n\t\t\t};\n\n\t\t\t// run\n\t\t\tstep1();\n\t\t},\n\n\t\tappendTerm: function ( term ) {\n\t\t\tif ( this.getRelatedType() == 'select' ) {\n\t\t\t\tthis.appendTermSelect( term );\n\t\t\t} else {\n\t\t\t\tthis.appendTermCheckbox( term );\n\t\t\t}\n\t\t},\n\n\t\tappendTermSelect: function ( term ) {\n\t\t\tthis.select2.addOption( {\n\t\t\t\tid: term.term_id,\n\t\t\t\ttext: term.term_label,\n\t\t\t} );\n\t\t},\n\n\t\tappendTermCheckbox: function ( term ) {\n\t\t\t// vars\n\t\t\tvar name = this.$( '[name]:first' ).attr( 'name' );\n\t\t\tvar $ul = this.$( 'ul:first' );\n\n\t\t\t// allow multiple selection\n\t\t\tif ( this.getRelatedType() == 'checkbox' ) {\n\t\t\t\tname += '[]';\n\t\t\t}\n\n\t\t\t// create new li\n\t\t\tvar $li = $(\n\t\t\t\t[\n\t\t\t\t\t'
',\n\t\t\t\t].join( '' )\n\t\t\t);\n\n\t\t\t// find parent\n\t\t\tif ( term.term_parent ) {\n\t\t\t\t// vars\n\t\t\t\tvar $parent = $ul.find(\n\t\t\t\t\t'li[data-id=\"' + term.term_parent + '\"]'\n\t\t\t\t);\n\n\t\t\t\t// update vars\n\t\t\t\t$ul = $parent.children( 'ul' );\n\n\t\t\t\t// create ul\n\t\t\t\tif ( ! $ul.exists() ) {\n\t\t\t\t\t$ul = $( '
' );\n\t\t\t\t\t$parent.append( $ul );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// append\n\t\t\t$ul.append( $li );\n\t\t},\n\n\t\tselectTerm: function ( id ) {\n\t\t\tif ( this.getRelatedType() == 'select' ) {\n\t\t\t\tthis.select2.selectOption( id );\n\t\t\t} else {\n\t\t\t\tvar $input = this.$( 'input[value=\"' + id + '\"]' );\n\t\t\t\t$input.prop( 'checked', true ).trigger( 'change' );\n\t\t\t}\n\t\t},\n\n\t\tonClickRadio: function ( e, $el ) {\n\t\t\t// vars\n\t\t\tvar $label = $el.parent( 'label' );\n\t\t\tvar selected = $label.hasClass( 'selected' );\n\n\t\t\t// remove previous selected\n\t\t\tthis.$( '.selected' ).removeClass( 'selected' );\n\n\t\t\t// add active class\n\t\t\t$label.addClass( 'selected' );\n\n\t\t\t// allow null\n\t\t\tif ( this.get( 'allow_null' ) && selected ) {\n\t\t\t\t$label.removeClass( 'selected' );\n\t\t\t\t$el.prop( 'checked', false ).trigger( 'change' );\n\t\t\t}\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.models.DatePickerField.extend( {\n\t\ttype: 'time_picker',\n\n\t\t$control: function () {\n\t\t\treturn this.$( '.acf-time-picker' );\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\t// vars\n\t\t\tvar $input = this.$input();\n\t\t\tvar $inputText = this.$inputText();\n\n\t\t\t// args\n\t\t\tvar args = {\n\t\t\t\ttimeFormat: this.get( 'time_format' ),\n\t\t\t\taltField: $input,\n\t\t\t\taltFieldTimeOnly: false,\n\t\t\t\taltTimeFormat: 'HH:mm:ss',\n\t\t\t\tshowButtonPanel: true,\n\t\t\t\tcontrolType: 'select',\n\t\t\t\toneLine: true,\n\t\t\t\tcloseText: acf.get( 'dateTimePickerL10n' ).selectText,\n\t\t\t\ttimeOnly: true,\n\t\t\t};\n\n\t\t\t// add custom 'Close = Select' functionality\n\t\t\targs.onClose = function ( value, dp_instance, t_instance ) {\n\t\t\t\t// vars\n\t\t\t\tvar $close = dp_instance.dpDiv.find( '.ui-datepicker-close' );\n\n\t\t\t\t// if clicking close button\n\t\t\t\tif ( ! value && $close.is( ':hover' ) ) {\n\t\t\t\t\tt_instance._updateDateTime();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// filter\n\t\t\targs = acf.applyFilters( 'time_picker_args', args, this );\n\n\t\t\t// add date time picker\n\t\t\tacf.newTimePicker( $inputText, args );\n\n\t\t\t// action\n\t\t\tacf.doAction( 'time_picker_init', $inputText, args, this );\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n\n\t// add\n\tacf.newTimePicker = function ( $input, args ) {\n\t\t// bail early if no datepicker library\n\t\tif ( typeof $.timepicker === 'undefined' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// defaults\n\t\targs = args || {};\n\n\t\t// initialize\n\t\t$input.timepicker( args );\n\n\t\t// wrap the datepicker (only if it hasn't already been wrapped)\n\t\tif ( $( 'body > #ui-datepicker-div' ).exists() ) {\n\t\t\t$( 'body > #ui-datepicker-div' ).wrap(\n\t\t\t\t'
'\n\t\t\t);\n\t\t}\n\t};\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'true_false',\n\n\t\tevents: {\n\t\t\t'change .acf-switch-input': 'onChange',\n\t\t\t'focus .acf-switch-input': 'onFocus',\n\t\t\t'blur .acf-switch-input': 'onBlur',\n\t\t\t'keypress .acf-switch-input': 'onKeypress',\n\t\t},\n\n\t\t$input: function () {\n\t\t\treturn this.$( 'input[type=\"checkbox\"]' );\n\t\t},\n\n\t\t$switch: function () {\n\t\t\treturn this.$( '.acf-switch' );\n\t\t},\n\n\t\tgetValue: function () {\n\t\t\treturn this.$input().prop( 'checked' ) ? 1 : 0;\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\tthis.render();\n\t\t},\n\n\t\trender: function () {\n\t\t\t// vars\n\t\t\tvar $switch = this.$switch();\n\n\t\t\t// bail early if no $switch\n\t\t\tif ( ! $switch.length ) return;\n\n\t\t\t// vars\n\t\t\tvar $on = $switch.children( '.acf-switch-on' );\n\t\t\tvar $off = $switch.children( '.acf-switch-off' );\n\t\t\tvar width = Math.max( $on.width(), $off.width() );\n\n\t\t\t// bail early if no width\n\t\t\tif ( ! width ) return;\n\n\t\t\t// set widths\n\t\t\t$on.css( 'min-width', width );\n\t\t\t$off.css( 'min-width', width );\n\t\t},\n\n\t\tswitchOn: function () {\n\t\t\tthis.$input().prop( 'checked', true );\n\t\t\tthis.$switch().addClass( '-on' );\n\t\t},\n\n\t\tswitchOff: function () {\n\t\t\tthis.$input().prop( 'checked', false );\n\t\t\tthis.$switch().removeClass( '-on' );\n\t\t},\n\n\t\tonChange: function ( e, $el ) {\n\t\t\tif ( $el.prop( 'checked' ) ) {\n\t\t\t\tthis.switchOn();\n\t\t\t} else {\n\t\t\t\tthis.switchOff();\n\t\t\t}\n\t\t},\n\n\t\tonFocus: function ( e, $el ) {\n\t\t\tthis.$switch().addClass( '-focus' );\n\t\t},\n\n\t\tonBlur: function ( e, $el ) {\n\t\t\tthis.$switch().removeClass( '-focus' );\n\t\t},\n\n\t\tonKeypress: function ( e, $el ) {\n\t\t\t// left\n\t\t\tif ( e.keyCode === 37 ) {\n\t\t\t\treturn this.switchOff();\n\t\t\t}\n\n\t\t\t// right\n\t\t\tif ( e.keyCode === 39 ) {\n\t\t\t\treturn this.switchOn();\n\t\t\t}\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'url',\n\n\t\tevents: {\n\t\t\t'keyup input[type=\"url\"]': 'onkeyup',\n\t\t},\n\n\t\t$control: function () {\n\t\t\treturn this.$( '.acf-input-wrap' );\n\t\t},\n\n\t\t$input: function () {\n\t\t\treturn this.$( 'input[type=\"url\"]' );\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\tthis.render();\n\t\t},\n\n\t\tisValid: function () {\n\t\t\t// vars\n\t\t\tvar val = this.val();\n\n\t\t\t// bail early if no val\n\t\t\tif ( ! val ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// url\n\t\t\tif ( val.indexOf( '://' ) !== -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// protocol relative url\n\t\t\tif ( val.indexOf( '//' ) === 0 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn false;\n\t\t},\n\n\t\trender: function () {\n\t\t\t// add class\n\t\t\tif ( this.isValid() ) {\n\t\t\t\tthis.$control().addClass( '-valid' );\n\t\t\t} else {\n\t\t\t\tthis.$control().removeClass( '-valid' );\n\t\t\t}\n\t\t},\n\n\t\tonkeyup: function ( e, $el ) {\n\t\t\tthis.render();\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.models.SelectField.extend( {\n\t\ttype: 'user',\n\t} );\n\n\tacf.registerFieldType( Field );\n\n\tacf.addFilter(\n\t\t'select2_ajax_data',\n\t\tfunction ( data, args, $input, field, select2 ) {\n\t\t\tif ( ! field ) {\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\tconst query_nonce = field.get( 'queryNonce' );\n\t\t\tif ( query_nonce && query_nonce.length ) {\n\t\t\t\tdata.user_query_nonce = query_nonce;\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\t);\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Field = acf.Field.extend( {\n\t\ttype: 'wysiwyg',\n\n\t\twait: 'load',\n\n\t\tevents: {\n\t\t\t'mousedown .acf-editor-wrap.delay': 'onMousedown',\n\t\t\tunmountField: 'disableEditor',\n\t\t\tremountField: 'enableEditor',\n\t\t\tremoveField: 'disableEditor',\n\t\t},\n\n\t\t$control: function () {\n\t\t\treturn this.$( '.acf-editor-wrap' );\n\t\t},\n\n\t\t$input: function () {\n\t\t\treturn this.$( 'textarea' );\n\t\t},\n\n\t\tgetMode: function () {\n\t\t\treturn this.$control().hasClass( 'tmce-active' )\n\t\t\t\t? 'visual'\n\t\t\t\t: 'text';\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\t// initializeEditor if no delay\n\t\t\tif ( ! this.$control().hasClass( 'delay' ) ) {\n\t\t\t\tthis.initializeEditor();\n\t\t\t}\n\t\t},\n\n\t\tinitializeEditor: function () {\n\t\t\t// vars\n\t\t\tvar $wrap = this.$control();\n\t\t\tvar $textarea = this.$input();\n\t\t\tvar args = {\n\t\t\t\ttinymce: true,\n\t\t\t\tquicktags: true,\n\t\t\t\ttoolbar: this.get( 'toolbar' ),\n\t\t\t\tmode: this.getMode(),\n\t\t\t\tfield: this,\n\t\t\t};\n\n\t\t\t// generate new id\n\t\t\tvar oldId = $textarea.attr( 'id' );\n\t\t\tvar newId = acf.uniqueId( 'acf-editor-' );\n\n\t\t\t// Backup textarea data.\n\t\t\tvar inputData = $textarea.data();\n\t\t\tvar inputVal = $textarea.val();\n\n\t\t\t// rename\n\t\t\tacf.rename( {\n\t\t\t\ttarget: $wrap,\n\t\t\t\tsearch: oldId,\n\t\t\t\treplace: newId,\n\t\t\t\tdestructive: true,\n\t\t\t} );\n\n\t\t\t// update id\n\t\t\tthis.set( 'id', newId, true );\n\n\t\t\t// apply data to new textarea (acf.rename creates a new textarea element due to destructive mode)\n\t\t\t// fixes bug where conditional logic \"disabled\" is lost during \"screen_check\"\n\t\t\tthis.$input().data( inputData ).val( inputVal );\n\n\t\t\t// initialize\n\t\t\tacf.tinymce.initialize( newId, args );\n\t\t},\n\n\t\tonMousedown: function ( e ) {\n\t\t\t// prevent default\n\t\t\te.preventDefault();\n\n\t\t\t// remove delay class\n\t\t\tvar $wrap = this.$control();\n\t\t\t$wrap.removeClass( 'delay' );\n\t\t\t$wrap.find( '.acf-editor-toolbar' ).remove();\n\n\t\t\t// initialize\n\t\t\tthis.initializeEditor();\n\t\t},\n\n\t\tenableEditor: function () {\n\t\t\tif ( this.getMode() == 'visual' ) {\n\t\t\t\tacf.tinymce.enable( this.get( 'id' ) );\n\t\t\t}\n\t\t},\n\n\t\tdisableEditor: function () {\n\t\t\tacf.tinymce.destroy( this.get( 'id' ) );\n\t\t},\n\t} );\n\n\tacf.registerFieldType( Field );\n} )( jQuery );\n","( function ( $, undefined ) {\n\t// vars\n\tvar storage = [];\n\n\t/**\n\t * acf.Field\n\t *\n\t * description\n\t *\n\t * @date\t23/3/18\n\t * @since\t5.6.9\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.Field = acf.Model.extend( {\n\t\t// field type\n\t\ttype: '',\n\n\t\t// class used to avoid nested event triggers\n\t\teventScope: '.acf-field',\n\n\t\t// initialize events on 'ready'\n\t\twait: 'ready',\n\n\t\t/**\n\t\t * setup\n\t\t *\n\t\t * Called during the constructor function to setup this field ready for initialization\n\t\t *\n\t\t * @date\t8/5/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\tjQuery $field The field element.\n\t\t * @return\tvoid\n\t\t */\n\n\t\tsetup: function ( $field ) {\n\t\t\t// set $el\n\t\t\tthis.$el = $field;\n\n\t\t\t// inherit $field data\n\t\t\tthis.inherit( $field );\n\n\t\t\t// inherit controll data\n\t\t\tthis.inherit( this.$control() );\n\t\t},\n\n\t\t/**\n\t\t * val\n\t\t *\n\t\t * Sets or returns the field's value\n\t\t *\n\t\t * @date\t8/5/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\tmixed val Optional. The value to set\n\t\t * @return\tmixed\n\t\t */\n\n\t\tval: function ( val ) {\n\t\t\t// Set.\n\t\t\tif ( val !== undefined ) {\n\t\t\t\treturn this.setValue( val );\n\n\t\t\t\t// Get.\n\t\t\t} else {\n\t\t\t\treturn this.prop( 'disabled' ) ? null : this.getValue();\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * getValue\n\t\t *\n\t\t * returns the field's value\n\t\t *\n\t\t * @date\t8/5/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\tvoid\n\t\t * @return\tmixed\n\t\t */\n\n\t\tgetValue: function () {\n\t\t\treturn this.$input().val();\n\t\t},\n\n\t\t/**\n\t\t * setValue\n\t\t *\n\t\t * sets the field's value and returns true if changed\n\t\t *\n\t\t * @date\t8/5/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\tmixed val\n\t\t * @return\tboolean. True if changed.\n\t\t */\n\n\t\tsetValue: function ( val ) {\n\t\t\treturn acf.val( this.$input(), val );\n\t\t},\n\n\t\t/**\n\t\t * __\n\t\t *\n\t\t * i18n helper to be removed\n\t\t *\n\t\t * @date\t8/5/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\ttype $var Description. Default.\n\t\t * @return\ttype Description.\n\t\t */\n\n\t\t__: function ( string ) {\n\t\t\treturn acf._e( this.type, string );\n\t\t},\n\n\t\t/**\n\t\t * $control\n\t\t *\n\t\t * returns the control jQuery element used for inheriting data. Uses this.control setting.\n\t\t *\n\t\t * @date\t8/5/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\tvoid\n\t\t * @return\tjQuery\n\t\t */\n\n\t\t$control: function () {\n\t\t\treturn false;\n\t\t},\n\n\t\t/**\n\t\t * $input\n\t\t *\n\t\t * returns the input jQuery element used for saving values. Uses this.input setting.\n\t\t *\n\t\t * @date\t8/5/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\tvoid\n\t\t * @return\tjQuery\n\t\t */\n\n\t\t$input: function () {\n\t\t\treturn this.$( '[name]:first' );\n\t\t},\n\n\t\t/**\n\t\t * $inputWrap\n\t\t *\n\t\t * description\n\t\t *\n\t\t * @date\t12/5/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\ttype $var Description. Default.\n\t\t * @return\ttype Description.\n\t\t */\n\n\t\t$inputWrap: function () {\n\t\t\treturn this.$( '.acf-input:first' );\n\t\t},\n\n\t\t/**\n\t\t * $inputWrap\n\t\t *\n\t\t * description\n\t\t *\n\t\t * @date\t12/5/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\ttype $var Description. Default.\n\t\t * @return\ttype Description.\n\t\t */\n\n\t\t$labelWrap: function () {\n\t\t\treturn this.$( '.acf-label:first' );\n\t\t},\n\n\t\t/**\n\t\t * getInputName\n\t\t *\n\t\t * Returns the field's input name\n\t\t *\n\t\t * @date\t8/5/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\tvoid\n\t\t * @return\tstring\n\t\t */\n\n\t\tgetInputName: function () {\n\t\t\treturn this.$input().attr( 'name' ) || '';\n\t\t},\n\n\t\t/**\n\t\t * parent\n\t\t *\n\t\t * returns the field's parent field or false on failure.\n\t\t *\n\t\t * @date\t8/5/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\tvoid\n\t\t * @return\tobject|false\n\t\t */\n\n\t\tparent: function () {\n\t\t\t// vars\n\t\t\tvar parents = this.parents();\n\n\t\t\t// return\n\t\t\treturn parents.length ? parents[ 0 ] : false;\n\t\t},\n\n\t\t/**\n\t\t * parents\n\t\t *\n\t\t * description\n\t\t *\n\t\t * @date\t9/7/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\ttype $var Description. Default.\n\t\t * @return\ttype Description.\n\t\t */\n\n\t\tparents: function () {\n\t\t\t// vars\n\t\t\tvar $parents = this.$el.parents( '.acf-field' );\n\n\t\t\t// convert\n\t\t\tvar parents = acf.getFields( $parents );\n\n\t\t\t// return\n\t\t\treturn parents;\n\t\t},\n\n\t\tshow: function ( lockKey, context ) {\n\t\t\t// show field and store result\n\t\t\tvar changed = acf.show( this.$el, lockKey );\n\n\t\t\t// do action if visibility has changed\n\t\t\tif ( changed ) {\n\t\t\t\tthis.prop( 'hidden', false );\n\t\t\t\tacf.doAction( 'show_field', this, context );\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn changed;\n\t\t},\n\n\t\thide: function ( lockKey, context ) {\n\t\t\t// hide field and store result\n\t\t\tvar changed = acf.hide( this.$el, lockKey );\n\n\t\t\t// do action if visibility has changed\n\t\t\tif ( changed ) {\n\t\t\t\tthis.prop( 'hidden', true );\n\t\t\t\tacf.doAction( 'hide_field', this, context );\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn changed;\n\t\t},\n\n\t\tenable: function ( lockKey, context ) {\n\t\t\t// enable field and store result\n\t\t\tvar changed = acf.enable( this.$el, lockKey );\n\n\t\t\t// do action if disabled has changed\n\t\t\tif ( changed ) {\n\t\t\t\tthis.prop( 'disabled', false );\n\t\t\t\tacf.doAction( 'enable_field', this, context );\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn changed;\n\t\t},\n\n\t\tdisable: function ( lockKey, context ) {\n\t\t\t// disabled field and store result\n\t\t\tvar changed = acf.disable( this.$el, lockKey );\n\n\t\t\t// do action if disabled has changed\n\t\t\tif ( changed ) {\n\t\t\t\tthis.prop( 'disabled', true );\n\t\t\t\tacf.doAction( 'disable_field', this, context );\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn changed;\n\t\t},\n\n\t\tshowEnable: function ( lockKey, context ) {\n\t\t\t// enable\n\t\t\tthis.enable.apply( this, arguments );\n\n\t\t\t// show and return true if changed\n\t\t\treturn this.show.apply( this, arguments );\n\t\t},\n\n\t\thideDisable: function ( lockKey, context ) {\n\t\t\t// disable\n\t\t\tthis.disable.apply( this, arguments );\n\n\t\t\t// hide and return true if changed\n\t\t\treturn this.hide.apply( this, arguments );\n\t\t},\n\n\t\tshowNotice: function ( props ) {\n\t\t\t// ensure object\n\t\t\tif ( typeof props !== 'object' ) {\n\t\t\t\tprops = { text: props };\n\t\t\t}\n\n\t\t\t// remove old notice\n\t\t\tif ( this.notice ) {\n\t\t\t\tthis.notice.remove();\n\t\t\t}\n\n\t\t\t// create new notice\n\t\t\tprops.target = this.$inputWrap();\n\t\t\tthis.notice = acf.newNotice( props );\n\t\t},\n\n\t\tremoveNotice: function ( timeout ) {\n\t\t\tif ( this.notice ) {\n\t\t\t\tthis.notice.away( timeout || 0 );\n\t\t\t\tthis.notice = false;\n\t\t\t}\n\t\t},\n\n\t\tshowError: function ( message ) {\n\t\t\t// add class\n\t\t\tthis.$el.addClass( 'acf-error' );\n\n\t\t\t// add message\n\t\t\tif ( message !== undefined ) {\n\t\t\t\tthis.showNotice( {\n\t\t\t\t\ttext: message,\n\t\t\t\t\ttype: 'error',\n\t\t\t\t\tdismiss: false,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// action\n\t\t\tacf.doAction( 'invalid_field', this );\n\n\t\t\t// add event\n\t\t\tthis.$el.one(\n\t\t\t\t'focus change',\n\t\t\t\t'input, select, textarea',\n\t\t\t\t$.proxy( this.removeError, this )\n\t\t\t);\n\t\t},\n\n\t\tremoveError: function () {\n\t\t\t// remove class\n\t\t\tthis.$el.removeClass( 'acf-error' );\n\n\t\t\t// remove notice\n\t\t\tthis.removeNotice( 250 );\n\n\t\t\t// action\n\t\t\tacf.doAction( 'valid_field', this );\n\t\t},\n\n\t\ttrigger: function ( name, args, bubbles ) {\n\t\t\t// allow some events to bubble\n\t\t\tif ( name == 'invalidField' ) {\n\t\t\t\tbubbles = true;\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn acf.Model.prototype.trigger.apply( this, [\n\t\t\t\tname,\n\t\t\t\targs,\n\t\t\t\tbubbles,\n\t\t\t] );\n\t\t},\n\t} );\n\n\t/**\n\t * newField\n\t *\n\t * description\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.newField = function ( $field ) {\n\t\t// vars\n\t\tvar type = $field.data( 'type' );\n\t\tvar mid = modelId( type );\n\t\tvar model = acf.models[ mid ] || acf.Field;\n\n\t\t// instantiate\n\t\tvar field = new model( $field );\n\n\t\t// actions\n\t\tacf.doAction( 'new_field', field );\n\n\t\t// return\n\t\treturn field;\n\t};\n\n\t/**\n\t * mid\n\t *\n\t * Calculates the model ID for a field type\n\t *\n\t * @date\t15/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tstring type\n\t * @return\tstring\n\t */\n\n\tvar modelId = function ( type ) {\n\t\treturn acf.strPascalCase( type || '' ) + 'Field';\n\t};\n\n\t/**\n\t * registerFieldType\n\t *\n\t * description\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.registerFieldType = function ( model ) {\n\t\t// vars\n\t\tvar proto = model.prototype;\n\t\tvar type = proto.type;\n\t\tvar mid = modelId( type );\n\n\t\t// store model\n\t\tacf.models[ mid ] = model;\n\n\t\t// store reference\n\t\tstorage.push( type );\n\t};\n\n\t/**\n\t * acf.getFieldType\n\t *\n\t * description\n\t *\n\t * @date\t1/2/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.getFieldType = function ( type ) {\n\t\tvar mid = modelId( type );\n\t\treturn acf.models[ mid ] || false;\n\t};\n\n\t/**\n\t * acf.getFieldTypes\n\t *\n\t * description\n\t *\n\t * @date\t1/2/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.getFieldTypes = function ( args ) {\n\t\t// defaults\n\t\targs = acf.parseArgs( args, {\n\t\t\tcategory: '',\n\t\t\t// hasValue: true\n\t\t} );\n\n\t\t// clonse available types\n\t\tvar types = [];\n\n\t\t// loop\n\t\tstorage.map( function ( type ) {\n\t\t\t// vars\n\t\t\tvar model = acf.getFieldType( type );\n\t\t\tvar proto = model.prototype;\n\n\t\t\t// check operator\n\t\t\tif ( args.category && proto.category !== args.category ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// append\n\t\t\ttypes.push( model );\n\t\t} );\n\n\t\t// return\n\t\treturn types;\n\t};\n} )( jQuery );\n","( function ( $, undefined ) {\n\t/**\n\t * findFields\n\t *\n\t * Returns a jQuery selection object of acf fields.\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tobject $args {\n\t *\t\tOptional. Arguments to find fields.\n\t *\n\t *\t\t@type string\t\t\tkey\t\t\tThe field's key (data-attribute).\n\t *\t\t@type string\t\t\tname\t\tThe field's name (data-attribute).\n\t *\t\t@type string\t\t\ttype\t\tThe field's type (data-attribute).\n\t *\t\t@type string\t\t\tis\t\t\tjQuery selector to compare against.\n\t *\t\t@type jQuery\t\t\tparent\t\tjQuery element to search within.\n\t *\t\t@type jQuery\t\t\tsibling\t\tjQuery element to search alongside.\n\t *\t\t@type limit\t\t\t\tint\t\t\tThe number of fields to find.\n\t *\t\t@type suppressFilters\tbool\t\tWhether to allow filters to add/remove results. Default behaviour will ignore clone fields.\n\t * }\n\t * @return\tjQuery\n\t */\n\n\tacf.findFields = function ( args ) {\n\t\t// vars\n\t\tvar selector = '.acf-field';\n\t\tvar $fields = false;\n\n\t\t// args\n\t\targs = acf.parseArgs( args, {\n\t\t\tkey: '',\n\t\t\tname: '',\n\t\t\ttype: '',\n\t\t\tis: '',\n\t\t\tparent: false,\n\t\t\tsibling: false,\n\t\t\tlimit: false,\n\t\t\tvisible: false,\n\t\t\tsuppressFilters: false,\n\t\t\texcludeSubFields: false,\n\t\t} );\n\n\t\t// filter args\n\t\tif ( ! args.suppressFilters ) {\n\t\t\targs = acf.applyFilters( 'find_fields_args', args );\n\t\t}\n\n\t\t// key\n\t\tif ( args.key ) {\n\t\t\tselector += '[data-key=\"' + args.key + '\"]';\n\t\t}\n\n\t\t// type\n\t\tif ( args.type ) {\n\t\t\tselector += '[data-type=\"' + args.type + '\"]';\n\t\t}\n\n\t\t// name\n\t\tif ( args.name ) {\n\t\t\tselector += '[data-name=\"' + args.name + '\"]';\n\t\t}\n\n\t\t// is\n\t\tif ( args.is ) {\n\t\t\tselector += args.is;\n\t\t}\n\n\t\t// visibility\n\t\tif ( args.visible ) {\n\t\t\tselector += ':visible';\n\t\t}\n\n\t\tif ( ! args.suppressFilters ) {\n\t\t\tselector = acf.applyFilters(\n\t\t\t\t'find_fields_selector',\n\t\t\t\tselector,\n\t\t\t\targs\n\t\t\t);\n\t\t}\n\n\t\t// query\n\t\tif ( args.parent ) {\n\t\t\t$fields = args.parent.find( selector );\n\t\t\t// exclude sub fields if required (only if a parent is provided)\n\t\t\tif ( args.excludeSubFields ) {\n\t\t\t\t$fields = $fields.not( args.parent.find( '.acf-is-subfields .acf-field' ) );\n\t\t\t}\n\t\t} else if ( args.sibling ) {\n\t\t\t$fields = args.sibling.siblings( selector );\n\t\t} else {\n\t\t\t$fields = $( selector );\n\t\t}\n\n\t\t// filter\n\t\tif ( ! args.suppressFilters ) {\n\t\t\t$fields = $fields.not( '.acf-clone .acf-field' );\n\t\t\t$fields = acf.applyFilters( 'find_fields', $fields );\n\t\t}\n\n\t\t// limit\n\t\tif ( args.limit ) {\n\t\t\t$fields = $fields.slice( 0, args.limit );\n\t\t}\n\n\t\t// return\n\t\treturn $fields;\n\t};\n\n\t/**\n\t * findField\n\t *\n\t * Finds a specific field with jQuery\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tstring key \t\tThe field's key.\n\t * @param\tjQuery $parent\tjQuery element to search within.\n\t * @return\tjQuery\n\t */\n\n\tacf.findField = function ( key, $parent ) {\n\t\treturn acf.findFields( {\n\t\t\tkey: key,\n\t\t\tlimit: 1,\n\t\t\tparent: $parent,\n\t\t\tsuppressFilters: true,\n\t\t} );\n\t};\n\n\t/**\n\t * getField\n\t *\n\t * Returns a field instance\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tjQuery|string $field\tjQuery element or field key.\n\t * @return\tobject\n\t */\n\n\tacf.getField = function ( $field ) {\n\t\t// allow jQuery\n\t\tif ( $field instanceof jQuery ) {\n\t\t\t// find fields\n\t\t} else {\n\t\t\t$field = acf.findField( $field );\n\t\t}\n\n\t\t// instantiate\n\t\tvar field = $field.data( 'acf' );\n\t\tif ( ! field ) {\n\t\t\tfield = acf.newField( $field );\n\t\t}\n\n\t\t// return\n\t\treturn field;\n\t};\n\n\t/**\n\t * getFields\n\t *\n\t * Returns multiple field instances\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tjQuery|object $fields\tjQuery elements or query args.\n\t * @return\tarray\n\t */\n\n\tacf.getFields = function ( $fields ) {\n\t\t// allow jQuery\n\t\tif ( $fields instanceof jQuery ) {\n\t\t\t// find fields\n\t\t} else {\n\t\t\t$fields = acf.findFields( $fields );\n\t\t}\n\n\t\t// loop\n\t\tvar fields = [];\n\t\t$fields.each( function () {\n\t\t\tvar field = acf.getField( $( this ) );\n\t\t\tfields.push( field );\n\t\t} );\n\n\t\t// return\n\t\treturn fields;\n\t};\n\n\t/**\n\t * findClosestField\n\t *\n\t * Returns the closest jQuery field element\n\t *\n\t * @date\t9/4/18\n\t * @since\t5.6.9\n\t *\n\t * @param\tjQuery $el\n\t * @return\tjQuery\n\t */\n\n\tacf.findClosestField = function ( $el ) {\n\t\treturn $el.closest( '.acf-field' );\n\t};\n\n\t/**\n\t * getClosestField\n\t *\n\t * Returns the closest field instance\n\t *\n\t * @date\t22/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\tjQuery $el\n\t * @return\tobject\n\t */\n\n\tacf.getClosestField = function ( $el ) {\n\t\tvar $field = acf.findClosestField( $el );\n\t\treturn this.getField( $field );\n\t};\n\n\t/**\n\t * addGlobalFieldAction\n\t *\n\t * Sets up callback logic for global field actions\n\t *\n\t * @date\t15/6/18\n\t * @since\t5.6.9\n\t *\n\t * @param\tstring action\n\t * @return\tvoid\n\t */\n\n\tvar addGlobalFieldAction = function ( action ) {\n\t\t// vars\n\t\tvar globalAction = action;\n\t\tvar pluralAction = action + '_fields'; // ready_fields\n\t\tvar singleAction = action + '_field'; // ready_field\n\n\t\t// global action\n\t\tvar globalCallback = function ( $el /*, arg1, arg2, etc*/ ) {\n\t\t\t//console.log( action, arguments );\n\n\t\t\t// get args [$el, ...]\n\t\t\tvar args = acf.arrayArgs( arguments );\n\t\t\tvar extraArgs = args.slice( 1 );\n\n\t\t\t// find fields\n\t\t\tvar fields = acf.getFields( { parent: $el } );\n\n\t\t\t// check\n\t\t\tif ( fields.length ) {\n\t\t\t\t// pluralAction\n\t\t\t\tvar pluralArgs = [ pluralAction, fields ].concat( extraArgs );\n\t\t\t\tacf.doAction.apply( null, pluralArgs );\n\t\t\t}\n\t\t};\n\n\t\t// plural action\n\t\tvar pluralCallback = function ( fields /*, arg1, arg2, etc*/ ) {\n\t\t\t//console.log( pluralAction, arguments );\n\n\t\t\t// get args [fields, ...]\n\t\t\tvar args = acf.arrayArgs( arguments );\n\t\t\tvar extraArgs = args.slice( 1 );\n\n\t\t\t// loop\n\t\t\tfields.map( function ( field, i ) {\n\t\t\t\t//setTimeout(function(){\n\t\t\t\t// singleAction\n\t\t\t\tvar singleArgs = [ singleAction, field ].concat( extraArgs );\n\t\t\t\tacf.doAction.apply( null, singleArgs );\n\t\t\t\t//}, i * 100);\n\t\t\t} );\n\t\t};\n\n\t\t// add actions\n\t\tacf.addAction( globalAction, globalCallback );\n\t\tacf.addAction( pluralAction, pluralCallback );\n\n\t\t// also add single action\n\t\taddSingleFieldAction( action );\n\t};\n\n\t/**\n\t * addSingleFieldAction\n\t *\n\t * Sets up callback logic for single field actions\n\t *\n\t * @date\t15/6/18\n\t * @since\t5.6.9\n\t *\n\t * @param\tstring action\n\t * @return\tvoid\n\t */\n\n\tvar addSingleFieldAction = function ( action ) {\n\t\t// vars\n\t\tvar singleAction = action + '_field'; // ready_field\n\t\tvar singleEvent = action + 'Field'; // readyField\n\n\t\t// single action\n\t\tvar singleCallback = function ( field /*, arg1, arg2, etc*/ ) {\n\t\t\t//console.log( singleAction, arguments );\n\n\t\t\t// get args [field, ...]\n\t\t\tvar args = acf.arrayArgs( arguments );\n\t\t\tvar extraArgs = args.slice( 1 );\n\n\t\t\t// action variations (ready_field/type=image)\n\t\t\tvar variations = [ 'type', 'name', 'key' ];\n\t\t\tvariations.map( function ( variation ) {\n\t\t\t\t// vars\n\t\t\t\tvar prefix = '/' + variation + '=' + field.get( variation );\n\n\t\t\t\t// singleAction\n\t\t\t\targs = [ singleAction + prefix, field ].concat( extraArgs );\n\t\t\t\tacf.doAction.apply( null, args );\n\t\t\t} );\n\n\t\t\t// event\n\t\t\tif ( singleFieldEvents.indexOf( action ) > -1 ) {\n\t\t\t\tfield.trigger( singleEvent, extraArgs );\n\t\t\t}\n\t\t};\n\n\t\t// add actions\n\t\tacf.addAction( singleAction, singleCallback );\n\t};\n\n\t// vars\n\tvar globalFieldActions = [\n\t\t'prepare',\n\t\t'ready',\n\t\t'load',\n\t\t'append',\n\t\t'remove',\n\t\t'unmount',\n\t\t'remount',\n\t\t'sortstart',\n\t\t'sortstop',\n\t\t'show',\n\t\t'hide',\n\t\t'unload',\n\t];\n\tvar singleFieldActions = [\n\t\t'valid',\n\t\t'invalid',\n\t\t'enable',\n\t\t'disable',\n\t\t'new',\n\t\t'duplicate',\n\t];\n\tvar singleFieldEvents = [\n\t\t'remove',\n\t\t'unmount',\n\t\t'remount',\n\t\t'sortstart',\n\t\t'sortstop',\n\t\t'show',\n\t\t'hide',\n\t\t'unload',\n\t\t'valid',\n\t\t'invalid',\n\t\t'enable',\n\t\t'disable',\n\t\t'duplicate',\n\t];\n\n\t// add\n\tglobalFieldActions.map( addGlobalFieldAction );\n\tsingleFieldActions.map( addSingleFieldAction );\n\n\t/**\n\t * fieldsEventManager\n\t *\n\t * Manages field actions and events\n\t *\n\t * @date\t15/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tvoid\n\t * @param\tvoid\n\t */\n\n\tvar fieldsEventManager = new acf.Model( {\n\t\tid: 'fieldsEventManager',\n\t\tevents: {\n\t\t\t'click .acf-field a[href=\"#\"]': 'onClick',\n\t\t\t'change .acf-field': 'onChange',\n\t\t},\n\t\tonClick: function ( e ) {\n\t\t\t// prevent default of any link with an href of #\n\t\t\te.preventDefault();\n\t\t},\n\t\tonChange: function () {\n\t\t\t// preview hack allows post to save with no title or content\n\t\t\t$( '#_acf_changed' ).val( 1 );\n\t\t},\n\t} );\n\n\tvar duplicateFieldsManager = new acf.Model( {\n\t\tid: 'duplicateFieldsManager',\n\t\tactions: {\n\t\t\tduplicate: 'onDuplicate',\n\t\t\tduplicate_fields: 'onDuplicateFields',\n\t\t},\n\t\tonDuplicate: function ( $el, $el2 ) {\n\t\t\tvar fields = acf.getFields( { parent: $el } );\n\t\t\tif ( fields.length ) {\n\t\t\t\tvar $fields = acf.findFields( { parent: $el2 } );\n\t\t\t\tacf.doAction( 'duplicate_fields', fields, $fields );\n\t\t\t}\n\t\t},\n\t\tonDuplicateFields: function ( fields, duplicates ) {\n\t\t\tfields.map( function ( field, i ) {\n\t\t\t\tacf.doAction( 'duplicate_field', field, $( duplicates[ i ] ) );\n\t\t\t} );\n\t\t},\n\t} );\n} )( jQuery );\n","( function ( $, undefined ) {\n\t/**\n\t * refreshHelper\n\t *\n\t * description\n\t *\n\t * @date\t1/7/18\n\t * @since\t5.6.9\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tvar refreshHelper = new acf.Model( {\n\t\tpriority: 90,\n\t\tactions: {\n\t\t\tnew_field: 'refresh',\n\t\t\tshow_field: 'refresh',\n\t\t\thide_field: 'refresh',\n\t\t\tremove_field: 'refresh',\n\t\t\tunmount_field: 'refresh',\n\t\t\tremount_field: 'refresh',\n\t\t},\n\t\trefresh: function () {\n\t\t\tacf.refresh();\n\t\t},\n\t} );\n\n\t/**\n\t * mountHelper\n\t *\n\t * Adds compatiblity for the 'unmount' and 'remount' actions added in 5.8.0\n\t *\n\t * @date\t7/3/19\n\t * @since\t5.7.14\n\t *\n\t * @param\tvoid\n\t * @return\tvoid\n\t */\n\tvar mountHelper = new acf.Model( {\n\t\tpriority: 1,\n\t\tactions: {\n\t\t\tsortstart: 'onSortstart',\n\t\t\tsortstop: 'onSortstop',\n\t\t},\n\t\tonSortstart: function ( $item ) {\n\t\t\tacf.doAction( 'unmount', $item );\n\t\t},\n\t\tonSortstop: function ( $item ) {\n\t\t\tacf.doAction( 'remount', $item );\n\t\t},\n\t} );\n\n\t/**\n\t * sortableHelper\n\t *\n\t * Adds compatibility for sorting a
element\n\t *\n\t * @date\t6/3/18\n\t * @since\t5.6.9\n\t *\n\t * @param\tvoid\n\t * @return\tvoid\n\t */\n\n\tvar sortableHelper = new acf.Model( {\n\t\tactions: {\n\t\t\tsortstart: 'onSortstart',\n\t\t},\n\t\tonSortstart: function ( $item, $placeholder ) {\n\t\t\t// if $item is a tr, apply some css to the elements\n\t\t\tif ( $item.is( 'tr' ) ) {\n\t\t\t\t// replace $placeholder children with a single td\n\t\t\t\t// fixes \"width calculation issues\" due to conditional logic hiding some children\n\t\t\t\t$placeholder.html(\n\t\t\t\t\t' '\n\t\t\t\t);\n\n\t\t\t\t// add helper class to remove absolute positioning\n\t\t\t\t$item.addClass( 'acf-sortable-tr-helper' );\n\n\t\t\t\t// set fixed widths for children\n\t\t\t\t$item.children().each( function () {\n\t\t\t\t\t$( this ).width( $( this ).width() );\n\t\t\t\t} );\n\n\t\t\t\t// mimic height\n\t\t\t\t$placeholder.height( $item.height() + 'px' );\n\n\t\t\t\t// remove class\n\t\t\t\t$item.removeClass( 'acf-sortable-tr-helper' );\n\t\t\t}\n\t\t},\n\t} );\n\n\t/**\n\t * duplicateHelper\n\t *\n\t * Fixes browser bugs when duplicating an element\n\t *\n\t * @date\t6/3/18\n\t * @since\t5.6.9\n\t *\n\t * @param\tvoid\n\t * @return\tvoid\n\t */\n\n\tvar duplicateHelper = new acf.Model( {\n\t\tactions: {\n\t\t\tafter_duplicate: 'onAfterDuplicate',\n\t\t},\n\t\tonAfterDuplicate: function ( $el, $el2 ) {\n\t\t\t// get original values\n\t\t\tvar vals = [];\n\t\t\t$el.find( 'select' ).each( function ( i ) {\n\t\t\t\tvals.push( $( this ).val() );\n\t\t\t} );\n\n\t\t\t// set duplicate values\n\t\t\t$el2.find( 'select' ).each( function ( i ) {\n\t\t\t\t$( this ).val( vals[ i ] );\n\t\t\t} );\n\t\t},\n\t} );\n\n\t/**\n\t * tableHelper\n\t *\n\t * description\n\t *\n\t * @date\t6/3/18\n\t * @since\t5.6.9\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tvar tableHelper = new acf.Model( {\n\t\tid: 'tableHelper',\n\n\t\tpriority: 20,\n\n\t\tactions: {\n\t\t\trefresh: 'renderTables',\n\t\t},\n\n\t\trenderTables: function ( $el ) {\n\t\t\t// loop\n\t\t\tvar self = this;\n\t\t\t$( '.acf-table:visible' ).each( function () {\n\t\t\t\tself.renderTable( $( this ) );\n\t\t\t} );\n\t\t},\n\n\t\trenderTable: function ( $table ) {\n\t\t\t// vars\n\t\t\tvar $ths = $table.find( '> thead > tr:visible > th[data-key]' );\n\t\t\tvar $tds = $table.find( '> tbody > tr:visible > td[data-key]' );\n\n\t\t\t// bail early if no thead\n\t\t\tif ( ! $ths.length || ! $tds.length ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// visiblity\n\t\t\t$ths.each( function ( i ) {\n\t\t\t\t// vars\n\t\t\t\tvar $th = $( this );\n\t\t\t\tvar key = $th.data( 'key' );\n\t\t\t\tvar $cells = $tds.filter( '[data-key=\"' + key + '\"]' );\n\t\t\t\tvar $hidden = $cells.filter( '.acf-hidden' );\n\n\t\t\t\t// always remove empty and allow cells to be hidden\n\t\t\t\t$cells.removeClass( 'acf-empty' );\n\n\t\t\t\t// hide $th if all cells are hidden\n\t\t\t\tif ( $cells.length === $hidden.length ) {\n\t\t\t\t\tacf.hide( $th );\n\n\t\t\t\t\t// force all hidden cells to appear empty\n\t\t\t\t} else {\n\t\t\t\t\tacf.show( $th );\n\t\t\t\t\t$hidden.addClass( 'acf-empty' );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// clear width\n\t\t\t$ths.css( 'width', 'auto' );\n\n\t\t\t// get visible\n\t\t\t$ths = $ths.not( '.acf-hidden' );\n\n\t\t\t// vars\n\t\t\tvar availableWidth = 100;\n\t\t\tvar colspan = $ths.length;\n\n\t\t\t// set custom widths first\n\t\t\tvar $fixedWidths = $ths.filter( '[data-width]' );\n\t\t\t$fixedWidths.each( function () {\n\t\t\t\tvar width = $( this ).data( 'width' );\n\t\t\t\t$( this ).css( 'width', width + '%' );\n\t\t\t\tavailableWidth -= width;\n\t\t\t} );\n\n\t\t\t// set auto widths\n\t\t\tvar $auoWidths = $ths.not( '[data-width]' );\n\t\t\tif ( $auoWidths.length ) {\n\t\t\t\tvar width = availableWidth / $auoWidths.length;\n\t\t\t\t$auoWidths.css( 'width', width + '%' );\n\t\t\t\tavailableWidth = 0;\n\t\t\t}\n\n\t\t\t// avoid stretching issue\n\t\t\tif ( availableWidth > 0 ) {\n\t\t\t\t$ths.last().css( 'width', 'auto' );\n\t\t\t}\n\n\t\t\t// update colspan on collapsed\n\t\t\t$tds.filter( '.-collapsed-target' ).each( function () {\n\t\t\t\t// vars\n\t\t\t\tvar $td = $( this );\n\n\t\t\t\t// check if collapsed\n\t\t\t\tif ( $td.parent().hasClass( '-collapsed' ) ) {\n\t\t\t\t\t$td.attr( 'colspan', $ths.length );\n\t\t\t\t} else {\n\t\t\t\t\t$td.removeAttr( 'colspan' );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\t} );\n\n\t/**\n\t * fieldsHelper\n\t *\n\t * description\n\t *\n\t * @date\t6/3/18\n\t * @since\t5.6.9\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tvar fieldsHelper = new acf.Model( {\n\t\tid: 'fieldsHelper',\n\n\t\tpriority: 30,\n\n\t\tactions: {\n\t\t\trefresh: 'renderGroups',\n\t\t},\n\n\t\trenderGroups: function () {\n\t\t\t// loop\n\t\t\tvar self = this;\n\t\t\t$( '.acf-fields:visible' ).each( function () {\n\t\t\t\tself.renderGroup( $( this ) );\n\t\t\t} );\n\t\t},\n\n\t\trenderGroup: function ( $el ) {\n\t\t\t// vars\n\t\t\tvar top = 0;\n\t\t\tvar height = 0;\n\t\t\tvar $row = $();\n\n\t\t\t// get fields\n\t\t\tvar $fields = $el.children( '.acf-field[data-width]:visible' );\n\n\t\t\t// bail early if no fields\n\t\t\tif ( ! $fields.length ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// bail early if is .-left\n\t\t\tif ( $el.hasClass( '-left' ) ) {\n\t\t\t\t$fields.removeAttr( 'data-width' );\n\t\t\t\t$fields.css( 'width', 'auto' );\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// reset fields\n\t\t\t$fields.removeClass( '-r0 -c0' ).css( { 'min-height': 0 } );\n\n\t\t\t// loop\n\t\t\t$fields.each( function ( i ) {\n\t\t\t\t// vars\n\t\t\t\tvar $field = $( this );\n\t\t\t\tvar position = $field.position();\n\t\t\t\tvar thisTop = Math.ceil( position.top );\n\t\t\t\tvar thisLeft = Math.ceil( position.left );\n\n\t\t\t\t// detect change in row\n\t\t\t\tif ( $row.length && thisTop > top ) {\n\t\t\t\t\t// set previous heights\n\t\t\t\t\t$row.css( { 'min-height': height + 'px' } );\n\n\t\t\t\t\t// update position due to change in row above\n\t\t\t\t\tposition = $field.position();\n\t\t\t\t\tthisTop = Math.ceil( position.top );\n\t\t\t\t\tthisLeft = Math.ceil( position.left );\n\n\t\t\t\t\t// reset vars\n\t\t\t\t\ttop = 0;\n\t\t\t\t\theight = 0;\n\t\t\t\t\t$row = $();\n\t\t\t\t}\n\n\t\t\t\t// rtl\n\t\t\t\tif ( acf.get( 'rtl' ) ) {\n\t\t\t\t\tthisLeft = Math.ceil(\n\t\t\t\t\t\t$field.parent().width() -\n\t\t\t\t\t\t\t( position.left + $field.outerWidth() )\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// add classes\n\t\t\t\tif ( thisTop == 0 ) {\n\t\t\t\t\t$field.addClass( '-r0' );\n\t\t\t\t} else if ( thisLeft == 0 ) {\n\t\t\t\t\t$field.addClass( '-c0' );\n\t\t\t\t}\n\n\t\t\t\t// get height after class change\n\t\t\t\t// - add 1 for subpixel rendering\n\t\t\t\tvar thisHeight = Math.ceil( $field.outerHeight() ) + 1;\n\n\t\t\t\t// set height\n\t\t\t\theight = Math.max( height, thisHeight );\n\n\t\t\t\t// set y\n\t\t\t\ttop = Math.max( top, thisTop );\n\n\t\t\t\t// append\n\t\t\t\t$row = $row.add( $field );\n\t\t\t} );\n\n\t\t\t// clean up\n\t\t\tif ( $row.length ) {\n\t\t\t\t$row.css( { 'min-height': height + 'px' } );\n\t\t\t}\n\t\t},\n\t} );\n\n\t/**\n\t * Adds a body class when holding down the \"shift\" key.\n\t *\n\t * @date\t06/05/2020\n\t * @since\t5.9.0\n\t */\n\tvar bodyClassShiftHelper = new acf.Model( {\n\t\tid: 'bodyClassShiftHelper',\n\t\tevents: {\n\t\t\tkeydown: 'onKeyDown',\n\t\t\tkeyup: 'onKeyUp',\n\t\t},\n\t\tisShiftKey: function ( e ) {\n\t\t\treturn e.keyCode === 16;\n\t\t},\n\t\tonKeyDown: function ( e ) {\n\t\t\tif ( this.isShiftKey( e ) ) {\n\t\t\t\t$( 'body' ).addClass( 'acf-keydown-shift' );\n\t\t\t}\n\t\t},\n\t\tonKeyUp: function ( e ) {\n\t\t\tif ( this.isShiftKey( e ) ) {\n\t\t\t\t$( 'body' ).removeClass( 'acf-keydown-shift' );\n\t\t\t}\n\t\t},\n\t} );\n} )( jQuery );\n","( function ( $, undefined ) {\n\t/**\n\t * acf.newMediaPopup\n\t *\n\t * description\n\t *\n\t * @date\t10/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.newMediaPopup = function ( args ) {\n\t\t// args\n\t\tvar popup = null;\n\t\tvar args = acf.parseArgs( args, {\n\t\t\tmode: 'select', // 'select', 'edit'\n\t\t\ttitle: '', // 'Upload Image'\n\t\t\tbutton: '', // 'Select Image'\n\t\t\ttype: '', // 'image', ''\n\t\t\tfield: false, // field instance\n\t\t\tallowedTypes: '', // '.jpg, .png, etc'\n\t\t\tlibrary: 'all', // 'all', 'uploadedTo'\n\t\t\tmultiple: false, // false, true, 'add'\n\t\t\tattachment: 0, // the attachment to edit\n\t\t\tautoOpen: true, // open the popup automatically\n\t\t\topen: function () {}, // callback after close\n\t\t\tselect: function () {}, // callback after select\n\t\t\tclose: function () {}, // callback after close\n\t\t} );\n\n\t\t// initialize\n\t\tif ( args.mode == 'edit' ) {\n\t\t\tpopup = new acf.models.EditMediaPopup( args );\n\t\t} else {\n\t\t\tpopup = new acf.models.SelectMediaPopup( args );\n\t\t}\n\n\t\t// open popup (allow frame customization before opening)\n\t\tif ( args.autoOpen ) {\n\t\t\tsetTimeout( function () {\n\t\t\t\tpopup.open();\n\t\t\t}, 1 );\n\t\t}\n\n\t\t// action\n\t\tacf.doAction( 'new_media_popup', popup );\n\n\t\t// return\n\t\treturn popup;\n\t};\n\n\t/**\n\t * getPostID\n\t *\n\t * description\n\t *\n\t * @date\t10/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tvar getPostID = function () {\n\t\tvar postID = acf.get( 'post_id' );\n\t\treturn acf.isNumeric( postID ) ? postID : 0;\n\t};\n\n\t/**\n\t * acf.getMimeTypes\n\t *\n\t * description\n\t *\n\t * @date\t11/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.getMimeTypes = function () {\n\t\treturn this.get( 'mimeTypes' );\n\t};\n\n\tacf.getMimeType = function ( name ) {\n\t\t// vars\n\t\tvar allTypes = acf.getMimeTypes();\n\n\t\t// search\n\t\tif ( allTypes[ name ] !== undefined ) {\n\t\t\treturn allTypes[ name ];\n\t\t}\n\n\t\t// some types contain a mixed key such as \"jpg|jpeg|jpe\"\n\t\tfor ( var key in allTypes ) {\n\t\t\tif ( key.indexOf( name ) !== -1 ) {\n\t\t\t\treturn allTypes[ key ];\n\t\t\t}\n\t\t}\n\n\t\t// return\n\t\treturn false;\n\t};\n\n\t/**\n\t * MediaPopup\n\t *\n\t * description\n\t *\n\t * @date\t10/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tvar MediaPopup = acf.Model.extend( {\n\t\tid: 'MediaPopup',\n\t\tdata: {},\n\t\tdefaults: {},\n\t\tframe: false,\n\n\t\tsetup: function ( props ) {\n\t\t\t$.extend( this.data, props );\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\t// vars\n\t\t\tvar options = this.getFrameOptions();\n\n\t\t\t// add states\n\t\t\tthis.addFrameStates( options );\n\n\t\t\t// create frame\n\t\t\tvar frame = wp.media( options );\n\n\t\t\t// add args reference\n\t\t\tframe.acf = this;\n\n\t\t\t// add events\n\t\t\tthis.addFrameEvents( frame, options );\n\n\t\t\t// strore frame\n\t\t\tthis.frame = frame;\n\t\t},\n\n\t\topen: function () {\n\t\t\tthis.frame.open();\n\t\t},\n\n\t\tclose: function () {\n\t\t\tthis.frame.close();\n\t\t},\n\n\t\tremove: function () {\n\t\t\tthis.frame.detach();\n\t\t\tthis.frame.remove();\n\t\t},\n\n\t\tgetFrameOptions: function () {\n\t\t\t// vars\n\t\t\tvar options = {\n\t\t\t\ttitle: this.get( 'title' ),\n\t\t\t\tmultiple: this.get( 'multiple' ),\n\t\t\t\tlibrary: {},\n\t\t\t\tstates: [],\n\t\t\t};\n\n\t\t\t// type\n\t\t\tif ( this.get( 'type' ) ) {\n\t\t\t\toptions.library.type = this.get( 'type' );\n\t\t\t}\n\n\t\t\t// type\n\t\t\tif ( this.get( 'library' ) === 'uploadedTo' ) {\n\t\t\t\toptions.library.uploadedTo = getPostID();\n\t\t\t}\n\n\t\t\t// attachment\n\t\t\tif ( this.get( 'attachment' ) ) {\n\t\t\t\toptions.library.post__in = [ this.get( 'attachment' ) ];\n\t\t\t}\n\n\t\t\t// button\n\t\t\tif ( this.get( 'button' ) ) {\n\t\t\t\toptions.button = {\n\t\t\t\t\ttext: this.get( 'button' ),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn options;\n\t\t},\n\n\t\taddFrameStates: function ( options ) {\n\t\t\t// create query\n\t\t\tvar Query = wp.media.query( options.library );\n\n\t\t\t// add _acfuploader\n\t\t\t// this is super wack!\n\t\t\t// if you add _acfuploader to the options.library args, new uploads will not be added to the library view.\n\t\t\t// this has been traced back to the wp.media.model.Query initialize function (which can't be overriden)\n\t\t\t// Adding any custom args will cause the Attahcments to not observe the uploader queue\n\t\t\t// To bypass this security issue, we add in the args AFTER the Query has been initialized\n\t\t\t// options.library._acfuploader = settings.field;\n\t\t\tif (\n\t\t\t\tthis.get( 'field' ) &&\n\t\t\t\tacf.isset( Query, 'mirroring', 'args' )\n\t\t\t) {\n\t\t\t\tQuery.mirroring.args._acfuploader = this.get( 'field' );\n\t\t\t}\n\n\t\t\t// add states\n\t\t\toptions.states.push(\n\t\t\t\t// main state\n\t\t\t\tnew wp.media.controller.Library( {\n\t\t\t\t\tlibrary: Query,\n\t\t\t\t\tmultiple: this.get( 'multiple' ),\n\t\t\t\t\ttitle: this.get( 'title' ),\n\t\t\t\t\tpriority: 20,\n\t\t\t\t\tfilterable: 'all',\n\t\t\t\t\teditable: true,\n\t\t\t\t\tallowLocalEdits: true,\n\t\t\t\t} )\n\t\t\t);\n\n\t\t\t// edit image functionality (added in WP 3.9)\n\t\t\tif ( acf.isset( wp, 'media', 'controller', 'EditImage' ) ) {\n\t\t\t\toptions.states.push( new wp.media.controller.EditImage() );\n\t\t\t}\n\t\t},\n\n\t\taddFrameEvents: function ( frame, options ) {\n\t\t\t// log all events\n\t\t\t//frame.on('all', function( e ) {\n\t\t\t//\tconsole.log( 'frame all: %o', e );\n\t\t\t//});\n\n\t\t\t// add class\n\t\t\tframe.on(\n\t\t\t\t'open',\n\t\t\t\tfunction () {\n\t\t\t\t\tthis.$el\n\t\t\t\t\t\t.closest( '.media-modal' )\n\t\t\t\t\t\t.addClass(\n\t\t\t\t\t\t\t'acf-media-modal -' + this.acf.get( 'mode' )\n\t\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tframe\n\t\t\t);\n\n\t\t\t// edit image view\n\t\t\t// source: media-views.js:2410 editImageContent()\n\t\t\tframe.on(\n\t\t\t\t'content:render:edit-image',\n\t\t\t\tfunction () {\n\t\t\t\t\tvar image = this.state().get( 'image' );\n\t\t\t\t\tvar view = new wp.media.view.EditImage( {\n\t\t\t\t\t\tmodel: image,\n\t\t\t\t\t\tcontroller: this,\n\t\t\t\t\t} ).render();\n\t\t\t\t\tthis.content.set( view );\n\n\t\t\t\t\t// after creating the wrapper view, load the actual editor via an ajax call\n\t\t\t\t\tview.loadEditor();\n\t\t\t\t},\n\t\t\t\tframe\n\t\t\t);\n\n\t\t\t// update toolbar button\n\t\t\t//frame.on( 'toolbar:create:select', function( toolbar ) {\n\t\t\t//\ttoolbar.view = new wp.media.view.Toolbar.Select({\n\t\t\t//\t\ttext: frame.options._button,\n\t\t\t//\t\tcontroller: this\n\t\t\t//\t});\n\t\t\t//}, frame );\n\n\t\t\t// on select\n\t\t\tframe.on( 'select', function () {\n\t\t\t\t// vars\n\t\t\t\tvar selection = frame.state().get( 'selection' );\n\n\t\t\t\t// if selecting images\n\t\t\t\tif ( selection ) {\n\t\t\t\t\t// loop\n\t\t\t\t\tselection.each( function ( attachment, i ) {\n\t\t\t\t\t\tframe.acf\n\t\t\t\t\t\t\t.get( 'select' )\n\t\t\t\t\t\t\t.apply( frame.acf, [ attachment, i ] );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// on close\n\t\t\tframe.on( 'close', function () {\n\t\t\t\t// callback and remove\n\t\t\t\tsetTimeout( function () {\n\t\t\t\t\tframe.acf.get( 'close' ).apply( frame.acf );\n\t\t\t\t\tframe.acf.remove();\n\t\t\t\t}, 1 );\n\t\t\t} );\n\t\t},\n\t} );\n\n\t/**\n\t * acf.models.SelectMediaPopup\n\t *\n\t * description\n\t *\n\t * @date\t10/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.models.SelectMediaPopup = MediaPopup.extend( {\n\t\tid: 'SelectMediaPopup',\n\t\tsetup: function ( props ) {\n\t\t\t// default button\n\t\t\tif ( ! props.button ) {\n\t\t\t\tprops.button = acf._x( 'Select', 'verb' );\n\t\t\t}\n\n\t\t\t// parent\n\t\t\tMediaPopup.prototype.setup.apply( this, arguments );\n\t\t},\n\n\t\taddFrameEvents: function ( frame, options ) {\n\t\t\t// plupload\n\t\t\t// adds _acfuploader param to validate uploads\n\t\t\tif (\n\t\t\t\tacf.isset( _wpPluploadSettings, 'defaults', 'multipart_params' )\n\t\t\t) {\n\t\t\t\t// add _acfuploader so that Uploader will inherit\n\t\t\t\t_wpPluploadSettings.defaults.multipart_params._acfuploader = this.get(\n\t\t\t\t\t'field'\n\t\t\t\t);\n\n\t\t\t\t// remove acf_field so future Uploaders won't inherit\n\t\t\t\tframe.on( 'open', function () {\n\t\t\t\t\tdelete _wpPluploadSettings\n\t\t\t\t\t\t.defaults.multipart_params._acfuploader;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// browse\n\t\t\tframe.on( 'content:activate:browse', function () {\n\t\t\t\t// vars\n\t\t\t\tvar toolbar = false;\n\n\t\t\t\t// populate above vars making sure to allow for failure\n\t\t\t\t// perhaps toolbar does not exist because the frame open is Upload Files\n\t\t\t\ttry {\n\t\t\t\t\ttoolbar = frame.content.get().toolbar;\n\t\t\t\t} catch ( e ) {\n\t\t\t\t\tconsole.log( e );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// callback\n\t\t\t\tframe.acf.customizeFilters.apply( frame.acf, [ toolbar ] );\n\t\t\t} );\n\n\t\t\t// parent\n\t\t\tMediaPopup.prototype.addFrameEvents.apply( this, arguments );\n\t\t},\n\n\t\tcustomizeFilters: function ( toolbar ) {\n\t\t\t// vars\n\t\t\tvar filters = toolbar.get( 'filters' );\n\n\t\t\t// image\n\t\t\tif ( this.get( 'type' ) == 'image' ) {\n\t\t\t\t// update all\n\t\t\t\tfilters.filters.all.text = acf.__( 'All images' );\n\n\t\t\t\t// remove some filters\n\t\t\t\tdelete filters.filters.audio;\n\t\t\t\tdelete filters.filters.video;\n\t\t\t\tdelete filters.filters.image;\n\n\t\t\t\t// update all filters to show images\n\t\t\t\t$.each( filters.filters, function ( i, filter ) {\n\t\t\t\t\tfilter.props.type = filter.props.type || 'image';\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// specific types\n\t\t\tif ( this.get( 'allowedTypes' ) ) {\n\t\t\t\t// convert \".jpg, .png\" into [\"jpg\", \"png\"]\n\t\t\t\tvar allowedTypes = this.get( 'allowedTypes' )\n\t\t\t\t\t.split( ' ' )\n\t\t\t\t\t.join( '' )\n\t\t\t\t\t.split( '.' )\n\t\t\t\t\t.join( '' )\n\t\t\t\t\t.split( ',' );\n\n\t\t\t\t// loop\n\t\t\t\tallowedTypes.map( function ( name ) {\n\t\t\t\t\t// get type\n\t\t\t\t\tvar mimeType = acf.getMimeType( name );\n\n\t\t\t\t\t// bail early if no type\n\t\t\t\t\tif ( ! mimeType ) return;\n\n\t\t\t\t\t// create new filter\n\t\t\t\t\tvar newFilter = {\n\t\t\t\t\t\ttext: mimeType,\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tstatus: null,\n\t\t\t\t\t\t\ttype: mimeType,\n\t\t\t\t\t\t\tuploadedTo: null,\n\t\t\t\t\t\t\torderby: 'date',\n\t\t\t\t\t\t\torder: 'DESC',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpriority: 20,\n\t\t\t\t\t};\n\n\t\t\t\t\t// append\n\t\t\t\t\tfilters.filters[ mimeType ] = newFilter;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// uploaded to post\n\t\t\tif ( this.get( 'library' ) === 'uploadedTo' ) {\n\t\t\t\t// vars\n\t\t\t\tvar uploadedTo = this.frame.options.library.uploadedTo;\n\n\t\t\t\t// remove some filters\n\t\t\t\tdelete filters.filters.unattached;\n\t\t\t\tdelete filters.filters.uploaded;\n\n\t\t\t\t// add uploadedTo to filters\n\t\t\t\t$.each( filters.filters, function ( i, filter ) {\n\t\t\t\t\tfilter.text +=\n\t\t\t\t\t\t' (' + acf.__( 'Uploaded to this post' ) + ')';\n\t\t\t\t\tfilter.props.uploadedTo = uploadedTo;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// add _acfuploader to filters\n\t\t\tvar field = this.get( 'field' );\n\t\t\t$.each( filters.filters, function ( k, filter ) {\n\t\t\t\tfilter.props._acfuploader = field;\n\t\t\t} );\n\n\t\t\t// add _acfuplaoder to search\n\t\t\tvar search = toolbar.get( 'search' );\n\t\t\tsearch.model.attributes._acfuploader = field;\n\n\t\t\t// render (custom function added to prototype)\n\t\t\tif ( filters.renderFilters ) {\n\t\t\t\tfilters.renderFilters();\n\t\t\t}\n\t\t},\n\t} );\n\n\t/**\n\t * acf.models.EditMediaPopup\n\t *\n\t * description\n\t *\n\t * @date\t10/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.models.EditMediaPopup = MediaPopup.extend( {\n\t\tid: 'SelectMediaPopup',\n\t\tsetup: function ( props ) {\n\t\t\t// default button\n\t\t\tif ( ! props.button ) {\n\t\t\t\tprops.button = acf._x( 'Update', 'verb' );\n\t\t\t}\n\n\t\t\t// parent\n\t\t\tMediaPopup.prototype.setup.apply( this, arguments );\n\t\t},\n\n\t\taddFrameEvents: function ( frame, options ) {\n\t\t\t// add class\n\t\t\tframe.on(\n\t\t\t\t'open',\n\t\t\t\tfunction () {\n\t\t\t\t\t// add class\n\t\t\t\t\tthis.$el\n\t\t\t\t\t\t.closest( '.media-modal' )\n\t\t\t\t\t\t.addClass( 'acf-expanded' );\n\n\t\t\t\t\t// set to browse\n\t\t\t\t\tif ( this.content.mode() != 'browse' ) {\n\t\t\t\t\t\tthis.content.mode( 'browse' );\n\t\t\t\t\t}\n\n\t\t\t\t\t// set selection\n\t\t\t\t\tvar state = this.state();\n\t\t\t\t\tvar selection = state.get( 'selection' );\n\t\t\t\t\tvar attachment = wp.media.attachment(\n\t\t\t\t\t\tframe.acf.get( 'attachment' )\n\t\t\t\t\t);\n\t\t\t\t\tselection.add( attachment );\n\t\t\t\t},\n\t\t\t\tframe\n\t\t\t);\n\n\t\t\t// parent\n\t\t\tMediaPopup.prototype.addFrameEvents.apply( this, arguments );\n\t\t},\n\t} );\n\n\t/**\n\t * customizePrototypes\n\t *\n\t * description\n\t *\n\t * @date\t11/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tvar customizePrototypes = new acf.Model( {\n\t\tid: 'customizePrototypes',\n\t\twait: 'ready',\n\n\t\tinitialize: function () {\n\t\t\t// bail early if no media views\n\t\t\tif ( ! acf.isset( window, 'wp', 'media', 'view' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// fix bug where CPT without \"editor\" does not set post.id setting which then prevents uploadedTo from working\n\t\t\tvar postID = getPostID();\n\t\t\tif (\n\t\t\t\tpostID &&\n\t\t\t\tacf.isset( wp, 'media', 'view', 'settings', 'post' )\n\t\t\t) {\n\t\t\t\twp.media.view.settings.post.id = postID;\n\t\t\t}\n\n\t\t\t// customize\n\t\t\tthis.customizeAttachmentsButton();\n\t\t\tthis.customizeAttachmentsRouter();\n\t\t\tthis.customizeAttachmentFilters();\n\t\t\tthis.customizeAttachmentCompat();\n\t\t\tthis.customizeAttachmentLibrary();\n\t\t},\n\n\t\tcustomizeAttachmentsButton: function () {\n\t\t\t// validate\n\t\t\tif ( ! acf.isset( wp, 'media', 'view', 'Button' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Extend\n\t\t\tvar Button = wp.media.view.Button;\n\t\t\twp.media.view.Button = Button.extend( {\n\t\t\t\t// Fix bug where \"Select\" button appears blank after editing an image.\n\t\t\t\t// Do this by simplifying Button initialize function and avoid deleting this.options.\n\t\t\t\tinitialize: function () {\n\t\t\t\t\tvar options = _.defaults( this.options, this.defaults );\n\t\t\t\t\tthis.model = new Backbone.Model( options );\n\t\t\t\t\tthis.listenTo( this.model, 'change', this.render );\n\t\t\t\t},\n\t\t\t} );\n\t\t},\n\n\t\tcustomizeAttachmentsRouter: function () {\n\t\t\t// validate\n\t\t\tif ( ! acf.isset( wp, 'media', 'view', 'Router' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// vars\n\t\t\tvar Parent = wp.media.view.Router;\n\n\t\t\t// extend\n\t\t\twp.media.view.Router = Parent.extend( {\n\t\t\t\taddExpand: function () {\n\t\t\t\t\t// vars\n\t\t\t\t\tvar $a = $(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t' ' +\n\t\t\t\t\t\t\t\tacf.__( 'Expand Details' ) +\n\t\t\t\t\t\t\t\t' ',\n\t\t\t\t\t\t\t' ' +\n\t\t\t\t\t\t\t\tacf.__( 'Collapse Details' ) +\n\t\t\t\t\t\t\t\t' ',\n\t\t\t\t\t\t\t' ',\n\t\t\t\t\t\t].join( '' )\n\t\t\t\t\t);\n\n\t\t\t\t\t// add events\n\t\t\t\t\t$a.on( 'click', function ( e ) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tvar $div = $( this ).closest( '.media-modal' );\n\t\t\t\t\t\tif ( $div.hasClass( 'acf-expanded' ) ) {\n\t\t\t\t\t\t\t$div.removeClass( 'acf-expanded' );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$div.addClass( 'acf-expanded' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t\t// append\n\t\t\t\t\tthis.$el.append( $a );\n\t\t\t\t},\n\n\t\t\t\tinitialize: function () {\n\t\t\t\t\t// initialize\n\t\t\t\t\tParent.prototype.initialize.apply( this, arguments );\n\n\t\t\t\t\t// add buttons\n\t\t\t\t\tthis.addExpand();\n\n\t\t\t\t\t// return\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t} );\n\t\t},\n\n\t\tcustomizeAttachmentFilters: function () {\n\t\t\t// validate\n\t\t\tif (\n\t\t\t\t! acf.isset( wp, 'media', 'view', 'AttachmentFilters', 'All' )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// vars\n\t\t\tvar Parent = wp.media.view.AttachmentFilters.All;\n\n\t\t\t// renderFilters\n\t\t\t// copied from media-views.js:6939\n\t\t\tParent.prototype.renderFilters = function () {\n\t\t\t\t// Build `` elements.\n\t\t\t\tthis.$el.html(\n\t\t\t\t\t_.chain( this.filters )\n\t\t\t\t\t\t.map( function ( filter, value ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tel: $( ' ' )\n\t\t\t\t\t\t\t\t\t.val( value )\n\t\t\t\t\t\t\t\t\t.html( filter.text )[ 0 ],\n\t\t\t\t\t\t\t\tpriority: filter.priority || 50,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}, this )\n\t\t\t\t\t\t.sortBy( 'priority' )\n\t\t\t\t\t\t.pluck( 'el' )\n\t\t\t\t\t\t.value()\n\t\t\t\t);\n\t\t\t};\n\t\t},\n\n\t\tcustomizeAttachmentCompat: function () {\n\t\t\t// validate\n\t\t\tif ( ! acf.isset( wp, 'media', 'view', 'AttachmentCompat' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// vars\n\t\t\tvar AttachmentCompat = wp.media.view.AttachmentCompat;\n\t\t\tvar timeout = false;\n\n\t\t\t// extend\n\t\t\twp.media.view.AttachmentCompat = AttachmentCompat.extend( {\n\t\t\t\trender: function () {\n\t\t\t\t\t// WP bug\n\t\t\t\t\t// When multiple media frames exist on the same page (WP content, WYSIWYG, image, file ),\n\t\t\t\t\t// WP creates multiple instances of this AttachmentCompat view.\n\t\t\t\t\t// Each instance will attempt to render when a new modal is created.\n\t\t\t\t\t// Use a property to avoid this and only render once per instance.\n\t\t\t\t\tif ( this.rendered ) {\n\t\t\t\t\t\treturn this;\n\t\t\t\t\t}\n\n\t\t\t\t\t// render HTML\n\t\t\t\t\tAttachmentCompat.prototype.render.apply( this, arguments );\n\n\t\t\t\t\t// when uploading, render is called twice.\n\t\t\t\t\t// ignore first render by checking for #acf-form-data element\n\t\t\t\t\tif ( ! this.$( '#acf-form-data' ).length ) {\n\t\t\t\t\t\treturn this;\n\t\t\t\t\t}\n\n\t\t\t\t\t// clear timeout\n\t\t\t\t\tclearTimeout( timeout );\n\n\t\t\t\t\t// setTimeout\n\t\t\t\t\ttimeout = setTimeout(\n\t\t\t\t\t\t$.proxy( function () {\n\t\t\t\t\t\t\tthis.rendered = true;\n\t\t\t\t\t\t\tacf.doAction( 'append', this.$el );\n\t\t\t\t\t\t}, this ),\n\t\t\t\t\t\t50\n\t\t\t\t\t);\n\n\t\t\t\t\t// return\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\tsave: function ( event ) {\n\t\t\t\t\tvar data = {};\n\n\t\t\t\t\tif ( event ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\n\t\t\t\t\t//_.each( this.$el.serializeArray(), function( pair ) {\n\t\t\t\t\t//\tdata[ pair.name ] = pair.value;\n\t\t\t\t\t//});\n\n\t\t\t\t\t// Serialize data more thoroughly to allow chckbox inputs to save.\n\t\t\t\t\tdata = acf.serializeForAjax( this.$el );\n\n\t\t\t\t\tthis.controller.trigger( 'attachment:compat:waiting', [\n\t\t\t\t\t\t'waiting',\n\t\t\t\t\t] );\n\t\t\t\t\tthis.model\n\t\t\t\t\t\t.saveCompat( data )\n\t\t\t\t\t\t.always( _.bind( this.postSave, this ) );\n\t\t\t\t},\n\t\t\t} );\n\t\t},\n\n\t\tcustomizeAttachmentLibrary: function () {\n\t\t\t// validate\n\t\t\tif ( ! acf.isset( wp, 'media', 'view', 'Attachment', 'Library' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// vars\n\t\t\tvar AttachmentLibrary = wp.media.view.Attachment.Library;\n\n\t\t\t// extend\n\t\t\twp.media.view.Attachment.Library = AttachmentLibrary.extend( {\n\t\t\t\trender: function () {\n\t\t\t\t\t// vars\n\t\t\t\t\tvar popup = acf.isget( this, 'controller', 'acf' );\n\t\t\t\t\tvar attributes = acf.isget( this, 'model', 'attributes' );\n\n\t\t\t\t\t// check vars exist to avoid errors\n\t\t\t\t\tif ( popup && attributes ) {\n\t\t\t\t\t\t// show errors\n\t\t\t\t\t\tif ( attributes.acf_errors ) {\n\t\t\t\t\t\t\tthis.$el.addClass( 'acf-disabled' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// disable selected\n\t\t\t\t\t\tvar selected = popup.get( 'selected' );\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tselected &&\n\t\t\t\t\t\t\tselected.indexOf( attributes.id ) > -1\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tthis.$el.addClass( 'acf-selected' );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// render\n\t\t\t\t\treturn AttachmentLibrary.prototype.render.apply(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\targuments\n\t\t\t\t\t);\n\t\t\t\t},\n\n\t\t\t\t/*\n\t\t\t\t * toggleSelection\n\t\t\t\t *\n\t\t\t\t * This function is called before an attachment is selected\n\t\t\t\t * A good place to check for errors and prevent the 'select' function from being fired\n\t\t\t\t *\n\t\t\t\t * @type\tfunction\n\t\t\t\t * @date\t29/09/2016\n\t\t\t\t * @since\t5.4.0\n\t\t\t\t *\n\t\t\t\t * @param\toptions (object)\n\t\t\t\t * @return\tn/a\n\t\t\t\t */\n\n\t\t\t\ttoggleSelection: function ( options ) {\n\t\t\t\t\t// vars\n\t\t\t\t\t// source: wp-includes/js/media-views.js:2880\n\t\t\t\t\tvar collection = this.collection,\n\t\t\t\t\t\tselection = this.options.selection,\n\t\t\t\t\t\tmodel = this.model,\n\t\t\t\t\t\tsingle = selection.single();\n\n\t\t\t\t\t// vars\n\t\t\t\t\tvar frame = this.controller;\n\t\t\t\t\tvar errors = acf.isget(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\t'model',\n\t\t\t\t\t\t'attributes',\n\t\t\t\t\t\t'acf_errors'\n\t\t\t\t\t);\n\t\t\t\t\tvar $sidebar = frame.$el.find(\n\t\t\t\t\t\t'.media-frame-content .media-sidebar'\n\t\t\t\t\t);\n\n\t\t\t\t\t// remove previous error\n\t\t\t\t\t$sidebar.children( '.acf-selection-error' ).remove();\n\n\t\t\t\t\t// show attachment details\n\t\t\t\t\t$sidebar.children().removeClass( 'acf-hidden' );\n\n\t\t\t\t\t// add message\n\t\t\t\t\tif ( frame && errors ) {\n\t\t\t\t\t\t// vars\n\t\t\t\t\t\tvar filename = acf.isget(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'model',\n\t\t\t\t\t\t\t'attributes',\n\t\t\t\t\t\t\t'filename'\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// hide attachment details\n\t\t\t\t\t\t// Gallery field continues to show previously selected attachment...\n\t\t\t\t\t\t$sidebar.children().addClass( 'acf-hidden' );\n\n\t\t\t\t\t\t// append message\n\t\t\t\t\t\t$sidebar.prepend(\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t'' +\n\t\t\t\t\t\t\t\t\tacf.__( 'Restricted' ) +\n\t\t\t\t\t\t\t\t\t' ',\n\t\t\t\t\t\t\t\t'' +\n\t\t\t\t\t\t\t\t\tfilename +\n\t\t\t\t\t\t\t\t\t' ',\n\t\t\t\t\t\t\t\t'' +\n\t\t\t\t\t\t\t\t\terrors +\n\t\t\t\t\t\t\t\t\t' ',\n\t\t\t\t\t\t\t\t'
',\n\t\t\t\t\t\t\t].join( '' )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// reset selection (unselects all attachments)\n\t\t\t\t\t\tselection.reset();\n\n\t\t\t\t\t\t// set single (attachment displayed in sidebar)\n\t\t\t\t\t\tselection.single( model );\n\n\t\t\t\t\t\t// return and prevent 'select' form being fired\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// return\n\t\t\t\t\treturn AttachmentLibrary.prototype.toggleSelection.apply(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\targuments\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t} );\n\t\t},\n\t} );\n} )( jQuery );\n","( function ( $, undefined ) {\n\t/**\n\t * postboxManager\n\t *\n\t * Manages postboxes on the screen.\n\t *\n\t * @date\t25/5/19\n\t * @since\t5.8.1\n\t *\n\t * @param\tvoid\n\t * @return\tvoid\n\t */\n\tvar postboxManager = new acf.Model( {\n\t\twait: 'prepare',\n\t\tpriority: 1,\n\t\tinitialize: function () {\n\t\t\t( acf.get( 'postboxes' ) || [] ).map( acf.newPostbox );\n\t\t},\n\t} );\n\n\t/**\n\t * acf.getPostbox\n\t *\n\t * Returns a postbox instance.\n\t *\n\t * @date\t23/9/18\n\t * @since\t5.7.7\n\t *\n\t * @param\tmixed $el Either a jQuery element or the postbox id.\n\t * @return\tobject\n\t */\n\tacf.getPostbox = function ( $el ) {\n\t\t// allow string parameter\n\t\tif ( typeof arguments[ 0 ] == 'string' ) {\n\t\t\t$el = $( '#' + arguments[ 0 ] );\n\t\t}\n\n\t\t// return instance\n\t\treturn acf.getInstance( $el );\n\t};\n\n\t/**\n\t * acf.getPostboxes\n\t *\n\t * Returns an array of postbox instances.\n\t *\n\t * @date\t23/9/18\n\t * @since\t5.7.7\n\t *\n\t * @param\tvoid\n\t * @return\tarray\n\t */\n\tacf.getPostboxes = function () {\n\t\treturn acf.getInstances( $( '.acf-postbox' ) );\n\t};\n\n\t/**\n\t * acf.newPostbox\n\t *\n\t * Returns a new postbox instance for the given props.\n\t *\n\t * @date\t20/9/18\n\t * @since\t5.7.6\n\t *\n\t * @param\tobject props The postbox properties.\n\t * @return\tobject\n\t */\n\tacf.newPostbox = function ( props ) {\n\t\treturn new acf.models.Postbox( props );\n\t};\n\n\t/**\n\t * acf.models.Postbox\n\t *\n\t * The postbox model.\n\t *\n\t * @date\t20/9/18\n\t * @since\t5.7.6\n\t *\n\t * @param\tvoid\n\t * @return\tvoid\n\t */\n\tacf.models.Postbox = acf.Model.extend( {\n\t\tdata: {\n\t\t\tid: '',\n\t\t\tkey: '',\n\t\t\tstyle: 'default',\n\t\t\tlabel: 'top',\n\t\t\tedit: '',\n\t\t},\n\n\t\tsetup: function ( props ) {\n\t\t\t// compatibilty\n\t\t\tif ( props.editLink ) {\n\t\t\t\tprops.edit = props.editLink;\n\t\t\t}\n\n\t\t\t// extend data\n\t\t\t$.extend( this.data, props );\n\n\t\t\t// set $el\n\t\t\tthis.$el = this.$postbox();\n\t\t},\n\n\t\t$postbox: function () {\n\t\t\treturn $( '#' + this.get( 'id' ) );\n\t\t},\n\n\t\t$hide: function () {\n\t\t\treturn $( '#' + this.get( 'id' ) + '-hide' );\n\t\t},\n\n\t\t$hideLabel: function () {\n\t\t\treturn this.$hide().parent();\n\t\t},\n\n\t\t$hndle: function () {\n\t\t\treturn this.$( '> .hndle' );\n\t\t},\n\n\t\t$handleActions: function () {\n\t\t\treturn this.$( '> .postbox-header .handle-actions' );\n\t\t},\n\n\t\t$inside: function () {\n\t\t\treturn this.$( '> .inside' );\n\t\t},\n\n\t\tisVisible: function () {\n\t\t\treturn this.$el.hasClass( 'acf-hidden' );\n\t\t},\n\n\t\tisHiddenByScreenOptions: function () {\n\t\t\treturn (\n\t\t\t\tthis.$el.hasClass( 'hide-if-js' ) ||\n\t\t\t\tthis.$el.css( 'display' ) == 'none'\n\t\t\t);\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\t// Add default class.\n\t\t\tthis.$el.addClass( 'acf-postbox' );\n\n\t\t\t// Add field group style class (ignore in block editor).\n\t\t\tif ( acf.get( 'editor' ) !== 'block' ) {\n\t\t\t\tvar style = this.get( 'style' );\n\t\t\t\tif ( style !== 'default' ) {\n\t\t\t\t\tthis.$el.addClass( style );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add .inside class.\n\t\t\tthis.$inside()\n\t\t\t\t.addClass( 'acf-fields' )\n\t\t\t\t.addClass( '-' + this.get( 'label' ) );\n\n\t\t\t// Append edit link.\n\t\t\tvar edit = this.get( 'edit' );\n\t\t\tif ( edit ) {\n\t\t\t\tvar html =\n\t\t\t\t\t' ';\n\t\t\t\tvar $handleActions = this.$handleActions();\n\t\t\t\tif ( $handleActions.length ) {\n\t\t\t\t\t$handleActions.prepend( html );\n\t\t\t\t} else {\n\t\t\t\t\tthis.$hndle().append( html );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Show postbox.\n\t\t\tthis.show();\n\t\t},\n\n\t\tshow: function () {\n\t\t\t// If disabled by screen options, set checked to false and return.\n\t\t\tif ( this.$el.hasClass( 'hide-if-js' ) ) {\n\t\t\t\tthis.$hide().prop( 'checked', false );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Show label.\n\t\t\tthis.$hideLabel().show();\n\n\t\t\t// toggle on checkbox\n\t\t\tthis.$hide().prop( 'checked', true );\n\n\t\t\t// Show postbox\n\t\t\tthis.$el.show().removeClass( 'acf-hidden' );\n\n\t\t\t// Do action.\n\t\t\tacf.doAction( 'show_postbox', this );\n\t\t},\n\n\t\tenable: function () {\n\t\t\tacf.enable( this.$el, 'postbox' );\n\t\t},\n\n\t\tshowEnable: function () {\n\t\t\tthis.enable();\n\t\t\tthis.show();\n\t\t},\n\n\t\thide: function () {\n\t\t\t// Hide label.\n\t\t\tthis.$hideLabel().hide();\n\n\t\t\t// Hide postbox\n\t\t\tthis.$el.hide().addClass( 'acf-hidden' );\n\n\t\t\t// Do action.\n\t\t\tacf.doAction( 'hide_postbox', this );\n\t\t},\n\n\t\tdisable: function () {\n\t\t\tacf.disable( this.$el, 'postbox' );\n\t\t},\n\n\t\thideDisable: function () {\n\t\t\tthis.disable();\n\t\t\tthis.hide();\n\t\t},\n\n\t\thtml: function ( html ) {\n\t\t\t// Update HTML.\n\t\t\tthis.$inside().html( html );\n\n\t\t\t// Do action.\n\t\t\tacf.doAction( 'append', this.$el );\n\t\t},\n\t} );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tacf.screen = new acf.Model( {\n\t\tactive: true,\n\n\t\txhr: false,\n\n\t\ttimeout: false,\n\n\t\twait: 'load',\n\n\t\tevents: {\n\t\t\t'change #page_template': 'onChange',\n\t\t\t'change #parent_id': 'onChange',\n\t\t\t'change #post-formats-select': 'onChange',\n\t\t\t'change .categorychecklist': 'onChange',\n\t\t\t'change .tagsdiv': 'onChange',\n\t\t\t'change .acf-taxonomy-field[data-save=\"1\"]': 'onChange',\n\t\t\t'change #product-type': 'onChange',\n\t\t},\n\n\t\tisPost: function () {\n\t\t\treturn acf.get( 'screen' ) === 'post';\n\t\t},\n\n\t\tisUser: function () {\n\t\t\treturn acf.get( 'screen' ) === 'user';\n\t\t},\n\n\t\tisTaxonomy: function () {\n\t\t\treturn acf.get( 'screen' ) === 'taxonomy';\n\t\t},\n\n\t\tisAttachment: function () {\n\t\t\treturn acf.get( 'screen' ) === 'attachment';\n\t\t},\n\n\t\tisNavMenu: function () {\n\t\t\treturn acf.get( 'screen' ) === 'nav_menu';\n\t\t},\n\n\t\tisWidget: function () {\n\t\t\treturn acf.get( 'screen' ) === 'widget';\n\t\t},\n\n\t\tisComment: function () {\n\t\t\treturn acf.get( 'screen' ) === 'comment';\n\t\t},\n\n\t\tgetPageTemplate: function () {\n\t\t\tvar $el = $( '#page_template' );\n\t\t\treturn $el.length ? $el.val() : null;\n\t\t},\n\n\t\tgetPageParent: function ( e, $el ) {\n\t\t\tvar $el = $( '#parent_id' );\n\t\t\treturn $el.length ? $el.val() : null;\n\t\t},\n\n\t\tgetPageType: function ( e, $el ) {\n\t\t\treturn this.getPageParent() ? 'child' : 'parent';\n\t\t},\n\n\t\tgetPostType: function () {\n\t\t\treturn $( '#post_type' ).val();\n\t\t},\n\n\t\tgetPostFormat: function ( e, $el ) {\n\t\t\tvar $el = $( '#post-formats-select input:checked' );\n\t\t\tif ( $el.length ) {\n\t\t\t\tvar val = $el.val();\n\t\t\t\treturn val == '0' ? 'standard' : val;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\n\t\tgetPostCoreTerms: function () {\n\t\t\t// vars\n\t\t\tvar terms = {};\n\n\t\t\t// serialize WP taxonomy postboxes\n\t\t\tvar data = acf.serialize( $( '.categorydiv, .tagsdiv' ) );\n\n\t\t\t// use tax_input (tag, custom-taxonomy) when possible.\n\t\t\t// this data is already formatted in taxonomy => [terms].\n\t\t\tif ( data.tax_input ) {\n\t\t\t\tterms = data.tax_input;\n\t\t\t}\n\n\t\t\t// append \"category\" which uses a different name\n\t\t\tif ( data.post_category ) {\n\t\t\t\tterms.category = data.post_category;\n\t\t\t}\n\n\t\t\t// convert any string values (tags) into array format\n\t\t\tfor ( var tax in terms ) {\n\t\t\t\tif ( ! acf.isArray( terms[ tax ] ) ) {\n\t\t\t\t\tterms[ tax ] = terms[ tax ].split( /,[\\s]?/ );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn terms;\n\t\t},\n\n\t\tgetPostTerms: function () {\n\t\t\t// Get core terms.\n\t\t\tvar terms = this.getPostCoreTerms();\n\n\t\t\t// loop over taxonomy fields and add their values\n\t\t\tacf.getFields( { type: 'taxonomy' } ).map( function ( field ) {\n\t\t\t\t// ignore fields that don't save\n\t\t\t\tif ( ! field.get( 'save' ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// vars\n\t\t\t\tvar val = field.val();\n\t\t\t\tvar tax = field.get( 'taxonomy' );\n\n\t\t\t\t// check val\n\t\t\t\tif ( val ) {\n\t\t\t\t\t// ensure terms exists\n\t\t\t\t\tterms[ tax ] = terms[ tax ] || [];\n\n\t\t\t\t\t// ensure val is an array\n\t\t\t\t\tval = acf.isArray( val ) ? val : [ val ];\n\n\t\t\t\t\t// append\n\t\t\t\t\tterms[ tax ] = terms[ tax ].concat( val );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// add WC product type\n\t\t\tif ( ( productType = this.getProductType() ) !== null ) {\n\t\t\t\tterms.product_type = [ productType ];\n\t\t\t}\n\n\t\t\t// remove duplicate values\n\t\t\tfor ( var tax in terms ) {\n\t\t\t\tterms[ tax ] = acf.uniqueArray( terms[ tax ] );\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn terms;\n\t\t},\n\n\t\tgetProductType: function () {\n\t\t\tvar $el = $( '#product-type' );\n\t\t\treturn $el.length ? $el.val() : null;\n\t\t},\n\n\t\tcheck: function () {\n\t\t\t// bail early if not for post\n\t\t\tif ( acf.get( 'screen' ) !== 'post' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// abort XHR if is already loading AJAX data\n\t\t\tif ( this.xhr ) {\n\t\t\t\tthis.xhr.abort();\n\t\t\t}\n\n\t\t\t// vars\n\t\t\tvar ajaxData = acf.parseArgs( this.data, {\n\t\t\t\taction: 'acf/ajax/check_screen',\n\t\t\t\tscreen: acf.get( 'screen' ),\n\t\t\t\texists: [],\n\t\t\t} );\n\n\t\t\t// post id\n\t\t\tif ( this.isPost() ) {\n\t\t\t\tajaxData.post_id = acf.get( 'post_id' );\n\t\t\t}\n\n\t\t\t// post type\n\t\t\tif ( ( postType = this.getPostType() ) !== null ) {\n\t\t\t\tajaxData.post_type = postType;\n\t\t\t}\n\n\t\t\t// page template\n\t\t\tif ( ( pageTemplate = this.getPageTemplate() ) !== null ) {\n\t\t\t\tajaxData.page_template = pageTemplate;\n\t\t\t}\n\n\t\t\t// page parent\n\t\t\tif ( ( pageParent = this.getPageParent() ) !== null ) {\n\t\t\t\tajaxData.page_parent = pageParent;\n\t\t\t}\n\n\t\t\t// page type\n\t\t\tif ( ( pageType = this.getPageType() ) !== null ) {\n\t\t\t\tajaxData.page_type = pageType;\n\t\t\t}\n\n\t\t\t// post format\n\t\t\tif ( ( postFormat = this.getPostFormat() ) !== null ) {\n\t\t\t\tajaxData.post_format = postFormat;\n\t\t\t}\n\n\t\t\t// post terms\n\t\t\tif ( ( postTerms = this.getPostTerms() ) !== null ) {\n\t\t\t\tajaxData.post_terms = postTerms;\n\t\t\t}\n\n\t\t\t// add array of existing postboxes to increase performance and reduce JSON HTML\n\t\t\tacf.getPostboxes().map( function ( postbox ) {\n\t\t\t\tajaxData.exists.push( postbox.get( 'key' ) );\n\t\t\t} );\n\n\t\t\t// filter\n\t\t\tajaxData = acf.applyFilters( 'check_screen_args', ajaxData );\n\n\t\t\t// success\n\t\t\tvar onSuccess = function ( json ) {\n\t\t\t\t// Render post screen.\n\t\t\t\tif ( acf.get( 'screen' ) == 'post' ) {\n\t\t\t\t\tthis.renderPostScreen( json );\n\n\t\t\t\t\t// Render user screen.\n\t\t\t\t} else if ( acf.get( 'screen' ) == 'user' ) {\n\t\t\t\t\tthis.renderUserScreen( json );\n\t\t\t\t}\n\n\t\t\t\t// action\n\t\t\t\tacf.doAction( 'check_screen_complete', json, ajaxData );\n\t\t\t};\n\n\t\t\t// ajax\n\t\t\tthis.xhr = $.ajax( {\n\t\t\t\turl: acf.get( 'ajaxurl' ),\n\t\t\t\tdata: acf.prepareForAjax( ajaxData ),\n\t\t\t\ttype: 'post',\n\t\t\t\tdataType: 'json',\n\t\t\t\tcontext: this,\n\t\t\t\tsuccess: onSuccess,\n\t\t\t} );\n\t\t},\n\n\t\tonChange: function ( e, $el ) {\n\t\t\tthis.setTimeout( this.check, 1 );\n\t\t},\n\n\t\trenderPostScreen: function ( data ) {\n\t\t\t// Helper function to copy events\n\t\t\tvar copyEvents = function ( $from, $to ) {\n\t\t\t\tvar events = $._data( $from[ 0 ] ).events;\n\t\t\t\tfor ( var type in events ) {\n\t\t\t\t\tfor ( var i = 0; i < events[ type ].length; i++ ) {\n\t\t\t\t\t\t$to.on( type, events[ type ][ i ].handler );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Helper function to sort metabox.\n\t\t\tvar sortMetabox = function ( id, ids ) {\n\t\t\t\t// Find position of id within ids.\n\t\t\t\tvar index = ids.indexOf( id );\n\n\t\t\t\t// Bail early if index not found.\n\t\t\t\tif ( index == -1 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Loop over metaboxes behind (in reverse order).\n\t\t\t\tfor ( var i = index - 1; i >= 0; i-- ) {\n\t\t\t\t\tif ( $( '#' + ids[ i ] ).length ) {\n\t\t\t\t\t\treturn $( '#' + ids[ i ] ).after( $( '#' + id ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Loop over metaboxes infront.\n\t\t\t\tfor ( var i = index + 1; i < ids.length; i++ ) {\n\t\t\t\t\tif ( $( '#' + ids[ i ] ).length ) {\n\t\t\t\t\t\treturn $( '#' + ids[ i ] ).before( $( '#' + id ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Return false if not sorted.\n\t\t\t\treturn false;\n\t\t\t};\n\n\t\t\t// Keep track of visible and hidden postboxes.\n\t\t\tdata.visible = [];\n\t\t\tdata.hidden = [];\n\n\t\t\t// Show these postboxes.\n\t\t\tdata.results = data.results.map( function ( result, i ) {\n\t\t\t\t// vars\n\t\t\t\tvar postbox = acf.getPostbox( result.id );\n\n\t\t\t\t// Prevent \"acf_after_title\" position in Block Editor.\n\t\t\t\tif (\n\t\t\t\t\tacf.isGutenberg() &&\n\t\t\t\t\tresult.position == 'acf_after_title'\n\t\t\t\t) {\n\t\t\t\t\tresult.position = 'normal';\n\t\t\t\t}\n\n\t\t\t\t// Create postbox if doesn't exist.\n\t\t\t\tif ( ! postbox ) {\n\t\t\t\t\tvar wpMinorVersion = parseFloat( acf.get( 'wp_version' ) );\n\t\t\t\t\tif ( wpMinorVersion >= 5.5 ) {\n\t\t\t\t\t\tvar postboxHeader = [\n\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t].join( '' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar postboxHeader = [\n\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t'Toggle panel: ' +\n\t\t\t\t\t\t\t\tacf.escHtml( result.title ) +\n\t\t\t\t\t\t\t\t' ',\n\t\t\t\t\t\t\t' ',\n\t\t\t\t\t\t\t' ',\n\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t'' + acf.escHtml( result.title ) + ' ',\n\t\t\t\t\t\t\t' ',\n\t\t\t\t\t\t].join( '' );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Ensure result.classes is set.\n\t\t\t\t\tif ( ! result.classes ) result.classes = '';\n\n\t\t\t\t\t// Create it.\n\t\t\t\t\tvar $postbox = $(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\tpostboxHeader,\n\t\t\t\t\t\t\t'
',\n\t\t\t\t\t\t\tresult.html,\n\t\t\t\t\t\t\t'
',\n\t\t\t\t\t\t\t'
',\n\t\t\t\t\t\t].join( '' )\n\t\t\t\t\t);\n\n\t\t\t\t\t// Create new hide toggle.\n\t\t\t\t\tif ( $( '#adv-settings' ).length ) {\n\t\t\t\t\t\tvar $prefs = $( '#adv-settings .metabox-prefs' );\n\t\t\t\t\t\tvar $label = $(\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t' ',\n\t\t\t\t\t\t\t\t' ' + result.title,\n\t\t\t\t\t\t\t\t' ',\n\t\t\t\t\t\t\t].join( '' )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Copy default WP events onto checkbox.\n\t\t\t\t\t\tcopyEvents(\n\t\t\t\t\t\t\t$prefs.find( 'input' ).first(),\n\t\t\t\t\t\t\t$label.find( 'input' )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Append hide label\n\t\t\t\t\t\t$prefs.append( $label );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Copy default WP events onto metabox.\n\t\t\t\t\tif ( $( '.postbox' ).length ) {\n\t\t\t\t\t\tcopyEvents(\n\t\t\t\t\t\t\t$( '.postbox .handlediv' ).first(),\n\t\t\t\t\t\t\t$postbox.children( '.handlediv' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tcopyEvents(\n\t\t\t\t\t\t\t$( '.postbox .hndle' ).first(),\n\t\t\t\t\t\t\t$postbox.children( '.hndle' )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Append metabox to the bottom of \"side-sortables\".\n\t\t\t\t\tif ( result.position === 'side' ) {\n\t\t\t\t\t\t$( '#' + result.position + '-sortables' ).append(\n\t\t\t\t\t\t\t$postbox\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Prepend metabox to the top of \"normal-sortbables\".\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$( '#' + result.position + '-sortables' ).prepend(\n\t\t\t\t\t\t\t$postbox\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Position metabox amongst existing ACF metaboxes within the same location.\n\t\t\t\t\tvar order = [];\n\t\t\t\t\tdata.results.map( function ( _result ) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tresult.position === _result.position &&\n\t\t\t\t\t\t\t$(\n\t\t\t\t\t\t\t\t'#' +\n\t\t\t\t\t\t\t\t\tresult.position +\n\t\t\t\t\t\t\t\t\t'-sortables #' +\n\t\t\t\t\t\t\t\t\t_result.id\n\t\t\t\t\t\t\t).length\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\torder.push( _result.id );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t\tsortMetabox( result.id, order );\n\n\t\t\t\t\t// Check 'sorted' for user preference.\n\t\t\t\t\tif ( data.sorted ) {\n\t\t\t\t\t\t// Loop over each position (acf_after_title, side, normal).\n\t\t\t\t\t\tfor ( var position in data.sorted ) {\n\t\t\t\t\t\t\tlet order = data.sorted[ position ];\n\n\t\t\t\t\t\t\tif ( typeof order !== 'string' ) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Explode string into array of ids.\n\t\t\t\t\t\t\torder = order.split( ',' );\n\n\t\t\t\t\t\t\t// Position metabox relative to order.\n\t\t\t\t\t\t\tif ( sortMetabox( result.id, order ) ) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Initalize it (modifies HTML).\n\t\t\t\t\tpostbox = acf.newPostbox( result );\n\n\t\t\t\t\t// Trigger action.\n\t\t\t\t\tacf.doAction( 'append', $postbox );\n\t\t\t\t\tacf.doAction( 'append_postbox', postbox );\n\t\t\t\t}\n\n\t\t\t\t// show postbox\n\t\t\t\tpostbox.showEnable();\n\n\t\t\t\t// append\n\t\t\t\tdata.visible.push( result.id );\n\n\t\t\t\t// Return result (may have changed).\n\t\t\t\treturn result;\n\t\t\t} );\n\n\t\t\t// Hide these postboxes.\n\t\t\tacf.getPostboxes().map( function ( postbox ) {\n\t\t\t\tif ( data.visible.indexOf( postbox.get( 'id' ) ) === -1 ) {\n\t\t\t\t\t// Hide postbox.\n\t\t\t\t\tpostbox.hideDisable();\n\n\t\t\t\t\t// Append to data.\n\t\t\t\t\tdata.hidden.push( postbox.get( 'id' ) );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// Update style.\n\t\t\t$( '#acf-style' ).html( data.style );\n\n\t\t\t// Do action.\n\t\t\tacf.doAction( 'refresh_post_screen', data );\n\t\t},\n\n\t\trenderUserScreen: function ( json ) {},\n\t} );\n\n\t/**\n\t * gutenScreen\n\t *\n\t * Adds compatibility with the Gutenberg edit screen.\n\t *\n\t * @date\t11/12/18\n\t * @since\t5.8.0\n\t *\n\t * @param\tvoid\n\t * @return\tvoid\n\t */\n\tvar gutenScreen = new acf.Model( {\n\t\t// Keep a reference to the most recent post attributes.\n\t\tpostEdits: {},\n\n\t\t// Wait until assets have been loaded.\n\t\twait: 'prepare',\n\n\t\tinitialize: function () {\n\t\t\t// Bail early if not Gutenberg.\n\t\t\tif ( ! acf.isGutenberg() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Listen for changes (use debounced version as this can fires often).\n\t\t\twp.data.subscribe( acf.debounce( this.onChange ).bind( this ) );\n\n\t\t\t// Customize \"acf.screen.get\" functions.\n\t\t\tacf.screen.getPageTemplate = this.getPageTemplate;\n\t\t\tacf.screen.getPageParent = this.getPageParent;\n\t\t\tacf.screen.getPostType = this.getPostType;\n\t\t\tacf.screen.getPostFormat = this.getPostFormat;\n\t\t\tacf.screen.getPostCoreTerms = this.getPostCoreTerms;\n\n\t\t\t// Disable unload\n\t\t\tacf.unload.disable();\n\n\t\t\t// Refresh metaboxes since WP 5.3.\n\t\t\tvar wpMinorVersion = parseFloat( acf.get( 'wp_version' ) );\n\t\t\tif ( wpMinorVersion >= 5.3 ) {\n\t\t\t\tthis.addAction(\n\t\t\t\t\t'refresh_post_screen',\n\t\t\t\t\tthis.onRefreshPostScreen\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Trigger \"refresh\" after WP has moved metaboxes into place.\n\t\t\twp.domReady( acf.refresh );\n\t\t},\n\n\t\tonChange: function () {\n\t\t\t// Determine attributes that can trigger a refresh.\n\t\t\tvar attributes = [ 'template', 'parent', 'format' ];\n\n\t\t\t// Append taxonomy attribute names to this list.\n\t\t\t( wp.data.select( 'core' ).getTaxonomies() || [] ).map( function (\n\t\t\t\ttaxonomy\n\t\t\t) {\n\t\t\t\tattributes.push( taxonomy.rest_base );\n\t\t\t} );\n\n\t\t\t// Get relevant current post edits.\n\t\t\tvar _postEdits = wp.data.select( 'core/editor' ).getPostEdits();\n\t\t\tvar postEdits = {};\n\t\t\tattributes.map( function ( k ) {\n\t\t\t\tif ( _postEdits[ k ] !== undefined ) {\n\t\t\t\t\tpostEdits[ k ] = _postEdits[ k ];\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// Detect change.\n\t\t\tif (\n\t\t\t\tJSON.stringify( postEdits ) !== JSON.stringify( this.postEdits )\n\t\t\t) {\n\t\t\t\tthis.postEdits = postEdits;\n\n\t\t\t\t// Check screen.\n\t\t\t\tacf.screen.check();\n\t\t\t}\n\t\t},\n\n\t\tgetPageTemplate: function () {\n\t\t\treturn wp.data\n\t\t\t\t.select( 'core/editor' )\n\t\t\t\t.getEditedPostAttribute( 'template' );\n\t\t},\n\n\t\tgetPageParent: function ( e, $el ) {\n\t\t\treturn wp.data\n\t\t\t\t.select( 'core/editor' )\n\t\t\t\t.getEditedPostAttribute( 'parent' );\n\t\t},\n\n\t\tgetPostType: function () {\n\t\t\treturn wp.data\n\t\t\t\t.select( 'core/editor' )\n\t\t\t\t.getEditedPostAttribute( 'type' );\n\t\t},\n\n\t\tgetPostFormat: function ( e, $el ) {\n\t\t\treturn wp.data\n\t\t\t\t.select( 'core/editor' )\n\t\t\t\t.getEditedPostAttribute( 'format' );\n\t\t},\n\n\t\tgetPostCoreTerms: function () {\n\t\t\t// vars\n\t\t\tvar terms = {};\n\n\t\t\t// Loop over taxonomies.\n\t\t\tvar taxonomies = wp.data.select( 'core' ).getTaxonomies() || [];\n\t\t\ttaxonomies.map( function ( taxonomy ) {\n\t\t\t\t// Append selected taxonomies to terms object.\n\t\t\t\tvar postTerms = wp.data\n\t\t\t\t\t.select( 'core/editor' )\n\t\t\t\t\t.getEditedPostAttribute( taxonomy.rest_base );\n\t\t\t\tif ( postTerms ) {\n\t\t\t\t\tterms[ taxonomy.slug ] = postTerms;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// return\n\t\t\treturn terms;\n\t\t},\n\n\t\t/**\n\t\t * onRefreshPostScreen\n\t\t *\n\t\t * Fires after the Post edit screen metaboxs are refreshed to update the Block Editor API state.\n\t\t *\n\t\t * @date\t11/11/19\n\t\t * @since\t5.8.7\n\t\t *\n\t\t * @param\tobject data The \"check_screen\" JSON response data.\n\t\t * @return\tvoid\n\t\t */\n\t\tonRefreshPostScreen: function ( data ) {\n\t\t\t// Extract vars.\n\t\t\tvar select = wp.data.select( 'core/edit-post' );\n\t\t\tvar dispatch = wp.data.dispatch( 'core/edit-post' );\n\n\t\t\t// Load current metabox locations and data.\n\t\t\tvar locations = {};\n\t\t\tselect.getActiveMetaBoxLocations().map( function ( location ) {\n\t\t\t\tlocations[ location ] = select.getMetaBoxesPerLocation(\n\t\t\t\t\tlocation\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\t// Generate flat array of existing ids.\n\t\t\tvar ids = [];\n\t\t\tfor ( var k in locations ) {\n\t\t\t\tlocations[ k ].map( function ( m ) {\n\t\t\t\t\tids.push( m.id );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Append new ACF metaboxes (ignore those which already exist).\n\t\t\tdata.results\n\t\t\t\t.filter( function ( r ) {\n\t\t\t\t\treturn ids.indexOf( r.id ) === -1;\n\t\t\t\t} )\n\t\t\t\t.map( function ( result, i ) {\n\t\t\t\t\t// Ensure location exists.\n\t\t\t\t\tvar location = result.position;\n\t\t\t\t\tlocations[ location ] = locations[ location ] || [];\n\n\t\t\t\t\t// Append.\n\t\t\t\t\tlocations[ location ].push( {\n\t\t\t\t\t\tid: result.id,\n\t\t\t\t\t\ttitle: result.title,\n\t\t\t\t\t} );\n\t\t\t\t} );\n\n\t\t\t// Remove hidden ACF metaboxes.\n\t\t\tfor ( var k in locations ) {\n\t\t\t\tlocations[ k ] = locations[ k ].filter( function ( m ) {\n\t\t\t\t\treturn data.hidden.indexOf( m.id ) === -1;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Update state.\n\t\t\tdispatch.setAvailableMetaBoxesPerLocation( locations );\n\t\t},\n\t} );\n} )( jQuery );\n","( function ( $, undefined ) {\n\t/**\n\t * acf.newSelect2\n\t *\n\t * description\n\t *\n\t * @date\t13/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.newSelect2 = function ( $select, props ) {\n\t\t// defaults\n\t\tprops = acf.parseArgs( props, {\n\t\t\tallowNull: false,\n\t\t\tplaceholder: '',\n\t\t\tmultiple: false,\n\t\t\tfield: false,\n\t\t\tajax: false,\n\t\t\tajaxAction: '',\n\t\t\tajaxData: function ( data ) {\n\t\t\t\treturn data;\n\t\t\t},\n\t\t\tajaxResults: function ( json ) {\n\t\t\t\treturn json;\n\t\t\t},\n\t\t\ttemplateSelection: false,\n\t\t\ttemplateResult: false,\n\t\t\tdropdownCssClass: '',\n\t\t\tsuppressFilters: false,\n\t\t} );\n\n\t\t// initialize\n\t\tif ( getVersion() == 4 ) {\n\t\t\tvar select2 = new Select2_4( $select, props );\n\t\t} else {\n\t\t\tvar select2 = new Select2_3( $select, props );\n\t\t}\n\n\t\t// actions\n\t\tacf.doAction( 'new_select2', select2 );\n\n\t\t// return\n\t\treturn select2;\n\t};\n\n\t/**\n\t * getVersion\n\t *\n\t * description\n\t *\n\t * @date\t13/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tfunction getVersion() {\n\t\t// v4\n\t\tif ( acf.isset( window, 'jQuery', 'fn', 'select2', 'amd' ) ) {\n\t\t\treturn 4;\n\t\t}\n\n\t\t// v3\n\t\tif ( acf.isset( window, 'Select2' ) ) {\n\t\t\treturn 3;\n\t\t}\n\n\t\t// return\n\t\treturn false;\n\t}\n\n\t/**\n\t * Select2\n\t *\n\t * description\n\t *\n\t * @date\t13/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tvar Select2 = acf.Model.extend( {\n\t\tsetup: function ( $select, props ) {\n\t\t\t$.extend( this.data, props );\n\t\t\tthis.$el = $select;\n\t\t},\n\n\t\tinitialize: function () {},\n\n\t\tselectOption: function ( value ) {\n\t\t\tvar $option = this.getOption( value );\n\t\t\tif ( ! $option.prop( 'selected' ) ) {\n\t\t\t\t$option.prop( 'selected', true ).trigger( 'change' );\n\t\t\t}\n\t\t},\n\n\t\tunselectOption: function ( value ) {\n\t\t\tvar $option = this.getOption( value );\n\t\t\tif ( $option.prop( 'selected' ) ) {\n\t\t\t\t$option.prop( 'selected', false ).trigger( 'change' );\n\t\t\t}\n\t\t},\n\n\t\tgetOption: function ( value ) {\n\t\t\treturn this.$( 'option[value=\"' + value + '\"]' );\n\t\t},\n\n\t\taddOption: function ( option ) {\n\t\t\t// defaults\n\t\t\toption = acf.parseArgs( option, {\n\t\t\t\tid: '',\n\t\t\t\ttext: '',\n\t\t\t\tselected: false,\n\t\t\t} );\n\n\t\t\t// vars\n\t\t\tvar $option = this.getOption( option.id );\n\n\t\t\t// append\n\t\t\tif ( ! $option.length ) {\n\t\t\t\t$option = $( ' ' );\n\t\t\t\t$option.html( option.text );\n\t\t\t\t$option.attr( 'value', option.id );\n\t\t\t\t$option.prop( 'selected', option.selected );\n\t\t\t\tthis.$el.append( $option );\n\t\t\t}\n\n\t\t\t// chain\n\t\t\treturn $option;\n\t\t},\n\n\t\tgetValue: function () {\n\t\t\t// vars\n\t\t\tvar val = [];\n\t\t\tvar $options = this.$el.find( 'option:selected' );\n\n\t\t\t// bail early if no selected\n\t\t\tif ( ! $options.exists() ) {\n\t\t\t\treturn val;\n\t\t\t}\n\n\t\t\t// sort by attribute\n\t\t\t$options = $options.sort( function ( a, b ) {\n\t\t\t\treturn (\n\t\t\t\t\t+a.getAttribute( 'data-i' ) - +b.getAttribute( 'data-i' )\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\t// loop\n\t\t\t$options.each( function () {\n\t\t\t\tvar $el = $( this );\n\t\t\t\tval.push( {\n\t\t\t\t\t$el: $el,\n\t\t\t\t\tid: $el.attr( 'value' ),\n\t\t\t\t\ttext: $el.text(),\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\t// return\n\t\t\treturn val;\n\t\t},\n\n\t\tmergeOptions: function () {},\n\n\t\tgetChoices: function () {\n\t\t\t// callback\n\t\t\tvar crawl = function ( $parent ) {\n\t\t\t\t// vars\n\t\t\t\tvar choices = [];\n\n\t\t\t\t// loop\n\t\t\t\t$parent.children().each( function () {\n\t\t\t\t\t// vars\n\t\t\t\t\tvar $child = $( this );\n\n\t\t\t\t\t// optgroup\n\t\t\t\t\tif ( $child.is( 'optgroup' ) ) {\n\t\t\t\t\t\tchoices.push( {\n\t\t\t\t\t\t\ttext: $child.attr( 'label' ),\n\t\t\t\t\t\t\tchildren: crawl( $child ),\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t// option\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchoices.push( {\n\t\t\t\t\t\t\tid: $child.attr( 'value' ),\n\t\t\t\t\t\t\ttext: $child.text(),\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\t// return\n\t\t\t\treturn choices;\n\t\t\t};\n\n\t\t\t// crawl\n\t\t\treturn crawl( this.$el );\n\t\t},\n\n\t\tgetAjaxData: function ( params ) {\n\t\t\t// vars\n\t\t\tvar ajaxData = {\n\t\t\t\taction: this.get( 'ajaxAction' ),\n\t\t\t\ts: params.term || '',\n\t\t\t\tpaged: params.page || 1,\n\t\t\t};\n\n\t\t\t// field helper\n\t\t\tvar field = this.get( 'field' );\n\t\t\tif ( field ) {\n\t\t\t\tajaxData.field_key = field.get( 'key' );\n\t\t\t}\n\n\t\t\t// callback\n\t\t\tvar callback = this.get( 'ajaxData' );\n\t\t\tif ( callback ) {\n\t\t\t\tajaxData = callback.apply( this, [ ajaxData, params ] );\n\t\t\t}\n\n\t\t\t// filter\n\t\t\tajaxData = acf.applyFilters(\n\t\t\t\t'select2_ajax_data',\n\t\t\t\tajaxData,\n\t\t\t\tthis.data,\n\t\t\t\tthis.$el,\n\t\t\t\tfield || false,\n\t\t\t\tthis\n\t\t\t);\n\n\t\t\t// return\n\t\t\treturn acf.prepareForAjax( ajaxData );\n\t\t},\n\n\t\tgetAjaxResults: function ( json, params ) {\n\t\t\t// defaults\n\t\t\tjson = acf.parseArgs( json, {\n\t\t\t\tresults: false,\n\t\t\t\tmore: false,\n\t\t\t} );\n\n\t\t\t// callback\n\t\t\tvar callback = this.get( 'ajaxResults' );\n\t\t\tif ( callback ) {\n\t\t\t\tjson = callback.apply( this, [ json, params ] );\n\t\t\t}\n\n\t\t\t// filter\n\t\t\tjson = acf.applyFilters(\n\t\t\t\t'select2_ajax_results',\n\t\t\t\tjson,\n\t\t\t\tparams,\n\t\t\t\tthis\n\t\t\t);\n\n\t\t\t// return\n\t\t\treturn json;\n\t\t},\n\n\t\tprocessAjaxResults: function ( json, params ) {\n\t\t\t// vars\n\t\t\tvar json = this.getAjaxResults( json, params );\n\n\t\t\t// change more to pagination\n\t\t\tif ( json.more ) {\n\t\t\t\tjson.pagination = { more: true };\n\t\t\t}\n\n\t\t\t// merge together groups\n\t\t\tsetTimeout( $.proxy( this.mergeOptions, this ), 1 );\n\n\t\t\t// return\n\t\t\treturn json;\n\t\t},\n\n\t\tdestroy: function () {\n\t\t\t// destroy via api\n\t\t\tif ( this.$el.data( 'select2' ) ) {\n\t\t\t\tthis.$el.select2( 'destroy' );\n\t\t\t}\n\n\t\t\t// destory via HTML (duplicating HTML does not contain data)\n\t\t\tthis.$el.siblings( '.select2-container' ).remove();\n\t\t},\n\t} );\n\n\t/**\n\t * Select2_4\n\t *\n\t * description\n\t *\n\t * @date\t13/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tvar Select2_4 = Select2.extend( {\n\t\tinitialize: function () {\n\t\t\t// vars\n\t\t\tvar $select = this.$el;\n\t\t\tvar options = {\n\t\t\t\twidth: '100%',\n\t\t\t\tallowClear: this.get( 'allowNull' ),\n\t\t\t\tplaceholder: this.get( 'placeholder' ),\n\t\t\t\tmultiple: this.get( 'multiple' ),\n\t\t\t\ttemplateSelection: this.get( 'templateSelection' ),\n\t\t\t\ttemplateResult: this.get( 'templateResult' ),\n\t\t\t\tdropdownCssClass: this.get( 'dropdownCssClass' ),\n\t\t\t\tsuppressFilters: this.get( 'suppressFilters' ),\n\t\t\t\tdata: [],\n\t\t\t\tescapeMarkup: function ( markup ) {\n\t\t\t\t\tif ( typeof markup !== 'string' ) {\n\t\t\t\t\t\treturn markup;\n\t\t\t\t\t}\n\t\t\t\t\treturn acf.escHtml( markup );\n\t\t\t\t},\n\t\t\t};\n\n\t\t\t// Clear empty templateSelections, templateResults, or dropdownCssClass.\n\t\t\tif ( ! options.templateSelection ) {\n\t\t\t\tdelete options.templateSelection;\n\t\t\t}\n\t\t\tif ( ! options.templateResult ) {\n\t\t\t\tdelete options.templateResult;\n\t\t\t}\n\t\t\tif ( ! options.dropdownCssClass ) {\n\t\t\t\tdelete options.dropdownCssClass;\n\t\t\t}\n\n\t\t\t// Only use the template if SelectWoo is not loaded to work around https://github.com/woocommerce/woocommerce/pull/30473\n\t\t\tif ( ! acf.isset( window, 'jQuery', 'fn', 'selectWoo' ) ) {\n\t\t\t\tif ( ! options.templateSelection ) {\n\t\t\t\t\toptions.templateSelection = function ( selection ) {\n\t\t\t\t\t\tvar $selection = $(\n\t\t\t\t\t\t\t' '\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$selection.html( acf.escHtml( selection.text ) );\n\t\t\t\t\t\t$selection.data( 'element', selection.element );\n\t\t\t\t\t\treturn $selection;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdelete options.templateSelection;\n\t\t\t\tdelete options.templateResult;\n\t\t\t}\n\n\t\t\t// multiple\n\t\t\tif ( options.multiple ) {\n\t\t\t\t// reorder options\n\t\t\t\tthis.getValue().map( function ( item ) {\n\t\t\t\t\titem.$el.detach().appendTo( $select );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Temporarily remove conflicting attribute.\n\t\t\tvar attrAjax = $select.attr( 'data-ajax' );\n\t\t\tif ( attrAjax !== undefined ) {\n\t\t\t\t$select.removeData( 'ajax' );\n\t\t\t\t$select.removeAttr( 'data-ajax' );\n\t\t\t}\n\n\t\t\t// ajax\n\t\t\tif ( this.get( 'ajax' ) ) {\n\t\t\t\toptions.ajax = {\n\t\t\t\t\turl: acf.get( 'ajaxurl' ),\n\t\t\t\t\tdelay: 250,\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\ttype: 'post',\n\t\t\t\t\tcache: false,\n\t\t\t\t\tdata: $.proxy( this.getAjaxData, this ),\n\t\t\t\t\tprocessResults: $.proxy( this.processAjaxResults, this ),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// filter for 3rd party customization\n\t\t\t//options = acf.applyFilters( 'select2_args', options, $select, this );\n\t\t\tif ( ! options.suppressFilters ) {\n\t\t\t\tvar field = this.get( 'field' );\n\t\t\t\toptions = acf.applyFilters(\n\t\t\t\t\t'select2_args',\n\t\t\t\t\toptions,\n\t\t\t\t\t$select,\n\t\t\t\t\tthis.data,\n\t\t\t\t\tfield || false,\n\t\t\t\t\tthis\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// add select2\n\t\t\t$select.select2( options );\n\n\t\t\t// get container (Select2 v4 does not return this from constructor)\n\t\t\tvar $container = $select.next( '.select2-container' );\n\n\t\t\t// multiple\n\t\t\tif ( options.multiple ) {\n\t\t\t\t// vars\n\t\t\t\tvar $ul = $container.find( 'ul' );\n\n\t\t\t\t// sortable\n\t\t\t\t$ul.sortable( {\n\t\t\t\t\tstop: function ( e ) {\n\t\t\t\t\t\t// loop\n\t\t\t\t\t\t$ul.find( '.select2-selection__choice' ).each(\n\t\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\t\t// Attempt to use .data if it exists (select2 version < 4.0.6) or use our template data instead.\n\t\t\t\t\t\t\t\tif ( $( this ).data( 'data' ) ) {\n\t\t\t\t\t\t\t\t\tvar $option = $(\n\t\t\t\t\t\t\t\t\t\t$( this ).data( 'data' ).element\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tvar $option = $(\n\t\t\t\t\t\t\t\t\t\t$( this )\n\t\t\t\t\t\t\t\t\t\t\t.find( 'span.acf-selection' )\n\t\t\t\t\t\t\t\t\t\t\t.data( 'element' )\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// detach and re-append to end\n\t\t\t\t\t\t\t\t$option.detach().appendTo( $select );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// trigger change on input (JS error if trigger on select)\n\t\t\t\t\t\t$select.trigger( 'change' );\n\t\t\t\t\t},\n\t\t\t\t} );\n\n\t\t\t\t// on select, move to end\n\t\t\t\t$select.on(\n\t\t\t\t\t'select2:select',\n\t\t\t\t\tthis.proxy( function ( e ) {\n\t\t\t\t\t\tthis.getOption( e.params.data.id )\n\t\t\t\t\t\t\t.detach()\n\t\t\t\t\t\t\t.appendTo( this.$el );\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// add handler to auto-focus searchbox (for jQuery 3.6)\n\t\t\t$select.on( 'select2:open', () => {\n\t\t\t\t$( '.select2-container--open .select2-search__field' )\n\t\t\t\t\t.get( -1 )\n\t\t\t\t\t.focus();\n\t\t\t} );\n\n\t\t\t// add class\n\t\t\t$container.addClass( '-acf' );\n\n\t\t\t// Add back temporarily removed attr.\n\t\t\tif ( attrAjax !== undefined ) {\n\t\t\t\t$select.attr( 'data-ajax', attrAjax );\n\t\t\t}\n\n\t\t\t// action for 3rd party customization\n\t\t\tif ( ! options.suppressFilters ) {\n\t\t\t\tacf.doAction(\n\t\t\t\t\t'select2_init',\n\t\t\t\t\t$select,\n\t\t\t\t\toptions,\n\t\t\t\t\tthis.data,\n\t\t\t\t\tfield || false,\n\t\t\t\t\tthis\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\n\t\tmergeOptions: function () {\n\t\t\t// vars\n\t\t\tvar $prevOptions = false;\n\t\t\tvar $prevGroup = false;\n\n\t\t\t// loop\n\t\t\t$( '.select2-results__option[role=\"group\"]' ).each( function () {\n\t\t\t\t// vars\n\t\t\t\tvar $options = $( this ).children( 'ul' );\n\t\t\t\tvar $group = $( this ).children( 'strong' );\n\n\t\t\t\t// compare to previous\n\t\t\t\tif ( $prevGroup && $prevGroup.text() === $group.text() ) {\n\t\t\t\t\t$prevOptions.append( $options.children() );\n\t\t\t\t\t$( this ).remove();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// update vars\n\t\t\t\t$prevOptions = $options;\n\t\t\t\t$prevGroup = $group;\n\t\t\t} );\n\t\t},\n\t} );\n\n\t/**\n\t * Select2_3\n\t *\n\t * description\n\t *\n\t * @date\t13/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tvar Select2_3 = Select2.extend( {\n\t\tinitialize: function () {\n\t\t\t// vars\n\t\t\tvar $select = this.$el;\n\t\t\tvar value = this.getValue();\n\t\t\tvar multiple = this.get( 'multiple' );\n\t\t\tvar options = {\n\t\t\t\twidth: '100%',\n\t\t\t\tallowClear: this.get( 'allowNull' ),\n\t\t\t\tplaceholder: this.get( 'placeholder' ),\n\t\t\t\tseparator: '||',\n\t\t\t\tmultiple: this.get( 'multiple' ),\n\t\t\t\tdata: this.getChoices(),\n\t\t\t\tescapeMarkup: function ( string ) {\n\t\t\t\t\treturn acf.escHtml( string );\n\t\t\t\t},\n\t\t\t\tdropdownCss: {\n\t\t\t\t\t'z-index': '999999999',\n\t\t\t\t},\n\t\t\t\tinitSelection: function ( element, callback ) {\n\t\t\t\t\tif ( multiple ) {\n\t\t\t\t\t\tcallback( value );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcallback( value.shift() );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t};\n\n\t\t\t// get hidden input\n\t\t\tvar $input = $select.siblings( 'input' );\n\t\t\tif ( ! $input.length ) {\n\t\t\t\t$input = $( ' ' );\n\t\t\t\t$select.before( $input );\n\t\t\t}\n\n\t\t\t// set input value\n\t\t\tinputValue = value\n\t\t\t\t.map( function ( item ) {\n\t\t\t\t\treturn item.id;\n\t\t\t\t} )\n\t\t\t\t.join( '||' );\n\t\t\t$input.val( inputValue );\n\n\t\t\t// multiple\n\t\t\tif ( options.multiple ) {\n\t\t\t\t// reorder options\n\t\t\t\tvalue.map( function ( item ) {\n\t\t\t\t\titem.$el.detach().appendTo( $select );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// remove blank option as we have a clear all button\n\t\t\tif ( options.allowClear ) {\n\t\t\t\toptions.data = options.data.filter( function ( item ) {\n\t\t\t\t\treturn item.id !== '';\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// remove conflicting atts\n\t\t\t$select.removeData( 'ajax' );\n\t\t\t$select.removeAttr( 'data-ajax' );\n\n\t\t\t// ajax\n\t\t\tif ( this.get( 'ajax' ) ) {\n\t\t\t\toptions.ajax = {\n\t\t\t\t\turl: acf.get( 'ajaxurl' ),\n\t\t\t\t\tquietMillis: 250,\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\ttype: 'post',\n\t\t\t\t\tcache: false,\n\t\t\t\t\tdata: $.proxy( this.getAjaxData, this ),\n\t\t\t\t\tresults: $.proxy( this.processAjaxResults, this ),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// filter for 3rd party customization\n\t\t\tvar field = this.get( 'field' );\n\t\t\toptions = acf.applyFilters(\n\t\t\t\t'select2_args',\n\t\t\t\toptions,\n\t\t\t\t$select,\n\t\t\t\tthis.data,\n\t\t\t\tfield || false,\n\t\t\t\tthis\n\t\t\t);\n\n\t\t\t// add select2\n\t\t\t$input.select2( options );\n\n\t\t\t// get container\n\t\t\tvar $container = $input.select2( 'container' );\n\n\t\t\t// helper to find this select's option\n\t\t\tvar getOption = $.proxy( this.getOption, this );\n\n\t\t\t// multiple\n\t\t\tif ( options.multiple ) {\n\t\t\t\t// vars\n\t\t\t\tvar $ul = $container.find( 'ul' );\n\n\t\t\t\t// sortable\n\t\t\t\t$ul.sortable( {\n\t\t\t\t\tstop: function () {\n\t\t\t\t\t\t// loop\n\t\t\t\t\t\t$ul.find( '.select2-search-choice' ).each( function () {\n\t\t\t\t\t\t\t// vars\n\t\t\t\t\t\t\tvar data = $( this ).data( 'select2Data' );\n\t\t\t\t\t\t\tvar $option = getOption( data.id );\n\n\t\t\t\t\t\t\t// detach and re-append to end\n\t\t\t\t\t\t\t$option.detach().appendTo( $select );\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t// trigger change on input (JS error if trigger on select)\n\t\t\t\t\t\t$select.trigger( 'change' );\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// on select, create option and move to end\n\t\t\t$input.on( 'select2-selecting', function ( e ) {\n\t\t\t\t// vars\n\t\t\t\tvar item = e.choice;\n\t\t\t\tvar $option = getOption( item.id );\n\n\t\t\t\t// create if doesn't exist\n\t\t\t\tif ( ! $option.length ) {\n\t\t\t\t\t$option = $(\n\t\t\t\t\t\t'' +\n\t\t\t\t\t\t\titem.text +\n\t\t\t\t\t\t\t' '\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// detach and re-append to end\n\t\t\t\t$option.detach().appendTo( $select );\n\t\t\t} );\n\n\t\t\t// add class\n\t\t\t$container.addClass( '-acf' );\n\n\t\t\t// action for 3rd party customization\n\t\t\tacf.doAction(\n\t\t\t\t'select2_init',\n\t\t\t\t$select,\n\t\t\t\toptions,\n\t\t\t\tthis.data,\n\t\t\t\tfield || false,\n\t\t\t\tthis\n\t\t\t);\n\n\t\t\t// change\n\t\t\t$input.on( 'change', function () {\n\t\t\t\tvar val = $input.val();\n\t\t\t\tif ( val.indexOf( '||' ) ) {\n\t\t\t\t\tval = val.split( '||' );\n\t\t\t\t}\n\t\t\t\t$select.val( val ).trigger( 'change' );\n\t\t\t} );\n\n\t\t\t// hide select\n\t\t\t$select.hide();\n\t\t},\n\n\t\tmergeOptions: function () {\n\t\t\t// vars\n\t\t\tvar $prevOptions = false;\n\t\t\tvar $prevGroup = false;\n\n\t\t\t// loop\n\t\t\t$( '#select2-drop .select2-result-with-children' ).each(\n\t\t\t\tfunction () {\n\t\t\t\t\t// vars\n\t\t\t\t\tvar $options = $( this ).children( 'ul' );\n\t\t\t\t\tvar $group = $( this ).children( '.select2-result-label' );\n\n\t\t\t\t\t// compare to previous\n\t\t\t\t\tif ( $prevGroup && $prevGroup.text() === $group.text() ) {\n\t\t\t\t\t\t$prevGroup.append( $options.children() );\n\t\t\t\t\t\t$( this ).remove();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// update vars\n\t\t\t\t\t$prevOptions = $options;\n\t\t\t\t\t$prevGroup = $group;\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\n\t\tgetAjaxData: function ( term, page ) {\n\t\t\t// create Select2 v4 params\n\t\t\tvar params = {\n\t\t\t\tterm: term,\n\t\t\t\tpage: page,\n\t\t\t};\n\n\t\t\t// filter\n\t\t\tvar field = this.get( 'field' );\n\t\t\tparams = acf.applyFilters(\n\t\t\t\t'select2_ajax_data',\n\t\t\t\tparams,\n\t\t\t\tthis.data,\n\t\t\t\tthis.$el,\n\t\t\t\tfield || false,\n\t\t\t\tthis\n\t\t\t);\n\n\t\t\t// return\n\t\t\treturn Select2.prototype.getAjaxData.apply( this, [ params ] );\n\t\t},\n\t} );\n\n\t// manager\n\tvar select2Manager = new acf.Model( {\n\t\tpriority: 5,\n\t\twait: 'prepare',\n\t\tactions: {\n\t\t\tduplicate: 'onDuplicate',\n\t\t},\n\t\tinitialize: function () {\n\t\t\t// vars\n\t\t\tvar locale = acf.get( 'locale' );\n\t\t\tvar rtl = acf.get( 'rtl' );\n\t\t\tvar l10n = acf.get( 'select2L10n' );\n\t\t\tvar version = getVersion();\n\n\t\t\t// bail early if no l10n\n\t\t\tif ( ! l10n ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// bail early if 'en'\n\t\t\tif ( locale.indexOf( 'en' ) === 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// initialize\n\t\t\tif ( version == 4 ) {\n\t\t\t\tthis.addTranslations4();\n\t\t\t} else if ( version == 3 ) {\n\t\t\t\tthis.addTranslations3();\n\t\t\t}\n\t\t},\n\n\t\taddTranslations4: function () {\n\t\t\t// vars\n\t\t\tvar l10n = acf.get( 'select2L10n' );\n\t\t\tvar locale = acf.get( 'locale' );\n\n\t\t\t// modify local to match html[lang] attribute (used by Select2)\n\t\t\tlocale = locale.replace( '_', '-' );\n\n\t\t\t// select2L10n\n\t\t\tvar select2L10n = {\n\t\t\t\terrorLoading: function () {\n\t\t\t\t\treturn l10n.load_fail;\n\t\t\t\t},\n\t\t\t\tinputTooLong: function ( args ) {\n\t\t\t\t\tvar overChars = args.input.length - args.maximum;\n\t\t\t\t\tif ( overChars > 1 ) {\n\t\t\t\t\t\treturn l10n.input_too_long_n.replace( '%d', overChars );\n\t\t\t\t\t}\n\t\t\t\t\treturn l10n.input_too_long_1;\n\t\t\t\t},\n\t\t\t\tinputTooShort: function ( args ) {\n\t\t\t\t\tvar remainingChars = args.minimum - args.input.length;\n\t\t\t\t\tif ( remainingChars > 1 ) {\n\t\t\t\t\t\treturn l10n.input_too_short_n.replace(\n\t\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t\tremainingChars\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn l10n.input_too_short_1;\n\t\t\t\t},\n\t\t\t\tloadingMore: function () {\n\t\t\t\t\treturn l10n.load_more;\n\t\t\t\t},\n\t\t\t\tmaximumSelected: function ( args ) {\n\t\t\t\t\tvar maximum = args.maximum;\n\t\t\t\t\tif ( maximum > 1 ) {\n\t\t\t\t\t\treturn l10n.selection_too_long_n.replace(\n\t\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t\tmaximum\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn l10n.selection_too_long_1;\n\t\t\t\t},\n\t\t\t\tnoResults: function () {\n\t\t\t\t\treturn l10n.matches_0;\n\t\t\t\t},\n\t\t\t\tsearching: function () {\n\t\t\t\t\treturn l10n.searching;\n\t\t\t\t},\n\t\t\t};\n\n\t\t\t// append\n\t\t\tjQuery.fn.select2.amd.define(\n\t\t\t\t'select2/i18n/' + locale,\n\t\t\t\t[],\n\t\t\t\tfunction () {\n\t\t\t\t\treturn select2L10n;\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\n\t\taddTranslations3: function () {\n\t\t\t// vars\n\t\t\tvar l10n = acf.get( 'select2L10n' );\n\t\t\tvar locale = acf.get( 'locale' );\n\n\t\t\t// modify local to match html[lang] attribute (used by Select2)\n\t\t\tlocale = locale.replace( '_', '-' );\n\n\t\t\t// select2L10n\n\t\t\tvar select2L10n = {\n\t\t\t\tformatMatches: function ( matches ) {\n\t\t\t\t\tif ( matches > 1 ) {\n\t\t\t\t\t\treturn l10n.matches_n.replace( '%d', matches );\n\t\t\t\t\t}\n\t\t\t\t\treturn l10n.matches_1;\n\t\t\t\t},\n\t\t\t\tformatNoMatches: function () {\n\t\t\t\t\treturn l10n.matches_0;\n\t\t\t\t},\n\t\t\t\tformatAjaxError: function () {\n\t\t\t\t\treturn l10n.load_fail;\n\t\t\t\t},\n\t\t\t\tformatInputTooShort: function ( input, min ) {\n\t\t\t\t\tvar remainingChars = min - input.length;\n\t\t\t\t\tif ( remainingChars > 1 ) {\n\t\t\t\t\t\treturn l10n.input_too_short_n.replace(\n\t\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t\tremainingChars\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn l10n.input_too_short_1;\n\t\t\t\t},\n\t\t\t\tformatInputTooLong: function ( input, max ) {\n\t\t\t\t\tvar overChars = input.length - max;\n\t\t\t\t\tif ( overChars > 1 ) {\n\t\t\t\t\t\treturn l10n.input_too_long_n.replace( '%d', overChars );\n\t\t\t\t\t}\n\t\t\t\t\treturn l10n.input_too_long_1;\n\t\t\t\t},\n\t\t\t\tformatSelectionTooBig: function ( maximum ) {\n\t\t\t\t\tif ( maximum > 1 ) {\n\t\t\t\t\t\treturn l10n.selection_too_long_n.replace(\n\t\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t\tmaximum\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn l10n.selection_too_long_1;\n\t\t\t\t},\n\t\t\t\tformatLoadMore: function () {\n\t\t\t\t\treturn l10n.load_more;\n\t\t\t\t},\n\t\t\t\tformatSearching: function () {\n\t\t\t\t\treturn l10n.searching;\n\t\t\t\t},\n\t\t\t};\n\n\t\t\t// ensure locales exists\n\t\t\t$.fn.select2.locales = $.fn.select2.locales || {};\n\n\t\t\t// append\n\t\t\t$.fn.select2.locales[ locale ] = select2L10n;\n\t\t\t$.extend( $.fn.select2.defaults, select2L10n );\n\t\t},\n\n\t\tonDuplicate: function ( $el, $el2 ) {\n\t\t\t$el2.find( '.select2-container' ).remove();\n\t\t},\n\t} );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tacf.tinymce = {\n\t\t/*\n\t\t * defaults\n\t\t *\n\t\t * This function will return default mce and qt settings\n\t\t *\n\t\t * @type\tfunction\n\t\t * @date\t18/8/17\n\t\t * @since\t5.6.0\n\t\t *\n\t\t * @param\t$post_id (int)\n\t\t * @return\t$post_id (int)\n\t\t */\n\n\t\tdefaults: function () {\n\t\t\t// bail early if no tinyMCEPreInit\n\t\t\tif ( typeof tinyMCEPreInit === 'undefined' ) return false;\n\n\t\t\t// vars\n\t\t\tvar defaults = {\n\t\t\t\ttinymce: tinyMCEPreInit.mceInit.acf_content,\n\t\t\t\tquicktags: tinyMCEPreInit.qtInit.acf_content,\n\t\t\t};\n\n\t\t\t// return\n\t\t\treturn defaults;\n\t\t},\n\n\t\t/*\n\t\t * initialize\n\t\t *\n\t\t * This function will initialize the tinymce and quicktags instances\n\t\t *\n\t\t * @type\tfunction\n\t\t * @date\t18/8/17\n\t\t * @since\t5.6.0\n\t\t *\n\t\t * @param\t$post_id (int)\n\t\t * @return\t$post_id (int)\n\t\t */\n\n\t\tinitialize: function ( id, args ) {\n\t\t\t// defaults\n\t\t\targs = acf.parseArgs( args, {\n\t\t\t\ttinymce: true,\n\t\t\t\tquicktags: true,\n\t\t\t\ttoolbar: 'full',\n\t\t\t\tmode: 'visual', // visual,text\n\t\t\t\tfield: false,\n\t\t\t} );\n\n\t\t\t// tinymce\n\t\t\tif ( args.tinymce ) {\n\t\t\t\tthis.initializeTinymce( id, args );\n\t\t\t}\n\n\t\t\t// quicktags\n\t\t\tif ( args.quicktags ) {\n\t\t\t\tthis.initializeQuicktags( id, args );\n\t\t\t}\n\t\t},\n\n\t\t/*\n\t\t * initializeTinymce\n\t\t *\n\t\t * This function will initialize the tinymce instance\n\t\t *\n\t\t * @type\tfunction\n\t\t * @date\t18/8/17\n\t\t * @since\t5.6.0\n\t\t *\n\t\t * @param\t$post_id (int)\n\t\t * @return\t$post_id (int)\n\t\t */\n\n\t\tinitializeTinymce: function ( id, args ) {\n\t\t\t// vars\n\t\t\tvar $textarea = $( '#' + id );\n\t\t\tvar defaults = this.defaults();\n\t\t\tvar toolbars = acf.get( 'toolbars' );\n\t\t\tvar field = args.field || false;\n\t\t\tvar $field = field.$el || false;\n\n\t\t\t// bail early\n\t\t\tif ( typeof tinymce === 'undefined' ) return false;\n\t\t\tif ( ! defaults ) return false;\n\n\t\t\t// check if exists\n\t\t\tif ( tinymce.get( id ) ) {\n\t\t\t\treturn this.enable( id );\n\t\t\t}\n\n\t\t\t// settings\n\t\t\tvar init = $.extend( {}, defaults.tinymce, args.tinymce );\n\t\t\tinit.id = id;\n\t\t\tinit.selector = '#' + id;\n\n\t\t\t// toolbar\n\t\t\tvar toolbar = args.toolbar;\n\t\t\tif ( toolbar && toolbars && toolbars[ toolbar ] ) {\n\t\t\t\tfor ( var i = 1; i <= 4; i++ ) {\n\t\t\t\t\tinit[ 'toolbar' + i ] = toolbars[ toolbar ][ i ] || '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// event\n\t\t\tinit.setup = function ( ed ) {\n\t\t\t\ted.on( 'change', function ( e ) {\n\t\t\t\t\ted.save(); // save to textarea\n\t\t\t\t\t$textarea.trigger( 'change' );\n\t\t\t\t} );\n\n\t\t\t\t// Fix bug where Gutenberg does not hear \"mouseup\" event and tries to select multiple blocks.\n\t\t\t\ted.on( 'mouseup', function ( e ) {\n\t\t\t\t\tvar event = new MouseEvent( 'mouseup' );\n\t\t\t\t\twindow.dispatchEvent( event );\n\t\t\t\t} );\n\n\t\t\t\t// Temporarily comment out. May not be necessary due to wysiwyg field actions.\n\t\t\t\t//ed.on('unload', function(e) {\n\t\t\t\t//\tacf.tinymce.remove( id );\n\t\t\t\t//});\n\t\t\t};\n\n\t\t\t// disable wp_autoresize_on (no solution yet for fixed toolbar)\n\t\t\tinit.wp_autoresize_on = false;\n\n\t\t\t// Enable wpautop allowing value to save without tags.\n\t\t\t// Only if the \"TinyMCE Advanced\" plugin hasn't already set this functionality.\n\t\t\tif ( ! init.tadv_noautop ) {\n\t\t\t\tinit.wpautop = true;\n\t\t\t}\n\n\t\t\t// hook for 3rd party customization\n\t\t\tinit = acf.applyFilters(\n\t\t\t\t'wysiwyg_tinymce_settings',\n\t\t\t\tinit,\n\t\t\t\tid,\n\t\t\t\tfield\n\t\t\t);\n\n\t\t\t// z-index fix (caused too many conflicts)\n\t\t\t//if( acf.isset(tinymce,'ui','FloatPanel') ) {\n\t\t\t//\ttinymce.ui.FloatPanel.zIndex = 900000;\n\t\t\t//}\n\n\t\t\t// store settings\n\t\t\ttinyMCEPreInit.mceInit[ id ] = init;\n\n\t\t\t// visual tab is active\n\t\t\tif ( args.mode == 'visual' ) {\n\t\t\t\t// init\n\t\t\t\tvar result = tinymce.init( init );\n\n\t\t\t\t// get editor\n\t\t\t\tvar ed = tinymce.get( id );\n\n\t\t\t\t// validate\n\t\t\t\tif ( ! ed ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// add reference\n\t\t\t\ted.acf = args.field;\n\n\t\t\t\t// action\n\t\t\t\tacf.doAction( 'wysiwyg_tinymce_init', ed, ed.id, init, field );\n\t\t\t}\n\t\t},\n\n\t\t/*\n\t\t * initializeQuicktags\n\t\t *\n\t\t * This function will initialize the quicktags instance\n\t\t *\n\t\t * @type\tfunction\n\t\t * @date\t18/8/17\n\t\t * @since\t5.6.0\n\t\t *\n\t\t * @param\t$post_id (int)\n\t\t * @return\t$post_id (int)\n\t\t */\n\n\t\tinitializeQuicktags: function ( id, args ) {\n\t\t\t// vars\n\t\t\tvar defaults = this.defaults();\n\n\t\t\t// bail early\n\t\t\tif ( typeof quicktags === 'undefined' ) return false;\n\t\t\tif ( ! defaults ) return false;\n\n\t\t\t// settings\n\t\t\tvar init = $.extend( {}, defaults.quicktags, args.quicktags );\n\t\t\tinit.id = id;\n\n\t\t\t// filter\n\t\t\tvar field = args.field || false;\n\t\t\tvar $field = field.$el || false;\n\t\t\tinit = acf.applyFilters(\n\t\t\t\t'wysiwyg_quicktags_settings',\n\t\t\t\tinit,\n\t\t\t\tinit.id,\n\t\t\t\tfield\n\t\t\t);\n\n\t\t\t// store settings\n\t\t\ttinyMCEPreInit.qtInit[ id ] = init;\n\n\t\t\t// init\n\t\t\tvar ed = quicktags( init );\n\n\t\t\t// validate\n\t\t\tif ( ! ed ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// generate HTML\n\t\t\tthis.buildQuicktags( ed );\n\n\t\t\t// action for 3rd party customization\n\t\t\tacf.doAction( 'wysiwyg_quicktags_init', ed, ed.id, init, field );\n\t\t},\n\n\t\t/*\n\t\t * buildQuicktags\n\t\t *\n\t\t * This function will build the quicktags HTML\n\t\t *\n\t\t * @type\tfunction\n\t\t * @date\t18/8/17\n\t\t * @since\t5.6.0\n\t\t *\n\t\t * @param\t$post_id (int)\n\t\t * @return\t$post_id (int)\n\t\t */\n\n\t\tbuildQuicktags: function ( ed ) {\n\t\t\tvar canvas,\n\t\t\t\tname,\n\t\t\t\tsettings,\n\t\t\t\ttheButtons,\n\t\t\t\thtml,\n\t\t\t\ted,\n\t\t\t\tid,\n\t\t\t\ti,\n\t\t\t\tuse,\n\t\t\t\tinstanceId,\n\t\t\t\tdefaults =\n\t\t\t\t\t',strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,';\n\n\t\t\tcanvas = ed.canvas;\n\t\t\tname = ed.name;\n\t\t\tsettings = ed.settings;\n\t\t\thtml = '';\n\t\t\ttheButtons = {};\n\t\t\tuse = '';\n\t\t\tinstanceId = ed.id;\n\n\t\t\t// set buttons\n\t\t\tif ( settings.buttons ) {\n\t\t\t\tuse = ',' + settings.buttons + ',';\n\t\t\t}\n\n\t\t\tfor ( i in edButtons ) {\n\t\t\t\tif ( ! edButtons[ i ] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tid = edButtons[ i ].id;\n\t\t\t\tif (\n\t\t\t\t\tuse &&\n\t\t\t\t\tdefaults.indexOf( ',' + id + ',' ) !== -1 &&\n\t\t\t\t\tuse.indexOf( ',' + id + ',' ) === -1\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t! edButtons[ i ].instance ||\n\t\t\t\t\tedButtons[ i ].instance === instanceId\n\t\t\t\t) {\n\t\t\t\t\ttheButtons[ id ] = edButtons[ i ];\n\n\t\t\t\t\tif ( edButtons[ i ].html ) {\n\t\t\t\t\t\thtml += edButtons[ i ].html( name + '_' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( use && use.indexOf( ',dfw,' ) !== -1 ) {\n\t\t\t\ttheButtons.dfw = new QTags.DFWButton();\n\t\t\t\thtml += theButtons.dfw.html( name + '_' );\n\t\t\t}\n\n\t\t\tif ( 'rtl' === document.getElementsByTagName( 'html' )[ 0 ].dir ) {\n\t\t\t\ttheButtons.textdirection = new QTags.TextDirectionButton();\n\t\t\t\thtml += theButtons.textdirection.html( name + '_' );\n\t\t\t}\n\n\t\t\ted.toolbar.innerHTML = html;\n\t\t\ted.theButtons = theButtons;\n\n\t\t\tif ( typeof jQuery !== 'undefined' ) {\n\t\t\t\tjQuery( document ).triggerHandler( 'quicktags-init', [ ed ] );\n\t\t\t}\n\t\t},\n\n\t\tdisable: function ( id ) {\n\t\t\tthis.destroyTinymce( id );\n\t\t},\n\n\t\tremove: function ( id ) {\n\t\t\tthis.destroyTinymce( id );\n\t\t},\n\n\t\tdestroy: function ( id ) {\n\t\t\tthis.destroyTinymce( id );\n\t\t},\n\n\t\tdestroyTinymce: function ( id ) {\n\t\t\t// bail early\n\t\t\tif ( typeof tinymce === 'undefined' ) return false;\n\n\t\t\t// get editor\n\t\t\tvar ed = tinymce.get( id );\n\n\t\t\t// bail early if no editor\n\t\t\tif ( ! ed ) return false;\n\n\t\t\t// save\n\t\t\ted.save();\n\n\t\t\t// destroy editor\n\t\t\ted.destroy();\n\n\t\t\t// return\n\t\t\treturn true;\n\t\t},\n\n\t\tenable: function ( id ) {\n\t\t\tthis.enableTinymce( id );\n\t\t},\n\n\t\tenableTinymce: function ( id ) {\n\t\t\t// bail early\n\t\t\tif ( typeof switchEditors === 'undefined' ) return false;\n\n\t\t\t// bail early if not initialized\n\t\t\tif ( typeof tinyMCEPreInit.mceInit[ id ] === 'undefined' )\n\t\t\t\treturn false;\n\n\t\t\t// Ensure textarea element is visible\n\t\t\t// - Fixes bug in block editor when switching between \"Block\" and \"Document\" tabs.\n\t\t\t$( '#' + id ).show();\n\n\t\t\t// toggle\n\t\t\tswitchEditors.go( id, 'tmce' );\n\n\t\t\t// return\n\t\t\treturn true;\n\t\t},\n\t};\n\n\tvar editorManager = new acf.Model( {\n\t\t// hook in before fieldsEventManager, conditions, etc\n\t\tpriority: 5,\n\n\t\tactions: {\n\t\t\tprepare: 'onPrepare',\n\t\t\tready: 'onReady',\n\t\t},\n\t\tonPrepare: function () {\n\t\t\t// find hidden editor which may exist within a field\n\t\t\tvar $div = $( '#acf-hidden-wp-editor' );\n\n\t\t\t// move to footer\n\t\t\tif ( $div.exists() ) {\n\t\t\t\t$div.appendTo( 'body' );\n\t\t\t}\n\t\t},\n\t\tonReady: function () {\n\t\t\t// Restore wp.editor functions used by tinymce removed in WP5.\n\t\t\tif ( acf.isset( window, 'wp', 'oldEditor' ) ) {\n\t\t\t\twp.editor.autop = wp.oldEditor.autop;\n\t\t\t\twp.editor.removep = wp.oldEditor.removep;\n\t\t\t}\n\n\t\t\t// bail early if no tinymce\n\t\t\tif ( ! acf.isset( window, 'tinymce', 'on' ) ) return;\n\n\t\t\t// restore default activeEditor\n\t\t\ttinymce.on( 'AddEditor', function ( data ) {\n\t\t\t\t// vars\n\t\t\t\tvar editor = data.editor;\n\n\t\t\t\t// bail early if not 'acf'\n\t\t\t\tif ( editor.id.substr( 0, 3 ) !== 'acf' ) return;\n\n\t\t\t\t// override if 'content' exists\n\t\t\t\teditor = tinymce.editors.content || editor;\n\n\t\t\t\t// update vars\n\t\t\t\ttinymce.activeEditor = editor;\n\t\t\t\twpActiveEditor = editor.id;\n\t\t\t} );\n\t\t},\n\t} );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tacf.unload = new acf.Model( {\n\t\twait: 'load',\n\t\tactive: true,\n\t\tchanged: false,\n\n\t\tactions: {\n\t\t\tvalidation_failure: 'startListening',\n\t\t\tvalidation_success: 'stopListening',\n\t\t},\n\n\t\tevents: {\n\t\t\t'change form .acf-field': 'startListening',\n\t\t\t'submit form': 'stopListening',\n\t\t},\n\n\t\tenable: function () {\n\t\t\tthis.active = true;\n\t\t},\n\n\t\tdisable: function () {\n\t\t\tthis.active = false;\n\t\t},\n\n\t\treset: function () {\n\t\t\tthis.stopListening();\n\t\t},\n\n\t\tstartListening: function () {\n\t\t\t// bail early if already changed, not active\n\t\t\tif ( this.changed || ! this.active ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// update\n\t\t\tthis.changed = true;\n\n\t\t\t// add event\n\t\t\t$( window ).on( 'beforeunload', this.onUnload );\n\t\t},\n\n\t\tstopListening: function () {\n\t\t\t// update\n\t\t\tthis.changed = false;\n\n\t\t\t// remove event\n\t\t\t$( window ).off( 'beforeunload', this.onUnload );\n\t\t},\n\n\t\tonUnload: function () {\n\t\t\treturn acf.__(\n\t\t\t\t'The changes you made will be lost if you navigate away from this page'\n\t\t\t);\n\t\t},\n\t} );\n} )( jQuery );\n","( function ( $, undefined ) {\n\t/**\n\t * Validator\n\t *\n\t * The model for validating forms\n\t *\n\t * @date\t4/9/18\n\t * @since\t5.7.5\n\t *\n\t * @param\tvoid\n\t * @return\tvoid\n\t */\n\tvar Validator = acf.Model.extend( {\n\t\t/** @var string The model identifier. */\n\t\tid: 'Validator',\n\n\t\t/** @var object The model data. */\n\t\tdata: {\n\t\t\t/** @var array The form errors. */\n\t\t\terrors: [],\n\n\t\t\t/** @var object The form notice. */\n\t\t\tnotice: null,\n\n\t\t\t/** @var string The form status. loading, invalid, valid */\n\t\t\tstatus: '',\n\t\t},\n\n\t\t/** @var object The model events. */\n\t\tevents: {\n\t\t\t'changed:status': 'onChangeStatus',\n\t\t},\n\n\t\t/**\n\t\t * addErrors\n\t\t *\n\t\t * Adds errors to the form.\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tarray errors An array of errors.\n\t\t * @return\tvoid\n\t\t */\n\t\taddErrors: function ( errors ) {\n\t\t\terrors.map( this.addError, this );\n\t\t},\n\n\t\t/**\n\t\t * addError\n\t\t *\n\t\t * Adds and error to the form.\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tobject error An error object containing input and message.\n\t\t * @return\tvoid\n\t\t */\n\t\taddError: function ( error ) {\n\t\t\tthis.data.errors.push( error );\n\t\t},\n\n\t\t/**\n\t\t * hasErrors\n\t\t *\n\t\t * Returns true if the form has errors.\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tvoid\n\t\t * @return\tbool\n\t\t */\n\t\thasErrors: function () {\n\t\t\treturn this.data.errors.length;\n\t\t},\n\n\t\t/**\n\t\t * clearErrors\n\t\t *\n\t\t * Removes any errors.\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tvoid\n\t\t * @return\tvoid\n\t\t */\n\t\tclearErrors: function () {\n\t\t\treturn ( this.data.errors = [] );\n\t\t},\n\n\t\t/**\n\t\t * getErrors\n\t\t *\n\t\t * Returns the forms errors.\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tvoid\n\t\t * @return\tarray\n\t\t */\n\t\tgetErrors: function () {\n\t\t\treturn this.data.errors;\n\t\t},\n\n\t\t/**\n\t\t * getFieldErrors\n\t\t *\n\t\t * Returns the forms field errors.\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tvoid\n\t\t * @return\tarray\n\t\t */\n\t\tgetFieldErrors: function () {\n\t\t\t// vars\n\t\t\tvar errors = [];\n\t\t\tvar inputs = [];\n\n\t\t\t// loop\n\t\t\tthis.getErrors().map( function ( error ) {\n\t\t\t\t// bail early if global\n\t\t\t\tif ( ! error.input ) return;\n\n\t\t\t\t// update if exists\n\t\t\t\tvar i = inputs.indexOf( error.input );\n\t\t\t\tif ( i > -1 ) {\n\t\t\t\t\terrors[ i ] = error;\n\n\t\t\t\t\t// update\n\t\t\t\t} else {\n\t\t\t\t\terrors.push( error );\n\t\t\t\t\tinputs.push( error.input );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// return\n\t\t\treturn errors;\n\t\t},\n\n\t\t/**\n\t\t * getGlobalErrors\n\t\t *\n\t\t * Returns the forms global errors (errors without a specific input).\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tvoid\n\t\t * @return\tarray\n\t\t */\n\t\tgetGlobalErrors: function () {\n\t\t\t// return array of errors that contain no input\n\t\t\treturn this.getErrors().filter( function ( error ) {\n\t\t\t\treturn ! error.input;\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * showErrors\n\t\t *\n\t\t * Displays all errors for this form.\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tvoid\n\t\t * @return\tvoid\n\t\t */\n\t\tshowErrors: function () {\n\t\t\t// bail early if no errors\n\t\t\tif ( ! this.hasErrors() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// vars\n\t\t\tvar fieldErrors = this.getFieldErrors();\n\t\t\tvar globalErrors = this.getGlobalErrors();\n\n\t\t\t// vars\n\t\t\tvar errorCount = 0;\n\t\t\tvar $scrollTo = false;\n\n\t\t\t// loop\n\t\t\tfieldErrors.map( function ( error ) {\n\t\t\t\t// get input\n\t\t\t\tvar $input = this.$( '[name=\"' + error.input + '\"]' ).first();\n\n\t\t\t\t// if $_POST value was an array, this $input may not exist\n\t\t\t\tif ( ! $input.length ) {\n\t\t\t\t\t$input = this.$( '[name^=\"' + error.input + '\"]' ).first();\n\t\t\t\t}\n\n\t\t\t\t// bail early if input doesn't exist\n\t\t\t\tif ( ! $input.length ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// increase\n\t\t\t\terrorCount++;\n\n\t\t\t\t// get field\n\t\t\t\tvar field = acf.getClosestField( $input );\n\n\t\t\t\t// make sure the postbox containing this field is not hidden by screen options\n\t\t\t\tensureFieldPostBoxIsVisible( field.$el );\n\n\t\t\t\t// show error\n\t\t\t\tfield.showError( error.message );\n\n\t\t\t\t// set $scrollTo\n\t\t\t\tif ( ! $scrollTo ) {\n\t\t\t\t\t$scrollTo = field.$el;\n\t\t\t\t}\n\t\t\t}, this );\n\n\t\t\t// errorMessage\n\t\t\tvar errorMessage = acf.__( 'Validation failed' );\n\t\t\tglobalErrors.map( function ( error ) {\n\t\t\t\terrorMessage += '. ' + error.message;\n\t\t\t} );\n\t\t\tif ( errorCount == 1 ) {\n\t\t\t\terrorMessage += '. ' + acf.__( '1 field requires attention' );\n\t\t\t} else if ( errorCount > 1 ) {\n\t\t\t\terrorMessage +=\n\t\t\t\t\t'. ' +\n\t\t\t\t\tacf\n\t\t\t\t\t\t.__( '%d fields require attention' )\n\t\t\t\t\t\t.replace( '%d', errorCount );\n\t\t\t}\n\n\t\t\t// notice\n\t\t\tif ( this.has( 'notice' ) ) {\n\t\t\t\tthis.get( 'notice' ).update( {\n\t\t\t\t\ttype: 'error',\n\t\t\t\t\ttext: errorMessage,\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tvar notice = acf.newNotice( {\n\t\t\t\t\ttype: 'error',\n\t\t\t\t\ttext: errorMessage,\n\t\t\t\t\ttarget: this.$el,\n\t\t\t\t} );\n\t\t\t\tthis.set( 'notice', notice );\n\t\t\t}\n\n\t\t\t// if no $scrollTo, set to message\n\t\t\tif ( ! $scrollTo ) {\n\t\t\t\t$scrollTo = this.get( 'notice' ).$el;\n\t\t\t}\n\n\t\t\t// timeout\n\t\t\tsetTimeout( function () {\n\t\t\t\t$( 'html, body' ).animate(\n\t\t\t\t\t{\n\t\t\t\t\t\tscrollTop:\n\t\t\t\t\t\t\t$scrollTo.offset().top - $( window ).height() / 2,\n\t\t\t\t\t},\n\t\t\t\t\t500\n\t\t\t\t);\n\t\t\t}, 10 );\n\t\t},\n\n\t\t/**\n\t\t * onChangeStatus\n\t\t *\n\t\t * Update the form class when changing the 'status' data\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tobject e The event object.\n\t\t * @param\tjQuery $el The form element.\n\t\t * @param\tstring value The new status.\n\t\t * @param\tstring prevValue The old status.\n\t\t * @return\tvoid\n\t\t */\n\t\tonChangeStatus: function ( e, $el, value, prevValue ) {\n\t\t\tthis.$el.removeClass( 'is-' + prevValue ).addClass( 'is-' + value );\n\t\t},\n\n\t\t/**\n\t\t * validate\n\t\t *\n\t\t * Vaildates the form via AJAX.\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tobject args A list of settings to customize the validation process.\n\t\t * @return\tbool True if the form is valid.\n\t\t */\n\t\tvalidate: function ( args ) {\n\t\t\t// default args\n\t\t\targs = acf.parseArgs( args, {\n\t\t\t\t// trigger event\n\t\t\t\tevent: false,\n\n\t\t\t\t// reset the form after submit\n\t\t\t\treset: false,\n\n\t\t\t\t// loading callback\n\t\t\t\tloading: function () {},\n\n\t\t\t\t// complete callback\n\t\t\t\tcomplete: function () {},\n\n\t\t\t\t// failure callback\n\t\t\t\tfailure: function () {},\n\n\t\t\t\t// success callback\n\t\t\t\tsuccess: function ( $form ) {\n\t\t\t\t\t$form.submit();\n\t\t\t\t},\n\t\t\t} );\n\n\t\t\t// return true if is valid - allows form submit\n\t\t\tif ( this.get( 'status' ) == 'valid' ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// return false if is currently validating - prevents form submit\n\t\t\tif ( this.get( 'status' ) == 'validating' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// return true if no ACF fields exist (no need to validate)\n\t\t\tif ( ! this.$( '.acf-field' ).length ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// if event is provided, create a new success callback.\n\t\t\tif ( args.event ) {\n\t\t\t\tvar event = $.Event( null, args.event );\n\t\t\t\targs.success = function () {\n\t\t\t\t\tacf.enableSubmit( $( event.target ) ).trigger( event );\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// action for 3rd party\n\t\t\tacf.doAction( 'validation_begin', this.$el );\n\n\t\t\t// lock form\n\t\t\tacf.lockForm( this.$el );\n\n\t\t\t// loading callback\n\t\t\targs.loading( this.$el, this );\n\n\t\t\t// update status\n\t\t\tthis.set( 'status', 'validating' );\n\n\t\t\t// success callback\n\t\t\tvar onSuccess = function ( json ) {\n\t\t\t\t// validate\n\t\t\t\tif ( ! acf.isAjaxSuccess( json ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// filter\n\t\t\t\tvar data = acf.applyFilters(\n\t\t\t\t\t'validation_complete',\n\t\t\t\t\tjson.data,\n\t\t\t\t\tthis.$el,\n\t\t\t\t\tthis\n\t\t\t\t);\n\n\t\t\t\t// add errors\n\t\t\t\tif ( ! data.valid ) {\n\t\t\t\t\tthis.addErrors( data.errors );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// complete\n\t\t\tvar onComplete = function () {\n\t\t\t\t// unlock form\n\t\t\t\tacf.unlockForm( this.$el );\n\n\t\t\t\t// failure\n\t\t\t\tif ( this.hasErrors() ) {\n\t\t\t\t\t// update status\n\t\t\t\t\tthis.set( 'status', 'invalid' );\n\n\t\t\t\t\t// action\n\t\t\t\t\tacf.doAction( 'validation_failure', this.$el, this );\n\n\t\t\t\t\t// display errors\n\t\t\t\t\tthis.showErrors();\n\n\t\t\t\t\t// failure callback\n\t\t\t\t\targs.failure( this.$el, this );\n\n\t\t\t\t\t// success\n\t\t\t\t} else {\n\t\t\t\t\t// update status\n\t\t\t\t\tthis.set( 'status', 'valid' );\n\n\t\t\t\t\t// remove previous error message\n\t\t\t\t\tif ( this.has( 'notice' ) ) {\n\t\t\t\t\t\tthis.get( 'notice' ).update( {\n\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\ttext: acf.__( 'Validation successful' ),\n\t\t\t\t\t\t\ttimeout: 1000,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\t// action\n\t\t\t\t\tacf.doAction( 'validation_success', this.$el, this );\n\t\t\t\t\tacf.doAction( 'submit', this.$el );\n\n\t\t\t\t\t// success callback (submit form)\n\t\t\t\t\targs.success( this.$el, this );\n\n\t\t\t\t\t// lock form\n\t\t\t\t\tacf.lockForm( this.$el );\n\n\t\t\t\t\t// reset\n\t\t\t\t\tif ( args.reset ) {\n\t\t\t\t\t\tthis.reset();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// complete callback\n\t\t\t\targs.complete( this.$el, this );\n\n\t\t\t\t// clear errors\n\t\t\t\tthis.clearErrors();\n\t\t\t};\n\n\t\t\t// serialize form data\n\t\t\tvar data = acf.serialize( this.$el );\n\t\t\tdata.action = 'acf/validate_save_post';\n\n\t\t\t// ajax\n\t\t\t$.ajax( {\n\t\t\t\turl: acf.get( 'ajaxurl' ),\n\t\t\t\tdata: acf.prepareForAjax( data ),\n\t\t\t\ttype: 'post',\n\t\t\t\tdataType: 'json',\n\t\t\t\tcontext: this,\n\t\t\t\tsuccess: onSuccess,\n\t\t\t\tcomplete: onComplete,\n\t\t\t} );\n\n\t\t\t// return false to fail validation and allow AJAX\n\t\t\treturn false;\n\t\t},\n\n\t\t/**\n\t\t * setup\n\t\t *\n\t\t * Called during the constructor function to setup this instance\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tjQuery $form The form element.\n\t\t * @return\tvoid\n\t\t */\n\t\tsetup: function ( $form ) {\n\t\t\t// set $el\n\t\t\tthis.$el = $form;\n\t\t},\n\n\t\t/**\n\t\t * reset\n\t\t *\n\t\t * Rests the validation to be used again.\n\t\t *\n\t\t * @date\t6/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tvoid\n\t\t * @return\tvoid\n\t\t */\n\t\treset: function () {\n\t\t\t// reset data\n\t\t\tthis.set( 'errors', [] );\n\t\t\tthis.set( 'notice', null );\n\t\t\tthis.set( 'status', '' );\n\n\t\t\t// unlock form\n\t\t\tacf.unlockForm( this.$el );\n\t\t},\n\t} );\n\n\t/**\n\t * getValidator\n\t *\n\t * Returns the instance for a given form element.\n\t *\n\t * @date\t4/9/18\n\t * @since\t5.7.5\n\t *\n\t * @param\tjQuery $el The form element.\n\t * @return\tobject\n\t */\n\tvar getValidator = function ( $el ) {\n\t\t// instantiate\n\t\tvar validator = $el.data( 'acf' );\n\t\tif ( ! validator ) {\n\t\t\tvalidator = new Validator( $el );\n\t\t}\n\n\t\t// return\n\t\treturn validator;\n\t};\n\n\t/**\n\t * acf.validateForm\n\t *\n\t * A helper function for the Validator.validate() function.\n\t * Returns true if form is valid, or fetches a validation request and returns false.\n\t *\n\t * @date\t4/4/18\n\t * @since\t5.6.9\n\t *\n\t * @param\tobject args A list of settings to customize the validation process.\n\t * @return\tbool\n\t */\n\n\tacf.validateForm = function ( args ) {\n\t\treturn getValidator( args.form ).validate( args );\n\t};\n\n\t/**\n\t * acf.enableSubmit\n\t *\n\t * Enables a submit button and returns the element.\n\t *\n\t * @date\t30/8/18\n\t * @since\t5.7.4\n\t *\n\t * @param\tjQuery $submit The submit button.\n\t * @return\tjQuery\n\t */\n\tacf.enableSubmit = function ( $submit ) {\n\t\treturn $submit.removeClass( 'disabled' ).removeAttr( 'disabled' );\n\t};\n\n\t/**\n\t * acf.disableSubmit\n\t *\n\t * Disables a submit button and returns the element.\n\t *\n\t * @date\t30/8/18\n\t * @since\t5.7.4\n\t *\n\t * @param\tjQuery $submit The submit button.\n\t * @return\tjQuery\n\t */\n\tacf.disableSubmit = function ( $submit ) {\n\t\treturn $submit.addClass( 'disabled' ).attr( 'disabled', true );\n\t};\n\n\t/**\n\t * acf.showSpinner\n\t *\n\t * Shows the spinner element.\n\t *\n\t * @date\t4/9/18\n\t * @since\t5.7.5\n\t *\n\t * @param\tjQuery $spinner The spinner element.\n\t * @return\tjQuery\n\t */\n\tacf.showSpinner = function ( $spinner ) {\n\t\t$spinner.addClass( 'is-active' ); // add class (WP > 4.2)\n\t\t$spinner.css( 'display', 'inline-block' ); // css (WP < 4.2)\n\t\treturn $spinner;\n\t};\n\n\t/**\n\t * acf.hideSpinner\n\t *\n\t * Hides the spinner element.\n\t *\n\t * @date\t4/9/18\n\t * @since\t5.7.5\n\t *\n\t * @param\tjQuery $spinner The spinner element.\n\t * @return\tjQuery\n\t */\n\tacf.hideSpinner = function ( $spinner ) {\n\t\t$spinner.removeClass( 'is-active' ); // add class (WP > 4.2)\n\t\t$spinner.css( 'display', 'none' ); // css (WP < 4.2)\n\t\treturn $spinner;\n\t};\n\n\t/**\n\t * acf.lockForm\n\t *\n\t * Locks a form by disabeling its primary inputs and showing a spinner.\n\t *\n\t * @date\t4/9/18\n\t * @since\t5.7.5\n\t *\n\t * @param\tjQuery $form The form element.\n\t * @return\tjQuery\n\t */\n\tacf.lockForm = function ( $form ) {\n\t\t// vars\n\t\tvar $wrap = findSubmitWrap( $form );\n\t\tvar $submit = $wrap\n\t\t\t.find( '.button, [type=\"submit\"]' )\n\t\t\t.not( '.acf-nav, .acf-repeater-add-row' );\n\t\tvar $spinner = $wrap.find( '.spinner, .acf-spinner' );\n\n\t\t// hide all spinners (hides the preview spinner)\n\t\tacf.hideSpinner( $spinner );\n\n\t\t// lock\n\t\tacf.disableSubmit( $submit );\n\t\tacf.showSpinner( $spinner.last() );\n\t\treturn $form;\n\t};\n\n\t/**\n\t * acf.unlockForm\n\t *\n\t * Unlocks a form by enabeling its primary inputs and hiding all spinners.\n\t *\n\t * @date\t4/9/18\n\t * @since\t5.7.5\n\t *\n\t * @param\tjQuery $form The form element.\n\t * @return\tjQuery\n\t */\n\tacf.unlockForm = function ( $form ) {\n\t\t// vars\n\t\tvar $wrap = findSubmitWrap( $form );\n\t\tvar $submit = $wrap\n\t\t\t.find( '.button, [type=\"submit\"]' )\n\t\t\t.not( '.acf-nav, .acf-repeater-add-row' );\n\t\tvar $spinner = $wrap.find( '.spinner, .acf-spinner' );\n\n\t\t// unlock\n\t\tacf.enableSubmit( $submit );\n\t\tacf.hideSpinner( $spinner );\n\t\treturn $form;\n\t};\n\n\t/**\n\t * findSubmitWrap\n\t *\n\t * An internal function to find the 'primary' form submit wrapping element.\n\t *\n\t * @date\t4/9/18\n\t * @since\t5.7.5\n\t *\n\t * @param\tjQuery $form The form element.\n\t * @return\tjQuery\n\t */\n\tvar findSubmitWrap = function ( $form ) {\n\t\t// default post submit div\n\t\tvar $wrap = $form.find( '#submitdiv' );\n\t\tif ( $wrap.length ) {\n\t\t\treturn $wrap;\n\t\t}\n\n\t\t// 3rd party publish box\n\t\tvar $wrap = $form.find( '#submitpost' );\n\t\tif ( $wrap.length ) {\n\t\t\treturn $wrap;\n\t\t}\n\n\t\t// term, user\n\t\tvar $wrap = $form.find( 'p.submit' ).last();\n\t\tif ( $wrap.length ) {\n\t\t\treturn $wrap;\n\t\t}\n\n\t\t// front end form\n\t\tvar $wrap = $form.find( '.acf-form-submit' );\n\t\tif ( $wrap.length ) {\n\t\t\treturn $wrap;\n\t\t}\n\n\t\t// ACF 6.0+ headerbar submit\n\t\tvar $wrap = $( '.acf-headerbar-actions' );\n\t\tif ( $wrap.length ) {\n\t\t\treturn $wrap;\n\t\t}\n\n\t\t// default\n\t\treturn $form;\n\t};\n\n\t/**\n\t * A debounced function to trigger a form submission.\n\t *\n\t * @date\t15/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\ttype Var Description.\n\t * @return\ttype Description.\n\t */\n\tvar submitFormDebounced = acf.debounce( function ( $form ) {\n\t\t$form.submit();\n\t} );\n\n\t/**\n\t * Ensure field is visible for validation errors\n\t *\n\t * @date\t20/10/2021\n\t * @since\t5.11.0\n\t */\n\tvar ensureFieldPostBoxIsVisible = function ( $el ) {\n\t\t// Find the postbox element containing this field.\n\t\tvar $postbox = $el.parents( '.acf-postbox' );\n\t\tif ( $postbox.length ) {\n\t\t\tvar acf_postbox = acf.getPostbox( $postbox );\n\t\t\tif ( acf_postbox && acf_postbox.isHiddenByScreenOptions() ) {\n\t\t\t\t// Rather than using .show() here, we don't want the field to appear next reload.\n\t\t\t\t// So just temporarily show the field group so validation can complete.\n\t\t\t\tacf_postbox.$el.removeClass( 'hide-if-js' );\n\t\t\t\tacf_postbox.$el.css( 'display', '' );\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\n\t * Ensure metaboxes which contain browser validation failures are visible.\n\t *\n\t * @date\t20/10/2021\n\t * @since\t5.11.0\n\t */\n\tvar ensureInvalidFieldVisibility = function () {\n\t\t// Load each ACF input field and check it's browser validation state.\n\t\tvar $inputs = $( '.acf-field input' );\n\t\t$inputs.each( function () {\n\t\t\tif ( ! this.checkValidity() ) {\n\t\t\t\t// Field is invalid, so we need to make sure it's metabox is visible.\n\t\t\t\tensureFieldPostBoxIsVisible( $( this ) );\n\t\t\t}\n\t\t} );\n\t};\n\n\t/**\n\t * acf.validation\n\t *\n\t * Global validation logic\n\t *\n\t * @date\t4/4/18\n\t * @since\t5.6.9\n\t *\n\t * @param\tvoid\n\t * @return\tvoid\n\t */\n\n\tacf.validation = new acf.Model( {\n\t\t/** @var string The model identifier. */\n\t\tid: 'validation',\n\n\t\t/** @var bool The active state. Set to false before 'prepare' to prevent validation. */\n\t\tactive: true,\n\n\t\t/** @var string The model initialize time. */\n\t\twait: 'prepare',\n\n\t\t/** @var object The model actions. */\n\t\tactions: {\n\t\t\tready: 'addInputEvents',\n\t\t\tappend: 'addInputEvents',\n\t\t},\n\n\t\t/** @var object The model events. */\n\t\tevents: {\n\t\t\t'click input[type=\"submit\"]': 'onClickSubmit',\n\t\t\t'click button[type=\"submit\"]': 'onClickSubmit',\n\t\t\t//'click #editor .editor-post-publish-button': 'onClickSubmitGutenberg',\n\t\t\t'click #save-post': 'onClickSave',\n\t\t\t'submit form#post': 'onSubmitPost',\n\t\t\t'submit form': 'onSubmit',\n\t\t},\n\n\t\t/**\n\t\t * initialize\n\t\t *\n\t\t * Called when initializing the model.\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tvoid\n\t\t * @return\tvoid\n\t\t */\n\t\tinitialize: function () {\n\t\t\t// check 'validation' setting\n\t\t\tif ( ! acf.get( 'validation' ) ) {\n\t\t\t\tthis.active = false;\n\t\t\t\tthis.actions = {};\n\t\t\t\tthis.events = {};\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * enable\n\t\t *\n\t\t * Enables validation.\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tvoid\n\t\t * @return\tvoid\n\t\t */\n\t\tenable: function () {\n\t\t\tthis.active = true;\n\t\t},\n\n\t\t/**\n\t\t * disable\n\t\t *\n\t\t * Disables validation.\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tvoid\n\t\t * @return\tvoid\n\t\t */\n\t\tdisable: function () {\n\t\t\tthis.active = false;\n\t\t},\n\n\t\t/**\n\t\t * reset\n\t\t *\n\t\t * Rests the form validation to be used again\n\t\t *\n\t\t * @date\t6/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tjQuery $form The form element.\n\t\t * @return\tvoid\n\t\t */\n\t\treset: function ( $form ) {\n\t\t\tgetValidator( $form ).reset();\n\t\t},\n\n\t\t/**\n\t\t * addInputEvents\n\t\t *\n\t\t * Adds 'invalid' event listeners to HTML inputs.\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tjQuery $el The element being added / readied.\n\t\t * @return\tvoid\n\t\t */\n\t\taddInputEvents: function ( $el ) {\n\t\t\t// Bug exists in Safari where custom \"invalid\" handling prevents draft from saving.\n\t\t\tif ( acf.get( 'browser' ) === 'safari' ) return;\n\n\t\t\t// vars\n\t\t\tvar $inputs = $( '.acf-field [name]', $el );\n\n\t\t\t// check\n\t\t\tif ( $inputs.length ) {\n\t\t\t\tthis.on( $inputs, 'invalid', 'onInvalid' );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * onInvalid\n\t\t *\n\t\t * Callback for the 'invalid' event.\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tobject e The event object.\n\t\t * @param\tjQuery $el The input element.\n\t\t * @return\tvoid\n\t\t */\n\t\tonInvalid: function ( e, $el ) {\n\t\t\t// prevent default\n\t\t\t// - prevents browser error message\n\t\t\t// - also fixes chrome bug where 'hidden-by-tab' field throws focus error\n\t\t\te.preventDefault();\n\n\t\t\t// vars\n\t\t\tvar $form = $el.closest( 'form' );\n\n\t\t\t// check form exists\n\t\t\tif ( $form.length ) {\n\t\t\t\t// add error to validator\n\t\t\t\tgetValidator( $form ).addError( {\n\t\t\t\t\tinput: $el.attr( 'name' ),\n\t\t\t\t\tmessage: acf.strEscape( e.target.validationMessage ),\n\t\t\t\t} );\n\n\t\t\t\t// trigger submit on $form\n\t\t\t\t// - allows for \"save\", \"preview\" and \"publish\" to work\n\t\t\t\tsubmitFormDebounced( $form );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * onClickSubmit\n\t\t *\n\t\t * Callback when clicking submit.\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tobject e The event object.\n\t\t * @param\tjQuery $el The input element.\n\t\t * @return\tvoid\n\t\t */\n\t\tonClickSubmit: function ( e, $el ) {\n\t\t\t// Some browsers (safari) force their browser validation before our AJAX validation,\n\t\t\t// so we need to make sure fields are visible earlier than showErrors()\n\t\t\tensureInvalidFieldVisibility();\n\n\t\t\t// store the \"click event\" for later use in this.onSubmit()\n\t\t\tthis.set( 'originalEvent', e );\n\t\t},\n\n\t\t/**\n\t\t * onClickSave\n\t\t *\n\t\t * Set ignore to true when saving a draft.\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tobject e The event object.\n\t\t * @param\tjQuery $el The input element.\n\t\t * @return\tvoid\n\t\t */\n\t\tonClickSave: function ( e, $el ) {\n\t\t\tthis.set( 'ignore', true );\n\t\t},\n\n\t\t/**\n\t\t * onClickSubmitGutenberg\n\t\t *\n\t\t * Custom validation event for the gutenberg editor.\n\t\t *\n\t\t * @date\t29/10/18\n\t\t * @since\t5.8.0\n\t\t *\n\t\t * @param\tobject e The event object.\n\t\t * @param\tjQuery $el The input element.\n\t\t * @return\tvoid\n\t\t */\n\t\tonClickSubmitGutenberg: function ( e, $el ) {\n\t\t\t// validate\n\t\t\tvar valid = acf.validateForm( {\n\t\t\t\tform: $( '#editor' ),\n\t\t\t\tevent: e,\n\t\t\t\treset: true,\n\t\t\t\tfailure: function ( $form, validator ) {\n\t\t\t\t\tvar $notice = validator.get( 'notice' ).$el;\n\t\t\t\t\t$notice.appendTo( '.components-notice-list' );\n\t\t\t\t\t$notice\n\t\t\t\t\t\t.find( '.acf-notice-dismiss' )\n\t\t\t\t\t\t.removeClass( 'small' );\n\t\t\t\t},\n\t\t\t} );\n\n\t\t\t// if not valid, stop event and allow validation to continue\n\t\t\tif ( ! valid ) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopImmediatePropagation();\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * onSubmitPost\n\t\t *\n\t\t * Callback when the 'post' form is submit.\n\t\t *\n\t\t * @date\t5/3/19\n\t\t * @since\t5.7.13\n\t\t *\n\t\t * @param\tobject e The event object.\n\t\t * @param\tjQuery $el The input element.\n\t\t * @return\tvoid\n\t\t */\n\t\tonSubmitPost: function ( e, $el ) {\n\t\t\t// Check if is preview.\n\t\t\tif ( $( 'input#wp-preview' ).val() === 'dopreview' ) {\n\t\t\t\t// Ignore validation.\n\t\t\t\tthis.set( 'ignore', true );\n\n\t\t\t\t// Unlock form to fix conflict with core \"submit.edit-post\" event causing all submit buttons to be disabled.\n\t\t\t\tacf.unlockForm( $el );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * onSubmit\n\t\t *\n\t\t * Callback when the form is submit.\n\t\t *\n\t\t * @date\t4/9/18\n\t\t * @since\t5.7.5\n\t\t *\n\t\t * @param\tobject e The event object.\n\t\t * @param\tjQuery $el The input element.\n\t\t * @return\tvoid\n\t\t */\n\t\tonSubmit: function ( e, $el ) {\n\t\t\t// Allow form to submit if...\n\t\t\tif (\n\t\t\t\t// Validation has been disabled.\n\t\t\t\t! this.active ||\n\t\t\t\t// Or this event is to be ignored.\n\t\t\t\tthis.get( 'ignore' ) ||\n\t\t\t\t// Or this event has already been prevented.\n\t\t\t\te.isDefaultPrevented()\n\t\t\t) {\n\t\t\t\t// Return early and call reset function.\n\t\t\t\treturn this.allowSubmit();\n\t\t\t}\n\n\t\t\t// Validate form.\n\t\t\tvar valid = acf.validateForm( {\n\t\t\t\tform: $el,\n\t\t\t\tevent: this.get( 'originalEvent' ),\n\t\t\t} );\n\n\t\t\t// If not valid, stop event to prevent form submit.\n\t\t\tif ( ! valid ) {\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * allowSubmit\n\t\t *\n\t\t * Resets data during onSubmit when the form is allowed to submit.\n\t\t *\n\t\t * @date\t5/3/19\n\t\t * @since\t5.7.13\n\t\t *\n\t\t * @param\tvoid\n\t\t * @return\tvoid\n\t\t */\n\t\tallowSubmit: function () {\n\t\t\t// Reset \"ignore\" state.\n\t\t\tthis.set( 'ignore', false );\n\n\t\t\t// Reset \"originalEvent\" object.\n\t\t\tthis.set( 'originalEvent', false );\n\n\t\t\t// Return true\n\t\t\treturn true;\n\t\t},\n\t} );\n\n\tvar gutenbergValidation = new acf.Model( {\n\t\twait: 'prepare',\n\t\tinitialize: function () {\n\t\t\t// Bail early if not Gutenberg.\n\t\t\tif ( ! acf.isGutenberg() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Custommize the editor.\n\t\t\tthis.customizeEditor();\n\t\t},\n\t\tcustomizeEditor: function () {\n\t\t\t// Extract vars.\n\t\t\tvar editor = wp.data.dispatch( 'core/editor' );\n\t\t\tvar editorSelect = wp.data.select( 'core/editor' );\n\t\t\tvar notices = wp.data.dispatch( 'core/notices' );\n\n\t\t\t// Backup original method.\n\t\t\tvar savePost = editor.savePost;\n\n\t\t\t// Listen for changes to post status and perform actions:\n\t\t\t// a) Enable validation for \"publish\" action.\n\t\t\t// b) Remember last non \"publish\" status used for restoring after validation fail.\n\t\t\tvar useValidation = false;\n\t\t\tvar lastPostStatus = '';\n\t\t\twp.data.subscribe( function () {\n\t\t\t\tvar postStatus =\n\t\t\t\t\teditorSelect.getEditedPostAttribute( 'status' );\n\t\t\t\tuseValidation =\n\t\t\t\t\tpostStatus === 'publish' || postStatus === 'future';\n\t\t\t\tlastPostStatus =\n\t\t\t\t\tpostStatus !== 'publish' ? postStatus : lastPostStatus;\n\t\t\t} );\n\n\t\t\t// Create validation version.\n\t\t\teditor.savePost = function ( options ) {\n\t\t\t\toptions = options || {};\n\n\t\t\t\t// Backup vars.\n\t\t\t\tvar _this = this;\n\t\t\t\tvar _args = arguments;\n\n\t\t\t\t// Perform validation within a Promise.\n\t\t\t\treturn new Promise( function ( resolve, reject ) {\n\t\t\t\t\t// Bail early if is autosave or preview.\n\t\t\t\t\tif ( options.isAutosave || options.isPreview ) {\n\t\t\t\t\t\treturn resolve( 'Validation ignored (autosave).' );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Bail early if validation is not needed.\n\t\t\t\t\tif ( ! useValidation ) {\n\t\t\t\t\t\treturn resolve( 'Validation ignored (draft).' );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Validate the editor form.\n\t\t\t\t\tvar valid = acf.validateForm( {\n\t\t\t\t\t\tform: $( '#editor' ),\n\t\t\t\t\t\treset: true,\n\t\t\t\t\t\tcomplete: function ( $form, validator ) {\n\t\t\t\t\t\t\t// Always unlock the form after AJAX.\n\t\t\t\t\t\t\teditor.unlockPostSaving( 'acf' );\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfailure: function ( $form, validator ) {\n\t\t\t\t\t\t\t// Get validation error and append to Gutenberg notices.\n\t\t\t\t\t\t\tvar notice = validator.get( 'notice' );\n\t\t\t\t\t\t\tnotices.createErrorNotice( notice.get( 'text' ), {\n\t\t\t\t\t\t\t\tid: 'acf-validation',\n\t\t\t\t\t\t\t\tisDismissible: true,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\tnotice.remove();\n\n\t\t\t\t\t\t\t// Restore last non \"publish\" status.\n\t\t\t\t\t\t\tif ( lastPostStatus ) {\n\t\t\t\t\t\t\t\teditor.editPost( {\n\t\t\t\t\t\t\t\t\tstatus: lastPostStatus,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Rejext promise and prevent savePost().\n\t\t\t\t\t\t\treject( 'Validation failed.' );\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccess: function () {\n\t\t\t\t\t\t\tnotices.removeNotice( 'acf-validation' );\n\n\t\t\t\t\t\t\t// Resolve promise and allow savePost().\n\t\t\t\t\t\t\tresolve( 'Validation success.' );\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Resolve promise and allow savePost() if no validation is needed.\n\t\t\t\t\tif ( valid ) {\n\t\t\t\t\t\tresolve( 'Validation bypassed.' );\n\n\t\t\t\t\t\t// Otherwise, lock the form and wait for AJAX response.\n\t\t\t\t\t} else {\n\t\t\t\t\t\teditor.lockPostSaving( 'acf' );\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t\t\t.then( function () {\n\t\t\t\t\t\treturn savePost.apply( _this, _args );\n\t\t\t\t\t} )\n\t\t\t\t\t.catch( function ( err ) {\n\t\t\t\t\t\t// Nothing to do here, user is alerted of validation issues.\n\t\t\t\t\t} );\n\t\t\t};\n\t\t},\n\t} );\n} )( jQuery );\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import './_acf-field.js';\nimport './_acf-fields.js';\nimport './_acf-field-accordion.js';\nimport './_acf-field-button-group.js';\nimport './_acf-field-checkbox.js';\nimport './_acf-field-color-picker.js';\nimport './_acf-field-date-picker.js';\nimport './_acf-field-date-time-picker.js';\nimport './_acf-field-google-map.js';\nimport './_acf-field-image.js';\nimport './_acf-field-file.js';\nimport './_acf-field-link.js';\nimport './_acf-field-oembed.js';\nimport './_acf-field-radio.js';\nimport './_acf-field-range.js';\nimport './_acf-field-relationship.js';\nimport './_acf-field-select.js';\nimport './_acf-field-tab.js';\nimport './_acf-field-post-object.js';\nimport './_acf-field-page-link.js';\nimport './_acf-field-user.js';\nimport './_acf-field-taxonomy.js';\nimport './_acf-field-time-picker.js';\nimport './_acf-field-true-false.js';\nimport './_acf-field-url.js';\nimport './_acf-field-wysiwyg.js';\nimport './_acf-condition.js';\nimport './_acf-conditions.js';\nimport './_acf-condition-types.js';\nimport './_acf-unload.js';\nimport './_acf-postbox.js';\nimport './_acf-media.js';\nimport './_acf-screen.js';\nimport './_acf-select2.js';\nimport './_acf-tinymce.js';\nimport './_acf-validation.js';\nimport './_acf-helpers.js';\nimport './_acf-compatibility.js';\n"],"names":["$","undefined","acf","newCompatibility","instance","compatibilty","__proto__","compatibility","getCompatibility","_acf","l10n","o","fields","update","set","add_action","addAction","remove_action","removeAction","do_action","doAction","add_filter","addFilter","remove_filter","removeFilter","apply_filters","applyFilters","parse_args","parseArgs","disable_el","disable","disable_form","enable_el","enable","enable_form","update_user_setting","updateUserSetting","prepare_for_ajax","prepareForAjax","is_ajax_success","isAjaxSuccess","remove_el","remove","remove_tr","str_replace","strReplace","render_select","renderSelect","get_uniqid","uniqid","serialize_form","serialize","esc_html","strEscape","str_sanitize","strSanitize","_e","k1","k2","compatKey","compats","__","string","get_selector","s","selector","isPlainObject","isEmptyObject","k","get_fields","$el","all","args","is","parent","suppressFilters","findFields","get_field","$fields","apply","arguments","length","first","get_closest_field","closest","get_field_wrap","get_field_key","$field","data","get_field_type","get_data","defaults","maybe_get","obj","key","value","keys","String","split","i","hasOwnProperty","compatibleArgument","arg","Field","compatibleArguments","arrayArgs","map","compatibleCallback","origCallback","document","action","callback","priority","context","actions","model","filters","events","extend","each","name","_add_action","_add_filter","_add_event","indexOf","event","substr","fn","e","field_group","on","get","field","type","_set_$field","focus","doFocus","_validation","validation","remove_error","getField","removeError","add_warning","message","showNotice","text","timeout","fetch","validateForm","enableSubmit","disableSubmit","showSpinner","hideSpinner","unlockForm","lockForm","tooltip","newTooltip","target","temp","confirm","button_y","button_n","cancel","confirm_remove","confirmRemove","media","Model","activeFrame","new_media_popup","frame","onNewMediaPopup","popup","props","mime_types","allowedTypes","id","attachment","newMediaPopup","select2","init","$select","allow_null","allowNull","ajax_action","ajaxAction","newSelect2","destroy","getInstance","postbox","render","edit_url","editLink","edit_title","editTitle","newPostbox","screen","check","ajax","jQuery","parseString","val","isEqualTo","v1","v2","toLowerCase","isEqualToNumber","parseFloat","isGreaterThan","isLessThan","inArray","array","containsString","haystack","needle","matchesPattern","pattern","regexp","RegExp","match","HasValue","Condition","operator","label","fieldTypes","rule","Array","choices","fieldObject","registerConditionType","HasNoValue","prototype","EqualTo","isNumeric","NotEqualTo","PatternMatch","Contains","TrueFalseEqualTo","choiceType","TrueFalseNotEqualTo","SelectEqualTo","lines","$setting","$input","prop","push","line","trim","SelectNotEqualTo","GreaterThan","LessThan","SelectionGreaterThan","SelectionLessThan","storage","conditions","change","keyup","enableField","disableField","setup","getEventTarget","calculate","newCondition","fieldType","conditionTypes","getConditionTypes","condition","modelId","strPascalCase","proto","mid","models","getConditionType","registerConditionForFieldType","conditionType","types","ProtoFieldTypes","ProtoOperator","CONTEXT","conditionsManager","new_field","onNewField","has","getConditions","getSiblingField","getFields","sibling","parents","Conditions","timeStamp","groups","rules","addRules","addRule","changed","show","hide","showEnable","cid","hideDisable","pass","getGroups","group","passed","filter","hasGroups","addGroup","hasGroup","getGroup","removeGroup","delete","groupArray","hasRule","getRule","removeRule","wait","$control","initialize","hasClass","$label","$labelWrap","$inputWrap","$wrap","$instructions","children","append","$table","$newLabel","$newInput","$newTable","attr","$newWrap","html","addClass","order","getPreference","css","prepend","accordionManager","iconHtml","open","$parent","nextUntil","removeAttr","registerFieldType","unload","isOpen","toggle","close","isGutenberg","duration","find","slideDown","replaceWith","siblings","slideUp","removeClass","onClick","preventDefault","onInvalidField","busy","setTimeout","onUnload","setPreference","setValue","trigger","selected","$toggle","$inputs","not","getValue","onChange","checked","onClickAdd","getInputName","before","last","onClickToggle","$labels","onClickCustom","$text","next","duplicateField","$inputText","iris","defaultColor","palettes","clear","wpColorPicker","onDuplicate","$duplicate","$colorPicker","initializeCompatibility","dateFormat","altField","altFormat","changeYear","yearRange","changeMonth","showButtonPanel","firstDay","newDatePicker","datepicker","onBlur","datePickerManager","locale","rtl","isRTL","regional","setDefaults","exists","wrap","DatePickerField","timeFormat","altFieldTimeOnly","altTimeFormat","controlType","oneLine","newDateTimePicker","dateTimePickerManager","timepicker","datetimepicker","ImageField","validateAttachment","attributes","url","alt","title","filename","filesizeHumanReadable","icon","src","selectAttachment","multiple","mode","library","select","proxy","editAttachment","button","showField","$search","$canvas","setState","state","JSON","parse","silent","valAttr","stringify","renderVal","address","setPosition","lat","lng","marker","setVisible","newLatLng","google","maps","LatLng","center","position","getPosition","setCenter","withAPI","initializeMap","bind","zoom","mapArgs","scrollwheel","parseInt","mapTypeId","MapTypeId","ROADMAP","draggable","raiseOnDrag","autocomplete","Map","markerArgs","Marker","isset","autocompleteArgs","places","Autocomplete","bindTo","addMapEvents","addListener","latLng","searchPosition","place","getPlace","searchPlace","getZoom","geocoder","geocode","location","results","status","replace","parseResult","geometry","formatted_address","searchAddress","searchLocation","navigator","geolocation","alert","getCurrentPosition","coords","latitude","longitude","error","result","place_id","street_number","street_name","city","post_code","country","keywords","address_components","component","component_type","long_name","short_name","onClickClear","onClickLocate","onClickSearch","onFocusSearch","onBlurSearch","onKeyupSearch","onKeydownSearch","which","blur","onShow","loading","window","Geocoder","dataType","cache","success","caption","description","width","height","size","isget","getNext","removeAttachment","onClickEdit","onClickRemove","$hiddenInput","getFileInputData","param","$node","$div","wpLink","getNodeValue","decode","setNodeValue","getInputValue","setInputValue","$textarea","onOpen","wpLinkL10n","onClose","$submit","isSubmit","off","getSearchVal","showLoading","hideLoading","maybeSearch","prevUrl","clearTimeout","search","ajaxData","field_key","xhr","abort","json","complete","onKeypressSearch","onChangeSearch","SelectField","$inputAlt","$list","list","$listItems","$listItem","newChoice","join","newValue","delayed","once","sortable","items","forceHelperSize","forcePlaceholderSize","scroll","scrollTop","onScrollChoices","one","onceInView","Math","ceil","scrollHeight","innerHeight","paged","onKeypressFilter","onChangeFilter","maybeFetch","max","$span","$li","getAjaxData","$choiceslist","$loading","onComplete","onSuccess","more","walkChoices","$html","$prevLabel","$prevList","walk","isArray","item","escHtml","escAttr","removeField","inherit","placeholder","onRemove","tabs","tab","findTabs","prevAll","findTab","$tabs","$tab","settings","endpoint","placement","Tabs","addTab","isActive","showFields","hiddenByTab","hideFields","lockKey","visible","refresh","hidden","reset","active","close_field_object","index","initialized","$before","ulClass","initializeTabs","getVisible","shift","groupIndex","tabIndex","isVisible","selectTab","closeTabs","getActive","setActive","hasActive","closeActive","closeTab","openTab","t","$a","outerHTML","classes","Tab","onRefresh","attribute","top","outerHeight","onCloseFieldObject","tabsManager","prepare","invalid_field","getTabs","getInstances","ftype","getRelatedPrototype","getRelatedType","getFieldType","$form","$name","$button","$message","notice","step1","newPopup","step2","content","step3","stopImmediatePropagation","startButtonLoading","term_name","term_parent","step4","stopButtonLoading","step5","newNotice","getAjaxMessage","dismiss","getAjaxError","term","$option","term_id","term_label","after","otherField","appendTerm","selectTerm","appendTermSelect","appendTermCheckbox","addOption","$ul","selectOption","onClickRadio","closeText","selectText","timeOnly","dp_instance","t_instance","$close","dpDiv","_updateDateTime","newTimePicker","$switch","$on","$off","switchOn","switchOff","onFocus","onKeypress","keyCode","isValid","onkeyup","query_nonce","user_query_nonce","unmountField","remountField","getMode","initializeEditor","tinymce","quicktags","toolbar","oldId","newId","uniqueId","inputData","inputVal","rename","destructive","onMousedown","enableEditor","disableEditor","eventScope","$parents","removeNotice","away","showError","bubbles","newField","getFieldTypes","category","limit","excludeSubFields","slice","findField","findClosestField","getClosestField","addGlobalFieldAction","globalAction","pluralAction","singleAction","globalCallback","extraArgs","pluralArgs","concat","pluralCallback","singleArgs","addSingleFieldAction","singleEvent","singleCallback","variations","variation","prefix","singleFieldEvents","globalFieldActions","singleFieldActions","fieldsEventManager","duplicateFieldsManager","duplicate","duplicate_fields","$el2","onDuplicateFields","duplicates","refreshHelper","show_field","hide_field","remove_field","unmount_field","remount_field","mountHelper","sortstart","sortstop","onSortstart","$item","onSortstop","sortableHelper","$placeholder","duplicateHelper","after_duplicate","onAfterDuplicate","vals","tableHelper","renderTables","self","renderTable","$ths","$tds","$th","$cells","$hidden","availableWidth","colspan","$fixedWidths","$auoWidths","$td","fieldsHelper","renderGroups","renderGroup","$row","thisTop","thisLeft","left","outerWidth","thisHeight","add","bodyClassShiftHelper","keydown","isShiftKey","onKeyDown","onKeyUp","autoOpen","EditMediaPopup","SelectMediaPopup","getPostID","postID","getMimeTypes","getMimeType","allTypes","MediaPopup","options","getFrameOptions","addFrameStates","wp","addFrameEvents","detach","states","uploadedTo","post__in","Query","query","mirroring","_acfuploader","controller","Library","filterable","editable","allowLocalEdits","EditImage","image","view","loadEditor","selection","_x","_wpPluploadSettings","multipart_params","console","log","customizeFilters","audio","video","mimeType","newFilter","orderby","unattached","uploaded","renderFilters","customizePrototypes","post","customizeAttachmentsButton","customizeAttachmentsRouter","customizeAttachmentFilters","customizeAttachmentCompat","customizeAttachmentLibrary","Button","_","Backbone","listenTo","Parent","Router","addExpand","AttachmentFilters","All","chain","el","sortBy","pluck","AttachmentCompat","rendered","save","serializeForAjax","saveCompat","always","postSave","AttachmentLibrary","Attachment","acf_errors","toggleSelection","collection","single","errors","$sidebar","postboxManager","getPostbox","getPostboxes","Postbox","style","edit","$postbox","$hide","$hideLabel","$hndle","$handleActions","$inside","isHiddenByScreenOptions","isPost","isUser","isTaxonomy","isAttachment","isNavMenu","isWidget","isComment","getPageTemplate","getPageParent","getPageType","getPostType","getPostFormat","getPostCoreTerms","terms","tax_input","post_category","tax","getPostTerms","productType","getProductType","product_type","uniqueArray","post_id","postType","post_type","pageTemplate","page_template","pageParent","page_parent","pageType","page_type","postFormat","post_format","postTerms","post_terms","renderPostScreen","renderUserScreen","copyEvents","$from","$to","_data","handler","sortMetabox","ids","wpMinorVersion","postboxHeader","$prefs","_result","sorted","gutenScreen","postEdits","subscribe","debounce","onRefreshPostScreen","domReady","getTaxonomies","taxonomy","rest_base","_postEdits","getPostEdits","getEditedPostAttribute","taxonomies","slug","dispatch","locations","getActiveMetaBoxLocations","getMetaBoxesPerLocation","m","r","setAvailableMetaBoxesPerLocation","ajaxResults","templateSelection","templateResult","dropdownCssClass","getVersion","Select2_4","Select2_3","Select2","getOption","unselectOption","option","$options","sort","a","b","getAttribute","mergeOptions","getChoices","crawl","$child","params","page","getAjaxResults","processAjaxResults","pagination","allowClear","escapeMarkup","markup","$selection","element","appendTo","attrAjax","removeData","delay","processResults","$container","stop","$prevOptions","$prevGroup","$group","separator","dropdownCss","initSelection","inputValue","quietMillis","choice","select2Manager","version","addTranslations4","addTranslations3","select2L10n","errorLoading","load_fail","inputTooLong","overChars","input","maximum","input_too_long_n","input_too_long_1","inputTooShort","remainingChars","minimum","input_too_short_n","input_too_short_1","loadingMore","load_more","maximumSelected","selection_too_long_n","selection_too_long_1","noResults","matches_0","searching","amd","define","formatMatches","matches","matches_n","matches_1","formatNoMatches","formatAjaxError","formatInputTooShort","min","formatInputTooLong","formatSelectionTooBig","formatLoadMore","formatSearching","locales","tinyMCEPreInit","mceInit","acf_content","qtInit","initializeTinymce","initializeQuicktags","toolbars","ed","MouseEvent","dispatchEvent","wp_autoresize_on","tadv_noautop","wpautop","buildQuicktags","canvas","theButtons","use","instanceId","buttons","edButtons","dfw","QTags","DFWButton","getElementsByTagName","dir","textdirection","TextDirectionButton","innerHTML","triggerHandler","destroyTinymce","enableTinymce","switchEditors","go","editorManager","ready","onPrepare","onReady","editor","autop","oldEditor","removep","editors","activeEditor","wpActiveEditor","validation_failure","validation_success","stopListening","startListening","Validator","addErrors","addError","hasErrors","clearErrors","getErrors","getFieldErrors","inputs","getGlobalErrors","showErrors","fieldErrors","globalErrors","errorCount","$scrollTo","ensureFieldPostBoxIsVisible","errorMessage","animate","offset","onChangeStatus","prevValue","validate","failure","submit","Event","valid","getValidator","validator","form","$spinner","findSubmitWrap","submitFormDebounced","acf_postbox","ensureInvalidFieldVisibility","checkValidity","addInputEvents","onInvalid","validationMessage","onClickSubmit","onClickSave","onClickSubmitGutenberg","$notice","onSubmitPost","onSubmit","isDefaultPrevented","allowSubmit","gutenbergValidation","customizeEditor","editorSelect","notices","savePost","useValidation","lastPostStatus","postStatus","_this","_args","Promise","resolve","reject","isAutosave","isPreview","unlockPostSaving","createErrorNotice","isDismissible","editPost","lockPostSaving","then","catch","err"],"sourceRoot":""}
\ 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..39375a7
--- /dev/null
+++ b/assets/build/js/acf-input.min.js
@@ -0,0 +1 @@
+!function(){var t={7787:function(){!function(t,e){acf.newCompatibility=function(t,e){return(e=e||{}).__proto__=t.__proto__,t.__proto__=e,t.compatibility=e,e},acf.getCompatibility=function(t){return t.compatibility||null};var i=acf.newCompatibility(acf,{l10n:{},o:{},fields:{},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});i._e=function(t,e){t=t||"";var i=(e=e||"")?t+"."+e:t,a={"image.select":"Select Image","image.edit":"Edit Image","image.update":"Update Image"};if(a[i])return acf.__(a[i]);var n=this.l10n[t]||"";return e&&(n=n[e]||""),n},i.get_selector=function(e){var i=".acf-field";if(!e)return i;if(t.isPlainObject(e)){if(t.isEmptyObject(e))return i;for(var a in e){e=e[a];break}}return i+="-"+e,i=acf.strReplace("_","-",i),acf.strReplace("field-field-","field-",i)},i.get_fields=function(t,e,i){var a={is:t||"",parent:e||!1,suppressFilters:i||!1};return a.is&&(a.is=this.get_selector(a.is)),acf.findFields(a)},i.get_field=function(t,e){var i=this.get_fields.apply(this,arguments);return!!i.length&&i.first()},i.get_closest_field=function(t,e){return t.closest(this.get_selector(e))},i.get_field_wrap=function(t){return t.closest(this.get_selector())},i.get_field_key=function(t){return t.data("key")},i.get_field_type=function(t){return t.data("type")},i.get_data=function(t,e){return acf.parseArgs(t.data(),e)},i.maybe_get=function(t,e,i){void 0===i&&(i=null),keys=String(e).split(".");for(var a=0;a1){for(var c=0;c0?e.substr(0,n):e,o=n>0?e.substr(n+1):"",r=function(e){e.$el=t(this),acf.field_group&&(e.$field=e.$el.closest(".acf-field-object")),"function"==typeof a.event&&(e=a.event(e)),a[i].apply(a,arguments)};o?t(document).on(s,o,r):t(document).on(s,r)},get:function(t,e){return e=e||null,void 0!==this[t]&&(e=this[t]),e},set:function(t,e){return this[t]=e,"function"==typeof this["_set_"+t]&&this["_set_"+t].apply(this),this}},i.field=acf.model.extend({type:"",o:{},$field:null,_add_action:function(t,e){var i=this;t=t+"_field/type="+i.type,acf.add_action(t,(function(t){i.set("$field",t),i[e].apply(i,arguments)}))},_add_filter:function(t,e){var i=this;t=t+"_field/type="+i.type,acf.add_filter(t,(function(t){i.set("$field",t),i[e].apply(i,arguments)}))},_add_event:function(e,i){var a=this,n=e.substr(0,e.indexOf(" ")),s=e.substr(e.indexOf(" ")+1),o=acf.get_selector(a.type);t(document).on(n,o+" "+s,(function(e){var n=t(this),s=acf.get_closest_field(n,a.type);s.length&&(s.is(a.$field)||a.set("$field",s),e.$el=n,e.$field=s,a[i].apply(a,[e]))}))},_set_$field:function(){"function"==typeof this.focus&&this.focus()},doFocus:function(t){return this.set("$field",t)}}),acf.newCompatibility(acf.validation,{remove_error:function(t){acf.getField(t).removeError()},add_warning:function(t,e){acf.getField(t).showNotice({text:e,type:"warning",timeout:1e3})},fetch:acf.validateForm,enableSubmit:acf.enableSubmit,disableSubmit:acf.disableSubmit,showSpinner:acf.showSpinner,hideSpinner:acf.hideSpinner,unlockForm:acf.unlockForm,lockForm:acf.lockForm}),i.tooltip={tooltip:function(t,e){return acf.newTooltip({text:t,target:e}).$el},temp:function(t,e){acf.newTooltip({text:t,target:e,timeout:250})},confirm:function(t,e,i,a,n){acf.newTooltip({confirm:!0,text:i,target:t,confirm:function(){e(!0)},cancel:function(){e(!1)}})},confirm_remove:function(t,e){acf.newTooltip({confirmRemove:!0,target:t,confirm:function(){e(!0)},cancel:function(){e(!1)}})}},i.media=new acf.Model({activeFrame:!1,actions:{new_media_popup:"onNewMediaPopup"},frame:function(){return this.activeFrame},onNewMediaPopup:function(t){this.activeFrame=t.frame},popup:function(t){return t.mime_types&&(t.allowedTypes=t.mime_types),t.id&&(t.attachment=t.id),acf.newMediaPopup(t).frame}}),i.select2={init:function(t,e,i){return e.allow_null&&(e.allowNull=e.allow_null),e.ajax_action&&(e.ajaxAction=e.ajax_action),i&&(e.field=acf.getField(i)),acf.newSelect2(t,e)},destroy:function(t){return acf.getInstance(t).destroy()}},i.postbox={render:function(t){return t.edit_url&&(t.editLink=t.edit_url),t.edit_title&&(t.editTitle=t.edit_title),acf.newPostbox(t)}},acf.newCompatibility(acf.screen,{update:function(){return this.set.apply(this,arguments)},fetch:acf.screen.check}),i.ajax=acf.screen}(jQuery)},682:function(){!function(t,e){var __=acf.__,i=function(t){return t?""+t:""},a=function(t,e){return i(t).toLowerCase()===i(e).toLowerCase()},n=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(t,e){let i=e.val();return i instanceof Array&&(i=i.length),!!i},choices:function(t){return' '}});acf.registerConditionType(n);var s=n.extend({type:"hasNoValue",operator:"==empty",label:__("Has no value"),match:function(t,e){return!n.prototype.match.apply(this,arguments)}});acf.registerConditionType(s);var o=acf.Condition.extend({type:"equalTo",operator:"==",label:__("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 r=o.extend({type:"notEqualTo",operator:"!=",label:__("Value is not equal to"),match:function(t,e){return!o.prototype.match.apply(this,arguments)}});acf.registerConditionType(r);var c=acf.Condition.extend({type:"patternMatch",operator:"==pattern",label:__("Value matches pattern"),fieldTypes:["text","textarea","email","url","password","wysiwyg"],match:function(t,e){return a=e.val(),n=t.value,s=new RegExp(i(n),"gi"),i(a).match(s);var a,n,s},choices:function(t){return' '}});acf.registerConditionType(c);var l=acf.Condition.extend({type:"contains",operator:"==contains",label:__("Value contains"),fieldTypes:["text","textarea","number","email","url","password","wysiwyg","oembed","select"],match:function(t,e){return a=e.val(),n=t.value,i(a).indexOf(i(n))>-1;var a,n},choices:function(t){return' '}});acf.registerConditionType(l);var d=o.extend({type:"trueFalseEqualTo",choiceType:"select",fieldTypes:["true_false"],choices:function(t){return[{id:1,text:__("Checked")}]}});acf.registerConditionType(d);var u=r.extend({type:"trueFalseNotEqualTo",choiceType:"select",fieldTypes:["true_false"],choices:function(t){return[{id:1,text:__("Checked")}]}});acf.registerConditionType(u);var f=acf.Condition.extend({type:"selectEqualTo",operator:"==",label:__("Value is equal to"),fieldTypes:["select","checkbox","radio","button_group"],match:function(t,e){var n,s=e.val();return s instanceof Array?(n=t.value,s.map((function(t){return i(t)})).indexOf(n)>-1):a(t.value,s)},choices:function(t){var e=[],i=t.$setting("choices textarea").val().split("\n");return t.$input("allow_null").prop("checked")&&e.push({id:"",text:__("Null")}),i.map((function(t){(t=t.split(":"))[1]=t[1]||t[0],e.push({id:t[0].trim(),text:t[1].trim()})})),e}});acf.registerConditionType(f);var p=f.extend({type:"selectNotEqualTo",operator:"!=",label:__("Value is not equal to"),match:function(t,e){return!f.prototype.match.apply(this,arguments)}});acf.registerConditionType(p);var h=acf.Condition.extend({type:"greaterThan",operator:">",label:__("Value is greater than"),fieldTypes:["number","range"],match:function(t,e){var i,a,n=e.val();return n instanceof Array&&(n=n.length),i=n,a=t.value,parseFloat(i)>parseFloat(a)},choices:function(t){return' '}});acf.registerConditionType(h);var g=h.extend({type:"lessThan",operator:"<",label:__("Value is less than"),match:function(t,e){var i,a,n=e.val();return n instanceof Array&&(n=n.length),null==n||!1===n||(i=n,a=t.value,parseFloat(i) '}});acf.registerConditionType(g);var m=h.extend({type:"selectionGreaterThan",label:__("Selection is greater than"),fieldTypes:["checkbox","select","post_object","page_link","relationship","taxonomy","user"]});acf.registerConditionType(m);var v=g.extend({type:"selectionLessThan",label:__("Selection is less than"),fieldTypes:["checkbox","select","post_object","page_link","relationship","taxonomy","user"]});acf.registerConditionType(v)}(jQuery)},2849:function(){!function(t,e){var i=[];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(e){t.extend(this.data,e)},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"),a=i.getField(t.field);if(!i||!a)return!1;var n={rule:t,target:i,conditions:e,field:a},s=a.get("type"),o=t.operator;return new(acf.getConditionTypes({fieldType:s,operator:o})[0]||acf.Condition)(n)};var a=function(t){return acf.strPascalCase(t||"")+"Condition"};acf.registerConditionType=function(t){var e=t.prototype.type,n=a(e);acf.models[n]=t,i.push(e)},acf.getConditionType=function(t){var e=a(t);return acf.models[e]||!1},acf.registerConditionForFieldType=function(t,e){var i=acf.getConditionType(t);i&&i.prototype.fieldTypes.push(e)},acf.getConditionTypes=function(t){t=acf.parseArgs(t,{fieldType:"",operator:""});var e=[];return i.map((function(i){var a=acf.getConditionType(i),n=a.prototype.fieldTypes,s=a.prototype.operator;t.fieldType&&-1===n.indexOf(t.fieldType)||t.operator&&s!==t.operator||e.push(a)})),e}}(jQuery)},3155:function(){!function(t,e){var i="conditional_logic",a=(new acf.Model({id:"conditionsManager",priority:20,actions:{new_field:"onNewField"},onNewField:function(t){t.has("conditions")&&t.getConditions().render()}}),function(e,i){var a=acf.getFields({key:i,sibling:e.$el,suppressFilters:!0});return a.length||(a=acf.getFields({key:i,parent:e.$el.parent(),suppressFilters:!0})),!a.length&&t(".acf-field-settings").length&&(a=acf.getFields({key:i,parent:e.$el.parents(".acf-field-settings:first"),suppressFilters:!0})),!a.length&&t("#acf-basic-settings").length&&(a=acf.getFields({key:i,parent:t("#acf-basic-settings"),suppressFilters:!0})),!!a.length&&a[0]});acf.Field.prototype.getField=function(t){var e=a(this,t);if(e)return e;for(var i=this.parents(),n=0;n '),d=t('
'),u=t(''),f=t(" ");l.append(a.html()),u.append(f),d.append(u),s.append(l),s.append(d),a.remove(),o.remove(),s.attr("colspan",2),a=l,s=d,o=f}e.addClass("acf-accordion"),a.addClass("acf-accordion-title"),s.addClass("acf-accordion-content"),i++,this.get("multi_expand")&&e.attr("multi-expand",1);var p=acf.getPreference("this.accordions")||[];void 0!==p[i-1]&&this.set("open",p[i-1]),this.get("open")&&(e.addClass("-open"),s.css("display","block")),a.prepend(n.iconHtml({open:this.get("open")}));var h=e.parent();o.addClass(h.hasClass("-left")?"-left":""),o.addClass(h.hasClass("-clear")?"-clear":""),o.append(e.nextUntil(".acf-field-accordion",".acf-field")),o.removeAttr("data-open data-multi_expand data-endpoint")}}});acf.registerFieldType(a);var n=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(e){var i=acf.isGutenberg()?0:300;e.find(".acf-accordion-content:first").slideDown(i).css("display","block"),e.find(".acf-accordion-icon:first").replaceWith(this.iconHtml({open:!0})),e.addClass("-open"),acf.doAction("show",e),e.attr("multi-expand")||e.siblings(".acf-accordion.-open").each((function(){n.close(t(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(e){var i=[];t(".acf-accordion").each((function(){var e=t(this).hasClass("-open")?1:0;i.push(e)})),i.length&&acf.setPreference("this.accordions",i)}})}(jQuery)},1357:function(){var t;jQuery,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"),a=i.hasClass("selected");this.$(".selected").removeClass("selected"),i.addClass("selected"),this.get("allow_null")&&a&&(i.removeClass("selected"),e.prop("checked",!1).trigger("change"))}}),acf.registerFieldType(t)},8171:function(){var t,e;t=jQuery,e=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 e=[];return this.$(":checked").each((function(){e.push(t(this).val())})),!!e.length&&e},onChange:function(t,e){var i=e.prop("checked"),a=e.parent("label"),n=this.$toggle();i?a.addClass("selected"):a.removeClass("selected"),n.length&&(0==this.$inputs().not(":checked").length?n.prop("checked",!0):n.prop("checked",!1))},onClickAdd:function(t,e){var i=' ';e.parent("li").before(i),e.parent("li").parent().find('input[type="text"]').last().focus()},onClickToggle:function(t,e){var i=e.prop("checked"),a=this.$('input[type="checkbox"]'),n=this.$("label");a.prop("checked",i),i?n.addClass("selected"):n.removeClass("selected")},onClickCustom:function(t,e){var i=e.prop("checked"),a=e.next('input[type="text"]');i?a.prop("disabled",!1):(a.prop("disabled",!0),""==a.val()&&e.parent("li").remove())}}),acf.registerFieldType(e)},9459:function(){var t;jQuery,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 t=this.$input(),e=this.$inputText(),i=function(i){setTimeout((function(){acf.val(t,e.val())}),1)},a={defaultColor:!1,palettes:!0,hide:!0,change:i,clear:i};a=acf.applyFilters("color_picker_args",a,this),e.wpColorPicker(a)},onDuplicate:function(t,e,i){$colorPicker=i.find(".wp-picker-container"),$inputText=i.find('input[type="text"]'),$colorPicker.replaceWith($inputText)}}),acf.registerFieldType(t)},7597:function(){var t,e;t=jQuery,e=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(),i={dateFormat:this.get("date_format"),altField:t,altFormat:"yymmdd",changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.get("first_day")};i=acf.applyFilters("date_picker_args",i,this),acf.newDatePicker(e,i),acf.doAction("date_picker_init",e,i,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")},a=(i=acf.applyFilters("date_picker_args",i,this)).dateFormat;i.dateFormat=this.get("save_format"),acf.newDatePicker(e,i),e.datepicker("option","dateFormat",a),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(e),new acf.Model({priority:5,wait:"ready",initialize:function(){var e=acf.get("locale"),i=acf.get("rtl"),a=acf.get("datePickerL10n");return!!a&&void 0!==t.datepicker&&(a.isRTL=i,t.datepicker.regional[e]=a,void t.datepicker.setDefaults(a))}}),acf.newDatePicker=function(e,i){if(void 0===t.datepicker)return!1;i=i||{},e.datepicker(i),t("body > #ui-datepicker-div").exists()&&t("body > #ui-datepicker-div").wrap('
')}},684:function(){var t,e;t=jQuery,e=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(),i={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};i=acf.applyFilters("date_time_picker_args",i,this),acf.newDateTimePicker(e,i),acf.doAction("date_time_picker_init",e,i,this)}}),acf.registerFieldType(e),new acf.Model({priority:5,wait:"ready",initialize:function(){var e=acf.get("locale"),i=acf.get("rtl"),a=acf.get("dateTimePickerL10n");return!!a&&void 0!==t.timepicker&&(a.isRTL=i,t.timepicker.regional[e]=a,void t.timepicker.setDefaults(a))}}),acf.newDateTimePicker=function(e,i){if(void 0===t.timepicker)return!1;i=i||{},e.datetimepicker(i),t("body > #ui-datepicker-div").exists()&&t("body > #ui-datepicker-div").wrap('
')}},5647:function(){var t,e;t=jQuery,e=acf.models.ImageField.extend({type:"file",$control:function(){return this.$(".acf-file-uploader")},$input:function(){return this.$('input[type="hidden"]:first')},validateAttachment:function(t){return void 0!==(t=t||{}).id&&(t=t.attributes),acf.parseArgs(t,{url:"",alt:"",title:"",filename:"",filesizeHumanReadable:"",icon:"/wp-includes/images/media/default.png"})},render:function(t){t=this.validateAttachment(t),this.$("img").attr({src:t.icon,alt:t.alt,title:t.title}),this.$('[data-name="title"]').text(t.title),this.$('[data-name="filename"]').text(t.filename).attr("href",t.url),this.$('[data-name="filesize"]').text(t.filesizeHumanReadable);var e=t.id||"";acf.val(this.$input(),e),e?this.$control().addClass("has-value"):this.$control().removeClass("has-value")},selectAttachment:function(){var e=this.parent(),i=e&&"repeater"===e.get("type");acf.newMediaPopup({mode:"select",title:acf.__("Select File"),field:this.get("key"),multiple:i,library:this.get("library"),allowedTypes:this.get("mime_types"),select:t.proxy((function(t,i){i>0?this.append(t,e):this.render(t)}),this)})},editAttachment:function(){var e=this.val();if(!e)return!1;acf.newMediaPopup({mode:"edit",title:acf.__("Edit File"),button:acf.__("Update File"),attachment:e,field:this.get("key"),select:t.proxy((function(t,e){this.render(t)}),this)})}}),acf.registerFieldType(e)},8489:function(){!function(t,e){var i=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"),"default"===t&&(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=this.map.marker.getPosition();if(t)var e=t.lat(),i=t.lng();else e=this.get("lat"),i=this.get("lng");this.map.setCenter({lat:parseFloat(e),lng:parseFloat(i)})},initialize:function(){!function(e){if(n)return e();if(acf.isset(window,"google","maps","Geocoder"))return n=new google.maps.Geocoder,e();if(acf.addAction("google_map_api_loaded",e),!a){var i=acf.get("google_map_api");i&&(a=!0,t.ajax({url:i,dataType:"script",cache:!0,success:function(){n=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);var a=new google.maps.Map(this.$canvas()[0],i),n=acf.parseArgs(i.marker,{draggable:!0,raiseOnDrag:!0,map:a});n=acf.applyFilters("google_map_marker_args",n,this);var s=new google.maps.Marker(n),o=!1;if(acf.isset(google,"maps","places","Autocomplete")){var r=i.autocomplete||{};r=acf.applyFilters("google_map_autocomplete_args",r,this),(o=new google.maps.places.Autocomplete(this.$search()[0],r)).bindTo("bounds",a)}this.addMapEvents(this,a,s,o),a.acf=this,a.marker=s,a.autocomplete=o,this.map=a,t&&this.setPosition(t.lat,t.lng),acf.doAction("google_map_init",a,s,this)},addMapEvents:function(t,e,i,a){google.maps.event.addListener(e,"click",(function(e){var i=e.latLng.lat(),a=e.latLng.lng();t.searchPosition(i,a)})),google.maps.event.addListener(i,"dragend",(function(){var e=this.getPosition().lat(),i=this.getPosition().lng();t.searchPosition(e,i)})),a&&google.maps.event.addListener(a,"place_changed",(function(){var e=this.getPlace();t.searchPlace(e)})),google.maps.event.addListener(e,"zoom_changed",(function(){var i=t.val();i&&(i.zoom=e.getZoom(),t.setValue(i,!0))}))},searchPosition:function(t,e){this.setState("loading");var i={lat:t,lng:e};n.geocode({location:i},function(i,a){if(this.setState(""),"OK"!==a)this.showNotice({text:acf.__("Location not found: %s").replace("%s",a),type:"warning"});else{var n=this.parseResult(i[0]);n.lat=t,n.lng=e,this.val(n)}}.bind(this))},searchPlace:function(t){if(t)if(t.geometry){t.formatted_address=this.$search().val();var e=this.parseResult(t);this.val(e)}else t.name&&this.searchAddress(t.name)},searchAddress:function(t){if(t){var e=t.split(",");if(2==e.length){var i=parseFloat(e[0]),a=parseFloat(e[1]);if(i&&a)return this.searchPosition(i,a)}this.setState("loading"),n.geocode({address:t},function(e,i){if(this.setState(""),"OK"!==i)this.showNotice({text:acf.__("Location not found: %s").replace("%s",i),type:"warning"});else{var a=this.parseResult(e[0]);a.address=t,this.val(a)}}.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,i=t.coords.longitude;this.searchPosition(e,i)}.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={street_number:["street_number"],street_name:["street_address","route"],city:["locality","postal_town"],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(var a in i)for(var n=i[a],s=0;s0?this.append(t,e):this.render(t)}),this)})},editAttachment:function(){var e=this.val();e&&acf.newMediaPopup({mode:"edit",title:acf.__("Edit Image"),button:acf.__("Update Image"),attachment:e,field:this.get("key"),select:t.proxy((function(t,e){this.render(t)}),this)})},removeAttachment:function(){this.render(!1)},onClickAdd:function(t,e){this.selectAttachment()},onClickEdit:function(t,e){this.editAttachment()},onClickRemove:function(t,e){this.removeAttachment()},onChange:function(e,i){var a=this.$input();i.val()||a.val(""),acf.getFileInputData(i,(function(e){a.val(t.param(e))}))}}),acf.registerFieldType(e)},4658:function(){var t,e;t=jQuery,e=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(){var t=this.$node();return!!t.attr("href")&&{title:t.html(),url:t.attr("href"),target:t.attr("target")}},setValue:function(t){t=acf.parseArgs(t,{title:"",url:"",target:""});var e=this.$control(),i=this.$node();e.removeClass("-value -external"),t.url&&e.addClass("-value"),"_blank"===t.target&&e.addClass("-external"),this.$(".link-title").html(t.title),this.$(".link-url").attr("href",t.url).html(t.url),i.html(t.title),i.attr("href",t.url),i.attr("target",t.target),this.$(".input-title").val(t.title),this.$(".input-target").val(t.target),this.$(".input-url").val(t.url).trigger("change")},onClickEdit:function(t,e){acf.wpLink.open(this.$node())},onClickRemove:function(t,e){this.setValue(!1)},onChange:function(t,e){var i=this.getValue();this.setValue(i)}}),acf.registerFieldType(e),acf.wpLink=new acf.Model({getNodeValue:function(){var t=this.get("node");return{title:acf.decode(t.html()),url:t.attr("href"),target:t.attr("target")}},setNodeValue:function(t){var e=this.get("node");e.text(t.title),e.attr("href",t.url),e.attr("target",t.target),e.trigger("change")},getInputValue:function(){return{title:t("#wp-link-text").val(),url:t("#wp-link-url").val(),target:t("#wp-link-target").prop("checked")?"_blank":""}},setInputValue:function(e){t("#wp-link-text").val(e.title),t("#wp-link-url").val(e.url),t("#wp-link-target").prop("checked","_blank"===e.target)},open:function(e){this.on("wplink-open","onOpen"),this.on("wplink-close","onClose"),this.set("node",e);var i=t('');t("body").append(i);var a=this.getNodeValue();wpLink.open("acf-link-textarea",a.url,a.title,null)},onOpen:function(){t("#wp-link-wrap").addClass("has-text-field");var e=this.getNodeValue();this.setInputValue(e),e.url&&wpLinkL10n&&t("#wp-link-submit").val(wpLinkL10n.update)},close:function(){wpLink.close()},onClose:function(){if(!this.has("node"))return!1;var e=t("#wp-link-submit");if(e.is(":hover")||e.is(":focus")){var i=this.getInputValue();this.setNodeValue(i)}this.off("wplink-open"),this.off("wplink-close"),t("#acf-link-textarea").remove(),this.set("node",null)}})},719:function(){var t,e;t=jQuery,e=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 e=this.val(),i=this.getSearchVal();if(!i)return this.clear();if("http"!=i.substr(0,4)&&(i="http://"+i),i!==e){var a=this.get("timeout");a&&clearTimeout(a);var n=t.proxy(this.search,this,i);this.set("timeout",setTimeout(n,300))}},search:function(e){var i={action:"acf/fields/oembed/search",s:e,field_key:this.get("key")};(a=this.get("xhr"))&&a.abort(),this.showLoading();var a=t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(i),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",a)},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(e)},1281:function(){var t;jQuery,t=acf.models.SelectField.extend({type:"page_link"}),acf.registerFieldType(t)},1987:function(){var t;jQuery,t=acf.models.SelectField.extend({type:"post_object"}),acf.registerFieldType(t)},2557:function(){var t;jQuery,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"other"===t&&this.get("other_choice")&&(t=this.$inputText().val()),t},onClick:function(t,e){var i=e.parent("label"),a=i.hasClass("selected"),n=e.val();this.$(".selected").removeClass("selected"),i.addClass("selected"),this.get("allow_null")&&a&&(i.removeClass("selected"),e.prop("checked",!1).trigger("change"),n=!1),this.get("other_choice")&&("other"===n?this.$inputText().prop("disabled",!1):this.$inputText().prop("disabled",!0))}}),acf.registerFieldType(t)},2489:function(){var t;jQuery,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)},714:function(){var t,e;t=jQuery,e=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","keypress .choices-list .acf-rel-item":"onKeypressFilter","keypress .values-list .acf-rel-item":"onKeypressFilter",'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 e=[];return this.$listItems("values").each((function(){e.push(t(this).data("id"))})),!!e.length&&e},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){if(!this.get("loading")&&this.get("more")){var e=this.$list("choices"),i=Math.ceil(e.scrollTop()),a=Math.ceil(e[0].scrollHeight),n=Math.ceil(e.innerHeight()),s=this.get("paged")||1;i+n>=a&&(this.set("paged",s+1),this.fetch())}},onKeypressFilter:function(t,e){e.hasClass("acf-rel-item-add")&&13==t.which&&this.onClickAdd(t,e),e.hasClass("acf-rel-item-remove")&&13==t.which&&this.onClickRemove(t,e),13==t.which&&t.preventDefault()},onChangeFilter:function(t,e){var i=e.val(),a=e.data("filter");this.get(a)!==i&&(this.set(a,i),this.set("paged",1),e.is("select")?this.fetch():this.maybeFetch())},onClickAdd:function(t,e){var i=this.val(),a=parseInt(this.get("max"));if(e.hasClass("disabled"))return!1;if(a>0&&i&&i.length>=a)return this.showNotice({text:acf.__("Maximum values reached ( {max} values )").replace("{max}",a),type:"warning"}),!1;e.addClass("disabled");var n=this.newValue({id:e.data("id"),text:e.html()});this.$list("values").append(n),this.$input().trigger("change")},onClickRemove:function(t,e){let i;t.preventDefault(),i=e.hasClass("acf-rel-item-remove")?e:e.parent();const a=i.parent(),n=i.data("id");a.remove(),this.$listItem("choices",n).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=this.$control().data();for(var e in t)t[e]=this.get(e);return t.action="acf/fields/relationship/query",t.field_key=this.get("key"),acf.applyFilters("relationship_ajax_data",t,this)},fetch:function(){(n=this.get("xhr"))&&n.abort();var e=this.getAjaxData(),i=this.$list("choices");1==e.paged&&i.html("");var a=t(' '+acf.__("Loading")+" ");i.append(a),this.set("loading",!0);var n=t.ajax({url:acf.get("ajaxurl"),dataType:"json",type:"post",data:acf.prepareForAjax(e),context:this,success:function(e){if(!e||!e.results||!e.results.length)return this.set("more",!1),void(1==this.get("paged")&&this.$list("choices").append(""+acf.__("No matches found")+" "));this.set("more",e.more);var a=this.walkChoices(e.results),n=t(a),s=this.val();s&&s.length&&s.map((function(t){n.find('.acf-rel-item[data-id="'+t+'"]').addClass("disabled")})),i.append(n);var o=!1,r=!1;i.find(".acf-rel-label").each((function(){var e=t(this),i=e.siblings("ul");if(o&&o.text()==e.text())return r.append(i.children()),void t(this).parent().remove();o=e,r=i}))},complete:function(){this.set("loading",!1),a.remove()}});this.set("xhr",n)},walkChoices:function(e){var i=function(e){var a="";return t.isArray(e)?e.map((function(t){a+=i(t)})):t.isPlainObject(e)&&(void 0!==e.children?(a+=''+acf.escHtml(e.text)+' "):a+=''+acf.escHtml(e.text)+" "),a};return i(e)}}),acf.registerFieldType(e)},6965:function(){var t;jQuery,t=acf.Field.extend({type:"select",select2:!1,wait:"load",events:{removeField:"onRemove",duplicateField:"onDuplicate"},$input:function(){return this.$("select")},initialize:function(){var t=this.$input();if(this.inherit(t),this.get("ui")){var e=this.get("ajax_action");e||(e="acf/fields/"+this.get("type")+"/query"),this.select2=acf.newSelect2(t,{field:this,ajax:this.get("ajax"),multiple:this.get("multiple"),placeholder:this.get("placeholder"),allowNull:this.get("allow_null"),ajaxAction:e})}},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)},177:function(){!function(t,e){var i="tab",a=acf.Field.extend({type:"tab",wait:"",tabs:!1,tab:!1,events:{duplicateField:"onDuplicate"},findFields:function(){let t=".acf-field";return"acf_field_settings_tabs"===this.get("key")&&(t=".acf-field-settings-main"),"acf_field_group_settings_tabs"===this.get("key")&&(t=".field-group-settings-tab"),"acf_browse_fields_tabs"===this.get("key")&&(t=".acf-field-types-tab"),this.$el.nextUntil(".acf-field-tab",t)},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={},!1;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,i),t.hiddenByTab=!1}),this)},hideFields:function(){this.getFields().map((function(t){t.hide(this.cid,i),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(i)}))},disable:function(t){this.getFields().map((function(t){t.disable(i)}))},onDuplicate:function(t,e,i){this.isActive()&&i.prevAll(".acf-tab-wrap:first").remove()}});acf.registerFieldType(a);var n=0,s=acf.Model.extend({tabs:[],active:!1,actions:{refresh:"onRefresh",close_field_object:"onCloseFieldObject"},data:{before:!1,placement:"top",index:0,initialized:!1},setup:function(e){t.extend(this.data,e),this.tabs=[],this.active=!1;var i=this.get("placement"),a=this.get("before"),s=a.parent();if("left"==i&&s.hasClass("acf-fields")&&s.addClass("-sidebar"),a.is("tr"))this.$el=t(' ');else{let e="acf-hl acf-tab-group";"acf_field_settings_tabs"===this.get("key")&&(e="acf-field-settings-tab-bar"),this.$el=t('')}a.before(this.$el),this.set("index",n,!0),n++},initializeTabs:function(){if("acf_field_settings_tabs"!==this.get("key")||!t("#acf-field-group-fields").hasClass("hide-tabs")){var e=this.getVisible().shift(),i=(acf.getPreference("this.tabs")||[])[this.get("index")];this.tabs[i]&&this.tabs[i].isVisible()&&(e=this.tabs[i]),e?this.selectTab(e):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(t){this.tabs.map((function(e){t.cid!==e.cid&&this.closeTab(e)}),this),this.openTab(t)},addTab:function(e,i){var a=t(""+e.outerHTML()+" "),n=e.attr("class").replace("acf-tab-button","");a.addClass(n),this.$("ul").append(a);var s=new o({$el:a,field:i,group:this});return this.tabs.push(s),s},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(){if("left"===this.get("placement")){var t=this.$el.parent(),e=this.$el.children("ul"),i=t.is("td")?"height":"min-height",a=e.position().top+e.outerHeight(!0)-1;t.css(i,a)}},onCloseFieldObject:function(t){const e=this.getVisible().find((e=>{const i=e.$el.closest("div[data-id]").data("id");if(t.data.id===i)return e}));e&&setTimeout((()=>{this.openTab(e)}),300)}}),o=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",show:"render",invalid_field:"onInvalidField"},findTabs:function(){return t(".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 t=[];this.getTabs().map((function(e){if(e.$el.children(".acf-field-settings-tab-bar").length||e.$el.parents("#acf-advanced-settings.postbox").length)return!0;var i=e.hasActive()?e.getActive().index():0;t.push(i)})),t.length&&acf.setPreference("this.tabs",t)}})}(jQuery)},2573:function(){var t,e;t=jQuery,e=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"multi_select"==t&&(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(e,i){var a=this,n=!1,s=!1,o=!1,r=!1,c=!1,l=!1,d=function(t){n.loading(!1),n.content(t),s=n.$("form"),o=n.$('input[name="term_name"]'),r=n.$('select[name="term_parent"]'),c=n.$(".acf-submit-button"),o.trigger("focus"),n.on("submit","form",u)},u=function(e,i){if(e.preventDefault(),e.stopImmediatePropagation(),""===o.val())return o.trigger("focus"),!1;acf.startButtonLoading(c);var n={action:"acf/fields/taxonomy/add_term",field_key:a.get("key"),term_name:o.val(),term_parent:r.length?r.val():0};t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(n),type:"post",dataType:"json",success:f})},f=function(t){acf.stopButtonLoading(c),l&&l.remove(),acf.isAjaxSuccess(t)?(o.val(""),p(t.data),l=acf.newNotice({type:"success",text:acf.getAjaxMessage(t),target:s,timeout:2e3,dismiss:!1})):l=acf.newNotice({type:"error",text:acf.getAjaxError(t),target:s,timeout:2e3,dismiss:!1}),o.trigger("focus")},p=function(e){var i=t(''+e.term_label+" ");e.term_parent?r.children('option[value="'+e.term_parent+'"]').after(i):r.append(i),acf.getFields({type:"taxonomy"}).map((function(t){t.get("taxonomy")==a.get("taxonomy")&&t.appendTerm(e)})),a.selectTerm(e.term_id)};!function(){n=acf.newPopup({title:i.attr("title"),loading:!0,width:"300px"});var e={action:"acf/fields/taxonomy/add_term",field_key:a.get("key")};t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(e),type:"post",dataType:"html",success:d})}()},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(e){var i=this.$("[name]:first").attr("name"),a=this.$("ul:first");"checkbox"==this.getRelatedType()&&(i+="[]");var n=t(['',"",' ',""+e.term_name+" "," "," "].join(""));if(e.term_parent){var s=a.find('li[data-id="'+e.term_parent+'"]');(a=s.children("ul")).exists()||(a=t(''),s.append(a))}a.append(n)},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"),a=i.hasClass("selected");this.$(".selected").removeClass("selected"),i.addClass("selected"),this.get("allow_null")&&a&&(i.removeClass("selected"),e.prop("checked",!1).trigger("change"))}}),acf.registerFieldType(e)},9047:function(){var t,e;t=jQuery,e=acf.models.DatePickerField.extend({type:"time_picker",$control:function(){return this.$(".acf-time-picker")},initialize:function(){var t=this.$input(),e=this.$inputText(),i={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){var a=e.dpDiv.find(".ui-datepicker-close");!t&&a.is(":hover")&&i._updateDateTime()}};i=acf.applyFilters("time_picker_args",i,this),acf.newTimePicker(e,i),acf.doAction("time_picker_init",e,i,this)}}),acf.registerFieldType(e),acf.newTimePicker=function(e,i){if(void 0===t.timepicker)return!1;i=i||{},e.timepicker(i),t("body > #ui-datepicker-div").exists()&&t("body > #ui-datepicker-div").wrap('
')}},1788:function(){var t;jQuery,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=this.$switch();if(t.length){var e=t.children(".acf-switch-on"),i=t.children(".acf-switch-off"),a=Math.max(e.width(),i.width());a&&(e.css("min-width",a),i.css("min-width",a))}},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)},4429:function(){var t;jQuery,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)},7790:function(){var t;jQuery,t=acf.models.SelectField.extend({type:"user"}),acf.registerFieldType(t),acf.addFilter("select2_ajax_data",(function(t,e,i,a,n){if(!a)return t;const s=a.get("queryNonce");return s&&s.length&&(t.user_query_nonce=s),t}))},4850:function(){var t;jQuery,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},a=e.attr("id"),n=acf.uniqueId("acf-editor-"),s=e.data(),o=e.val();acf.rename({target:t,search:a,replace:n,destructive:!0}),this.set("id",n,!0),this.$input().data(s).val(o),acf.tinymce.initialize(n,i)},onMousedown:function(t){t.preventDefault();var e=this.$control();e.removeClass("delay"),e.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)},6291:function(){!function(t,e){var i=[];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!==e?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){var i=acf.show(this.$el,t);return i&&(this.prop("hidden",!1),acf.doAction("show_field",this,e)),i},hide:function(t,e){var i=acf.hide(this.$el,t);return i&&(this.prop("hidden",!0),acf.doAction("hide_field",this,e)),i},enable:function(t,e){var i=acf.enable(this.$el,t);return i&&(this.prop("disabled",!1),acf.doAction("enable_field",this,e)),i},disable:function(t,e){var i=acf.disable(this.$el,t);return i&&(this.prop("disabled",!0),acf.doAction("disable_field",this,e)),i},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(i){this.$el.addClass("acf-error"),i!==e&&this.showNotice({text:i,type:"error",dismiss:!1}),acf.doAction("invalid_field",this),this.$el.one("focus change","input, select, textarea",t.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"),i=a(e),n=new(acf.models[i]||acf.Field)(t);return acf.doAction("new_field",n),n};var a=function(t){return acf.strPascalCase(t||"")+"Field"};acf.registerFieldType=function(t){var e=t.prototype.type,n=a(e);acf.models[n]=t,i.push(e)},acf.getFieldType=function(t){var e=a(t);return acf.models[e]||!1},acf.getFieldTypes=function(t){t=acf.parseArgs(t,{category:""});var e=[];return i.map((function(i){var a=acf.getFieldType(i),n=a.prototype;t.category&&n.category!==t.category||e.push(a)})),e}}(jQuery)},1580:function(){!function(t,e){acf.findFields=function(e){var i=".acf-field",a=!1;return(e=acf.parseArgs(e,{key:"",name:"",type:"",is:"",parent:!1,sibling:!1,limit:!1,visible:!1,suppressFilters:!1,excludeSubFields:!1})).suppressFilters||(e=acf.applyFilters("find_fields_args",e)),e.key&&(i+='[data-key="'+e.key+'"]'),e.type&&(i+='[data-type="'+e.type+'"]'),e.name&&(i+='[data-name="'+e.name+'"]'),e.is&&(i+=e.is),e.visible&&(i+=":visible"),e.suppressFilters||(i=acf.applyFilters("find_fields_selector",i,e)),e.parent?(a=e.parent.find(i),e.excludeSubFields&&(a=a.not(e.parent.find(".acf-is-subfields .acf-field")))):a=e.sibling?e.sibling.siblings(i):t(i),e.suppressFilters||(a=a.not(".acf-clone .acf-field"),a=acf.applyFilters("find_fields",a)),e.limit&&(a=a.slice(0,e.limit)),a},acf.findField=function(t,e){return acf.findFields({key:t,limit:1,parent:e,suppressFilters:!0})},acf.getField=function(t){t instanceof jQuery||(t=acf.findField(t));var e=t.data("acf");return e||(e=acf.newField(t)),e},acf.getFields=function(e){e instanceof jQuery||(e=acf.findFields(e));var i=[];return e.each((function(){var e=acf.getField(t(this));i.push(e)})),i},acf.findClosestField=function(t){return t.closest(".acf-field")},acf.getClosestField=function(t){var e=acf.findClosestField(t);return this.getField(e)};var i=function(t){var e=t+"_field",i=t+"Field";acf.addAction(e,(function(n){var s=acf.arrayArgs(arguments),o=s.slice(1);["type","name","key"].map((function(t){var i="/"+t+"="+n.get(t);s=[e+i,n].concat(o),acf.doAction.apply(null,s)})),a.indexOf(t)>-1&&n.trigger(i,o)}))},a=["remove","unmount","remount","sortstart","sortstop","show","hide","unload","valid","invalid","enable","disable","duplicate"];["prepare","ready","load","append","remove","unmount","remount","sortstart","sortstop","show","hide","unload"].map((function(t){var e=t,a=t+"_fields",n=t+"_field";acf.addAction(e,(function(t){var e=acf.arrayArgs(arguments).slice(1),i=acf.getFields({parent:t});if(i.length){var n=[a,i].concat(e);acf.doAction.apply(null,n)}})),acf.addAction(a,(function(t){var e=acf.arrayArgs(arguments).slice(1);t.map((function(t,i){var a=[n,t].concat(e);acf.doAction.apply(null,a)}))})),i(t)})),["valid","invalid","enable","disable","new","duplicate"].map(i),new acf.Model({id:"fieldsEventManager",events:{'click .acf-field a[href="#"]':"onClick","change .acf-field":"onChange"},onClick:function(t){t.preventDefault()},onChange:function(){t("#_acf_changed").val(1)}}),new acf.Model({id:"duplicateFieldsManager",actions:{duplicate:"onDuplicate",duplicate_fields:"onDuplicateFields"},onDuplicate:function(t,e){var i=acf.getFields({parent:t});if(i.length){var a=acf.findFields({parent:e});acf.doAction("duplicate_fields",i,a)}},onDuplicateFields:function(e,i){e.map((function(e,a){acf.doAction("duplicate_field",e,t(i[a]))}))}})}(jQuery)},5938:function(){var t;t=jQuery,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()}}),new acf.Model({priority:1,actions:{sortstart:"onSortstart",sortstop:"onSortstop"},onSortstart:function(t){acf.doAction("unmount",t)},onSortstop:function(t){acf.doAction("remount",t)}}),new acf.Model({actions:{sortstart:"onSortstart"},onSortstart:function(e,i){e.is("tr")&&(i.html(' '),e.addClass("acf-sortable-tr-helper"),e.children().each((function(){t(this).width(t(this).width())})),i.height(e.height()+"px"),e.removeClass("acf-sortable-tr-helper"))}}),new acf.Model({actions:{after_duplicate:"onAfterDuplicate"},onAfterDuplicate:function(e,i){var a=[];e.find("select").each((function(e){a.push(t(this).val())})),i.find("select").each((function(e){t(this).val(a[e])}))}}),new acf.Model({id:"tableHelper",priority:20,actions:{refresh:"renderTables"},renderTables:function(e){var i=this;t(".acf-table:visible").each((function(){i.renderTable(t(this))}))},renderTable:function(e){var i=e.find("> thead > tr:visible > th[data-key]"),a=e.find("> tbody > tr:visible > td[data-key]");if(!i.length||!a.length)return!1;i.each((function(e){var i=t(this),n=i.data("key"),s=a.filter('[data-key="'+n+'"]'),o=s.filter(".acf-hidden");s.removeClass("acf-empty"),s.length===o.length?acf.hide(i):(acf.show(i),o.addClass("acf-empty"))})),i.css("width","auto"),i=i.not(".acf-hidden");var n=100;i.length,i.filter("[data-width]").each((function(){var e=t(this).data("width");t(this).css("width",e+"%"),n-=e}));var s=i.not("[data-width]");if(s.length){var o=n/s.length;s.css("width",o+"%"),n=0}n>0&&i.last().css("width","auto"),a.filter(".-collapsed-target").each((function(){var e=t(this);e.parent().hasClass("-collapsed")?e.attr("colspan",i.length):e.removeAttr("colspan")}))}}),new acf.Model({id:"fieldsHelper",priority:30,actions:{refresh:"renderGroups"},renderGroups:function(){var e=this;t(".acf-fields:visible").each((function(){e.renderGroup(t(this))}))},renderGroup:function(e){var i=0,a=0,n=t(),s=e.children(".acf-field[data-width]:visible");return!!s.length&&(e.hasClass("-left")?(s.removeAttr("data-width"),s.css("width","auto"),!1):(s.removeClass("-r0 -c0").css({"min-height":0}),s.each((function(e){var s=t(this),o=s.position(),r=Math.ceil(o.top),c=Math.ceil(o.left);n.length&&r>i&&(n.css({"min-height":a+"px"}),o=s.position(),r=Math.ceil(o.top),c=Math.ceil(o.left),i=0,a=0,n=t()),acf.get("rtl")&&(c=Math.ceil(s.parent().width()-(o.left+s.outerWidth()))),0==r?s.addClass("-r0"):0==c&&s.addClass("-c0");var l=Math.ceil(s.outerHeight())+1;a=Math.max(a,l),i=Math.max(i,r),n=n.add(s)})),void(n.length&&n.css({"min-height":a+"px"}))))}}),new acf.Model({id:"bodyClassShiftHelper",events:{keydown:"onKeyDown",keyup:"onKeyUp"},isShiftKey:function(t){return 16===t.keyCode},onKeyDown:function(e){this.isShiftKey(e)&&t("body").addClass("acf-keydown-shift")},onKeyUp:function(e){this.isShiftKey(e)&&t("body").removeClass("acf-keydown-shift")}})},3812:function(){!function(t,e){acf.newMediaPopup=function(t){var e=null;return 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(){}}),e="edit"==t.mode?new acf.models.EditMediaPopup(t):new acf.models.SelectMediaPopup(t),t.autoOpen&&setTimeout((function(){e.open()}),1),acf.doAction("new_media_popup",e),e};var i=function(){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=acf.getMimeTypes();if(void 0!==e[t])return e[t];for(var i in e)if(-1!==i.indexOf(t))return e[i];return!1};var a=acf.Model.extend({id:"MediaPopup",data:{},defaults:{},frame:!1,setup:function(e){t.extend(this.data,e)},initialize:function(){var t=this.getFrameOptions();this.addFrameStates(t);var e=wp.media(t);e.acf=this,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=i()),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(t,e){t.on("open",(function(){this.$el.closest(".media-modal").addClass("acf-media-modal -"+this.acf.get("mode"))}),t),t.on("content:render:edit-image",(function(){var t=this.state().get("image"),e=new wp.media.view.EditImage({model:t,controller:this}).render();this.content.set(e),e.loadEditor()}),t),t.on("select",(function(){var e=t.state().get("selection");e&&e.each((function(e,i){t.acf.get("select").apply(t.acf,[e,i])}))})),t.on("close",(function(){setTimeout((function(){t.acf.get("close").apply(t.acf),t.acf.remove()}),1)}))}});acf.models.SelectMediaPopup=a.extend({id:"SelectMediaPopup",setup:function(t){t.button||(t.button=acf._x("Select","verb")),a.prototype.setup.apply(this,arguments)},addFrameEvents:function(t,e){acf.isset(_wpPluploadSettings,"defaults","multipart_params")&&(_wpPluploadSettings.defaults.multipart_params._acfuploader=this.get("field"),t.on("open",(function(){delete _wpPluploadSettings.defaults.multipart_params._acfuploader}))),t.on("content:activate:browse",(function(){var e=!1;try{e=t.content.get().toolbar}catch(t){return void console.log(t)}t.acf.customizeFilters.apply(t.acf,[e])})),a.prototype.addFrameEvents.apply(this,arguments)},customizeFilters:function(e){var i=e.get("filters");if("image"==this.get("type")&&(i.filters.all.text=acf.__("All images"),delete i.filters.audio,delete i.filters.video,delete i.filters.image,t.each(i.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){var e=acf.getMimeType(t);if(e){var a={text:e,props:{status:null,type:e,uploadedTo:null,orderby:"date",order:"DESC"},priority:20};i.filters[e]=a}})),"uploadedTo"===this.get("library")){var a=this.frame.options.library.uploadedTo;delete i.filters.unattached,delete i.filters.uploaded,t.each(i.filters,(function(t,e){e.text+=" ("+acf.__("Uploaded to this post")+")",e.props.uploadedTo=a}))}var n=this.get("field");t.each(i.filters,(function(t,e){e.props._acfuploader=n})),e.get("search").model.attributes._acfuploader=n,i.renderFilters&&i.renderFilters()}}),acf.models.EditMediaPopup=a.extend({id:"SelectMediaPopup",setup:function(t){t.button||(t.button=acf._x("Update","verb")),a.prototype.setup.apply(this,arguments)},addFrameEvents:function(t,e){t.on("open",(function(){this.$el.closest(".media-modal").addClass("acf-expanded"),"browse"!=this.content.mode()&&this.content.mode("browse");var e=this.state().get("selection"),i=wp.media.attachment(t.acf.get("attachment"));e.add(i)}),t),a.prototype.addFrameEvents.apply(this,arguments)}}),new acf.Model({id:"customizePrototypes",wait:"ready",initialize:function(){if(acf.isset(window,"wp","media","view")){var t=i();t&&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(){if(acf.isset(wp,"media","view","Button")){var 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(){if(acf.isset(wp,"media","view","Router")){var e=wp.media.view.Router;wp.media.view.Router=e.extend({addExpand:function(){var e=t(['',' '+acf.__("Expand Details")+" ",' '+acf.__("Collapse Details")+" "," "].join(""));e.on("click",(function(e){e.preventDefault();var i=t(this).closest(".media-modal");i.hasClass("acf-expanded")?i.removeClass("acf-expanded"):i.addClass("acf-expanded")})),this.$el.append(e)},initialize:function(){return e.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(e,i){return{el:t(" ").val(i).html(e.text)[0],priority:e.priority||50}}),this).sortBy("priority").pluck("el").value())})},customizeAttachmentCompat:function(){if(acf.isset(wp,"media","view","AttachmentCompat")){var e=wp.media.view.AttachmentCompat,i=!1;wp.media.view.AttachmentCompat=e.extend({render:function(){return this.rendered?this:(e.prototype.render.apply(this,arguments),this.$("#acf-form-data").length?(clearTimeout(i),i=setTimeout(t.proxy((function(){this.rendered=!0,acf.doAction("append",this.$el)}),this),50),this):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(){if(acf.isset(wp,"media","view","Attachment","Library")){var t=wp.media.view.Attachment.Library;wp.media.view.Attachment.Library=t.extend({render:function(){var e=acf.isget(this,"controller","acf"),i=acf.isget(this,"model","attributes");if(e&&i){i.acf_errors&&this.$el.addClass("acf-disabled");var a=e.get("selected");a&&a.indexOf(i.id)>-1&&this.$el.addClass("acf-selected")}return t.prototype.render.apply(this,arguments)},toggleSelection:function(e){this.collection;var i=this.options.selection,a=this.model,n=(i.single(),this.controller),s=acf.isget(this,"model","attributes","acf_errors"),o=n.$el.find(".media-frame-content .media-sidebar");if(o.children(".acf-selection-error").remove(),o.children().removeClass("acf-hidden"),n&&s){var r=acf.isget(this,"model","attributes","filename");return o.children().addClass("acf-hidden"),o.prepend(['',''+acf.__("Restricted")+" ",''+r+" ",''+s+" ","
"].join("")),i.reset(),void i.single(a)}return t.prototype.toggleSelection.apply(this,arguments)}})}}})}(jQuery)},1128:function(){var t;t=jQuery,new acf.Model({wait:"prepare",priority:1,initialize:function(){(acf.get("postboxes")||[]).map(acf.newPostbox)}}),acf.getPostbox=function(e){return"string"==typeof arguments[0]&&(e=t("#"+arguments[0])),acf.getInstance(e)},acf.getPostboxes=function(){return acf.getInstances(t(".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(e){e.editLink&&(e.edit=e.editLink),t.extend(this.data,e),this.$el=this.$postbox()},$postbox:function(){return t("#"+this.get("id"))},$hide:function(){return t("#"+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")},isHiddenByScreenOptions:function(){return this.$el.hasClass("hide-if-js")||"none"==this.$el.css("display")},initialize:function(){if(this.$el.addClass("acf-postbox"),"block"!==acf.get("editor")){var t=this.get("style");"default"!==t&&this.$el.addClass(t)}this.$inside().addClass("acf-fields").addClass("-"+this.get("label"));var e=this.get("edit");if(e){var i=' ',a=this.$handleActions();a.length?a.prepend(i):this.$hndle().append(i)}this.show()},show:function(){this.$el.hasClass("hide-if-js")?this.$hide().prop("checked",!1):(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)}})},7240:function(){var t;t=jQuery,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 e=t("#page_template");return e.length?e.val():null},getPageParent:function(e,i){return(i=t("#parent_id")).length?i.val():null},getPageType:function(t,e){return this.getPageParent()?"child":"parent"},getPostType:function(){return t("#post_type").val()},getPostFormat:function(e,i){if((i=t("#post-formats-select input:checked")).length){var a=i.val();return"0"==a?"standard":a}return null},getPostCoreTerms:function(){var e={},i=acf.serialize(t(".categorydiv, .tagsdiv"));for(var a in i.tax_input&&(e=i.tax_input),i.post_category&&(e.category=i.post_category),e)acf.isArray(e[a])||(e[a]=e[a].split(/,[\s]?/));return e},getPostTerms:function(){var t=this.getPostCoreTerms();for(var e in acf.getFields({type:"taxonomy"}).map((function(e){if(e.get("save")){var i=e.val(),a=e.get("taxonomy");i&&(t[a]=t[a]||[],i=acf.isArray(i)?i:[i],t[a]=t[a].concat(i))}})),null!==(productType=this.getProductType())&&(t.product_type=[productType]),t)t[e]=acf.uniqueArray(t[e]);return t},getProductType:function(){var e=t("#product-type");return e.length?e.val():null},check:function(){if("post"===acf.get("screen")){this.xhr&&this.xhr.abort();var 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=t.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(e){var i=function(e,i){var a=t._data(e[0]).events;for(var n in a)for(var s=0;s=0;n--)if(t("#"+i[n]).length)return t("#"+i[n]).after(t("#"+e));for(n=a+1;n=5.5)var r=['"].join("");else r=['','Toggle panel: '+acf.escHtml(n.title)+" ",' '," ",'',""+acf.escHtml(n.title)+" "," "].join("");n.classes||(n.classes="");var c=t(['"].join(""));if(t("#adv-settings").length){var l=t("#adv-settings .metabox-prefs"),d=t(['',' '," "+n.title," "].join(""));i(l.find("input").first(),d.find("input")),l.append(d)}t(".postbox").length&&(i(t(".postbox .handlediv").first(),c.children(".handlediv")),i(t(".postbox .hndle").first(),c.children(".hndle"))),"side"===n.position?t("#"+n.position+"-sortables").append(c):t("#"+n.position+"-sortables").prepend(c);var u=[];if(e.results.map((function(e){n.position===e.position&&t("#"+n.position+"-sortables #"+e.id).length&&u.push(e.id)})),a(n.id,u),e.sorted)for(var f in e.sorted){let t=e.sorted[f];if("string"==typeof t&&(t=t.split(","),a(n.id,t)))break}o=acf.newPostbox(n),acf.doAction("append",c),acf.doAction("append_postbox",o)}return o.showEnable(),e.visible.push(n.id),n})),acf.getPostboxes().map((function(t){-1===e.visible.indexOf(t.get("id"))&&(t.hideDisable(),e.hidden.push(t.get("id")))})),t("#acf-style").html(e.style),acf.doAction("refresh_post_screen",e)},renderUserScreen:function(t){}}),new acf.Model({postEdits:{},wait:"prepare",initialize:function(){acf.isGutenberg()&&(wp.data.subscribe(acf.debounce(this.onChange).bind(this)),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,acf.unload.disable(),parseFloat(acf.get("wp_version"))>=5.3&&this.addAction("refresh_post_screen",this.onRefreshPostScreen),wp.domReady(acf.refresh))},onChange:function(){var t=["template","parent","format"];(wp.data.select("core").getTaxonomies()||[]).map((function(e){t.push(e.rest_base)}));var e=wp.data.select("core/editor").getPostEdits(),i={};t.map((function(t){void 0!==e[t]&&(i[t]=e[t])})),JSON.stringify(i)!==JSON.stringify(this.postEdits)&&(this.postEdits=i,acf.screen.check())},getPageTemplate:function(){return wp.data.select("core/editor").getEditedPostAttribute("template")},getPageParent:function(t,e){return wp.data.select("core/editor").getEditedPostAttribute("parent")},getPostType:function(){return wp.data.select("core/editor").getEditedPostAttribute("type")},getPostFormat:function(t,e){return wp.data.select("core/editor").getEditedPostAttribute("format")},getPostCoreTerms:function(){var t={};return(wp.data.select("core").getTaxonomies()||[]).map((function(e){var i=wp.data.select("core/editor").getEditedPostAttribute(e.rest_base);i&&(t[e.slug]=i)})),t},onRefreshPostScreen:function(t){var e=wp.data.select("core/edit-post"),i=wp.data.dispatch("core/edit-post"),a={};e.getActiveMetaBoxLocations().map((function(t){a[t]=e.getMetaBoxesPerLocation(t)}));var n=[];for(var s in a)a[s].map((function(t){n.push(t.id)}));for(var s in t.results.filter((function(t){return-1===n.indexOf(t.id)})).map((function(t,e){var i=t.position;a[i]=a[i]||[],a[i].push({id:t.id,title:t.title})})),a)a[s]=a[s].filter((function(e){return-1===t.hidden.indexOf(e.id)}));i.setAvailableMetaBoxesPerLocation(a)}})},5796:function(){!function(t,e){function i(){return acf.isset(window,"jQuery","fn","select2","amd")?4:!!acf.isset(window,"Select2")&&3}acf.newSelect2=function(t,e){if(e=acf.parseArgs(e,{allowNull:!1,placeholder:"",multiple:!1,field:!1,ajax:!1,ajaxAction:"",ajaxData:function(t){return t},ajaxResults:function(t){return t},templateSelection:!1,templateResult:!1,dropdownCssClass:"",suppressFilters:!1}),4==i())var a=new n(t,e);else a=new s(t,e);return acf.doAction("new_select2",a),a};var a=acf.Model.extend({setup:function(e,i){t.extend(this.data,i),this.$el=e},initialize:function(){},selectOption:function(t){var e=this.getOption(t);e.prop("selected")||e.prop("selected",!0).trigger("change")},unselectOption:function(t){var e=this.getOption(t);e.prop("selected")&&e.prop("selected",!1).trigger("change")},getOption:function(t){return this.$('option[value="'+t+'"]')},addOption:function(e){e=acf.parseArgs(e,{id:"",text:"",selected:!1});var i=this.getOption(e.id);return i.length||((i=t(" ")).html(e.text),i.attr("value",e.id),i.prop("selected",e.selected),this.$el.append(i)),i},getValue:function(){var e=[],i=this.$el.find("option:selected");return i.exists()?((i=i.sort((function(t,e){return+t.getAttribute("data-i")-+e.getAttribute("data-i")}))).each((function(){var i=t(this);e.push({$el:i,id:i.attr("value"),text:i.text()})})),e):e},mergeOptions:function(){},getChoices:function(){var e=function(i){var a=[];return i.children().each((function(){var i=t(this);i.is("optgroup")?a.push({text:i.attr("label"),children:e(i)}):a.push({id:i.attr("value"),text:i.text()})})),a};return e(this.$el)},getAjaxData:function(t){var e={action:this.get("ajaxAction"),s:t.term||"",paged:t.page||1},i=this.get("field");i&&(e.field_key=i.get("key"));var a=this.get("ajaxData");return a&&(e=a.apply(this,[e,t])),e=acf.applyFilters("select2_ajax_data",e,this.data,this.$el,i||!1,this),acf.prepareForAjax(e)},getAjaxResults:function(t,e){t=acf.parseArgs(t,{results:!1,more:!1});var i=this.get("ajaxResults");return i&&(t=i.apply(this,[t,e])),acf.applyFilters("select2_ajax_results",t,e,this)},processAjaxResults:function(e,i){return(e=this.getAjaxResults(e,i)).more&&(e.pagination={more:!0}),setTimeout(t.proxy(this.mergeOptions,this),1),e},destroy:function(){this.$el.data("select2")&&this.$el.select2("destroy"),this.$el.siblings(".select2-container").remove()}}),n=a.extend({initialize:function(){var i=this.$el,a={width:"100%",allowClear:this.get("allowNull"),placeholder:this.get("placeholder"),multiple:this.get("multiple"),templateSelection:this.get("templateSelection"),templateResult:this.get("templateResult"),dropdownCssClass:this.get("dropdownCssClass"),suppressFilters:this.get("suppressFilters"),data:[],escapeMarkup:function(t){return"string"!=typeof t?t:acf.escHtml(t)}};a.templateSelection||delete a.templateSelection,a.templateResult||delete a.templateResult,a.dropdownCssClass||delete a.dropdownCssClass,acf.isset(window,"jQuery","fn","selectWoo")?(delete a.templateSelection,delete a.templateResult):a.templateSelection||(a.templateSelection=function(e){var i=t(' ');return i.html(acf.escHtml(e.text)),i.data("element",e.element),i}),a.multiple&&this.getValue().map((function(t){t.$el.detach().appendTo(i)}));var n=i.attr("data-ajax");if(n!==e&&(i.removeData("ajax"),i.removeAttr("data-ajax")),this.get("ajax")&&(a.ajax={url:acf.get("ajaxurl"),delay:250,dataType:"json",type:"post",cache:!1,data:t.proxy(this.getAjaxData,this),processResults:t.proxy(this.processAjaxResults,this)}),!a.suppressFilters){var s=this.get("field");a=acf.applyFilters("select2_args",a,i,this.data,s||!1,this)}i.select2(a);var o=i.next(".select2-container");if(a.multiple){var r=o.find("ul");r.sortable({stop:function(e){r.find(".select2-selection__choice").each((function(){if(t(this).data("data"))var e=t(t(this).data("data").element);else e=t(t(this).find("span.acf-selection").data("element"));e.detach().appendTo(i)})),i.trigger("change")}}),i.on("select2:select",this.proxy((function(t){this.getOption(t.params.data.id).detach().appendTo(this.$el)})))}i.on("select2:open",(()=>{t(".select2-container--open .select2-search__field").get(-1).focus()})),o.addClass("-acf"),n!==e&&i.attr("data-ajax",n),a.suppressFilters||acf.doAction("select2_init",i,a,this.data,s||!1,this)},mergeOptions:function(){var e=!1,i=!1;t('.select2-results__option[role="group"]').each((function(){var a=t(this).children("ul"),n=t(this).children("strong");if(i&&i.text()===n.text())return e.append(a.children()),void t(this).remove();e=a,i=n}))}}),s=a.extend({initialize:function(){var e=this.$el,i=this.getValue(),a=this.get("multiple"),n={width:"100%",allowClear:this.get("allowNull"),placeholder:this.get("placeholder"),separator:"||",multiple:this.get("multiple"),data:this.getChoices(),escapeMarkup:function(t){return acf.escHtml(t)},dropdownCss:{"z-index":"999999999"},initSelection:function(t,e){e(a?i:i.shift())}},s=e.siblings("input");s.length||(s=t(' '),e.before(s)),inputValue=i.map((function(t){return t.id})).join("||"),s.val(inputValue),n.multiple&&i.map((function(t){t.$el.detach().appendTo(e)})),n.allowClear&&(n.data=n.data.filter((function(t){return""!==t.id}))),e.removeData("ajax"),e.removeAttr("data-ajax"),this.get("ajax")&&(n.ajax={url:acf.get("ajaxurl"),quietMillis:250,dataType:"json",type:"post",cache:!1,data:t.proxy(this.getAjaxData,this),results:t.proxy(this.processAjaxResults,this)});var o=this.get("field");n=acf.applyFilters("select2_args",n,e,this.data,o||!1,this),s.select2(n);var r=s.select2("container"),c=t.proxy(this.getOption,this);if(n.multiple){var l=r.find("ul");l.sortable({stop:function(){l.find(".select2-search-choice").each((function(){var i=t(this).data("select2Data");c(i.id).detach().appendTo(e)})),e.trigger("change")}})}s.on("select2-selecting",(function(i){var a=i.choice,n=c(a.id);n.length||(n=t(''+a.text+" ")),n.detach().appendTo(e)})),r.addClass("-acf"),acf.doAction("select2_init",e,n,this.data,o||!1,this),s.on("change",(function(){var t=s.val();t.indexOf("||")&&(t=t.split("||")),e.val(t).trigger("change")})),e.hide()},mergeOptions:function(){var e=!1;t("#select2-drop .select2-result-with-children").each((function(){var i=t(this).children("ul"),a=t(this).children(".select2-result-label");if(e&&e.text()===a.text())return e.append(i.children()),void t(this).remove();e=a}))},getAjaxData:function(t,e){var i={term:t,page:e},n=this.get("field");return i=acf.applyFilters("select2_ajax_data",i,this.data,this.$el,n||!1,this),a.prototype.getAjaxData.apply(this,[i])}});new acf.Model({priority:5,wait:"prepare",actions:{duplicate:"onDuplicate"},initialize:function(){var t=acf.get("locale"),e=(acf.get("rtl"),acf.get("select2L10n")),a=i();return!!e&&0!==t.indexOf("en")&&void(4==a?this.addTranslations4():3==a&&this.addTranslations3())},addTranslations4:function(){var t=acf.get("select2L10n"),e=acf.get("locale");e=e.replace("_","-");var i={errorLoading:function(){return t.load_fail},inputTooLong:function(e){var i=e.input.length-e.maximum;return i>1?t.input_too_long_n.replace("%d",i):t.input_too_long_1},inputTooShort:function(e){var i=e.minimum-e.input.length;return i>1?t.input_too_short_n.replace("%d",i):t.input_too_short_1},loadingMore:function(){return t.load_more},maximumSelected:function(e){var i=e.maximum;return i>1?t.selection_too_long_n.replace("%d",i):t.selection_too_long_1},noResults:function(){return t.matches_0},searching:function(){return t.searching}};jQuery.fn.select2.amd.define("select2/i18n/"+e,[],(function(){return i}))},addTranslations3:function(){var e=acf.get("select2L10n"),i=acf.get("locale");i=i.replace("_","-");var a={formatMatches:function(t){return t>1?e.matches_n.replace("%d",t):e.matches_1},formatNoMatches:function(){return e.matches_0},formatAjaxError:function(){return e.load_fail},formatInputTooShort:function(t,i){var a=i-t.length;return a>1?e.input_too_short_n.replace("%d",a):e.input_too_short_1},formatInputTooLong:function(t,i){var a=t.length-i;return a>1?e.input_too_long_n.replace("%d",a):e.input_too_long_1},formatSelectionTooBig:function(t){return t>1?e.selection_too_long_n.replace("%d",t):e.selection_too_long_1},formatLoadMore:function(){return e.load_more},formatSearching:function(){return e.searching}};t.fn.select2.locales=t.fn.select2.locales||{},t.fn.select2.locales[i]=a,t.extend(t.fn.select2.defaults,a)},onDuplicate:function(t,e){e.find(".select2-container").remove()}})}(jQuery)},8061:function(){var t;t=jQuery,acf.tinymce={defaults:function(){return"undefined"!=typeof tinyMCEPreInit&&{tinymce:tinyMCEPreInit.mceInit.acf_content,quicktags:tinyMCEPreInit.qtInit.acf_content}},initialize:function(t,e){(e=acf.parseArgs(e,{tinymce:!0,quicktags:!0,toolbar:"full",mode:"visual",field:!1})).tinymce&&this.initializeTinymce(t,e),e.quicktags&&this.initializeQuicktags(t,e)},initializeTinymce:function(e,i){var a=t("#"+e),n=this.defaults(),s=acf.get("toolbars"),o=i.field||!1;if(o.$el,"undefined"==typeof tinymce)return!1;if(!n)return!1;if(tinymce.get(e))return this.enable(e);var r=t.extend({},n.tinymce,i.tinymce);r.id=e,r.selector="#"+e;var c=i.toolbar;if(c&&s&&s[c])for(var l=1;l<=4;l++)r["toolbar"+l]=s[c][l]||"";if(r.setup=function(t){t.on("change",(function(e){t.save(),a.trigger("change")})),t.on("mouseup",(function(t){var e=new MouseEvent("mouseup");window.dispatchEvent(e)}))},r.wp_autoresize_on=!1,r.tadv_noautop||(r.wpautop=!0),r=acf.applyFilters("wysiwyg_tinymce_settings",r,e,o),tinyMCEPreInit.mceInit[e]=r,"visual"==i.mode){tinymce.init(r);var d=tinymce.get(e);if(!d)return!1;d.acf=i.field,acf.doAction("wysiwyg_tinymce_init",d,d.id,r,o)}},initializeQuicktags:function(e,i){var a=this.defaults();if("undefined"==typeof quicktags)return!1;if(!a)return!1;var n=t.extend({},a.quicktags,i.quicktags);n.id=e;var s=i.field||!1;s.$el,n=acf.applyFilters("wysiwyg_quicktags_settings",n,n.id,s),tinyMCEPreInit.qtInit[e]=n;var o=quicktags(n);if(!o)return!1;this.buildQuicktags(o),acf.doAction("wysiwyg_quicktags_init",o,o.id,n,s)},buildQuicktags:function(t){var e,i,a,n,s,o,r,c;for(o in t.canvas,e=t.name,i=t.settings,n="",a={},r="",c=t.id,i.buttons&&(r=","+i.buttons+","),edButtons)edButtons[o]&&(s=edButtons[o].id,r&&-1!==",strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,".indexOf(","+s+",")&&-1===r.indexOf(","+s+",")||edButtons[o].instance&&edButtons[o].instance!==c||(a[s]=edButtons[o],edButtons[o].html&&(n+=edButtons[o].html(e+"_"))));r&&-1!==r.indexOf(",dfw,")&&(a.dfw=new QTags.DFWButton,n+=a.dfw.html(e+"_")),"rtl"===document.getElementsByTagName("html")[0].dir&&(a.textdirection=new QTags.TextDirectionButton,n+=a.textdirection.html(e+"_")),t.toolbar.innerHTML=n,t.theButtons=a,"undefined"!=typeof jQuery&&jQuery(document).triggerHandler("quicktags-init",[t])},disable:function(t){this.destroyTinymce(t)},remove:function(t){this.destroyTinymce(t)},destroy:function(t){this.destroyTinymce(t)},destroyTinymce:function(t){if("undefined"==typeof tinymce)return!1;var e=tinymce.get(t);return!!e&&(e.save(),e.destroy(),!0)},enable:function(t){this.enableTinymce(t)},enableTinymce:function(e){return"undefined"!=typeof switchEditors&&void 0!==tinyMCEPreInit.mceInit[e]&&(t("#"+e).show(),switchEditors.go(e,"tmce"),!0)}},new acf.Model({priority:5,actions:{prepare:"onPrepare",ready:"onReady"},onPrepare:function(){var e=t("#acf-hidden-wp-editor");e.exists()&&e.appendTo("body")},onReady:function(){acf.isset(window,"wp","oldEditor")&&(wp.editor.autop=wp.oldEditor.autop,wp.editor.removep=wp.oldEditor.removep),acf.isset(window,"tinymce","on")&&tinymce.on("AddEditor",(function(t){var e=t.editor;"acf"===e.id.substr(0,3)&&(e=tinymce.editors.content||e,tinymce.activeEditor=e,wpActiveEditor=e.id)}))}})},1417:function(){var t;t=jQuery,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")}})},6148:function(){!function(t,e){var i=acf.Model.extend({id:"Validator",data:{errors:[],notice:null,status:""},events:{"changed:status":"onChangeStatus"},addErrors:function(t){t.map(this.addError,this)},addError:function(t){this.data.errors.push(t)},hasErrors:function(){return this.data.errors.length},clearErrors:function(){return this.data.errors=[]},getErrors:function(){return this.data.errors},getFieldErrors:function(){var t=[],e=[];return this.getErrors().map((function(i){if(i.input){var a=e.indexOf(i.input);a>-1?t[a]=i:(t.push(i),e.push(i.input))}})),t},getGlobalErrors:function(){return this.getErrors().filter((function(t){return!t.input}))},showErrors:function(){if(this.hasErrors()){var e=this.getFieldErrors(),i=this.getGlobalErrors(),a=0,n=!1;e.map((function(t){var e=this.$('[name="'+t.input+'"]').first();if(e.length||(e=this.$('[name^="'+t.input+'"]').first()),e.length){a++;var i=acf.getClosestField(e);o(i.$el),i.showError(t.message),n||(n=i.$el)}}),this);var s=acf.__("Validation failed");if(i.map((function(t){s+=". "+t.message})),1==a?s+=". "+acf.__("1 field requires attention"):a>1&&(s+=". "+acf.__("%d fields require attention").replace("%d",a)),this.has("notice"))this.get("notice").update({type:"error",text:s});else{var r=acf.newNotice({type:"error",text:s,target:this.$el});this.set("notice",r)}n||(n=this.get("notice").$el),setTimeout((function(){t("html, body").animate({scrollTop:n.offset().top-t(window).height()/2},500)}),10)}},onChangeStatus:function(t,e,i,a){this.$el.removeClass("is-"+a).addClass("is-"+i)},validate:function(e){if(e=acf.parseArgs(e,{event:!1,reset:!1,loading:function(){},complete:function(){},failure:function(){},success:function(t){t.submit()}}),"valid"==this.get("status"))return!0;if("validating"==this.get("status"))return!1;if(!this.$(".acf-field").length)return!0;if(e.event){var i=t.Event(null,e.event);e.success=function(){acf.enableSubmit(t(i.target)).trigger(i)}}acf.doAction("validation_begin",this.$el),acf.lockForm(this.$el),e.loading(this.$el,this),this.set("status","validating");var a=acf.serialize(this.$el);return a.action="acf/validate_save_post",t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(a),type:"post",dataType:"json",context:this,success:function(t){if(acf.isAjaxSuccess(t)){var e=acf.applyFilters("validation_complete",t.data,this.$el,this);e.valid||this.addErrors(e.errors)}},complete:function(){acf.unlockForm(this.$el),this.hasErrors()?(this.set("status","invalid"),acf.doAction("validation_failure",this.$el,this),this.showErrors(),e.failure(this.$el,this)):(this.set("status","valid"),this.has("notice")&&this.get("notice").update({type:"success",text:acf.__("Validation successful"),timeout:1e3}),acf.doAction("validation_success",this.$el,this),acf.doAction("submit",this.$el),e.success(this.$el,this),acf.lockForm(this.$el),e.reset&&this.reset()),e.complete(this.$el,this),this.clearErrors()}}),!1},setup:function(t){this.$el=t},reset:function(){this.set("errors",[]),this.set("notice",null),this.set("status",""),acf.unlockForm(this.$el)}}),a=function(t){var e=t.data("acf");return e||(e=new i(t)),e};acf.validateForm=function(t){return a(t.form).validate(t)},acf.enableSubmit=function(t){return t.removeClass("disabled").removeAttr("disabled")},acf.disableSubmit=function(t){return t.addClass("disabled").attr("disabled",!0)},acf.showSpinner=function(t){return t.addClass("is-active"),t.css("display","inline-block"),t},acf.hideSpinner=function(t){return t.removeClass("is-active"),t.css("display","none"),t},acf.lockForm=function(t){var e=n(t),i=e.find('.button, [type="submit"]').not(".acf-nav, .acf-repeater-add-row"),a=e.find(".spinner, .acf-spinner");return acf.hideSpinner(a),acf.disableSubmit(i),acf.showSpinner(a.last()),t},acf.unlockForm=function(t){var e=n(t),i=e.find('.button, [type="submit"]').not(".acf-nav, .acf-repeater-add-row"),a=e.find(".spinner, .acf-spinner");return acf.enableSubmit(i),acf.hideSpinner(a),t};var n=function(e){var i;return(i=e.find("#submitdiv")).length||(i=e.find("#submitpost")).length||(i=e.find("p.submit").last()).length||(i=e.find(".acf-form-submit")).length||(i=t(".acf-headerbar-actions")).length?i:e},s=acf.debounce((function(t){t.submit()})),o=function(t){var e=t.parents(".acf-postbox");if(e.length){var i=acf.getPostbox(e);i&&i.isHiddenByScreenOptions()&&(i.$el.removeClass("hide-if-js"),i.$el.css("display",""))}};acf.validation=new acf.Model({id:"validation",active:!0,wait:"prepare",actions:{ready:"addInputEvents",append:"addInputEvents"},events:{'click input[type="submit"]':"onClickSubmit",'click button[type="submit"]':"onClickSubmit","click #save-post":"onClickSave","submit form#post":"onSubmitPost","submit form":"onSubmit"},initialize:function(){acf.get("validation")||(this.active=!1,this.actions={},this.events={})},enable:function(){this.active=!0},disable:function(){this.active=!1},reset:function(t){a(t).reset()},addInputEvents:function(e){if("safari"!==acf.get("browser")){var i=t(".acf-field [name]",e);i.length&&this.on(i,"invalid","onInvalid")}},onInvalid:function(t,e){t.preventDefault();var i=e.closest("form");i.length&&(a(i).addError({input:e.attr("name"),message:acf.strEscape(t.target.validationMessage)}),s(i))},onClickSubmit:function(e,i){t(".acf-field input").each((function(){this.checkValidity()||o(t(this))})),this.set("originalEvent",e)},onClickSave:function(t,e){this.set("ignore",!0)},onClickSubmitGutenberg:function(e,i){acf.validateForm({form:t("#editor"),event:e,reset:!0,failure:function(t,e){var i=e.get("notice").$el;i.appendTo(".components-notice-list"),i.find(".acf-notice-dismiss").removeClass("small")}})||(e.preventDefault(),e.stopImmediatePropagation())},onSubmitPost:function(e,i){"dopreview"===t("input#wp-preview").val()&&(this.set("ignore",!0),acf.unlockForm(i))},onSubmit:function(t,e){if(!this.active||this.get("ignore")||t.isDefaultPrevented())return this.allowSubmit();acf.validateForm({form:e,event:this.get("originalEvent")})||t.preventDefault()},allowSubmit:function(){return this.set("ignore",!1),this.set("originalEvent",!1),!0}}),new acf.Model({wait:"prepare",initialize:function(){acf.isGutenberg()&&this.customizeEditor()},customizeEditor:function(){var e=wp.data.dispatch("core/editor"),i=wp.data.select("core/editor"),a=wp.data.dispatch("core/notices"),n=e.savePost,s=!1,o="";wp.data.subscribe((function(){var t=i.getEditedPostAttribute("status");s="publish"===t||"future"===t,o="publish"!==t?t:o})),e.savePost=function(i){i=i||{};var r=this,c=arguments;return new Promise((function(n,r){return i.isAutosave||i.isPreview?n("Validation ignored (autosave)."):s?void(acf.validateForm({form:t("#editor"),reset:!0,complete:function(t,i){e.unlockPostSaving("acf")},failure:function(t,i){var n=i.get("notice");a.createErrorNotice(n.get("text"),{id:"acf-validation",isDismissible:!0}),n.remove(),o&&e.editPost({status:o}),r("Validation failed.")},success:function(){a.removeNotice("acf-validation"),n("Validation success.")}})?n("Validation bypassed."):e.lockPostSaving("acf")):n("Validation ignored (draft).")})).then((function(){return n.apply(r,c)})).catch((function(t){}))}}})}(jQuery)}},e={};function i(a){var n=e[a];if(void 0!==n)return n.exports;var s=e[a]={exports:{}};return t[a](s,s.exports,i),s.exports}i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var a in e)i.o(e,a)&&!i.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";i(6291),i(1580),i(2213),i(1357),i(8171),i(9459),i(7597),i(684),i(8489),i(6691),i(5647),i(4658),i(719),i(2557),i(2489),i(714),i(6965),i(177),i(1987),i(1281),i(7790),i(2573),i(9047),i(1788),i(4429),i(4850),i(2849),i(3155),i(682),i(1417),i(1128),i(3812),i(7240),i(5796),i(8061),i(6148),i(5938),i(7787)}()}();
\ No newline at end of file
diff --git a/assets/build/js/acf-internal-post-type.js b/assets/build/js/acf-internal-post-type.js
new file mode 100644
index 0000000..542ee5d
--- /dev/null
+++ b/assets/build/js/acf-internal-post-type.js
@@ -0,0 +1,396 @@
+/******/ (function() { // webpackBootstrap
+/******/ var __webpack_modules__ = ({
+
+/***/ "./src/advanced-custom-fields-pro/assets/src/js/_acf-internal-post-type.js":
+/*!*********************************************************************************!*\
+ !*** ./src/advanced-custom-fields-pro/assets/src/js/_acf-internal-post-type.js ***!
+ \*********************************************************************************/
+/***/ (function() {
+
+(function ($, undefined) {
+ /**
+ * internalPostTypeSettingsManager
+ *
+ * Model for handling events in the settings metaboxes of internal post types
+ *
+ * @since 6.1
+ */
+ const internalPostTypeSettingsManager = new acf.Model({
+ id: 'internalPostTypeSettingsManager',
+ wait: 'ready',
+ events: {
+ 'blur .acf_slugify_to_key': 'onChangeSlugify',
+ 'blur .acf_singular_label': 'onChangeSingularLabel',
+ 'blur .acf_plural_label': 'onChangePluralLabel',
+ 'change .acf_hierarchical_switch': 'onChangeHierarchical',
+ 'click .acf-regenerate-labels': 'onClickRegenerateLabels',
+ 'click .acf-clear-labels': 'onClickClearLabels',
+ 'change .rewrite_slug_field': 'onChangeURLSlug',
+ 'keyup .rewrite_slug_field': 'onChangeURLSlug'
+ },
+ onChangeSlugify: function (e, $el) {
+ const name = $el.val();
+ const $keyInput = $('.acf_slugified_key');
+
+ // generate field key.
+ if ($keyInput.val().trim() == '') {
+ let slug = acf.strSanitize(name.trim()).replaceAll('_', '-');
+ slug = acf.applyFilters('generate_internal_post_type_name', slug, this);
+ if ('taxonomy' === acf.get('screen')) {
+ $keyInput.val(slug.substring(0, 32));
+ return;
+ }
+ $keyInput.val(slug.substring(0, 20));
+ }
+ },
+ initialize: function () {
+ // check we should init.
+ if (!['taxonomy', 'post_type'].includes(acf.get('screen'))) return;
+
+ // select2
+ const template = function (selection) {
+ if ('undefined' === typeof selection.element) {
+ return selection;
+ }
+ const $parentSelect = $(selection.element.parentElement);
+ const $selection = $(' ');
+ $selection.html(acf.escHtml(selection.element.innerHTML));
+ let isDefault = false;
+ if ($parentSelect.filter('.acf-taxonomy-manage_terms, .acf-taxonomy-edit_terms, .acf-taxonomy-delete_terms').length && selection.id === 'manage_categories') {
+ isDefault = true;
+ } else if ($parentSelect.filter('.acf-taxonomy-assign_terms').length && selection.id === 'edit_posts') {
+ isDefault = true;
+ } else if (selection.id === 'taxonomy_key' || selection.id === 'post_type_key' || selection.id === 'default') {
+ isDefault = true;
+ }
+ if (isDefault) {
+ $selection.append('' + acf.__('Default') + ' ');
+ }
+ $selection.data('element', selection.element);
+ return $selection;
+ };
+ acf.newSelect2($('select.query_var'), {
+ field: false,
+ templateSelection: template,
+ templateResult: template
+ });
+ acf.newSelect2($('select.acf-taxonomy-manage_terms'), {
+ field: false,
+ templateSelection: template,
+ templateResult: template
+ });
+ acf.newSelect2($('select.acf-taxonomy-edit_terms'), {
+ field: false,
+ templateSelection: template,
+ templateResult: template
+ });
+ acf.newSelect2($('select.acf-taxonomy-delete_terms'), {
+ field: false,
+ templateSelection: template,
+ templateResult: template
+ });
+ acf.newSelect2($('select.acf-taxonomy-assign_terms'), {
+ field: false,
+ templateSelection: template,
+ templateResult: template
+ });
+ acf.newSelect2($('select.meta_box'), {
+ field: false,
+ templateSelection: template,
+ templateResult: template
+ });
+ const permalinkRewrite = acf.newSelect2($('select.permalink_rewrite'), {
+ field: false,
+ templateSelection: template,
+ templateResult: template
+ });
+ $('.rewrite_slug_field').trigger('change');
+ permalinkRewrite.on('change', function (e) {
+ $('.rewrite_slug_field').trigger('change');
+ });
+ },
+ onChangeURLSlug: function (e, $el) {
+ const $field = $('div.acf-field.acf-field-permalink-rewrite');
+ const rewriteType = $field.find('select').find('option:selected').val();
+ const originalInstructions = $field.data(rewriteType + '_instructions');
+ const siteURL = $field.data('site_url');
+ const $permalinkDesc = $field.find('p.description').first();
+ if (rewriteType === 'taxonomy_key' || rewriteType === 'post_type_key') {
+ var slugvalue = $('.acf_slugified_key').val().trim();
+ } else {
+ var slugvalue = $el.val().trim();
+ }
+ if (!slugvalue.length) slugvalue = '{slug}';
+ $permalinkDesc.html($('' + originalInstructions + ' ').text().replace('{slug}', '' + $('' + siteURL + '/' + slugvalue + ' ').text() + ' '));
+ },
+ onChangeSingularLabel: function (e, $el) {
+ const label = $el.val();
+ this.updateLabels(label, 'singular', false);
+ },
+ onChangePluralLabel: function (e, $el) {
+ const label = $el.val();
+ this.updateLabels(label, 'plural', false);
+ },
+ onChangeHierarchical: function (e, $el) {
+ const hierarchical = $el.is(':checked');
+ if ('taxonomy' === acf.get('screen')) {
+ let text = $('.acf-field-meta-box').data('tags_meta_box');
+ if (hierarchical) {
+ text = $('.acf-field-meta-box').data('categories_meta_box');
+ }
+ $('#acf_taxonomy-meta_box').find('option:first').text(text).trigger('change');
+ }
+ this.updatePlaceholders(hierarchical);
+ },
+ onClickRegenerateLabels: function (e, $el) {
+ this.updateLabels($('.acf_singular_label').val(), 'singular', true);
+ this.updateLabels($('.acf_plural_label').val(), 'plural', true);
+ },
+ onClickClearLabels: function (e, $el) {
+ this.clearLabels();
+ },
+ updateLabels(label, type, force) {
+ $('[data-label][data-replace="' + type + '"').each((index, element) => {
+ var $input = $(element).find('input[type="text"]').first();
+ if (!force && $input.val() != '') return;
+ if (label == '') return;
+ $input.val($(element).data('transform') === 'lower' ? $(element).data('label').replace('%s', label.toLowerCase()) : $(element).data('label').replace('%s', label));
+ });
+ },
+ clearLabels() {
+ $('[data-label]').each((index, element) => {
+ $(element).find('input[type="text"]').first().val('');
+ });
+ },
+ updatePlaceholders(heirarchical) {
+ if (acf.get('screen') == 'post_type') {
+ var singular = acf.__('Post');
+ var plural = acf.__('Posts');
+ if (heirarchical) {
+ singular = acf.__('Page');
+ plural = acf.__('Pages');
+ }
+ } else {
+ var singular = acf.__('Tag');
+ var plural = acf.__('Tags');
+ if (heirarchical) {
+ singular = acf.__('Category');
+ plural = acf.__('Categories');
+ }
+ }
+ $('[data-label]').each((index, element) => {
+ var useReplacement = $(element).data('replace') === 'plural' ? plural : singular;
+ if ($(element).data('transform') === 'lower') {
+ useReplacement = useReplacement.toLowerCase();
+ }
+ $(element).find('input[type="text"]').first().attr('placeholder', $(element).data('label').replace('%s', useReplacement));
+ });
+ }
+ });
+
+ /**
+ * advancedSettingsMetaboxManager
+ *
+ * Screen options functionality for internal post types
+ *
+ * @since 6.1
+ */
+ const advancedSettingsMetaboxManager = new acf.Model({
+ id: 'advancedSettingsMetaboxManager',
+ wait: 'load',
+ events: {
+ 'change .acf-advanced-settings-toggle': 'onToggleACFAdvancedSettings',
+ 'change #screen-options-wrap #acf-advanced-settings-hide': 'onToggleScreenOptionsAdvancedSettings'
+ },
+ initialize: function () {
+ this.$screenOptionsToggle = $('#screen-options-wrap #acf-advanced-settings-hide:first');
+ this.$ACFAdvancedToggle = $('.acf-advanced-settings-toggle:first');
+ this.render();
+ },
+ isACFAdvancedSettingsChecked: function () {
+ // Screen option is hidden by filter.
+ if (!this.$ACFAdvancedToggle.length) {
+ return false;
+ }
+ return this.$ACFAdvancedToggle.prop('checked');
+ },
+ isScreenOptionsAdvancedSettingsChecked: function () {
+ // Screen option is hidden by filter.
+ if (!this.$screenOptionsToggle.length) {
+ return false;
+ }
+ return this.$screenOptionsToggle.prop('checked');
+ },
+ onToggleScreenOptionsAdvancedSettings: function () {
+ if (this.isScreenOptionsAdvancedSettingsChecked()) {
+ if (!this.isACFAdvancedSettingsChecked()) {
+ this.$ACFAdvancedToggle.trigger('click');
+ }
+ } else {
+ if (this.isACFAdvancedSettingsChecked()) {
+ this.$ACFAdvancedToggle.trigger('click');
+ }
+ }
+ },
+ onToggleACFAdvancedSettings: function () {
+ if (this.isACFAdvancedSettingsChecked()) {
+ if (!this.isScreenOptionsAdvancedSettingsChecked()) {
+ this.$screenOptionsToggle.trigger('click');
+ }
+ } else {
+ if (this.isScreenOptionsAdvancedSettingsChecked()) {
+ this.$screenOptionsToggle.trigger('click');
+ }
+ }
+ },
+ render: function () {
+ // On render, sync screen options to ACF's setting.
+ this.onToggleACFAdvancedSettings();
+ }
+ });
+ const linkFieldGroupsManger = new acf.Model({
+ id: 'linkFieldGroupsManager',
+ events: {
+ 'click .acf-link-field-groups': 'linkFieldGroups'
+ },
+ linkFieldGroups: function () {
+ let popup = false;
+ const step1 = function () {
+ $.ajax({
+ url: acf.get('ajaxurl'),
+ data: acf.prepareForAjax({
+ action: 'acf/link_field_groups'
+ }),
+ type: 'post',
+ dataType: 'json',
+ success: step2
+ });
+ };
+ const step2 = function (response) {
+ popup = acf.newPopup({
+ title: response.data.title,
+ content: response.data.content,
+ width: '600px'
+ });
+ popup.$el.addClass('acf-link-field-groups-popup');
+ popup.on('submit', 'form', step3);
+ };
+ const step3 = function (e) {
+ e.preventDefault();
+ const $select = popup.$('select');
+ const val = $select.val();
+ if (!val.length) {
+ $select.focus();
+ return;
+ }
+ acf.startButtonLoading(popup.$('.button'));
+
+ // get HTML
+ $.ajax({
+ url: acf.get('ajaxurl'),
+ data: acf.prepareForAjax({
+ action: 'acf/link_field_groups',
+ field_groups: val
+ }),
+ type: 'post',
+ dataType: 'json',
+ success: step4
+ });
+ };
+ const step4 = function (response) {
+ popup.content(response.data.content);
+ if (wp.a11y && wp.a11y.speak && acf.__) {
+ wp.a11y.speak(acf.__('Field groups linked successfully.'), 'polite');
+ }
+ popup.$('button.acf-close-popup').focus();
+ };
+ step1();
+ }
+ });
+})(jQuery);
+
+/***/ })
+
+/******/ });
+/************************************************************************/
+/******/ // The module cache
+/******/ var __webpack_module_cache__ = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/ // Check if module is in cache
+/******/ var cachedModule = __webpack_module_cache__[moduleId];
+/******/ if (cachedModule !== undefined) {
+/******/ return cachedModule.exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = __webpack_module_cache__[moduleId] = {
+/******/ // no module.id needed
+/******/ // no module.loaded needed
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/************************************************************************/
+/******/ /* webpack/runtime/compat get default export */
+/******/ !function() {
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function() { return module['default']; } :
+/******/ function() { return module; };
+/******/ __webpack_require__.d(getter, { a: getter });
+/******/ return getter;
+/******/ };
+/******/ }();
+/******/
+/******/ /* webpack/runtime/define property getters */
+/******/ !function() {
+/******/ // define getter functions for harmony exports
+/******/ __webpack_require__.d = function(exports, definition) {
+/******/ for(var key in definition) {
+/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
+/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
+/******/ }
+/******/ }
+/******/ };
+/******/ }();
+/******/
+/******/ /* webpack/runtime/hasOwnProperty shorthand */
+/******/ !function() {
+/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
+/******/ }();
+/******/
+/******/ /* webpack/runtime/make namespace object */
+/******/ !function() {
+/******/ // define __esModule on exports
+/******/ __webpack_require__.r = function(exports) {
+/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ }
+/******/ Object.defineProperty(exports, '__esModule', { value: true });
+/******/ };
+/******/ }();
+/******/
+/************************************************************************/
+var __webpack_exports__ = {};
+// This entry need to be wrapped in an IIFE because it need to be in strict mode.
+!function() {
+"use strict";
+/*!********************************************************************************!*\
+ !*** ./src/advanced-custom-fields-pro/assets/src/js/acf-internal-post-type.js ***!
+ \********************************************************************************/
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _acf_internal_post_type_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_acf-internal-post-type.js */ "./src/advanced-custom-fields-pro/assets/src/js/_acf-internal-post-type.js");
+/* harmony import */ var _acf_internal_post_type_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_acf_internal_post_type_js__WEBPACK_IMPORTED_MODULE_0__);
+
+}();
+/******/ })()
+;
+//# sourceMappingURL=acf-internal-post-type.js.map
\ No newline at end of file
diff --git a/assets/build/js/acf-internal-post-type.js.map b/assets/build/js/acf-internal-post-type.js.map
new file mode 100644
index 0000000..a17613d
--- /dev/null
+++ b/assets/build/js/acf-internal-post-type.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"acf-internal-post-type.js","mappings":";;;;;;;;;AAAA,CAAE,UAAWA,CAAC,EAAEC,SAAS,EAAG;EAC3B;AACD;AACA;AACA;AACA;AACA;AACA;EACC,MAAMC,+BAA+B,GAAG,IAAIC,GAAG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UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D","sources":["webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/_acf-internal-post-type.js","webpack://advanced-custom-fields-pro/webpack/bootstrap","webpack://advanced-custom-fields-pro/webpack/runtime/compat get default export","webpack://advanced-custom-fields-pro/webpack/runtime/define property getters","webpack://advanced-custom-fields-pro/webpack/runtime/hasOwnProperty shorthand","webpack://advanced-custom-fields-pro/webpack/runtime/make namespace object","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/acf-internal-post-type.js"],"sourcesContent":["( function ( $, undefined ) {\n\t/**\n\t * internalPostTypeSettingsManager\n\t *\n\t * Model for handling events in the settings metaboxes of internal post types\n\t *\n\t * @since\t6.1\n\t */\n\tconst internalPostTypeSettingsManager = new acf.Model( {\n\t\tid: 'internalPostTypeSettingsManager',\n\t\twait: 'ready',\n\t\tevents: {\n\t\t\t'blur .acf_slugify_to_key': 'onChangeSlugify',\n\t\t\t'blur .acf_singular_label': 'onChangeSingularLabel',\n\t\t\t'blur .acf_plural_label': 'onChangePluralLabel',\n\t\t\t'change .acf_hierarchical_switch': 'onChangeHierarchical',\n\t\t\t'click .acf-regenerate-labels': 'onClickRegenerateLabels',\n\t\t\t'click .acf-clear-labels': 'onClickClearLabels',\n\t\t\t'change .rewrite_slug_field': 'onChangeURLSlug',\n\t\t\t'keyup .rewrite_slug_field': 'onChangeURLSlug',\n\t\t},\n\t\tonChangeSlugify: function ( e, $el ) {\n\t\t\tconst name = $el.val();\n\t\t\tconst $keyInput = $( '.acf_slugified_key' );\n\n\t\t\t// generate field key.\n\t\t\tif ( $keyInput.val().trim() == '' ) {\n\t\t\t\tlet slug = acf\n\t\t\t\t\t.strSanitize( name.trim() )\n\t\t\t\t\t.replaceAll( '_', '-' );\n\t\t\t\tslug = acf.applyFilters(\n\t\t\t\t\t'generate_internal_post_type_name',\n\t\t\t\t\tslug,\n\t\t\t\t\tthis\n\t\t\t\t);\n\t\t\t\tif( 'taxonomy' === acf.get( 'screen' ) ) {\n\t\t\t\t\t$keyInput.val( slug.substring( 0, 32 ) );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$keyInput.val( slug.substring( 0, 20 ) );\n\t\t\t}\n\t\t},\n\t\tinitialize: function () {\n\t\t\t// check we should init.\n\t\t\tif ( ! [ 'taxonomy', 'post_type' ].includes( acf.get( 'screen' ) ) )\n\t\t\t\treturn;\n\n\t\t\t// select2\n\t\t\tconst template = function ( selection ) {\n\t\t\t\tif ( 'undefined' === typeof selection.element ) {\n\t\t\t\t\treturn selection;\n\t\t\t\t}\n\n\t\t\t\tconst $parentSelect = $( selection.element.parentElement );\n\t\t\t\tconst $selection = $( ' ' );\n\t\t\t\t$selection.html( acf.escHtml( selection.element.innerHTML ) );\n\n\t\t\t\tlet isDefault = false;\n\n\t\t\t\tif ( $parentSelect.filter( '.acf-taxonomy-manage_terms, .acf-taxonomy-edit_terms, .acf-taxonomy-delete_terms' ).length &&\n\t\t\t\t\tselection.id === 'manage_categories'\n\t\t\t\t) {\n\t\t\t\t\tisDefault = true;\n\t\t\t\t} else if ( $parentSelect.filter( '.acf-taxonomy-assign_terms' ).length && selection.id === 'edit_posts' ) {\n\t\t\t\t\tisDefault = true;\n\t\t\t\t} else if (\n\t\t\t\t\tselection.id === 'taxonomy_key' ||\n\t\t\t\t\tselection.id === 'post_type_key' ||\n\t\t\t\t\tselection.id === 'default'\n\t\t\t\t) {\n\t\t\t\t\tisDefault = true;\n\t\t\t\t}\n\n\t\t\t\tif ( isDefault ) {\n\t\t\t\t\t$selection.append(\n\t\t\t\t\t\t'' +\n\t\t\t\t\t\tacf.__( 'Default' ) +\n\t\t\t\t\t\t' '\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t$selection.data( 'element', selection.element );\n\t\t\t\treturn $selection;\n\t\t\t};\n\n\t\t\tacf.newSelect2( $( 'select.query_var' ), {\n\t\t\t\tfield: false,\n\t\t\t\ttemplateSelection: template,\n\t\t\t\ttemplateResult: template,\n\t\t\t} );\n\n\t\t\tacf.newSelect2( $( 'select.acf-taxonomy-manage_terms' ), {\n\t\t\t\tfield: false,\n\t\t\t\ttemplateSelection: template,\n\t\t\t\ttemplateResult: template,\n\t\t\t} );\n\n\t\t\tacf.newSelect2( $( 'select.acf-taxonomy-edit_terms' ), {\n\t\t\t\tfield: false,\n\t\t\t\ttemplateSelection: template,\n\t\t\t\ttemplateResult: template,\n\t\t\t} );\n\n\t\t\tacf.newSelect2( $( 'select.acf-taxonomy-delete_terms' ), {\n\t\t\t\tfield: false,\n\t\t\t\ttemplateSelection: template,\n\t\t\t\ttemplateResult: template,\n\t\t\t} );\n\n\t\t\tacf.newSelect2( $( 'select.acf-taxonomy-assign_terms' ), {\n\t\t\t\tfield: false,\n\t\t\t\ttemplateSelection: template,\n\t\t\t\ttemplateResult: template,\n\t\t\t} );\n\n\t\t\tacf.newSelect2( $( 'select.meta_box' ), {\n\t\t\t\tfield: false,\n\t\t\t\ttemplateSelection: template,\n\t\t\t\ttemplateResult: template,\n\t\t\t} );\n\n\t\t\tconst permalinkRewrite = acf.newSelect2(\n\t\t\t\t$( 'select.permalink_rewrite' ),\n\t\t\t\t{\n\t\t\t\t\tfield: false,\n\t\t\t\t\ttemplateSelection: template,\n\t\t\t\t\ttemplateResult: template,\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t$( '.rewrite_slug_field' ).trigger( 'change' );\n\t\t\tpermalinkRewrite.on( 'change', function ( e ) {\n\t\t\t\t$( '.rewrite_slug_field' ).trigger( 'change' );\n\t\t\t} );\n\t\t},\n\t\tonChangeURLSlug: function ( e, $el ) {\n\t\t\tconst $field = $( 'div.acf-field.acf-field-permalink-rewrite' );\n\t\t\tconst rewriteType = $field\n\t\t\t\t.find( 'select' )\n\t\t\t\t.find( 'option:selected' )\n\t\t\t\t.val();\n\t\t\tconst originalInstructions = $field.data(\n\t\t\t\trewriteType + '_instructions'\n\t\t\t);\n\t\t\tconst siteURL = $field.data( 'site_url' );\n\t\t\tconst $permalinkDesc = $field.find( 'p.description' ).first();\n\n\t\t\tif (\n\t\t\t\trewriteType === 'taxonomy_key' ||\n\t\t\t\trewriteType === 'post_type_key'\n\t\t\t) {\n\t\t\t\tvar slugvalue = $( '.acf_slugified_key' ).val().trim();\n\t\t\t} else {\n\t\t\t\tvar slugvalue = $el.val().trim();\n\t\t\t}\n\t\t\tif ( ! slugvalue.length ) slugvalue = '{slug}';\n\n\t\t\t$permalinkDesc.html(\n\t\t\t\t$( '' + originalInstructions + ' ' )\n\t\t\t\t\t.text()\n\t\t\t\t\t.replace(\n\t\t\t\t\t\t'{slug}',\n\t\t\t\t\t\t'' +\n\t\t\t\t\t\t\t$(\n\t\t\t\t\t\t\t\t'' + siteURL + '/' + slugvalue + ' '\n\t\t\t\t\t\t\t).text() +\n\t\t\t\t\t\t\t' '\n\t\t\t\t\t)\n\t\t\t);\n\t\t},\n\t\tonChangeSingularLabel: function ( e, $el ) {\n\t\t\tconst label = $el.val();\n\t\t\tthis.updateLabels( label, 'singular', false );\n\t\t},\n\t\tonChangePluralLabel: function ( e, $el ) {\n\t\t\tconst label = $el.val();\n\t\t\tthis.updateLabels( label, 'plural', false );\n\t\t},\n\t\tonChangeHierarchical: function ( e, $el ) {\n\t\t\tconst hierarchical = $el.is( ':checked' );\n\n\t\t\tif ( 'taxonomy' === acf.get( 'screen' ) ) {\n\t\t\t\tlet text = $( '.acf-field-meta-box' ).data( 'tags_meta_box' );\n\n\t\t\t\tif ( hierarchical ) {\n\t\t\t\t\ttext = $( '.acf-field-meta-box' ).data(\n\t\t\t\t\t\t'categories_meta_box'\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t$( '#acf_taxonomy-meta_box' )\n\t\t\t\t\t.find( 'option:first' )\n\t\t\t\t\t.text( text )\n\t\t\t\t\t.trigger( 'change' );\n\t\t\t}\n\n\t\t\tthis.updatePlaceholders( hierarchical );\n\t\t},\n\t\tonClickRegenerateLabels: function ( e, $el ) {\n\t\t\tthis.updateLabels(\n\t\t\t\t$( '.acf_singular_label' ).val(),\n\t\t\t\t'singular',\n\t\t\t\ttrue\n\t\t\t);\n\t\t\tthis.updateLabels( $( '.acf_plural_label' ).val(), 'plural', true );\n\t\t},\n\t\tonClickClearLabels: function ( e, $el ) {\n\t\t\tthis.clearLabels();\n\t\t},\n\t\tupdateLabels( label, type, force ) {\n\t\t\t$( '[data-label][data-replace=\"' + type + '\"' ).each(\n\t\t\t\t( index, element ) => {\n\t\t\t\t\tvar $input = $( element )\n\t\t\t\t\t\t.find( 'input[type=\"text\"]' )\n\t\t\t\t\t\t.first();\n\t\t\t\t\tif ( ! force && $input.val() != '' ) return;\n\t\t\t\t\tif ( label == '' ) return;\n\t\t\t\t\t$input.val(\n\t\t\t\t\t\t$( element ).data( 'transform' ) === 'lower'\n\t\t\t\t\t\t\t? $( element )\n\t\t\t\t\t\t\t\t\t.data( 'label' )\n\t\t\t\t\t\t\t\t\t.replace( '%s', label.toLowerCase() )\n\t\t\t\t\t\t\t: $( element )\n\t\t\t\t\t\t\t\t\t.data( 'label' )\n\t\t\t\t\t\t\t\t\t.replace( '%s', label )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t\tclearLabels() {\n\t\t\t$( '[data-label]' ).each( ( index, element ) => {\n\t\t\t\t$( element ).find( 'input[type=\"text\"]' ).first().val( '' );\n\t\t\t} );\n\t\t},\n\t\tupdatePlaceholders( heirarchical ) {\n\t\t\tif ( acf.get( 'screen' ) == 'post_type' ) {\n\t\t\t\tvar singular = acf.__( 'Post' );\n\t\t\t\tvar plural = acf.__( 'Posts' );\n\t\t\t\tif ( heirarchical ) {\n\t\t\t\t\tsingular = acf.__( 'Page' );\n\t\t\t\t\tplural = acf.__( 'Pages' );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar singular = acf.__( 'Tag' );\n\t\t\t\tvar plural = acf.__( 'Tags' );\n\t\t\t\tif ( heirarchical ) {\n\t\t\t\t\tsingular = acf.__( 'Category' );\n\t\t\t\t\tplural = acf.__( 'Categories' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$( '[data-label]' ).each( ( index, element ) => {\n\t\t\t\tvar useReplacement =\n\t\t\t\t\t$( element ).data( 'replace' ) === 'plural'\n\t\t\t\t\t\t? plural\n\t\t\t\t\t\t: singular;\n\t\t\t\tif ( $( element ).data( 'transform' ) === 'lower' ) {\n\t\t\t\t\tuseReplacement = useReplacement.toLowerCase();\n\t\t\t\t}\n\t\t\t\t$( element )\n\t\t\t\t\t.find( 'input[type=\"text\"]' )\n\t\t\t\t\t.first()\n\t\t\t\t\t.attr(\n\t\t\t\t\t\t'placeholder',\n\t\t\t\t\t\t$( element )\n\t\t\t\t\t\t\t.data( 'label' )\n\t\t\t\t\t\t\t.replace( '%s', useReplacement )\n\t\t\t\t\t);\n\t\t\t} );\n\t\t},\n\t} );\n\n\t/**\n\t * advancedSettingsMetaboxManager\n\t *\n\t * Screen options functionality for internal post types\n\t *\n\t * @since\t6.1\n\t */\n\tconst advancedSettingsMetaboxManager = new acf.Model( {\n\t\tid: 'advancedSettingsMetaboxManager',\n\t\twait: 'load',\n\t\tevents: {\n\t\t\t'change .acf-advanced-settings-toggle':\n\t\t\t\t'onToggleACFAdvancedSettings',\n\t\t\t'change #screen-options-wrap #acf-advanced-settings-hide':\n\t\t\t\t'onToggleScreenOptionsAdvancedSettings',\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\tthis.$screenOptionsToggle = $(\n\t\t\t\t'#screen-options-wrap #acf-advanced-settings-hide:first'\n\t\t\t);\n\t\t\tthis.$ACFAdvancedToggle = $(\n\t\t\t\t'.acf-advanced-settings-toggle:first'\n\t\t\t);\n\t\t\tthis.render();\n\t\t},\n\n\t\tisACFAdvancedSettingsChecked: function () {\n\t\t\t// Screen option is hidden by filter.\n\t\t\tif ( ! this.$ACFAdvancedToggle.length ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn this.$ACFAdvancedToggle.prop( 'checked' );\n\t\t},\n\n\t\tisScreenOptionsAdvancedSettingsChecked: function () {\n\t\t\t// Screen option is hidden by filter.\n\t\t\tif ( ! this.$screenOptionsToggle.length ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn this.$screenOptionsToggle.prop( 'checked' );\n\t\t},\n\n\t\tonToggleScreenOptionsAdvancedSettings: function () {\n\t\t\tif ( this.isScreenOptionsAdvancedSettingsChecked() ) {\n\t\t\t\tif ( ! this.isACFAdvancedSettingsChecked() ) {\n\t\t\t\t\tthis.$ACFAdvancedToggle.trigger( 'click' );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( this.isACFAdvancedSettingsChecked() ) {\n\t\t\t\t\tthis.$ACFAdvancedToggle.trigger( 'click' );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tonToggleACFAdvancedSettings: function () {\n\t\t\tif ( this.isACFAdvancedSettingsChecked() ) {\n\t\t\t\tif ( ! this.isScreenOptionsAdvancedSettingsChecked() ) {\n\t\t\t\t\tthis.$screenOptionsToggle.trigger( 'click' );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( this.isScreenOptionsAdvancedSettingsChecked() ) {\n\t\t\t\t\tthis.$screenOptionsToggle.trigger( 'click' );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\trender: function () {\n\t\t\t// On render, sync screen options to ACF's setting.\n\t\t\tthis.onToggleACFAdvancedSettings();\n\t\t},\n\t} );\n\n\tconst linkFieldGroupsManger = new acf.Model( {\n\t\tid: 'linkFieldGroupsManager',\n\t\tevents: {\n\t\t\t'click .acf-link-field-groups': 'linkFieldGroups',\n\t\t},\n\n\t\tlinkFieldGroups: function () {\n\t\t\tlet popup = false;\n\n\t\t\tconst step1 = function () {\n\t\t\t\t$.ajax( {\n\t\t\t\t\turl: acf.get( 'ajaxurl' ),\n\t\t\t\t\tdata: acf.prepareForAjax( {\n\t\t\t\t\t\taction: 'acf/link_field_groups',\n\t\t\t\t\t} ),\n\t\t\t\t\ttype: 'post',\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tsuccess: step2,\n\t\t\t\t} );\n\t\t\t};\n\t\t\tconst step2 = function ( response ) {\n\t\t\t\tpopup = acf.newPopup( {\n\t\t\t\t\ttitle: response.data.title,\n\t\t\t\t\tcontent: response.data.content,\n\t\t\t\t\twidth: '600px',\n\t\t\t\t} );\n\n\t\t\t\tpopup.$el.addClass( 'acf-link-field-groups-popup' );\n\t\t\t\tpopup.on( 'submit', 'form', step3 );\n\t\t\t};\n\t\t\tconst step3 = function ( e ) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tconst $select = popup.$( 'select' );\n\t\t\t\tconst val = $select.val();\n\n\t\t\t\tif ( ! val.length ) {\n\t\t\t\t\t$select.focus();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tacf.startButtonLoading( popup.$( '.button' ) );\n\n\t\t\t\t// get HTML\n\t\t\t\t$.ajax( {\n\t\t\t\t\turl: acf.get( 'ajaxurl' ),\n\t\t\t\t\tdata: acf.prepareForAjax( {\n\t\t\t\t\t\taction: 'acf/link_field_groups',\n\t\t\t\t\t\tfield_groups: val,\n\t\t\t\t\t} ),\n\t\t\t\t\ttype: 'post',\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tsuccess: step4,\n\t\t\t\t} );\n\t\t\t};\n\t\t\tconst step4 = function ( response ) {\n\t\t\t\tpopup.content( response.data.content );\n\n\t\t\t\tif ( wp.a11y && wp.a11y.speak && acf.__ ) {\n\t\t\t\t\twp.a11y.speak(\n\t\t\t\t\t\tacf.__( 'Field groups linked successfully.' ),\n\t\t\t\t\t\t'polite'\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tpopup.$( 'button.acf-close-popup' ).focus();\n\t\t\t};\n\n\t\t\tstep1();\n\t\t},\n\t} );\n} )( jQuery );\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import './_acf-internal-post-type.js';"],"names":["$","undefined","internalPostTypeSettingsManager","acf","Model","id","wait","events","onChangeSlugify","e","$el","name","val","$keyInput","trim","slug","strSanitize","replaceAll","applyFilters","get","substring","initialize","includes","template","selection","element","$parentSelect","parentElement","$selection","html","escHtml","innerHTML","isDefault","filter","length","append","__","data","newSelect2","field","templateSelection","templateResult","permalinkRewrite","trigger","on","onChangeURLSlug","$field","rewriteType","find","originalInstructions","siteURL","$permalinkDesc","first","slugvalue","text","replace","onChangeSingularLabel","label","updateLabels","onChangePluralLabel","onChangeHierarchical","hierarchical","is","updatePlaceholders","onClickRegenerateLabels","onClickClearLabels","clearLabels","type","force","each","index","$input","toLowerCase","heirarchical","singular","plural","useReplacement","attr","advancedSettingsMetaboxManager","$screenOptionsToggle","$ACFAdvancedToggle","render","isACFAdvancedSettingsChecked","prop","isScreenOptionsAdvancedSettingsChecked","onToggleScreenOptionsAdvancedSettings","onToggleACFAdvancedSettings","linkFieldGroupsManger","linkFieldGroups","popup","step1","ajax","url","prepareForAjax","action","dataType","success","step2","response","newPopup","title","content","width","addClass","step3","preventDefault","$select","focus","startButtonLoading","field_groups","step4","wp","a11y","speak","jQuery"],"sourceRoot":""}
\ No newline at end of file
diff --git a/assets/build/js/acf-internal-post-type.min.js b/assets/build/js/acf-internal-post-type.min.js
new file mode 100644
index 0000000..2ad856c
--- /dev/null
+++ b/assets/build/js/acf-internal-post-type.min.js
@@ -0,0 +1 @@
+!function(){var e={4110:function(){var e;e=jQuery,new acf.Model({id:"internalPostTypeSettingsManager",wait:"ready",events:{"blur .acf_slugify_to_key":"onChangeSlugify","blur .acf_singular_label":"onChangeSingularLabel","blur .acf_plural_label":"onChangePluralLabel","change .acf_hierarchical_switch":"onChangeHierarchical","click .acf-regenerate-labels":"onClickRegenerateLabels","click .acf-clear-labels":"onClickClearLabels","change .rewrite_slug_field":"onChangeURLSlug","keyup .rewrite_slug_field":"onChangeURLSlug"},onChangeSlugify:function(t,a){const n=a.val(),l=e(".acf_slugified_key");if(""==l.val().trim()){let e=acf.strSanitize(n.trim()).replaceAll("_","-");if(e=acf.applyFilters("generate_internal_post_type_name",e,this),"taxonomy"===acf.get("screen"))return void l.val(e.substring(0,32));l.val(e.substring(0,20))}},initialize:function(){if(!["taxonomy","post_type"].includes(acf.get("screen")))return;const t=function(t){if(void 0===t.element)return t;const a=e(t.element.parentElement),n=e(' ');n.html(acf.escHtml(t.element.innerHTML));let l=!1;return a.filter(".acf-taxonomy-manage_terms, .acf-taxonomy-edit_terms, .acf-taxonomy-delete_terms").length&&"manage_categories"===t.id||a.filter(".acf-taxonomy-assign_terms").length&&"edit_posts"===t.id?l=!0:"taxonomy_key"!==t.id&&"post_type_key"!==t.id&&"default"!==t.id||(l=!0),l&&n.append(''+acf.__("Default")+" "),n.data("element",t.element),n};acf.newSelect2(e("select.query_var"),{field:!1,templateSelection:t,templateResult:t}),acf.newSelect2(e("select.acf-taxonomy-manage_terms"),{field:!1,templateSelection:t,templateResult:t}),acf.newSelect2(e("select.acf-taxonomy-edit_terms"),{field:!1,templateSelection:t,templateResult:t}),acf.newSelect2(e("select.acf-taxonomy-delete_terms"),{field:!1,templateSelection:t,templateResult:t}),acf.newSelect2(e("select.acf-taxonomy-assign_terms"),{field:!1,templateSelection:t,templateResult:t}),acf.newSelect2(e("select.meta_box"),{field:!1,templateSelection:t,templateResult:t});const a=acf.newSelect2(e("select.permalink_rewrite"),{field:!1,templateSelection:t,templateResult:t});e(".rewrite_slug_field").trigger("change"),a.on("change",(function(t){e(".rewrite_slug_field").trigger("change")}))},onChangeURLSlug:function(t,a){const n=e("div.acf-field.acf-field-permalink-rewrite"),l=n.find("select").find("option:selected").val(),i=n.data(l+"_instructions"),c=n.data("site_url"),s=n.find("p.description").first();if("taxonomy_key"===l||"post_type_key"===l)var o=e(".acf_slugified_key").val().trim();else o=a.val().trim();o.length||(o="{slug}"),s.html(e(""+i+" ").text().replace("{slug}",""+e(""+c+"/"+o+" ").text()+" "))},onChangeSingularLabel:function(e,t){const a=t.val();this.updateLabels(a,"singular",!1)},onChangePluralLabel:function(e,t){const a=t.val();this.updateLabels(a,"plural",!1)},onChangeHierarchical:function(t,a){const n=a.is(":checked");if("taxonomy"===acf.get("screen")){let t=e(".acf-field-meta-box").data("tags_meta_box");n&&(t=e(".acf-field-meta-box").data("categories_meta_box")),e("#acf_taxonomy-meta_box").find("option:first").text(t).trigger("change")}this.updatePlaceholders(n)},onClickRegenerateLabels:function(t,a){this.updateLabels(e(".acf_singular_label").val(),"singular",!0),this.updateLabels(e(".acf_plural_label").val(),"plural",!0)},onClickClearLabels:function(e,t){this.clearLabels()},updateLabels(t,a,n){e('[data-label][data-replace="'+a+'"').each(((a,l)=>{var i=e(l).find('input[type="text"]').first();(n||""==i.val())&&""!=t&&i.val("lower"===e(l).data("transform")?e(l).data("label").replace("%s",t.toLowerCase()):e(l).data("label").replace("%s",t))}))},clearLabels(){e("[data-label]").each(((t,a)=>{e(a).find('input[type="text"]').first().val("")}))},updatePlaceholders(t){if("post_type"==acf.get("screen")){var a=acf.__("Post"),n=acf.__("Posts");t&&(a=acf.__("Page"),n=acf.__("Pages"))}else a=acf.__("Tag"),n=acf.__("Tags"),t&&(a=acf.__("Category"),n=acf.__("Categories"));e("[data-label]").each(((t,l)=>{var i="plural"===e(l).data("replace")?n:a;"lower"===e(l).data("transform")&&(i=i.toLowerCase()),e(l).find('input[type="text"]').first().attr("placeholder",e(l).data("label").replace("%s",i))}))}}),new acf.Model({id:"advancedSettingsMetaboxManager",wait:"load",events:{"change .acf-advanced-settings-toggle":"onToggleACFAdvancedSettings","change #screen-options-wrap #acf-advanced-settings-hide":"onToggleScreenOptionsAdvancedSettings"},initialize:function(){this.$screenOptionsToggle=e("#screen-options-wrap #acf-advanced-settings-hide:first"),this.$ACFAdvancedToggle=e(".acf-advanced-settings-toggle:first"),this.render()},isACFAdvancedSettingsChecked:function(){return!!this.$ACFAdvancedToggle.length&&this.$ACFAdvancedToggle.prop("checked")},isScreenOptionsAdvancedSettingsChecked:function(){return!!this.$screenOptionsToggle.length&&this.$screenOptionsToggle.prop("checked")},onToggleScreenOptionsAdvancedSettings:function(){this.isScreenOptionsAdvancedSettingsChecked()?this.isACFAdvancedSettingsChecked()||this.$ACFAdvancedToggle.trigger("click"):this.isACFAdvancedSettingsChecked()&&this.$ACFAdvancedToggle.trigger("click")},onToggleACFAdvancedSettings:function(){this.isACFAdvancedSettingsChecked()?this.isScreenOptionsAdvancedSettingsChecked()||this.$screenOptionsToggle.trigger("click"):this.isScreenOptionsAdvancedSettingsChecked()&&this.$screenOptionsToggle.trigger("click")},render:function(){this.onToggleACFAdvancedSettings()}}),new acf.Model({id:"linkFieldGroupsManager",events:{"click .acf-link-field-groups":"linkFieldGroups"},linkFieldGroups:function(){let t=!1;const a=function(a){a.preventDefault();const l=t.$("select"),i=l.val();i.length?(acf.startButtonLoading(t.$(".button")),e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax({action:"acf/link_field_groups",field_groups:i}),type:"post",dataType:"json",success:n})):l.focus()},n=function(e){t.content(e.data.content),wp.a11y&&wp.a11y.speak&&acf.__&&wp.a11y.speak(acf.__("Field groups linked successfully."),"polite"),t.$("button.acf-close-popup").focus()};e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax({action:"acf/link_field_groups"}),type:"post",dataType:"json",success:function(e){t=acf.newPopup({title:e.data.title,content:e.data.content,width:"600px"}),t.$el.addClass("acf-link-field-groups-popup"),t.on("submit","form",a)}})}})}},t={};function a(n){var l=t[n];if(void 0!==l)return l.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,a),i.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";a(4110)}()}();
\ No newline at end of file
diff --git a/assets/build/js/acf.js b/assets/build/js/acf.js
new file mode 100644
index 0000000..9f65465
--- /dev/null
+++ b/assets/build/js/acf.js
@@ -0,0 +1,4458 @@
+/******/ (function() { // webpackBootstrap
+/******/ var __webpack_modules__ = ({
+
+/***/ "./src/advanced-custom-fields-pro/assets/src/js/_acf-hooks.js":
+/*!********************************************************************!*\
+ !*** ./src/advanced-custom-fields-pro/assets/src/js/_acf-hooks.js ***!
+ \********************************************************************/
+/***/ (function() {
+
+(function (window, undefined) {
+ 'use strict';
+
+ /**
+ * Handles managing all events for whatever you plug it into. Priorities for hooks are based on lowest to highest in
+ * that, lowest priority hooks are fired first.
+ */
+ var EventManager = function () {
+ /**
+ * Maintain a reference to the object scope so our public methods never get confusing.
+ */
+ var MethodsAvailable = {
+ removeFilter: removeFilter,
+ applyFilters: applyFilters,
+ addFilter: addFilter,
+ removeAction: removeAction,
+ doAction: doAction,
+ addAction: addAction,
+ storage: getStorage
+ };
+
+ /**
+ * Contains the hooks that get registered with this EventManager. The array for storage utilizes a "flat"
+ * object literal such that looking up the hook utilizes the native object literal hash.
+ */
+ var STORAGE = {
+ actions: {},
+ filters: {}
+ };
+ function getStorage() {
+ return STORAGE;
+ }
+
+ /**
+ * Adds an action to the event manager.
+ *
+ * @param action Must contain namespace.identifier
+ * @param callback Must be a valid callback function before this action is added
+ * @param [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook
+ * @param [context] Supply a value to be used for this
+ */
+ function addAction(action, callback, priority, context) {
+ if (typeof action === 'string' && typeof callback === 'function') {
+ priority = parseInt(priority || 10, 10);
+ _addHook('actions', action, callback, priority, context);
+ }
+ return MethodsAvailable;
+ }
+
+ /**
+ * Performs an action if it exists. You can pass as many arguments as you want to this function; the only rule is
+ * that the first argument must always be the action.
+ */
+ function doAction( /* action, arg1, arg2, ... */
+ ) {
+ var args = Array.prototype.slice.call(arguments);
+ var action = args.shift();
+ if (typeof action === 'string') {
+ _runHook('actions', action, args);
+ }
+ return MethodsAvailable;
+ }
+
+ /**
+ * Removes the specified action if it contains a namespace.identifier & exists.
+ *
+ * @param action The action to remove
+ * @param [callback] Callback function to remove
+ */
+ function removeAction(action, callback) {
+ if (typeof action === 'string') {
+ _removeHook('actions', action, callback);
+ }
+ return MethodsAvailable;
+ }
+
+ /**
+ * Adds a filter to the event manager.
+ *
+ * @param filter Must contain namespace.identifier
+ * @param callback Must be a valid callback function before this action is added
+ * @param [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook
+ * @param [context] Supply a value to be used for this
+ */
+ function addFilter(filter, callback, priority, context) {
+ if (typeof filter === 'string' && typeof callback === 'function') {
+ priority = parseInt(priority || 10, 10);
+ _addHook('filters', filter, callback, priority, context);
+ }
+ return MethodsAvailable;
+ }
+
+ /**
+ * Performs a filter if it exists. You should only ever pass 1 argument to be filtered. The only rule is that
+ * the first argument must always be the filter.
+ */
+ function applyFilters( /* filter, filtered arg, arg2, ... */
+ ) {
+ var args = Array.prototype.slice.call(arguments);
+ var filter = args.shift();
+ if (typeof filter === 'string') {
+ return _runHook('filters', filter, args);
+ }
+ return MethodsAvailable;
+ }
+
+ /**
+ * Removes the specified filter if it contains a namespace.identifier & exists.
+ *
+ * @param filter The action to remove
+ * @param [callback] Callback function to remove
+ */
+ function removeFilter(filter, callback) {
+ if (typeof filter === 'string') {
+ _removeHook('filters', filter, callback);
+ }
+ return MethodsAvailable;
+ }
+
+ /**
+ * Removes the specified hook by resetting the value of it.
+ *
+ * @param type Type of hook, either 'actions' or 'filters'
+ * @param hook The hook (namespace.identifier) to remove
+ * @private
+ */
+ function _removeHook(type, hook, callback, context) {
+ if (!STORAGE[type][hook]) {
+ return;
+ }
+ if (!callback) {
+ STORAGE[type][hook] = [];
+ } else {
+ var handlers = STORAGE[type][hook];
+ var i;
+ if (!context) {
+ for (i = handlers.length; i--;) {
+ if (handlers[i].callback === callback) {
+ handlers.splice(i, 1);
+ }
+ }
+ } else {
+ for (i = handlers.length; i--;) {
+ var handler = handlers[i];
+ if (handler.callback === callback && handler.context === context) {
+ handlers.splice(i, 1);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Adds the hook to the appropriate storage container
+ *
+ * @param type 'actions' or 'filters'
+ * @param hook The hook (namespace.identifier) to add to our event manager
+ * @param callback The function that will be called when the hook is executed.
+ * @param priority The priority of this hook. Must be an integer.
+ * @param [context] A value to be used for this
+ * @private
+ */
+ function _addHook(type, hook, callback, priority, context) {
+ var hookObject = {
+ callback: callback,
+ priority: priority,
+ context: context
+ };
+
+ // Utilize 'prop itself' : http://jsperf.com/hasownproperty-vs-in-vs-undefined/19
+ var hooks = STORAGE[type][hook];
+ if (hooks) {
+ hooks.push(hookObject);
+ hooks = _hookInsertSort(hooks);
+ } else {
+ hooks = [hookObject];
+ }
+ STORAGE[type][hook] = hooks;
+ }
+
+ /**
+ * Use an insert sort for keeping our hooks organized based on priority. This function is ridiculously faster
+ * than bubble sort, etc: http://jsperf.com/javascript-sort
+ *
+ * @param hooks The custom array containing all of the appropriate hooks to perform an insert sort on.
+ * @private
+ */
+ function _hookInsertSort(hooks) {
+ var tmpHook, j, prevHook;
+ for (var i = 1, len = hooks.length; i < len; i++) {
+ tmpHook = hooks[i];
+ j = i;
+ while ((prevHook = hooks[j - 1]) && prevHook.priority > tmpHook.priority) {
+ hooks[j] = hooks[j - 1];
+ --j;
+ }
+ hooks[j] = tmpHook;
+ }
+ return hooks;
+ }
+
+ /**
+ * Runs the specified hook. If it is an action, the value is not modified but if it is a filter, it is.
+ *
+ * @param type 'actions' or 'filters'
+ * @param hook The hook ( namespace.identifier ) to be ran.
+ * @param args Arguments to pass to the action/filter. If it's a filter, args is actually a single parameter.
+ * @private
+ */
+ function _runHook(type, hook, args) {
+ var handlers = STORAGE[type][hook];
+ if (!handlers) {
+ return type === 'filters' ? args[0] : false;
+ }
+ var i = 0,
+ len = handlers.length;
+ if (type === 'filters') {
+ for (; i < len; i++) {
+ args[0] = handlers[i].callback.apply(handlers[i].context, args);
+ }
+ } else {
+ for (; i < len; i++) {
+ handlers[i].callback.apply(handlers[i].context, args);
+ }
+ }
+ return type === 'filters' ? args[0] : true;
+ }
+
+ // return all of the publicly available methods
+ return MethodsAvailable;
+ };
+
+ // instantiate
+ acf.hooks = new EventManager();
+})(window);
+
+/***/ }),
+
+/***/ "./src/advanced-custom-fields-pro/assets/src/js/_acf-modal.js":
+/*!********************************************************************!*\
+ !*** ./src/advanced-custom-fields-pro/assets/src/js/_acf-modal.js ***!
+ \********************************************************************/
+/***/ (function() {
+
+(function ($, undefined) {
+ acf.models.Modal = acf.Model.extend({
+ data: {
+ title: '',
+ content: '',
+ toolbar: ''
+ },
+ events: {
+ 'click .acf-modal-close': 'onClickClose'
+ },
+ setup: function (props) {
+ $.extend(this.data, props);
+ this.$el = $();
+ this.render();
+ },
+ initialize: function () {
+ this.open();
+ },
+ render: function () {
+ // Extract vars.
+ var title = this.get('title');
+ var content = this.get('content');
+ var toolbar = this.get('toolbar');
+
+ // Create element.
+ var $el = $(['', '
', '
', '
' + title + ' ', ' ', '', '
' + content + '
', '
' + toolbar + '
', '
', '
', '
'].join(''));
+
+ // Update DOM.
+ if (this.$el) {
+ this.$el.replaceWith($el);
+ }
+ this.$el = $el;
+
+ // Trigger action.
+ acf.doAction('append', $el);
+ },
+ update: function (props) {
+ this.data = acf.parseArgs(props, this.data);
+ this.render();
+ },
+ title: function (title) {
+ this.$('.acf-modal-title h2').html(title);
+ },
+ content: function (content) {
+ this.$('.acf-modal-content').html(content);
+ },
+ toolbar: function (toolbar) {
+ this.$('.acf-modal-toolbar').html(toolbar);
+ },
+ open: function () {
+ $('body').append(this.$el);
+ },
+ close: function () {
+ this.remove();
+ },
+ onClickClose: function (e, $el) {
+ e.preventDefault();
+ this.close();
+ },
+ /**
+ * Places focus within the popup.
+ */
+ focus: function () {
+ this.$el.find('.acf-icon').first().trigger('focus');
+ },
+ /**
+ * Locks focus within the modal.
+ *
+ * @param {boolean} locked True to lock focus, false to unlock.
+ */
+ lockFocusToModal: function (locked) {
+ let inertElement = $('#wpwrap');
+ if (!inertElement.length) {
+ return;
+ }
+ inertElement[0].inert = locked;
+ inertElement.attr('aria-hidden', locked);
+ },
+ /**
+ * Returns focus to the element that opened the popup
+ * if it still exists in the DOM.
+ */
+ returnFocusToOrigin: function () {
+ if (this.data.openedBy instanceof $ && this.data.openedBy.closest('body').length > 0) {
+ this.data.openedBy.trigger('focus');
+ }
+ }
+ });
+
+ /**
+ * Returns a new modal.
+ *
+ * @date 21/4/20
+ * @since 5.9.0
+ *
+ * @param object props The modal props.
+ * @return object
+ */
+ acf.newModal = function (props) {
+ return new acf.models.Modal(props);
+ };
+})(jQuery);
+
+/***/ }),
+
+/***/ "./src/advanced-custom-fields-pro/assets/src/js/_acf-model.js":
+/*!********************************************************************!*\
+ !*** ./src/advanced-custom-fields-pro/assets/src/js/_acf-model.js ***!
+ \********************************************************************/
+/***/ (function() {
+
+(function ($, undefined) {
+ // Cached regex to split keys for `addEvent`.
+ var delegateEventSplitter = /^(\S+)\s*(.*)$/;
+
+ /**
+ * extend
+ *
+ * Helper function to correctly set up the prototype chain for subclasses
+ * Heavily inspired by backbone.js
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object protoProps New properties for this object.
+ * @return function.
+ */
+
+ var extend = function (protoProps) {
+ // vars
+ var Parent = this;
+ var Child;
+
+ // The constructor function for the new subclass is either defined by you
+ // (the "constructor" property in your `extend` definition), or defaulted
+ // by us to simply call the parent constructor.
+ if (protoProps && protoProps.hasOwnProperty('constructor')) {
+ Child = protoProps.constructor;
+ } else {
+ Child = function () {
+ return Parent.apply(this, arguments);
+ };
+ }
+
+ // Add static properties to the constructor function, if supplied.
+ $.extend(Child, Parent);
+
+ // Set the prototype chain to inherit from `parent`, without calling
+ // `parent`'s constructor function and add the prototype properties.
+ Child.prototype = Object.create(Parent.prototype);
+ $.extend(Child.prototype, protoProps);
+ Child.prototype.constructor = Child;
+
+ // Set a convenience property in case the parent's prototype is needed later.
+ //Child.prototype.__parent__ = Parent.prototype;
+
+ // return
+ return Child;
+ };
+
+ /**
+ * Model
+ *
+ * Base class for all inheritence
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object props
+ * @return function.
+ */
+
+ var Model = acf.Model = function () {
+ // generate uique client id
+ this.cid = acf.uniqueId('acf');
+
+ // set vars to avoid modifying prototype
+ this.data = $.extend(true, {}, this.data);
+
+ // pass props to setup function
+ this.setup.apply(this, arguments);
+
+ // store on element (allow this.setup to create this.$el)
+ if (this.$el && !this.$el.data('acf')) {
+ this.$el.data('acf', this);
+ }
+
+ // initialize
+ var initialize = function () {
+ this.initialize();
+ this.addEvents();
+ this.addActions();
+ this.addFilters();
+ };
+
+ // initialize on action
+ if (this.wait && !acf.didAction(this.wait)) {
+ this.addAction(this.wait, initialize);
+
+ // initialize now
+ } else {
+ initialize.apply(this);
+ }
+ };
+
+ // Attach all inheritable methods to the Model prototype.
+ $.extend(Model.prototype, {
+ // Unique model id
+ id: '',
+ // Unique client id
+ cid: '',
+ // jQuery element
+ $el: null,
+ // Data specific to this instance
+ data: {},
+ // toggle used when changing data
+ busy: false,
+ changed: false,
+ // Setup events hooks
+ events: {},
+ actions: {},
+ filters: {},
+ // class used to avoid nested event triggers
+ eventScope: '',
+ // action to wait until initialize
+ wait: false,
+ // action priority default
+ priority: 10,
+ /**
+ * get
+ *
+ * Gets a specific data value
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @return mixed
+ */
+
+ get: function (name) {
+ return this.data[name];
+ },
+ /**
+ * has
+ *
+ * Returns `true` if the data exists and is not null
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @return boolean
+ */
+
+ has: function (name) {
+ return this.get(name) != null;
+ },
+ /**
+ * set
+ *
+ * Sets a specific data value
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param mixed value
+ * @return this
+ */
+
+ set: function (name, value, silent) {
+ // bail if unchanged
+ var prevValue = this.get(name);
+ if (prevValue == value) {
+ return this;
+ }
+
+ // set data
+ this.data[name] = value;
+
+ // trigger events
+ if (!silent) {
+ this.changed = true;
+ this.trigger('changed:' + name, [value, prevValue]);
+ this.trigger('changed', [name, value, prevValue]);
+ }
+
+ // return
+ return this;
+ },
+ /**
+ * inherit
+ *
+ * Inherits the data from a jQuery element
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param jQuery $el
+ * @return this
+ */
+
+ inherit: function (data) {
+ // allow jQuery
+ if (data instanceof jQuery) {
+ data = data.data();
+ }
+
+ // extend
+ $.extend(this.data, data);
+
+ // return
+ return this;
+ },
+ /**
+ * prop
+ *
+ * mimics the jQuery prop function
+ *
+ * @date 4/6/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ prop: function () {
+ return this.$el.prop.apply(this.$el, arguments);
+ },
+ /**
+ * setup
+ *
+ * Run during constructor function
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ setup: function (props) {
+ $.extend(this, props);
+ },
+ /**
+ * initialize
+ *
+ * Also run during constructor function
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ initialize: function () {},
+ /**
+ * addElements
+ *
+ * Adds multiple jQuery elements to this object
+ *
+ * @date 9/5/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ addElements: function (elements) {
+ elements = elements || this.elements || null;
+ if (!elements || !Object.keys(elements).length) return false;
+ for (var i in elements) {
+ this.addElement(i, elements[i]);
+ }
+ },
+ /**
+ * addElement
+ *
+ * description
+ *
+ * @date 9/5/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ addElement: function (name, selector) {
+ this['$' + name] = this.$(selector);
+ },
+ /**
+ * addEvents
+ *
+ * Adds multiple event handlers
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object events {event1 : callback, event2 : callback, etc }
+ * @return n/a
+ */
+
+ addEvents: function (events) {
+ events = events || this.events || null;
+ if (!events) return false;
+ for (var key in events) {
+ var match = key.match(delegateEventSplitter);
+ this.on(match[1], match[2], events[key]);
+ }
+ },
+ /**
+ * removeEvents
+ *
+ * Removes multiple event handlers
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object events {event1 : callback, event2 : callback, etc }
+ * @return n/a
+ */
+
+ removeEvents: function (events) {
+ events = events || this.events || null;
+ if (!events) return false;
+ for (var key in events) {
+ var match = key.match(delegateEventSplitter);
+ this.off(match[1], match[2], events[key]);
+ }
+ },
+ /**
+ * getEventTarget
+ *
+ * Returns a jQuery element to trigger an event on.
+ *
+ * @date 5/6/18
+ * @since 5.6.9
+ *
+ * @param jQuery $el The default jQuery element. Optional.
+ * @param string event The event name. Optional.
+ * @return jQuery
+ */
+
+ getEventTarget: function ($el, event) {
+ return $el || this.$el || $(document);
+ },
+ /**
+ * validateEvent
+ *
+ * Returns true if the event target's closest $el is the same as this.$el
+ * Requires both this.el and this.$el to be defined
+ *
+ * @date 5/6/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ validateEvent: function (e) {
+ if (this.eventScope) {
+ return $(e.target).closest(this.eventScope).is(this.$el);
+ } else {
+ return true;
+ }
+ },
+ /**
+ * proxyEvent
+ *
+ * Returns a new event callback function scoped to this model
+ *
+ * @date 29/3/18
+ * @since 5.6.9
+ *
+ * @param function callback
+ * @return function
+ */
+
+ proxyEvent: function (callback) {
+ return this.proxy(function (e) {
+ // validate
+ if (!this.validateEvent(e)) {
+ return;
+ }
+
+ // construct args
+ var args = acf.arrayArgs(arguments);
+ var extraArgs = args.slice(1);
+ var eventArgs = [e, $(e.currentTarget)].concat(extraArgs);
+
+ // callback
+ callback.apply(this, eventArgs);
+ });
+ },
+ /**
+ * on
+ *
+ * Adds an event handler similar to jQuery
+ * Uses the instance 'cid' to namespace event
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param string callback
+ * @return n/a
+ */
+
+ on: function (a1, a2, a3, a4) {
+ // vars
+ var $el, event, selector, callback, args;
+
+ // find args
+ if (a1 instanceof jQuery) {
+ // 1. args( $el, event, selector, callback )
+ if (a4) {
+ $el = a1;
+ event = a2;
+ selector = a3;
+ callback = a4;
+
+ // 2. args( $el, event, callback )
+ } else {
+ $el = a1;
+ event = a2;
+ callback = a3;
+ }
+ } else {
+ // 3. args( event, selector, callback )
+ if (a3) {
+ event = a1;
+ selector = a2;
+ callback = a3;
+
+ // 4. args( event, callback )
+ } else {
+ event = a1;
+ callback = a2;
+ }
+ }
+
+ // element
+ $el = this.getEventTarget($el);
+
+ // modify callback
+ if (typeof callback === 'string') {
+ callback = this.proxyEvent(this[callback]);
+ }
+
+ // modify event
+ event = event + '.' + this.cid;
+
+ // args
+ if (selector) {
+ args = [event, selector, callback];
+ } else {
+ args = [event, callback];
+ }
+
+ // on()
+ $el.on.apply($el, args);
+ },
+ /**
+ * off
+ *
+ * Removes an event handler similar to jQuery
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param string callback
+ * @return n/a
+ */
+
+ off: function (a1, a2, a3) {
+ // vars
+ var $el, event, selector, args;
+
+ // find args
+ if (a1 instanceof jQuery) {
+ // 1. args( $el, event, selector )
+ if (a3) {
+ $el = a1;
+ event = a2;
+ selector = a3;
+
+ // 2. args( $el, event )
+ } else {
+ $el = a1;
+ event = a2;
+ }
+ } else {
+ // 3. args( event, selector )
+ if (a2) {
+ event = a1;
+ selector = a2;
+
+ // 4. args( event )
+ } else {
+ event = a1;
+ }
+ }
+
+ // element
+ $el = this.getEventTarget($el);
+
+ // modify event
+ event = event + '.' + this.cid;
+
+ // args
+ if (selector) {
+ args = [event, selector];
+ } else {
+ args = [event];
+ }
+
+ // off()
+ $el.off.apply($el, args);
+ },
+ /**
+ * trigger
+ *
+ * Triggers an event similar to jQuery
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param string callback
+ * @return n/a
+ */
+
+ trigger: function (name, args, bubbles) {
+ var $el = this.getEventTarget();
+ if (bubbles) {
+ $el.trigger.apply($el, arguments);
+ } else {
+ $el.triggerHandler.apply($el, arguments);
+ }
+ return this;
+ },
+ /**
+ * addActions
+ *
+ * Adds multiple action handlers
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object actions {action1 : callback, action2 : callback, etc }
+ * @return n/a
+ */
+
+ addActions: function (actions) {
+ actions = actions || this.actions || null;
+ if (!actions) return false;
+ for (var i in actions) {
+ this.addAction(i, actions[i]);
+ }
+ },
+ /**
+ * removeActions
+ *
+ * Removes multiple action handlers
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object actions {action1 : callback, action2 : callback, etc }
+ * @return n/a
+ */
+
+ removeActions: function (actions) {
+ actions = actions || this.actions || null;
+ if (!actions) return false;
+ for (var i in actions) {
+ this.removeAction(i, actions[i]);
+ }
+ },
+ /**
+ * addAction
+ *
+ * Adds an action using the wp.hooks library
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param string callback
+ * @return n/a
+ */
+
+ addAction: function (name, callback, priority) {
+ //console.log('addAction', name, priority);
+ // defaults
+ priority = priority || this.priority;
+
+ // modify callback
+ if (typeof callback === 'string') {
+ callback = this[callback];
+ }
+
+ // add
+ acf.addAction(name, callback, priority, this);
+ },
+ /**
+ * removeAction
+ *
+ * Remove an action using the wp.hooks library
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param string callback
+ * @return n/a
+ */
+
+ removeAction: function (name, callback) {
+ acf.removeAction(name, this[callback]);
+ },
+ /**
+ * addFilters
+ *
+ * Adds multiple filter handlers
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object filters {filter1 : callback, filter2 : callback, etc }
+ * @return n/a
+ */
+
+ addFilters: function (filters) {
+ filters = filters || this.filters || null;
+ if (!filters) return false;
+ for (var i in filters) {
+ this.addFilter(i, filters[i]);
+ }
+ },
+ /**
+ * addFilter
+ *
+ * Adds a filter using the wp.hooks library
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param string callback
+ * @return n/a
+ */
+
+ addFilter: function (name, callback, priority) {
+ // defaults
+ priority = priority || this.priority;
+
+ // modify callback
+ if (typeof callback === 'string') {
+ callback = this[callback];
+ }
+
+ // add
+ acf.addFilter(name, callback, priority, this);
+ },
+ /**
+ * removeFilters
+ *
+ * Removes multiple filter handlers
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object filters {filter1 : callback, filter2 : callback, etc }
+ * @return n/a
+ */
+
+ removeFilters: function (filters) {
+ filters = filters || this.filters || null;
+ if (!filters) return false;
+ for (var i in filters) {
+ this.removeFilter(i, filters[i]);
+ }
+ },
+ /**
+ * removeFilter
+ *
+ * Remove a filter using the wp.hooks library
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param string callback
+ * @return n/a
+ */
+
+ removeFilter: function (name, callback) {
+ acf.removeFilter(name, this[callback]);
+ },
+ /**
+ * $
+ *
+ * description
+ *
+ * @date 16/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ $: function (selector) {
+ return this.$el.find(selector);
+ },
+ /**
+ * remove
+ *
+ * Removes the element and listenters
+ *
+ * @date 19/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ remove: function () {
+ this.removeEvents();
+ this.removeActions();
+ this.removeFilters();
+ this.$el.remove();
+ },
+ /**
+ * setTimeout
+ *
+ * description
+ *
+ * @date 16/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ setTimeout: function (callback, milliseconds) {
+ return setTimeout(this.proxy(callback), milliseconds);
+ },
+ /**
+ * time
+ *
+ * used for debugging
+ *
+ * @date 7/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ time: function () {
+ console.time(this.id || this.cid);
+ },
+ /**
+ * timeEnd
+ *
+ * used for debugging
+ *
+ * @date 7/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ timeEnd: function () {
+ console.timeEnd(this.id || this.cid);
+ },
+ /**
+ * show
+ *
+ * description
+ *
+ * @date 15/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ show: function () {
+ acf.show(this.$el);
+ },
+ /**
+ * hide
+ *
+ * description
+ *
+ * @date 15/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ hide: function () {
+ acf.hide(this.$el);
+ },
+ /**
+ * proxy
+ *
+ * Returns a new function scoped to this model
+ *
+ * @date 29/3/18
+ * @since 5.6.9
+ *
+ * @param function callback
+ * @return function
+ */
+
+ proxy: function (callback) {
+ return $.proxy(callback, this);
+ }
+ });
+
+ // Set up inheritance for the model
+ Model.extend = extend;
+
+ // Global model storage
+ acf.models = {};
+
+ /**
+ * acf.getInstance
+ *
+ * This function will get an instance from an element
+ *
+ * @date 5/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.getInstance = function ($el) {
+ return $el.data('acf');
+ };
+
+ /**
+ * acf.getInstances
+ *
+ * This function will get an array of instances from multiple elements
+ *
+ * @date 5/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.getInstances = function ($el) {
+ var instances = [];
+ $el.each(function () {
+ instances.push(acf.getInstance($(this)));
+ });
+ return instances;
+ };
+})(jQuery);
+
+/***/ }),
+
+/***/ "./src/advanced-custom-fields-pro/assets/src/js/_acf-notice.js":
+/*!*********************************************************************!*\
+ !*** ./src/advanced-custom-fields-pro/assets/src/js/_acf-notice.js ***!
+ \*********************************************************************/
+/***/ (function() {
+
+(function ($, undefined) {
+ var Notice = acf.Model.extend({
+ data: {
+ text: '',
+ type: '',
+ timeout: 0,
+ dismiss: true,
+ target: false,
+ close: function () {}
+ },
+ events: {
+ 'click .acf-notice-dismiss': 'onClickClose'
+ },
+ tmpl: function () {
+ return '
';
+ },
+ setup: function (props) {
+ $.extend(this.data, props);
+ this.$el = $(this.tmpl());
+ },
+ initialize: function () {
+ // render
+ this.render();
+
+ // show
+ this.show();
+ },
+ render: function () {
+ // class
+ this.type(this.get('type'));
+
+ // text
+ this.html('' + this.get('text') + '
');
+
+ // close
+ if (this.get('dismiss')) {
+ this.$el.append(' ');
+ this.$el.addClass('-dismiss');
+ }
+
+ // timeout
+ var timeout = this.get('timeout');
+ if (timeout) {
+ this.away(timeout);
+ }
+ },
+ update: function (props) {
+ // update
+ $.extend(this.data, props);
+
+ // re-initialize
+ this.initialize();
+
+ // refresh events
+ this.removeEvents();
+ this.addEvents();
+ },
+ show: function () {
+ var $target = this.get('target');
+ if ($target) {
+ $target.prepend(this.$el);
+ }
+ },
+ hide: function () {
+ this.$el.remove();
+ },
+ away: function (timeout) {
+ this.setTimeout(function () {
+ acf.remove(this.$el);
+ }, timeout);
+ },
+ type: function (type) {
+ // remove prev type
+ var prevType = this.get('type');
+ if (prevType) {
+ this.$el.removeClass('-' + prevType);
+ }
+
+ // add new type
+ this.$el.addClass('-' + type);
+
+ // backwards compatibility
+ if (type == 'error') {
+ this.$el.addClass('acf-error-message');
+ }
+ },
+ html: function (html) {
+ this.$el.html(acf.escHtml(html));
+ },
+ text: function (text) {
+ this.$('p').html(acf.escHtml(text));
+ },
+ onClickClose: function (e, $el) {
+ e.preventDefault();
+ this.get('close').apply(this, arguments);
+ this.remove();
+ }
+ });
+ acf.newNotice = function (props) {
+ // ensure object
+ if (typeof props !== 'object') {
+ props = {
+ text: props
+ };
+ }
+
+ // instantiate
+ return new Notice(props);
+ };
+ var noticeManager = new acf.Model({
+ wait: 'prepare',
+ priority: 1,
+ initialize: function () {
+ const $notices = $('.acf-admin-notice');
+ $notices.each(function () {
+ // Move to avoid WP flicker.
+ if ($(this).length) {
+ $('h1:first').after($(this));
+ }
+ if ($(this).data('persisted')) {
+ let dismissed = acf.getPreference('dismissed-notices');
+ if (dismissed && typeof dismissed == 'object' && dismissed.includes($(this).data('persist-id'))) {
+ $(this).remove();
+ } else {
+ $(this).on('click', '.notice-dismiss', function (e) {
+ dismissed = acf.getPreference('dismissed-notices');
+ if (!dismissed || typeof dismissed != 'object') {
+ dismissed = [];
+ }
+ dismissed.push($(this).closest('.acf-admin-notice').data('persist-id'));
+ acf.setPreference('dismissed-notices', dismissed);
+ });
+ }
+ }
+ });
+ }
+ });
+})(jQuery);
+
+/***/ }),
+
+/***/ "./src/advanced-custom-fields-pro/assets/src/js/_acf-panel.js":
+/*!********************************************************************!*\
+ !*** ./src/advanced-custom-fields-pro/assets/src/js/_acf-panel.js ***!
+ \********************************************************************/
+/***/ (function() {
+
+(function ($, undefined) {
+ var panel = new acf.Model({
+ events: {
+ 'click .acf-panel-title': 'onClick'
+ },
+ onClick: function (e, $el) {
+ e.preventDefault();
+ this.toggle($el.parent());
+ },
+ isOpen: function ($el) {
+ return $el.hasClass('-open');
+ },
+ toggle: function ($el) {
+ this.isOpen($el) ? this.close($el) : this.open($el);
+ },
+ open: function ($el) {
+ $el.addClass('-open');
+ $el.find('.acf-panel-title i').attr('class', 'dashicons dashicons-arrow-down');
+ },
+ close: function ($el) {
+ $el.removeClass('-open');
+ $el.find('.acf-panel-title i').attr('class', 'dashicons dashicons-arrow-right');
+ }
+ });
+})(jQuery);
+
+/***/ }),
+
+/***/ "./src/advanced-custom-fields-pro/assets/src/js/_acf-popup.js":
+/*!********************************************************************!*\
+ !*** ./src/advanced-custom-fields-pro/assets/src/js/_acf-popup.js ***!
+ \********************************************************************/
+/***/ (function() {
+
+(function ($, undefined) {
+ acf.models.Popup = acf.Model.extend({
+ data: {
+ title: '',
+ content: '',
+ width: 0,
+ height: 0,
+ loading: false,
+ openedBy: null
+ },
+ events: {
+ 'click [data-event="close"]': 'onClickClose',
+ 'click .acf-close-popup': 'onClickClose',
+ 'keydown': 'onPressEscapeClose'
+ },
+ setup: function (props) {
+ $.extend(this.data, props);
+ this.$el = $(this.tmpl());
+ },
+ initialize: function () {
+ this.render();
+ this.open();
+ this.focus();
+ this.lockFocusToPopup(true);
+ },
+ tmpl: function () {
+ return [''].join('');
+ },
+ render: function () {
+ // Extract Vars.
+ var title = this.get('title');
+ var content = this.get('content');
+ var loading = this.get('loading');
+ var width = this.get('width');
+ var height = this.get('height');
+
+ // Update.
+ this.title(title);
+ this.content(content);
+ if (width) {
+ this.$('.acf-popup-box').css('width', width);
+ }
+ if (height) {
+ this.$('.acf-popup-box').css('min-height', height);
+ }
+ this.loading(loading);
+
+ // Trigger action.
+ acf.doAction('append', this.$el);
+ },
+ /**
+ * Places focus within the popup.
+ */
+ focus: function () {
+ this.$el.find('.acf-icon').first().trigger('focus');
+ },
+ /**
+ * Locks focus within the popup.
+ *
+ * @param {boolean} locked True to lock focus, false to unlock.
+ */
+ lockFocusToPopup: function (locked) {
+ let inertElement = $('#wpwrap');
+ if (!inertElement.length) {
+ return;
+ }
+ inertElement[0].inert = locked;
+ inertElement.attr('aria-hidden', locked);
+ },
+ update: function (props) {
+ this.data = acf.parseArgs(props, this.data);
+ this.render();
+ },
+ title: function (title) {
+ this.$('.title:first h3').html(title);
+ },
+ content: function (content) {
+ this.$('.inner:first').html(content);
+ },
+ loading: function (show) {
+ var $loading = this.$('.loading:first');
+ show ? $loading.show() : $loading.hide();
+ },
+ open: function () {
+ $('body').append(this.$el);
+ },
+ close: function () {
+ this.lockFocusToPopup(false);
+ this.returnFocusToOrigin();
+ this.remove();
+ },
+ onClickClose: function (e, $el) {
+ e.preventDefault();
+ this.close();
+ },
+ /**
+ * Closes the popup when the escape key is pressed.
+ *
+ * @param {KeyboardEvent} e
+ */
+ onPressEscapeClose: function (e) {
+ if (e.key === 'Escape') {
+ this.close();
+ }
+ },
+ /**
+ * Returns focus to the element that opened the popup
+ * if it still exists in the DOM.
+ */
+ returnFocusToOrigin: function () {
+ if (this.data.openedBy instanceof $ && this.data.openedBy.closest('body').length > 0) {
+ this.data.openedBy.trigger('focus');
+ }
+ }
+ });
+
+ /**
+ * newPopup
+ *
+ * Creates a new Popup with the supplied props
+ *
+ * @date 17/12/17
+ * @since 5.6.5
+ *
+ * @param object props
+ * @return object
+ */
+
+ acf.newPopup = function (props) {
+ return new acf.models.Popup(props);
+ };
+})(jQuery);
+
+/***/ }),
+
+/***/ "./src/advanced-custom-fields-pro/assets/src/js/_acf-tooltip.js":
+/*!**********************************************************************!*\
+ !*** ./src/advanced-custom-fields-pro/assets/src/js/_acf-tooltip.js ***!
+ \**********************************************************************/
+/***/ (function() {
+
+(function ($, undefined) {
+ acf.newTooltip = function (props) {
+ // ensure object
+ if (typeof props !== 'object') {
+ props = {
+ text: props
+ };
+ }
+
+ // confirmRemove
+ if (props.confirmRemove !== undefined) {
+ props.textConfirm = acf.__('Remove');
+ props.textCancel = acf.__('Cancel');
+ return new TooltipConfirm(props);
+
+ // confirm
+ } else if (props.confirm !== undefined) {
+ return new TooltipConfirm(props);
+
+ // default
+ } else {
+ return new Tooltip(props);
+ }
+ };
+ var Tooltip = acf.Model.extend({
+ data: {
+ text: '',
+ timeout: 0,
+ target: null
+ },
+ tmpl: function () {
+ return '
';
+ },
+ setup: function (props) {
+ $.extend(this.data, props);
+ this.$el = $(this.tmpl());
+ },
+ initialize: function () {
+ // render
+ this.render();
+
+ // append
+ this.show();
+
+ // position
+ this.position();
+
+ // timeout
+ var timeout = this.get('timeout');
+ if (timeout) {
+ setTimeout($.proxy(this.fade, this), timeout);
+ }
+ },
+ update: function (props) {
+ $.extend(this.data, props);
+ this.initialize();
+ },
+ render: function () {
+ this.html(this.get('text'));
+ },
+ show: function () {
+ $('body').append(this.$el);
+ },
+ hide: function () {
+ this.$el.remove();
+ },
+ fade: function () {
+ // add class
+ this.$el.addClass('acf-fade-up');
+
+ // remove
+ this.setTimeout(function () {
+ this.remove();
+ }, 250);
+ },
+ html: function (html) {
+ this.$el.html(html);
+ },
+ position: function () {
+ // vars
+ var $tooltip = this.$el;
+ var $target = this.get('target');
+ if (!$target) return;
+
+ // Reset position.
+ $tooltip.removeClass('right left bottom top').css({
+ top: 0,
+ left: 0
+ });
+
+ // Declare tollerance to edge of screen.
+ var tolerance = 10;
+
+ // Find target position.
+ var targetWidth = $target.outerWidth();
+ var targetHeight = $target.outerHeight();
+ var targetTop = $target.offset().top;
+ var targetLeft = $target.offset().left;
+
+ // Find tooltip position.
+ var tooltipWidth = $tooltip.outerWidth();
+ var tooltipHeight = $tooltip.outerHeight();
+ var tooltipTop = $tooltip.offset().top; // Should be 0, but WP media grid causes this to be 32 (toolbar padding).
+
+ // Assume default top alignment.
+ var top = targetTop - tooltipHeight - tooltipTop;
+ var left = targetLeft + targetWidth / 2 - tooltipWidth / 2;
+
+ // Check if too far left.
+ if (left < tolerance) {
+ $tooltip.addClass('right');
+ left = targetLeft + targetWidth;
+ top = targetTop + targetHeight / 2 - tooltipHeight / 2 - tooltipTop;
+
+ // Check if too far right.
+ } else if (left + tooltipWidth + tolerance > $(window).width()) {
+ $tooltip.addClass('left');
+ left = targetLeft - tooltipWidth;
+ top = targetTop + targetHeight / 2 - tooltipHeight / 2 - tooltipTop;
+
+ // Check if too far up.
+ } else if (top - $(window).scrollTop() < tolerance) {
+ $tooltip.addClass('bottom');
+ top = targetTop + targetHeight - tooltipTop;
+
+ // No colision with edges.
+ } else {
+ $tooltip.addClass('top');
+ }
+
+ // update css
+ $tooltip.css({
+ top: top,
+ left: left
+ });
+ }
+ });
+ var TooltipConfirm = Tooltip.extend({
+ data: {
+ text: '',
+ textConfirm: '',
+ textCancel: '',
+ target: null,
+ targetConfirm: true,
+ confirm: function () {},
+ cancel: function () {},
+ context: false
+ },
+ events: {
+ 'click [data-event="cancel"]': 'onCancel',
+ 'click [data-event="confirm"]': 'onConfirm'
+ },
+ addEvents: function () {
+ // add events
+ acf.Model.prototype.addEvents.apply(this);
+
+ // vars
+ var $document = $(document);
+ var $target = this.get('target');
+
+ // add global 'cancel' click event
+ // - use timeout to avoid the current 'click' event triggering the onCancel function
+ this.setTimeout(function () {
+ this.on($document, 'click', 'onCancel');
+ });
+
+ // add target 'confirm' click event
+ // - allow setting to control this feature
+ if (this.get('targetConfirm')) {
+ this.on($target, 'click', 'onConfirm');
+ }
+ },
+ removeEvents: function () {
+ // remove events
+ acf.Model.prototype.removeEvents.apply(this);
+
+ // vars
+ var $document = $(document);
+ var $target = this.get('target');
+
+ // remove custom events
+ this.off($document, 'click');
+ this.off($target, 'click');
+ },
+ render: function () {
+ // defaults
+ var text = this.get('text') || acf.__('Are you sure?');
+ var textConfirm = this.get('textConfirm') || acf.__('Yes');
+ var textCancel = this.get('textCancel') || acf.__('No');
+
+ // html
+ var html = [text, '' + textConfirm + ' ', '' + textCancel + ' '].join(' ');
+
+ // html
+ this.html(html);
+
+ // class
+ this.$el.addClass('-confirm');
+ },
+ onCancel: function (e, $el) {
+ // prevent default
+ e.preventDefault();
+ e.stopImmediatePropagation();
+
+ // callback
+ var callback = this.get('cancel');
+ var context = this.get('context') || this;
+ callback.apply(context, arguments);
+
+ //remove
+ this.remove();
+ },
+ onConfirm: function (e, $el) {
+ // Prevent event from propagating completely to allow "targetConfirm" to be clicked.
+ e.preventDefault();
+ e.stopImmediatePropagation();
+
+ // callback
+ var callback = this.get('confirm');
+ var context = this.get('context') || this;
+ callback.apply(context, arguments);
+
+ //remove
+ this.remove();
+ }
+ });
+
+ // storage
+ acf.models.Tooltip = Tooltip;
+ acf.models.TooltipConfirm = TooltipConfirm;
+
+ /**
+ * tooltipManager
+ *
+ * description
+ *
+ * @date 17/4/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var tooltipHoverHelper = new acf.Model({
+ tooltip: false,
+ events: {
+ 'mouseenter .acf-js-tooltip': 'showTitle',
+ 'mouseup .acf-js-tooltip': 'hideTitle',
+ 'mouseleave .acf-js-tooltip': 'hideTitle',
+ 'focus .acf-js-tooltip': 'showTitle',
+ 'blur .acf-js-tooltip': 'hideTitle',
+ 'keyup .acf-js-tooltip': 'onKeyUp'
+ },
+ showTitle: function (e, $el) {
+ // vars
+ var title = $el.attr('title');
+
+ // bail early if no title
+ if (!title) {
+ return;
+ }
+
+ // clear title to avoid default browser tooltip
+ $el.attr('title', '');
+
+ // create
+ if (!this.tooltip) {
+ this.tooltip = acf.newTooltip({
+ text: title,
+ target: $el
+ });
+
+ // update
+ } else {
+ this.tooltip.update({
+ text: title,
+ target: $el
+ });
+ }
+ },
+ hideTitle: function (e, $el) {
+ // hide tooltip
+ this.tooltip.hide();
+
+ // restore title
+ $el.attr('title', this.tooltip.get('text'));
+ },
+ onKeyUp: function (e, $el) {
+ if ('Escape' === e.key) {
+ this.hideTitle(e, $el);
+ }
+ }
+ });
+})(jQuery);
+
+/***/ }),
+
+/***/ "./src/advanced-custom-fields-pro/assets/src/js/_acf.js":
+/*!**************************************************************!*\
+ !*** ./src/advanced-custom-fields-pro/assets/src/js/_acf.js ***!
+ \**************************************************************/
+/***/ (function() {
+
+(function ($, undefined) {
+ /**
+ * acf
+ *
+ * description
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ // The global acf object
+ var acf = {};
+
+ // Set as a browser global
+ window.acf = acf;
+
+ /** @var object Data sent from PHP */
+ acf.data = {};
+
+ /**
+ * get
+ *
+ * Gets a specific data value
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @return mixed
+ */
+
+ acf.get = function (name) {
+ return this.data[name] || null;
+ };
+
+ /**
+ * has
+ *
+ * Returns `true` if the data exists and is not null
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @return boolean
+ */
+
+ acf.has = function (name) {
+ return this.get(name) !== null;
+ };
+
+ /**
+ * set
+ *
+ * Sets a specific data value
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param mixed value
+ * @return this
+ */
+
+ acf.set = function (name, value) {
+ this.data[name] = value;
+ return this;
+ };
+
+ /**
+ * uniqueId
+ *
+ * Returns a unique ID
+ *
+ * @date 9/11/17
+ * @since 5.6.3
+ *
+ * @param string prefix Optional prefix.
+ * @return string
+ */
+
+ var idCounter = 0;
+ acf.uniqueId = function (prefix) {
+ var id = ++idCounter + '';
+ return prefix ? prefix + id : id;
+ };
+
+ /**
+ * acf.uniqueArray
+ *
+ * Returns a new array with only unique values
+ * Credit: https://stackoverflow.com/questions/1960473/get-all-unique-values-in-an-array-remove-duplicates
+ *
+ * @date 23/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.uniqueArray = function (array) {
+ function onlyUnique(value, index, self) {
+ return self.indexOf(value) === index;
+ }
+ return array.filter(onlyUnique);
+ };
+
+ /**
+ * uniqid
+ *
+ * Returns a unique ID (PHP version)
+ *
+ * @date 9/11/17
+ * @since 5.6.3
+ * @source http://locutus.io/php/misc/uniqid/
+ *
+ * @param string prefix Optional prefix.
+ * @return string
+ */
+
+ var uniqidSeed = '';
+ acf.uniqid = function (prefix, moreEntropy) {
+ // discuss at: http://locutus.io/php/uniqid/
+ // original by: Kevin van Zonneveld (http://kvz.io)
+ // revised by: Kankrelune (http://www.webfaktory.info/)
+ // note 1: Uses an internal counter (in locutus global) to avoid collision
+ // example 1: var $id = uniqid()
+ // example 1: var $result = $id.length === 13
+ // returns 1: true
+ // example 2: var $id = uniqid('foo')
+ // example 2: var $result = $id.length === (13 + 'foo'.length)
+ // returns 2: true
+ // example 3: var $id = uniqid('bar', true)
+ // example 3: var $result = $id.length === (23 + 'bar'.length)
+ // returns 3: true
+ if (typeof prefix === 'undefined') {
+ prefix = '';
+ }
+ var retId;
+ var formatSeed = function (seed, reqWidth) {
+ seed = parseInt(seed, 10).toString(16); // to hex str
+ if (reqWidth < seed.length) {
+ // so long we split
+ return seed.slice(seed.length - reqWidth);
+ }
+ if (reqWidth > seed.length) {
+ // so short we pad
+ return Array(1 + (reqWidth - seed.length)).join('0') + seed;
+ }
+ return seed;
+ };
+ if (!uniqidSeed) {
+ // init seed with big random int
+ uniqidSeed = Math.floor(Math.random() * 0x75bcd15);
+ }
+ uniqidSeed++;
+ retId = prefix; // start with prefix, add current milliseconds hex string
+ retId += formatSeed(parseInt(new Date().getTime() / 1000, 10), 8);
+ retId += formatSeed(uniqidSeed, 5); // add seed hex string
+ if (moreEntropy) {
+ // for more entropy we add a float lower to 10
+ retId += (Math.random() * 10).toFixed(8).toString();
+ }
+ return retId;
+ };
+
+ /**
+ * strReplace
+ *
+ * Performs a string replace
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string search
+ * @param string replace
+ * @param string subject
+ * @return string
+ */
+
+ acf.strReplace = function (search, replace, subject) {
+ return subject.split(search).join(replace);
+ };
+
+ /**
+ * strCamelCase
+ *
+ * Converts a string into camelCase
+ * Thanks to https://stackoverflow.com/questions/2970525/converting-any-string-into-camel-case
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string str
+ * @return string
+ */
+
+ acf.strCamelCase = function (str) {
+ var matches = str.match(/([a-zA-Z0-9]+)/g);
+ return matches ? matches.map(function (s, i) {
+ var c = s.charAt(0);
+ return (i === 0 ? c.toLowerCase() : c.toUpperCase()) + s.slice(1);
+ }).join('') : '';
+ };
+
+ /**
+ * strPascalCase
+ *
+ * Converts a string into PascalCase
+ * Thanks to https://stackoverflow.com/questions/1026069/how-do-i-make-the-first-letter-of-a-string-uppercase-in-javascript
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string str
+ * @return string
+ */
+
+ acf.strPascalCase = function (str) {
+ var camel = acf.strCamelCase(str);
+ return camel.charAt(0).toUpperCase() + camel.slice(1);
+ };
+
+ /**
+ * acf.strSlugify
+ *
+ * Converts a string into a HTML class friendly slug
+ *
+ * @date 21/3/18
+ * @since 5.6.9
+ *
+ * @param string str
+ * @return string
+ */
+
+ acf.strSlugify = function (str) {
+ return acf.strReplace('_', '-', str.toLowerCase());
+ };
+ acf.strSanitize = function (str) {
+ // chars (https://jsperf.com/replace-foreign-characters)
+ var map = {
+ À: 'A',
+ Á: 'A',
+ Â: 'A',
+ Ã: 'A',
+ Ä: 'A',
+ Å: 'A',
+ Æ: 'AE',
+ Ç: 'C',
+ È: 'E',
+ É: 'E',
+ Ê: 'E',
+ Ë: 'E',
+ Ì: 'I',
+ Í: 'I',
+ Î: 'I',
+ Ï: 'I',
+ Ð: 'D',
+ Ñ: 'N',
+ Ò: 'O',
+ Ó: 'O',
+ Ô: 'O',
+ Õ: 'O',
+ Ö: 'O',
+ Ø: 'O',
+ Ù: 'U',
+ Ú: 'U',
+ Û: 'U',
+ Ü: 'U',
+ Ý: 'Y',
+ ß: 's',
+ à: 'a',
+ á: 'a',
+ â: 'a',
+ ã: 'a',
+ ä: 'a',
+ å: 'a',
+ æ: 'ae',
+ ç: 'c',
+ è: 'e',
+ é: 'e',
+ ê: 'e',
+ ë: 'e',
+ ì: 'i',
+ í: 'i',
+ î: 'i',
+ ï: 'i',
+ ñ: 'n',
+ ò: 'o',
+ ó: 'o',
+ ô: 'o',
+ õ: 'o',
+ ö: 'o',
+ ø: 'o',
+ ù: 'u',
+ ú: 'u',
+ û: 'u',
+ ü: 'u',
+ ý: 'y',
+ ÿ: 'y',
+ Ā: 'A',
+ ā: 'a',
+ Ă: 'A',
+ ă: 'a',
+ Ą: 'A',
+ ą: 'a',
+ Ć: 'C',
+ ć: 'c',
+ Ĉ: 'C',
+ ĉ: 'c',
+ Ċ: 'C',
+ ċ: 'c',
+ Č: 'C',
+ č: 'c',
+ Ď: 'D',
+ ď: 'd',
+ Đ: 'D',
+ đ: 'd',
+ Ē: 'E',
+ ē: 'e',
+ Ĕ: 'E',
+ ĕ: 'e',
+ Ė: 'E',
+ ė: 'e',
+ Ę: 'E',
+ ę: 'e',
+ Ě: 'E',
+ ě: 'e',
+ Ĝ: 'G',
+ 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: 'z',
+ Ż: 'Z',
+ ż: 'z',
+ Ž: 'Z',
+ ž: 'z',
+ ſ: 's',
+ ƒ: 'f',
+ Ơ: 'O',
+ ơ: 'o',
+ Ư: 'U',
+ ư: 'u',
+ Ǎ: 'A',
+ ǎ: 'a',
+ Ǐ: 'I',
+ ǐ: 'i',
+ Ǒ: 'O',
+ ǒ: 'o',
+ Ǔ: 'U',
+ ǔ: 'u',
+ Ǖ: 'U',
+ ǖ: 'u',
+ Ǘ: 'U',
+ ǘ: 'u',
+ Ǚ: 'U',
+ ǚ: 'u',
+ Ǜ: 'U',
+ ǜ: 'u',
+ Ǻ: 'A',
+ ǻ: 'a',
+ Ǽ: 'AE',
+ ǽ: 'ae',
+ Ǿ: 'O',
+ ǿ: 'o',
+ // extra
+ ' ': '_',
+ "'": '',
+ '?': '',
+ '/': '',
+ '\\': '',
+ '.': '',
+ ',': '',
+ '`': '',
+ '>': '',
+ '<': '',
+ '"': '',
+ '[': '',
+ ']': '',
+ '|': '',
+ '{': '',
+ '}': '',
+ '(': '',
+ ')': ''
+ };
+
+ // vars
+ var nonWord = /\W/g;
+ var mapping = function (c) {
+ return map[c] !== undefined ? map[c] : c;
+ };
+
+ // replace
+ str = str.replace(nonWord, mapping);
+
+ // lowercase
+ str = str.toLowerCase();
+
+ // return
+ return str;
+ };
+
+ /**
+ * acf.strMatch
+ *
+ * Returns the number of characters that match between two strings
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.strMatch = function (s1, s2) {
+ // vars
+ var val = 0;
+ var min = Math.min(s1.length, s2.length);
+
+ // loop
+ for (var i = 0; i < min; i++) {
+ if (s1[i] !== s2[i]) {
+ break;
+ }
+ val++;
+ }
+
+ // return
+ return val;
+ };
+
+ /**
+ * Escapes HTML entities from a string.
+ *
+ * @date 08/06/2020
+ * @since 5.9.0
+ *
+ * @param string string The input string.
+ * @return string
+ */
+ acf.strEscape = function (string) {
+ var htmlEscapes = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": '''
+ };
+ return ('' + string).replace(/[&<>"']/g, function (chr) {
+ return htmlEscapes[chr];
+ });
+ };
+
+ // Tests.
+ //console.log( acf.strEscape('Test 1') );
+ //console.log( acf.strEscape('Test & 1') );
+ //console.log( acf.strEscape('Test\'s & 1') );
+ //console.log( acf.strEscape('') );
+
+ /**
+ * Unescapes HTML entities from a string.
+ *
+ * @date 08/06/2020
+ * @since 5.9.0
+ *
+ * @param string string The input string.
+ * @return string
+ */
+ acf.strUnescape = function (string) {
+ var htmlUnescapes = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ ''': "'"
+ };
+ return ('' + string).replace(/&|<|>|"|'/g, function (entity) {
+ return htmlUnescapes[entity];
+ });
+ };
+
+ // Tests.
+ //console.log( acf.strUnescape( acf.strEscape('Test 1') ) );
+ //console.log( acf.strUnescape( acf.strEscape('Test & 1') ) );
+ //console.log( acf.strUnescape( acf.strEscape('Test\'s & 1') ) );
+ //console.log( acf.strUnescape( acf.strEscape('') ) );
+
+ /**
+ * Escapes HTML entities from a string.
+ *
+ * @date 08/06/2020
+ * @since 5.9.0
+ *
+ * @param string string The input string.
+ * @return string
+ */
+ acf.escAttr = acf.strEscape;
+
+ /**
+ * Encodes ') );
+ //console.log( acf.escHtml( acf.strEscape('') ) );
+ //console.log( acf.escHtml( '' ) );
+
+ /**
+ * acf.decode
+ *
+ * description
+ *
+ * @date 13/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.decode = function (string) {
+ return $('').html(string).text();
+ };
+
+ /**
+ * parseArgs
+ *
+ * Merges together defaults and args much like the WP wp_parse_args function
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object args
+ * @param object defaults
+ * @return object
+ */
+
+ acf.parseArgs = function (args, defaults) {
+ if (typeof args !== 'object') args = {};
+ if (typeof defaults !== 'object') defaults = {};
+ return $.extend({}, defaults, args);
+ };
+
+ /**
+ * __
+ *
+ * Retrieve the translation of $text.
+ *
+ * @date 16/4/18
+ * @since 5.6.9
+ *
+ * @param string text Text to translate.
+ * @return string Translated text.
+ */
+
+ if (window.acfL10n == undefined) {
+ acfL10n = {};
+ }
+ acf.__ = function (text) {
+ return acfL10n[text] || text;
+ };
+
+ /**
+ * _x
+ *
+ * Retrieve translated string with gettext context.
+ *
+ * @date 16/4/18
+ * @since 5.6.9
+ *
+ * @param string text Text to translate.
+ * @param string context Context information for the translators.
+ * @return string Translated text.
+ */
+
+ acf._x = function (text, context) {
+ return acfL10n[text + '.' + context] || acfL10n[text] || text;
+ };
+
+ /**
+ * _n
+ *
+ * Retrieve the plural or single form based on the amount.
+ *
+ * @date 16/4/18
+ * @since 5.6.9
+ *
+ * @param string single Single text to translate.
+ * @param string plural Plural text to translate.
+ * @param int number The number to compare against.
+ * @return string Translated text.
+ */
+
+ acf._n = function (single, plural, number) {
+ if (number == 1) {
+ return acf.__(single);
+ } else {
+ return acf.__(plural);
+ }
+ };
+ acf.isArray = function (a) {
+ return Array.isArray(a);
+ };
+ acf.isObject = function (a) {
+ return typeof a === 'object';
+ };
+
+ /**
+ * serialize
+ *
+ * description
+ *
+ * @date 24/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var buildObject = function (obj, name, value) {
+ // replace [] with placeholder
+ name = name.replace('[]', '[%%index%%]');
+
+ // vars
+ var keys = name.match(/([^\[\]])+/g);
+ if (!keys) return;
+ var length = keys.length;
+ var ref = obj;
+
+ // loop
+ for (var i = 0; i < length; i++) {
+ // vars
+ var key = String(keys[i]);
+
+ // value
+ if (i == length - 1) {
+ // %%index%%
+ if (key === '%%index%%') {
+ ref.push(value);
+
+ // default
+ } else {
+ ref[key] = value;
+ }
+
+ // path
+ } else {
+ // array
+ if (keys[i + 1] === '%%index%%') {
+ if (!acf.isArray(ref[key])) {
+ ref[key] = [];
+ }
+
+ // object
+ } else {
+ if (!acf.isObject(ref[key])) {
+ ref[key] = {};
+ }
+ }
+
+ // crawl
+ ref = ref[key];
+ }
+ }
+ };
+ acf.serialize = function ($el, prefix) {
+ // vars
+ var obj = {};
+ var inputs = acf.serializeArray($el);
+
+ // prefix
+ if (prefix !== undefined) {
+ // filter and modify
+ inputs = inputs.filter(function (item) {
+ return item.name.indexOf(prefix) === 0;
+ }).map(function (item) {
+ item.name = item.name.slice(prefix.length);
+ return item;
+ });
+ }
+
+ // loop
+ for (var i = 0; i < inputs.length; i++) {
+ buildObject(obj, inputs[i].name, inputs[i].value);
+ }
+
+ // return
+ return obj;
+ };
+
+ /**
+ * acf.serializeArray
+ *
+ * Similar to $.serializeArray() but works with a parent wrapping element.
+ *
+ * @date 19/8/18
+ * @since 5.7.3
+ *
+ * @param jQuery $el The element or form to serialize.
+ * @return array
+ */
+
+ acf.serializeArray = function ($el) {
+ return $el.find('select, textarea, input').serializeArray();
+ };
+
+ /**
+ * acf.serializeForAjax
+ *
+ * Returns an object containing name => value data ready to be encoded for Ajax.
+ *
+ * @date 17/12/18
+ * @since 5.8.0
+ *
+ * @param jQUery $el The element or form to serialize.
+ * @return object
+ */
+ acf.serializeForAjax = function ($el) {
+ // vars
+ var data = {};
+ var index = {};
+
+ // Serialize inputs.
+ var inputs = acf.serializeArray($el);
+
+ // Loop over inputs and build data.
+ inputs.map(function (item) {
+ // Append to array.
+ if (item.name.slice(-2) === '[]') {
+ data[item.name] = data[item.name] || [];
+ data[item.name].push(item.value);
+ // Append
+ } else {
+ data[item.name] = item.value;
+ }
+ });
+
+ // return
+ return data;
+ };
+
+ /**
+ * addAction
+ *
+ * Wrapper for acf.hooks.addAction
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ /*
+ var prefixAction = function( action ){
+ return 'acf_' + action;
+ }
+ */
+
+ acf.addAction = function (action, callback, priority, context) {
+ //action = prefixAction(action);
+ acf.hooks.addAction.apply(this, arguments);
+ return this;
+ };
+
+ /**
+ * removeAction
+ *
+ * Wrapper for acf.hooks.removeAction
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ acf.removeAction = function (action, callback) {
+ //action = prefixAction(action);
+ acf.hooks.removeAction.apply(this, arguments);
+ return this;
+ };
+
+ /**
+ * doAction
+ *
+ * Wrapper for acf.hooks.doAction
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ var actionHistory = {};
+ //var currentAction = false;
+ acf.doAction = function (action) {
+ //action = prefixAction(action);
+ //currentAction = action;
+ actionHistory[action] = 1;
+ acf.hooks.doAction.apply(this, arguments);
+ actionHistory[action] = 0;
+ return this;
+ };
+
+ /**
+ * doingAction
+ *
+ * Return true if doing action
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ acf.doingAction = function (action) {
+ //action = prefixAction(action);
+ return actionHistory[action] === 1;
+ };
+
+ /**
+ * didAction
+ *
+ * Wrapper for acf.hooks.doAction
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ acf.didAction = function (action) {
+ //action = prefixAction(action);
+ return actionHistory[action] !== undefined;
+ };
+
+ /**
+ * currentAction
+ *
+ * Wrapper for acf.hooks.doAction
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ acf.currentAction = function () {
+ for (var k in actionHistory) {
+ if (actionHistory[k]) {
+ return k;
+ }
+ }
+ return false;
+ };
+
+ /**
+ * addFilter
+ *
+ * Wrapper for acf.hooks.addFilter
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ acf.addFilter = function (action) {
+ //action = prefixAction(action);
+ acf.hooks.addFilter.apply(this, arguments);
+ return this;
+ };
+
+ /**
+ * removeFilter
+ *
+ * Wrapper for acf.hooks.removeFilter
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ acf.removeFilter = function (action) {
+ //action = prefixAction(action);
+ acf.hooks.removeFilter.apply(this, arguments);
+ return this;
+ };
+
+ /**
+ * applyFilters
+ *
+ * Wrapper for acf.hooks.applyFilters
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ acf.applyFilters = function (action) {
+ //action = prefixAction(action);
+ return acf.hooks.applyFilters.apply(this, arguments);
+ };
+
+ /**
+ * getArgs
+ *
+ * description
+ *
+ * @date 15/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.arrayArgs = function (args) {
+ return Array.prototype.slice.call(args);
+ };
+
+ /**
+ * extendArgs
+ *
+ * description
+ *
+ * @date 15/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ /*
+ acf.extendArgs = function( ){
+ var args = Array.prototype.slice.call( arguments );
+ var realArgs = args.shift();
+
+ Array.prototype.push.call(arguments, 'bar')
+ return Array.prototype.push.apply( args, arguments );
+ };
+ */
+
+ // Preferences
+ // - use try/catch to avoid JS error if cookies are disabled on front-end form
+ try {
+ var preferences = JSON.parse(localStorage.getItem('acf')) || {};
+ } catch (e) {
+ var preferences = {};
+ }
+
+ /**
+ * getPreferenceName
+ *
+ * Gets the true preference name.
+ * Converts "this.thing" to "thing-123" if editing post 123.
+ *
+ * @date 11/11/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @return string
+ */
+
+ var getPreferenceName = function (name) {
+ if (name.substr(0, 5) === 'this.') {
+ name = name.substr(5) + '-' + acf.get('post_id');
+ }
+ return name;
+ };
+
+ /**
+ * acf.getPreference
+ *
+ * Gets a preference setting or null if not set.
+ *
+ * @date 11/11/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @return mixed
+ */
+
+ acf.getPreference = function (name) {
+ name = getPreferenceName(name);
+ return preferences[name] || null;
+ };
+
+ /**
+ * acf.setPreference
+ *
+ * Sets a preference setting.
+ *
+ * @date 11/11/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param mixed value
+ * @return n/a
+ */
+
+ acf.setPreference = function (name, value) {
+ name = getPreferenceName(name);
+ if (value === null) {
+ delete preferences[name];
+ } else {
+ preferences[name] = value;
+ }
+ localStorage.setItem('acf', JSON.stringify(preferences));
+ };
+
+ /**
+ * acf.removePreference
+ *
+ * Removes a preference setting.
+ *
+ * @date 11/11/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @return n/a
+ */
+
+ acf.removePreference = function (name) {
+ acf.setPreference(name, null);
+ };
+
+ /**
+ * remove
+ *
+ * Removes an element with fade effect
+ *
+ * @date 1/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.remove = function (props) {
+ // allow jQuery
+ if (props instanceof jQuery) {
+ props = {
+ target: props
+ };
+ }
+
+ // defaults
+ props = acf.parseArgs(props, {
+ target: false,
+ endHeight: 0,
+ complete: function () {}
+ });
+
+ // action
+ acf.doAction('remove', props.target);
+
+ // tr
+ if (props.target.is('tr')) {
+ removeTr(props);
+
+ // div
+ } else {
+ removeDiv(props);
+ }
+ };
+
+ /**
+ * removeDiv
+ *
+ * description
+ *
+ * @date 16/2/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var removeDiv = function (props) {
+ // vars
+ var $el = props.target;
+ var height = $el.height();
+ var width = $el.width();
+ var margin = $el.css('margin');
+ var outerHeight = $el.outerHeight(true);
+ var style = $el.attr('style') + ''; // needed to copy
+
+ // wrap
+ $el.wrap('
');
+ var $wrap = $el.parent();
+
+ // set pos
+ $el.css({
+ height: height,
+ width: width,
+ margin: margin,
+ position: 'absolute'
+ });
+
+ // fade wrap
+ setTimeout(function () {
+ $wrap.css({
+ opacity: 0,
+ height: props.endHeight
+ });
+ }, 50);
+
+ // remove
+ setTimeout(function () {
+ $el.attr('style', style);
+ $wrap.remove();
+ props.complete();
+ }, 301);
+ };
+
+ /**
+ * removeTr
+ *
+ * description
+ *
+ * @date 16/2/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var removeTr = function (props) {
+ // vars
+ var $tr = props.target;
+ var height = $tr.height();
+ var children = $tr.children().length;
+
+ // create dummy td
+ var $td = $(' ');
+
+ // fade away tr
+ $tr.addClass('acf-remove-element');
+
+ // update HTML after fade animation
+ setTimeout(function () {
+ $tr.html($td);
+ }, 251);
+
+ // allow .acf-temp-remove to exist before changing CSS
+ setTimeout(function () {
+ // remove class
+ $tr.removeClass('acf-remove-element');
+
+ // collapse
+ $td.css({
+ height: props.endHeight
+ });
+ }, 300);
+
+ // remove
+ setTimeout(function () {
+ $tr.remove();
+ props.complete();
+ }, 451);
+ };
+
+ /**
+ * duplicate
+ *
+ * description
+ *
+ * @date 3/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.duplicate = function (args) {
+ // allow jQuery
+ if (args instanceof jQuery) {
+ args = {
+ target: args
+ };
+ }
+
+ // defaults
+ args = acf.parseArgs(args, {
+ target: false,
+ search: '',
+ replace: '',
+ rename: true,
+ before: function ($el) {},
+ after: function ($el, $el2) {},
+ append: function ($el, $el2) {
+ $el.after($el2);
+ }
+ });
+
+ // compatibility
+ args.target = args.target || args.$el;
+
+ // vars
+ var $el = args.target;
+
+ // search
+ args.search = args.search || $el.attr('data-id');
+ args.replace = args.replace || acf.uniqid();
+
+ // before
+ // - allow acf to modify DOM
+ // - fixes bug where select field option is not selected
+ args.before($el);
+ acf.doAction('before_duplicate', $el);
+
+ // clone
+ var $el2 = $el.clone();
+
+ // rename
+ if (args.rename) {
+ acf.rename({
+ target: $el2,
+ search: args.search,
+ replace: args.replace,
+ replacer: typeof args.rename === 'function' ? args.rename : null
+ });
+ }
+
+ // remove classes
+ $el2.removeClass('acf-clone');
+ $el2.find('.ui-sortable').removeClass('ui-sortable');
+
+ // remove any initialised select2s prevent the duplicated object stealing the previous select2.
+ $el2.find('[data-select2-id]').removeAttr('data-select2-id');
+ $el2.find('.select2').remove();
+
+ // subfield select2 renames happen after init and contain a duplicated ID. force change those IDs to prevent this.
+ $el2.find('.acf-is-subfields select[data-ui="1"]').each(function () {
+ $(this).prop('id', $(this).prop('id').replace('acf_fields', acf.uniqid('duplicated_') + '_acf_fields'));
+ });
+
+ // remove tab wrapper to ensure proper init
+ $el2.find('.acf-field-settings > .acf-tab-wrap').remove();
+
+ // after
+ // - allow acf to modify DOM
+ args.after($el, $el2);
+ acf.doAction('after_duplicate', $el, $el2);
+
+ // append
+ args.append($el, $el2);
+
+ /**
+ * Fires after an element has been duplicated and appended to the DOM.
+ *
+ * @date 30/10/19
+ * @since 5.8.7
+ *
+ * @param jQuery $el The original element.
+ * @param jQuery $el2 The duplicated element.
+ */
+ acf.doAction('duplicate', $el, $el2);
+
+ // append
+ acf.doAction('append', $el2);
+
+ // return
+ return $el2;
+ };
+
+ /**
+ * rename
+ *
+ * description
+ *
+ * @date 7/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.rename = function (args) {
+ // Allow jQuery param.
+ if (args instanceof jQuery) {
+ args = {
+ target: args
+ };
+ }
+
+ // Apply default args.
+ args = acf.parseArgs(args, {
+ target: false,
+ destructive: false,
+ search: '',
+ replace: '',
+ replacer: null
+ });
+
+ // Extract args.
+ var $el = args.target;
+
+ // Provide backup for empty args.
+ if (!args.search) {
+ args.search = $el.attr('data-id');
+ }
+ if (!args.replace) {
+ args.replace = acf.uniqid('acf');
+ }
+ if (!args.replacer) {
+ args.replacer = function (name, value, search, replace) {
+ return value.replace(search, replace);
+ };
+ }
+
+ // Callback function for jQuery replacing.
+ var withReplacer = function (name) {
+ return function (i, value) {
+ return args.replacer(name, value, args.search, args.replace);
+ };
+ };
+
+ // Destructive Replace.
+ if (args.destructive) {
+ var html = acf.strReplace(args.search, args.replace, $el.outerHTML());
+ $el.replaceWith(html);
+
+ // Standard Replace.
+ } else {
+ $el.attr('data-id', args.replace);
+ $el.find('[id*="' + args.search + '"]').attr('id', withReplacer('id'));
+ $el.find('[for*="' + args.search + '"]').attr('for', withReplacer('for'));
+ $el.find('[name*="' + args.search + '"]').attr('name', withReplacer('name'));
+ }
+
+ // return
+ return $el;
+ };
+
+ /**
+ * acf.prepareForAjax
+ *
+ * description
+ *
+ * @date 4/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.prepareForAjax = function (data) {
+ // required
+ data.nonce = acf.get('nonce');
+ data.post_id = acf.get('post_id');
+
+ // language
+ if (acf.has('language')) {
+ data.lang = acf.get('language');
+ }
+
+ // filter for 3rd party customization
+ data = acf.applyFilters('prepare_for_ajax', data);
+
+ // return
+ return data;
+ };
+
+ /**
+ * acf.startButtonLoading
+ *
+ * description
+ *
+ * @date 5/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.startButtonLoading = function ($el) {
+ $el.prop('disabled', true);
+ $el.after(' ');
+ };
+ acf.stopButtonLoading = function ($el) {
+ $el.prop('disabled', false);
+ $el.next('.acf-loading').remove();
+ };
+
+ /**
+ * acf.showLoading
+ *
+ * description
+ *
+ * @date 12/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.showLoading = function ($el) {
+ $el.append('
');
+ };
+ acf.hideLoading = function ($el) {
+ $el.children('.acf-loading-overlay').remove();
+ };
+
+ /**
+ * acf.updateUserSetting
+ *
+ * description
+ *
+ * @date 5/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.updateUserSetting = function (name, value) {
+ var ajaxData = {
+ action: 'acf/ajax/user_setting',
+ name: name,
+ value: value
+ };
+ $.ajax({
+ url: acf.get('ajaxurl'),
+ data: acf.prepareForAjax(ajaxData),
+ type: 'post',
+ dataType: 'html'
+ });
+ };
+
+ /**
+ * acf.val
+ *
+ * description
+ *
+ * @date 8/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.val = function ($input, value, silent) {
+ // vars
+ var prevValue = $input.val();
+
+ // bail if no change
+ if (value === prevValue) {
+ return false;
+ }
+
+ // update value
+ $input.val(value);
+
+ // prevent select elements displaying blank value if option doesn't exist
+ if ($input.is('select') && $input.val() === null) {
+ $input.val(prevValue);
+ return false;
+ }
+
+ // update with trigger
+ if (silent !== true) {
+ $input.trigger('change');
+ }
+
+ // return
+ return true;
+ };
+
+ /**
+ * acf.show
+ *
+ * description
+ *
+ * @date 9/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.show = function ($el, lockKey) {
+ // unlock
+ if (lockKey) {
+ acf.unlock($el, 'hidden', lockKey);
+ }
+
+ // bail early if $el is still locked
+ if (acf.isLocked($el, 'hidden')) {
+ //console.log( 'still locked', getLocks( $el, 'hidden' ));
+ return false;
+ }
+
+ // $el is hidden, remove class and return true due to change in visibility
+ if ($el.hasClass('acf-hidden')) {
+ $el.removeClass('acf-hidden');
+ return true;
+
+ // $el is visible, return false due to no change in visibility
+ } else {
+ return false;
+ }
+ };
+
+ /**
+ * acf.hide
+ *
+ * description
+ *
+ * @date 9/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.hide = function ($el, lockKey) {
+ // lock
+ if (lockKey) {
+ acf.lock($el, 'hidden', lockKey);
+ }
+
+ // $el is hidden, return false due to no change in visibility
+ if ($el.hasClass('acf-hidden')) {
+ return false;
+
+ // $el is visible, add class and return true due to change in visibility
+ } else {
+ $el.addClass('acf-hidden');
+ return true;
+ }
+ };
+
+ /**
+ * acf.isHidden
+ *
+ * description
+ *
+ * @date 9/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.isHidden = function ($el) {
+ return $el.hasClass('acf-hidden');
+ };
+
+ /**
+ * acf.isVisible
+ *
+ * description
+ *
+ * @date 9/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.isVisible = function ($el) {
+ return !acf.isHidden($el);
+ };
+
+ /**
+ * enable
+ *
+ * description
+ *
+ * @date 12/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var enable = function ($el, lockKey) {
+ // check class. Allow .acf-disabled to overrule all JS
+ if ($el.hasClass('acf-disabled')) {
+ return false;
+ }
+
+ // unlock
+ if (lockKey) {
+ acf.unlock($el, 'disabled', lockKey);
+ }
+
+ // bail early if $el is still locked
+ if (acf.isLocked($el, 'disabled')) {
+ return false;
+ }
+
+ // $el is disabled, remove prop and return true due to change
+ if ($el.prop('disabled')) {
+ $el.prop('disabled', false);
+ return true;
+
+ // $el is enabled, return false due to no change
+ } else {
+ return false;
+ }
+ };
+
+ /**
+ * acf.enable
+ *
+ * description
+ *
+ * @date 9/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.enable = function ($el, lockKey) {
+ // enable single input
+ if ($el.attr('name')) {
+ return enable($el, lockKey);
+ }
+
+ // find and enable child inputs
+ // return true if any inputs have changed
+ var results = false;
+ $el.find('[name]').each(function () {
+ var result = enable($(this), lockKey);
+ if (result) {
+ results = true;
+ }
+ });
+ return results;
+ };
+
+ /**
+ * disable
+ *
+ * description
+ *
+ * @date 12/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var disable = function ($el, lockKey) {
+ // lock
+ if (lockKey) {
+ acf.lock($el, 'disabled', lockKey);
+ }
+
+ // $el is disabled, return false due to no change
+ if ($el.prop('disabled')) {
+ return false;
+
+ // $el is enabled, add prop and return true due to change
+ } else {
+ $el.prop('disabled', true);
+ return true;
+ }
+ };
+
+ /**
+ * acf.disable
+ *
+ * description
+ *
+ * @date 9/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.disable = function ($el, lockKey) {
+ // disable single input
+ if ($el.attr('name')) {
+ return disable($el, lockKey);
+ }
+
+ // find and enable child inputs
+ // return true if any inputs have changed
+ var results = false;
+ $el.find('[name]').each(function () {
+ var result = disable($(this), lockKey);
+ if (result) {
+ results = true;
+ }
+ });
+ return results;
+ };
+
+ /**
+ * acf.isset
+ *
+ * description
+ *
+ * @date 10/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.isset = function (obj /*, level1, level2, ... */) {
+ for (var i = 1; i < arguments.length; i++) {
+ if (!obj || !obj.hasOwnProperty(arguments[i])) {
+ return false;
+ }
+ obj = obj[arguments[i]];
+ }
+ return true;
+ };
+
+ /**
+ * acf.isget
+ *
+ * description
+ *
+ * @date 10/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.isget = function (obj /*, level1, level2, ... */) {
+ for (var i = 1; i < arguments.length; i++) {
+ if (!obj || !obj.hasOwnProperty(arguments[i])) {
+ return null;
+ }
+ obj = obj[arguments[i]];
+ }
+ return obj;
+ };
+
+ /**
+ * acf.getFileInputData
+ *
+ * description
+ *
+ * @date 10/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.getFileInputData = function ($input, callback) {
+ // vars
+ var value = $input.val();
+
+ // bail early if no value
+ if (!value) {
+ return false;
+ }
+
+ // data
+ var data = {
+ url: value
+ };
+
+ // modern browsers
+ var file = $input[0].files.length ? acf.isget($input[0].files, 0) : false;
+ if (file) {
+ // update data
+ data.size = file.size;
+ data.type = file.type;
+
+ // image
+ if (file.type.indexOf('image') > -1) {
+ // vars
+ var windowURL = window.URL || window.webkitURL;
+ var img = new Image();
+ img.onload = function () {
+ // update
+ data.width = this.width;
+ data.height = this.height;
+ callback(data);
+ };
+ img.src = windowURL.createObjectURL(file);
+ } else {
+ callback(data);
+ }
+ } else {
+ callback(data);
+ }
+ };
+
+ /**
+ * acf.isAjaxSuccess
+ *
+ * description
+ *
+ * @date 18/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.isAjaxSuccess = function (json) {
+ return json && json.success;
+ };
+
+ /**
+ * acf.getAjaxMessage
+ *
+ * description
+ *
+ * @date 18/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.getAjaxMessage = function (json) {
+ return acf.isget(json, 'data', 'message');
+ };
+
+ /**
+ * acf.getAjaxError
+ *
+ * description
+ *
+ * @date 18/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.getAjaxError = function (json) {
+ return acf.isget(json, 'data', 'error');
+ };
+
+ /**
+ * Returns the error message from an XHR object.
+ *
+ * @date 17/3/20
+ * @since 5.8.9
+ *
+ * @param object xhr The XHR object.
+ * @return (string)
+ */
+ acf.getXhrError = function (xhr) {
+ if (xhr.responseJSON) {
+ // Responses via `return new WP_Error();`
+ if (xhr.responseJSON.message) {
+ return xhr.responseJSON.message;
+ }
+
+ // Responses via `wp_send_json_error();`.
+ if (xhr.responseJSON.data && xhr.responseJSON.data.error) {
+ return xhr.responseJSON.data.error;
+ }
+ } else if (xhr.statusText) {
+ return xhr.statusText;
+ }
+ return '';
+ };
+
+ /**
+ * acf.renderSelect
+ *
+ * Renders the innter html for a select field.
+ *
+ * @date 19/2/18
+ * @since 5.6.9
+ *
+ * @param jQuery $select The select element.
+ * @param array choices An array of choices.
+ * @return void
+ */
+
+ acf.renderSelect = function ($select, choices) {
+ // vars
+ var value = $select.val();
+ var values = [];
+
+ // callback
+ var crawl = function (items) {
+ // vars
+ var itemsHtml = '';
+
+ // loop
+ items.map(function (item) {
+ // vars
+ var text = item.text || item.label || '';
+ var id = item.id || item.value || '';
+
+ // append
+ values.push(id);
+
+ // optgroup
+ if (item.children) {
+ itemsHtml += '' + crawl(item.children) + ' ';
+
+ // option
+ } else {
+ itemsHtml += '' + acf.strEscape(text) + ' ';
+ }
+ });
+
+ // return
+ return itemsHtml;
+ };
+
+ // update HTML
+ $select.html(crawl(choices));
+
+ // update value
+ if (values.indexOf(value) > -1) {
+ $select.val(value);
+ }
+
+ // return selected value
+ return $select.val();
+ };
+
+ /**
+ * acf.lock
+ *
+ * Creates a "lock" on an element for a given type and key
+ *
+ * @date 22/2/18
+ * @since 5.6.9
+ *
+ * @param jQuery $el The element to lock.
+ * @param string type The type of lock such as "condition" or "visibility".
+ * @param string key The key that will be used to unlock.
+ * @return void
+ */
+
+ var getLocks = function ($el, type) {
+ return $el.data('acf-lock-' + type) || [];
+ };
+ var setLocks = function ($el, type, locks) {
+ $el.data('acf-lock-' + type, locks);
+ };
+ acf.lock = function ($el, type, key) {
+ var locks = getLocks($el, type);
+ var i = locks.indexOf(key);
+ if (i < 0) {
+ locks.push(key);
+ setLocks($el, type, locks);
+ }
+ };
+
+ /**
+ * acf.unlock
+ *
+ * Unlocks a "lock" on an element for a given type and key
+ *
+ * @date 22/2/18
+ * @since 5.6.9
+ *
+ * @param jQuery $el The element to lock.
+ * @param string type The type of lock such as "condition" or "visibility".
+ * @param string key The key that will be used to unlock.
+ * @return void
+ */
+
+ acf.unlock = function ($el, type, key) {
+ var locks = getLocks($el, type);
+ var i = locks.indexOf(key);
+ if (i > -1) {
+ locks.splice(i, 1);
+ setLocks($el, type, locks);
+ }
+
+ // return true if is unlocked (no locks)
+ return locks.length === 0;
+ };
+
+ /**
+ * acf.isLocked
+ *
+ * Returns true if a lock exists for a given type
+ *
+ * @date 22/2/18
+ * @since 5.6.9
+ *
+ * @param jQuery $el The element to lock.
+ * @param string type The type of lock such as "condition" or "visibility".
+ * @return void
+ */
+
+ acf.isLocked = function ($el, type) {
+ return getLocks($el, type).length > 0;
+ };
+
+ /**
+ * acf.isGutenberg
+ *
+ * Returns true if the Gutenberg editor is being used.
+ *
+ * @date 14/11/18
+ * @since 5.8.0
+ *
+ * @param vois
+ * @return bool
+ */
+ acf.isGutenberg = function () {
+ return !!(window.wp && wp.data && wp.data.select && wp.data.select('core/editor'));
+ };
+
+ /**
+ * acf.objectToArray
+ *
+ * Returns an array of items from the given object.
+ *
+ * @date 20/11/18
+ * @since 5.8.0
+ *
+ * @param object obj The object of items.
+ * @return array
+ */
+ acf.objectToArray = function (obj) {
+ return Object.keys(obj).map(function (key) {
+ return obj[key];
+ });
+ };
+
+ /**
+ * acf.debounce
+ *
+ * Returns a debounced version of the passed function which will postpone its execution until after `wait` milliseconds have elapsed since the last time it was invoked.
+ *
+ * @date 28/8/19
+ * @since 5.8.1
+ *
+ * @param function callback The callback function.
+ * @return int wait The number of milliseconds to wait.
+ */
+ acf.debounce = function (callback, wait) {
+ var timeout;
+ return function () {
+ var context = this;
+ var args = arguments;
+ var later = function () {
+ callback.apply(context, args);
+ };
+ clearTimeout(timeout);
+ timeout = setTimeout(later, wait);
+ };
+ };
+
+ /**
+ * acf.throttle
+ *
+ * Returns a throttled version of the passed function which will allow only one execution per `limit` time period.
+ *
+ * @date 28/8/19
+ * @since 5.8.1
+ *
+ * @param function callback The callback function.
+ * @return int wait The number of milliseconds to wait.
+ */
+ acf.throttle = function (callback, limit) {
+ var busy = false;
+ return function () {
+ if (busy) return;
+ busy = true;
+ setTimeout(function () {
+ busy = false;
+ }, limit);
+ callback.apply(this, arguments);
+ };
+ };
+
+ /**
+ * acf.isInView
+ *
+ * Returns true if the given element is in view.
+ *
+ * @date 29/8/19
+ * @since 5.8.1
+ *
+ * @param elem el The dom element to inspect.
+ * @return bool
+ */
+ acf.isInView = function (el) {
+ if (el instanceof jQuery) {
+ el = el[0];
+ }
+ var rect = el.getBoundingClientRect();
+ return rect.top !== rect.bottom && rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
+ };
+
+ /**
+ * acf.onceInView
+ *
+ * Watches for a dom element to become visible in the browser and then excecutes the passed callback.
+ *
+ * @date 28/8/19
+ * @since 5.8.1
+ *
+ * @param dom el The dom element to inspect.
+ * @param function callback The callback function.
+ */
+ acf.onceInView = function () {
+ // Define list.
+ var items = [];
+ var id = 0;
+
+ // Define check function.
+ var check = function () {
+ items.forEach(function (item) {
+ if (acf.isInView(item.el)) {
+ item.callback.apply(this);
+ pop(item.id);
+ }
+ });
+ };
+
+ // And create a debounced version.
+ var debounced = acf.debounce(check, 300);
+
+ // Define add function.
+ var push = function (el, callback) {
+ // Add event listener.
+ if (!items.length) {
+ $(window).on('scroll resize', debounced).on('acfrefresh orientationchange', check);
+ }
+
+ // Append to list.
+ items.push({
+ id: id++,
+ el: el,
+ callback: callback
+ });
+ };
+
+ // Define remove function.
+ var pop = function (id) {
+ // Remove from list.
+ items = items.filter(function (item) {
+ return item.id !== id;
+ });
+
+ // Clean up listener.
+ if (!items.length) {
+ $(window).off('scroll resize', debounced).off('acfrefresh orientationchange', check);
+ }
+ };
+
+ // Define returned function.
+ return function (el, callback) {
+ // Allow jQuery object.
+ if (el instanceof jQuery) el = el[0];
+
+ // Execute callback if already in view or add to watch list.
+ if (acf.isInView(el)) {
+ callback.apply(this);
+ } else {
+ push(el, callback);
+ }
+ };
+ }();
+
+ /**
+ * acf.once
+ *
+ * Creates a function that is restricted to invoking `func` once.
+ *
+ * @date 2/9/19
+ * @since 5.8.1
+ *
+ * @param function func The function to restrict.
+ * @return function
+ */
+ acf.once = function (func) {
+ var i = 0;
+ return function () {
+ if (i++ > 0) {
+ return func = undefined;
+ }
+ return func.apply(this, arguments);
+ };
+ };
+
+ /**
+ * Focuses attention to a specific element.
+ *
+ * @date 05/05/2020
+ * @since 5.9.0
+ *
+ * @param jQuery $el The jQuery element to focus.
+ * @return void
+ */
+ acf.focusAttention = function ($el) {
+ var wait = 1000;
+
+ // Apply class to focus attention.
+ $el.addClass('acf-attention -focused');
+
+ // Scroll to element if needed.
+ var scrollTime = 500;
+ if (!acf.isInView($el)) {
+ $('body, html').animate({
+ scrollTop: $el.offset().top - $(window).height() / 2
+ }, scrollTime);
+ wait += scrollTime;
+ }
+
+ // Remove class after $wait amount of time.
+ var fadeTime = 250;
+ setTimeout(function () {
+ $el.removeClass('-focused');
+ setTimeout(function () {
+ $el.removeClass('acf-attention');
+ }, fadeTime);
+ }, wait);
+ };
+
+ /**
+ * Description
+ *
+ * @date 05/05/2020
+ * @since 5.9.0
+ *
+ * @param type Var Description.
+ * @return type Description.
+ */
+ acf.onFocus = function ($el, callback) {
+ // Only run once per element.
+ // if( $el.data('acf.onFocus') ) {
+ // return false;
+ // }
+
+ // Vars.
+ var ignoreBlur = false;
+ var focus = false;
+
+ // Functions.
+ var onFocus = function () {
+ ignoreBlur = true;
+ setTimeout(function () {
+ ignoreBlur = false;
+ }, 1);
+ setFocus(true);
+ };
+ var onBlur = function () {
+ if (!ignoreBlur) {
+ setFocus(false);
+ }
+ };
+ var addEvents = function () {
+ $(document).on('click', onBlur);
+ //$el.on('acfBlur', onBlur);
+ $el.on('blur', 'input, select, textarea', onBlur);
+ };
+ var removeEvents = function () {
+ $(document).off('click', onBlur);
+ //$el.off('acfBlur', onBlur);
+ $el.off('blur', 'input, select, textarea', onBlur);
+ };
+ var setFocus = function (value) {
+ if (focus === value) {
+ return;
+ }
+ if (value) {
+ addEvents();
+ } else {
+ removeEvents();
+ }
+ focus = value;
+ callback(value);
+ };
+
+ // Add events and set data.
+ $el.on('click', onFocus);
+ //$el.on('acfFocus', onFocus);
+ $el.on('focus', 'input, select, textarea', onFocus);
+ //$el.data('acf.onFocus', true);
+ };
+
+ /*
+ * exists
+ *
+ * This function will return true if a jQuery selection exists
+ *
+ * @type function
+ * @date 8/09/2014
+ * @since 5.0.0
+ *
+ * @param n/a
+ * @return (boolean)
+ */
+
+ $.fn.exists = function () {
+ return $(this).length > 0;
+ };
+
+ /*
+ * outerHTML
+ *
+ * This function will return a string containing the HTML of the selected element
+ *
+ * @type function
+ * @date 19/11/2013
+ * @since 5.0.0
+ *
+ * @param $.fn
+ * @return (string)
+ */
+
+ $.fn.outerHTML = function () {
+ return $(this).get(0).outerHTML;
+ };
+
+ /*
+ * indexOf
+ *
+ * This function will provide compatibility for ie8
+ *
+ * @type function
+ * @date 5/3/17
+ * @since 5.5.10
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ if (!Array.prototype.indexOf) {
+ Array.prototype.indexOf = function (val) {
+ return $.inArray(val, this);
+ };
+ }
+
+ /**
+ * Returns true if value is a number or a numeric string.
+ *
+ * @date 30/11/20
+ * @since 5.9.4
+ * @link https://stackoverflow.com/questions/9716468/pure-javascript-a-function-like-jquerys-isnumeric/9716488#9716488
+ *
+ * @param mixed n The variable being evaluated.
+ * @return bool.
+ */
+ acf.isNumeric = function (n) {
+ return !isNaN(parseFloat(n)) && isFinite(n);
+ };
+
+ /**
+ * Triggers a "refresh" action used by various Components to redraw the DOM.
+ *
+ * @date 26/05/2020
+ * @since 5.9.0
+ *
+ * @param void
+ * @return void
+ */
+ acf.refresh = acf.debounce(function () {
+ $(window).trigger('acfrefresh');
+ acf.doAction('refresh');
+ }, 0);
+
+ // Set up actions from events
+ $(document).ready(function () {
+ acf.doAction('ready');
+ });
+ $(window).on('load', function () {
+ // Use timeout to ensure action runs after Gutenberg has modified DOM elements during "DOMContentLoaded".
+ setTimeout(function () {
+ acf.doAction('load');
+ });
+ });
+ $(window).on('beforeunload', function () {
+ acf.doAction('unload');
+ });
+ $(window).on('resize', function () {
+ acf.doAction('resize');
+ });
+ $(document).on('sortstart', function (event, ui) {
+ acf.doAction('sortstart', ui.item, ui.placeholder);
+ });
+ $(document).on('sortstop', function (event, ui) {
+ acf.doAction('sortstop', ui.item, ui.placeholder);
+ });
+})(jQuery);
+
+/***/ })
+
+/******/ });
+/************************************************************************/
+/******/ // The module cache
+/******/ var __webpack_module_cache__ = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/ // Check if module is in cache
+/******/ var cachedModule = __webpack_module_cache__[moduleId];
+/******/ if (cachedModule !== undefined) {
+/******/ return cachedModule.exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = __webpack_module_cache__[moduleId] = {
+/******/ // no module.id needed
+/******/ // no module.loaded needed
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/************************************************************************/
+/******/ /* webpack/runtime/compat get default export */
+/******/ !function() {
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function() { return module['default']; } :
+/******/ function() { return module; };
+/******/ __webpack_require__.d(getter, { a: getter });
+/******/ return getter;
+/******/ };
+/******/ }();
+/******/
+/******/ /* webpack/runtime/define property getters */
+/******/ !function() {
+/******/ // define getter functions for harmony exports
+/******/ __webpack_require__.d = function(exports, definition) {
+/******/ for(var key in definition) {
+/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
+/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
+/******/ }
+/******/ }
+/******/ };
+/******/ }();
+/******/
+/******/ /* webpack/runtime/hasOwnProperty shorthand */
+/******/ !function() {
+/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
+/******/ }();
+/******/
+/******/ /* webpack/runtime/make namespace object */
+/******/ !function() {
+/******/ // define __esModule on exports
+/******/ __webpack_require__.r = function(exports) {
+/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ }
+/******/ Object.defineProperty(exports, '__esModule', { value: true });
+/******/ };
+/******/ }();
+/******/
+/************************************************************************/
+var __webpack_exports__ = {};
+// This entry need to be wrapped in an IIFE because it need to be in strict mode.
+!function() {
+"use strict";
+/*!*************************************************************!*\
+ !*** ./src/advanced-custom-fields-pro/assets/src/js/acf.js ***!
+ \*************************************************************/
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _acf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_acf.js */ "./src/advanced-custom-fields-pro/assets/src/js/_acf.js");
+/* harmony import */ var _acf_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_acf_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _acf_hooks_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_acf-hooks.js */ "./src/advanced-custom-fields-pro/assets/src/js/_acf-hooks.js");
+/* harmony import */ var _acf_hooks_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_acf_hooks_js__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var _acf_model_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_acf-model.js */ "./src/advanced-custom-fields-pro/assets/src/js/_acf-model.js");
+/* harmony import */ var _acf_model_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_acf_model_js__WEBPACK_IMPORTED_MODULE_2__);
+/* harmony import */ var _acf_popup_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_acf-popup.js */ "./src/advanced-custom-fields-pro/assets/src/js/_acf-popup.js");
+/* harmony import */ var _acf_popup_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_acf_popup_js__WEBPACK_IMPORTED_MODULE_3__);
+/* harmony import */ var _acf_modal_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./_acf-modal.js */ "./src/advanced-custom-fields-pro/assets/src/js/_acf-modal.js");
+/* harmony import */ var _acf_modal_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_acf_modal_js__WEBPACK_IMPORTED_MODULE_4__);
+/* harmony import */ var _acf_panel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./_acf-panel.js */ "./src/advanced-custom-fields-pro/assets/src/js/_acf-panel.js");
+/* harmony import */ var _acf_panel_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_acf_panel_js__WEBPACK_IMPORTED_MODULE_5__);
+/* harmony import */ var _acf_notice_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./_acf-notice.js */ "./src/advanced-custom-fields-pro/assets/src/js/_acf-notice.js");
+/* harmony import */ var _acf_notice_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_acf_notice_js__WEBPACK_IMPORTED_MODULE_6__);
+/* harmony import */ var _acf_tooltip_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./_acf-tooltip.js */ "./src/advanced-custom-fields-pro/assets/src/js/_acf-tooltip.js");
+/* harmony import */ var _acf_tooltip_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_acf_tooltip_js__WEBPACK_IMPORTED_MODULE_7__);
+
+
+
+
+
+
+
+
+}();
+/******/ })()
+;
+//# sourceMappingURL=acf.js.map
\ No newline at end of file
diff --git a/assets/build/js/acf.js.map b/assets/build/js/acf.js.map
new file mode 100644
index 0000000..cb36de9
--- /dev/null
+++ b/assets/build/js/acf.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"acf.js","mappings":";;;;;;;;;AAAA,CAAE,UAAWA,MAAM,EAAEC,SAAS,EAAG;EAChC,YAAY;;EAEZ;AACD;AACA;AACA;EACC,IAAIC,YAAY,GAAG,SAAAA,CAAA,EAAY;IAC9B;AACF;AACA;IACE,IAAIC,gBAAgB,GAAG;MACtBC,YAAY,EAAEA,YAAY;MAC1BC,Y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,EAAEiJ,EAAE,CAACC,WAAW,CAAE;EACrD,CAAC,CAAE;EAEHpmB,CAAC,CAAEiF,QAAQ,CAAE,CAACL,EAAE,CAAE,UAAU,EAAE,UAAWI,KAAK,EAAEmhB,EAAE,EAAG;IACpDpmB,GAAG,CAACvC,QAAQ,CAAE,UAAU,EAAE2oB,EAAE,CAACjJ,IAAI,EAAEiJ,EAAE,CAACC,WAAW,CAAE;EACpD,CAAC,CAAE;AACJ,CAAC,EAAI3jB,MAAM,CAAE;;;;;;UCtiFb;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACNmB;AACM;AACA;AACA;AACA;AACA;AACC","sources":["webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/_acf-hooks.js","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/_acf-modal.js","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/_acf-model.js","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/_acf-notice.js","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/_acf-panel.js","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/_acf-popup.js","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/_acf-tooltip.js","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/_acf.js","webpack://advanced-custom-fields-pro/webpack/bootstrap","webpack://advanced-custom-fields-pro/webpack/runtime/compat get default export","webpack://advanced-custom-fields-pro/webpack/runtime/define property getters","webpack://advanced-custom-fields-pro/webpack/runtime/hasOwnProperty shorthand","webpack://advanced-custom-fields-pro/webpack/runtime/make namespace object","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/acf.js"],"sourcesContent":["( function ( window, undefined ) {\n\t'use strict';\n\n\t/**\n\t * Handles managing all events for whatever you plug it into. Priorities for hooks are based on lowest to highest in\n\t * that, lowest priority hooks are fired first.\n\t */\n\tvar EventManager = function () {\n\t\t/**\n\t\t * Maintain a reference to the object scope so our public methods never get confusing.\n\t\t */\n\t\tvar MethodsAvailable = {\n\t\t\tremoveFilter: removeFilter,\n\t\t\tapplyFilters: applyFilters,\n\t\t\taddFilter: addFilter,\n\t\t\tremoveAction: removeAction,\n\t\t\tdoAction: doAction,\n\t\t\taddAction: addAction,\n\t\t\tstorage: getStorage,\n\t\t};\n\n\t\t/**\n\t\t * Contains the hooks that get registered with this EventManager. The array for storage utilizes a \"flat\"\n\t\t * object literal such that looking up the hook utilizes the native object literal hash.\n\t\t */\n\t\tvar STORAGE = {\n\t\t\tactions: {},\n\t\t\tfilters: {},\n\t\t};\n\n\t\tfunction getStorage() {\n\t\t\treturn STORAGE;\n\t\t}\n\n\t\t/**\n\t\t * Adds an action to the event manager.\n\t\t *\n\t\t * @param action Must contain namespace.identifier\n\t\t * @param callback Must be a valid callback function before this action is added\n\t\t * @param [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook\n\t\t * @param [context] Supply a value to be used for this\n\t\t */\n\t\tfunction addAction( action, callback, priority, context ) {\n\t\t\tif (\n\t\t\t\ttypeof action === 'string' &&\n\t\t\t\ttypeof callback === 'function'\n\t\t\t) {\n\t\t\t\tpriority = parseInt( priority || 10, 10 );\n\t\t\t\t_addHook( 'actions', action, callback, priority, context );\n\t\t\t}\n\n\t\t\treturn MethodsAvailable;\n\t\t}\n\n\t\t/**\n\t\t * Performs an action if it exists. You can pass as many arguments as you want to this function; the only rule is\n\t\t * that the first argument must always be the action.\n\t\t */\n\t\tfunction doAction(/* action, arg1, arg2, ... */) {\n\t\t\tvar args = Array.prototype.slice.call( arguments );\n\t\t\tvar action = args.shift();\n\n\t\t\tif ( typeof action === 'string' ) {\n\t\t\t\t_runHook( 'actions', action, args );\n\t\t\t}\n\n\t\t\treturn MethodsAvailable;\n\t\t}\n\n\t\t/**\n\t\t * Removes the specified action if it contains a namespace.identifier & exists.\n\t\t *\n\t\t * @param action The action to remove\n\t\t * @param [callback] Callback function to remove\n\t\t */\n\t\tfunction removeAction( action, callback ) {\n\t\t\tif ( typeof action === 'string' ) {\n\t\t\t\t_removeHook( 'actions', action, callback );\n\t\t\t}\n\n\t\t\treturn MethodsAvailable;\n\t\t}\n\n\t\t/**\n\t\t * Adds a filter to the event manager.\n\t\t *\n\t\t * @param filter Must contain namespace.identifier\n\t\t * @param callback Must be a valid callback function before this action is added\n\t\t * @param [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook\n\t\t * @param [context] Supply a value to be used for this\n\t\t */\n\t\tfunction addFilter( filter, callback, priority, context ) {\n\t\t\tif (\n\t\t\t\ttypeof filter === 'string' &&\n\t\t\t\ttypeof callback === 'function'\n\t\t\t) {\n\t\t\t\tpriority = parseInt( priority || 10, 10 );\n\t\t\t\t_addHook( 'filters', filter, callback, priority, context );\n\t\t\t}\n\n\t\t\treturn MethodsAvailable;\n\t\t}\n\n\t\t/**\n\t\t * Performs a filter if it exists. You should only ever pass 1 argument to be filtered. The only rule is that\n\t\t * the first argument must always be the filter.\n\t\t */\n\t\tfunction applyFilters(/* filter, filtered arg, arg2, ... */) {\n\t\t\tvar args = Array.prototype.slice.call( arguments );\n\t\t\tvar filter = args.shift();\n\n\t\t\tif ( typeof filter === 'string' ) {\n\t\t\t\treturn _runHook( 'filters', filter, args );\n\t\t\t}\n\n\t\t\treturn MethodsAvailable;\n\t\t}\n\n\t\t/**\n\t\t * Removes the specified filter if it contains a namespace.identifier & exists.\n\t\t *\n\t\t * @param filter The action to remove\n\t\t * @param [callback] Callback function to remove\n\t\t */\n\t\tfunction removeFilter( filter, callback ) {\n\t\t\tif ( typeof filter === 'string' ) {\n\t\t\t\t_removeHook( 'filters', filter, callback );\n\t\t\t}\n\n\t\t\treturn MethodsAvailable;\n\t\t}\n\n\t\t/**\n\t\t * Removes the specified hook by resetting the value of it.\n\t\t *\n\t\t * @param type Type of hook, either 'actions' or 'filters'\n\t\t * @param hook The hook (namespace.identifier) to remove\n\t\t * @private\n\t\t */\n\t\tfunction _removeHook( type, hook, callback, context ) {\n\t\t\tif ( ! STORAGE[ type ][ hook ] ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( ! callback ) {\n\t\t\t\tSTORAGE[ type ][ hook ] = [];\n\t\t\t} else {\n\t\t\t\tvar handlers = STORAGE[ type ][ hook ];\n\t\t\t\tvar i;\n\t\t\t\tif ( ! context ) {\n\t\t\t\t\tfor ( i = handlers.length; i--; ) {\n\t\t\t\t\t\tif ( handlers[ i ].callback === callback ) {\n\t\t\t\t\t\t\thandlers.splice( i, 1 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor ( i = handlers.length; i--; ) {\n\t\t\t\t\t\tvar handler = handlers[ i ];\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\thandler.callback === callback &&\n\t\t\t\t\t\t\thandler.context === context\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\thandlers.splice( i, 1 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Adds the hook to the appropriate storage container\n\t\t *\n\t\t * @param type 'actions' or 'filters'\n\t\t * @param hook The hook (namespace.identifier) to add to our event manager\n\t\t * @param callback The function that will be called when the hook is executed.\n\t\t * @param priority The priority of this hook. Must be an integer.\n\t\t * @param [context] A value to be used for this\n\t\t * @private\n\t\t */\n\t\tfunction _addHook( type, hook, callback, priority, context ) {\n\t\t\tvar hookObject = {\n\t\t\t\tcallback: callback,\n\t\t\t\tpriority: priority,\n\t\t\t\tcontext: context,\n\t\t\t};\n\n\t\t\t// Utilize 'prop itself' : http://jsperf.com/hasownproperty-vs-in-vs-undefined/19\n\t\t\tvar hooks = STORAGE[ type ][ hook ];\n\t\t\tif ( hooks ) {\n\t\t\t\thooks.push( hookObject );\n\t\t\t\thooks = _hookInsertSort( hooks );\n\t\t\t} else {\n\t\t\t\thooks = [ hookObject ];\n\t\t\t}\n\n\t\t\tSTORAGE[ type ][ hook ] = hooks;\n\t\t}\n\n\t\t/**\n\t\t * Use an insert sort for keeping our hooks organized based on priority. This function is ridiculously faster\n\t\t * than bubble sort, etc: http://jsperf.com/javascript-sort\n\t\t *\n\t\t * @param hooks The custom array containing all of the appropriate hooks to perform an insert sort on.\n\t\t * @private\n\t\t */\n\t\tfunction _hookInsertSort( hooks ) {\n\t\t\tvar tmpHook, j, prevHook;\n\t\t\tfor ( var i = 1, len = hooks.length; i < len; i++ ) {\n\t\t\t\ttmpHook = hooks[ i ];\n\t\t\t\tj = i;\n\t\t\t\twhile (\n\t\t\t\t\t( prevHook = hooks[ j - 1 ] ) &&\n\t\t\t\t\tprevHook.priority > tmpHook.priority\n\t\t\t\t) {\n\t\t\t\t\thooks[ j ] = hooks[ j - 1 ];\n\t\t\t\t\t--j;\n\t\t\t\t}\n\t\t\t\thooks[ j ] = tmpHook;\n\t\t\t}\n\n\t\t\treturn hooks;\n\t\t}\n\n\t\t/**\n\t\t * Runs the specified hook. If it is an action, the value is not modified but if it is a filter, it is.\n\t\t *\n\t\t * @param type 'actions' or 'filters'\n\t\t * @param hook The hook ( namespace.identifier ) to be ran.\n\t\t * @param args Arguments to pass to the action/filter. If it's a filter, args is actually a single parameter.\n\t\t * @private\n\t\t */\n\t\tfunction _runHook( type, hook, args ) {\n\t\t\tvar handlers = STORAGE[ type ][ hook ];\n\n\t\t\tif ( ! handlers ) {\n\t\t\t\treturn type === 'filters' ? args[ 0 ] : false;\n\t\t\t}\n\n\t\t\tvar i = 0,\n\t\t\t\tlen = handlers.length;\n\t\t\tif ( type === 'filters' ) {\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\targs[ 0 ] = handlers[ i ].callback.apply(\n\t\t\t\t\t\thandlers[ i ].context,\n\t\t\t\t\t\targs\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\thandlers[ i ].callback.apply( handlers[ i ].context, args );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn type === 'filters' ? args[ 0 ] : true;\n\t\t}\n\n\t\t// return all of the publicly available methods\n\t\treturn MethodsAvailable;\n\t};\n\n\t// instantiate\n\tacf.hooks = new EventManager();\n} )( window );\n","( function ( $, undefined ) {\n\tacf.models.Modal = acf.Model.extend( {\n\t\tdata: {\n\t\t\ttitle: '',\n\t\t\tcontent: '',\n\t\t\ttoolbar: '',\n\t\t},\n\t\tevents: {\n\t\t\t'click .acf-modal-close': 'onClickClose',\n\t\t},\n\t\tsetup: function ( props ) {\n\t\t\t$.extend( this.data, props );\n\t\t\tthis.$el = $();\n\t\t\tthis.render();\n\t\t},\n\t\tinitialize: function () {\n\t\t\tthis.open();\n\t\t},\n\t\trender: function () {\n\t\t\t// Extract vars.\n\t\t\tvar title = this.get( 'title' );\n\t\t\tvar content = this.get( 'content' );\n\t\t\tvar toolbar = this.get( 'toolbar' );\n\n\t\t\t// Create element.\n\t\t\tvar $el = $(\n\t\t\t\t[\n\t\t\t\t\t'',\n\t\t\t\t\t'
',\n\t\t\t\t\t'
',\n\t\t\t\t\t'
' + title + ' ',\n\t\t\t\t\t' ',\n\t\t\t\t\t'',\n\t\t\t\t\t'
' + content + '
',\n\t\t\t\t\t'
' + toolbar + '
',\n\t\t\t\t\t'
',\n\t\t\t\t\t'
',\n\t\t\t\t\t'
',\n\t\t\t\t].join( '' )\n\t\t\t);\n\n\t\t\t// Update DOM.\n\t\t\tif ( this.$el ) {\n\t\t\t\tthis.$el.replaceWith( $el );\n\t\t\t}\n\t\t\tthis.$el = $el;\n\n\t\t\t// Trigger action.\n\t\t\tacf.doAction( 'append', $el );\n\t\t},\n\t\tupdate: function ( props ) {\n\t\t\tthis.data = acf.parseArgs( props, this.data );\n\t\t\tthis.render();\n\t\t},\n\t\ttitle: function ( title ) {\n\t\t\tthis.$( '.acf-modal-title h2' ).html( title );\n\t\t},\n\t\tcontent: function ( content ) {\n\t\t\tthis.$( '.acf-modal-content' ).html( content );\n\t\t},\n\t\ttoolbar: function ( toolbar ) {\n\t\t\tthis.$( '.acf-modal-toolbar' ).html( toolbar );\n\t\t},\n\t\topen: function () {\n\t\t\t$( 'body' ).append( this.$el );\n\t\t},\n\t\tclose: function () {\n\t\t\tthis.remove();\n\t\t},\n\t\tonClickClose: function ( e, $el ) {\n\t\t\te.preventDefault();\n\t\t\tthis.close();\n\t\t},\n\n\t\t/**\n\t\t * Places focus within the popup.\n\t\t */\n\t\tfocus: function() {\n\t\t\tthis.$el.find( '.acf-icon' ).first().trigger( 'focus' );\n\t\t},\n\n\t\t/**\n\t\t * Locks focus within the modal.\n\t\t *\n\t\t * @param {boolean} locked True to lock focus, false to unlock.\n\t\t */\n\t\tlockFocusToModal: function( locked ) {\n\t\t\tlet inertElement = $( '#wpwrap' );\n\n\t\t\tif ( ! inertElement.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinertElement[ 0 ].inert = locked;\n\t\t\tinertElement.attr( 'aria-hidden', locked );\n\t\t},\n\n\t\t/**\n\t\t * Returns focus to the element that opened the popup\n\t\t * if it still exists in the DOM.\n\t\t */\n\t\treturnFocusToOrigin: function() {\n\t\t\tif (\n\t\t\t\tthis.data.openedBy instanceof $\n\t\t\t\t&& this.data.openedBy.closest( 'body' ).length > 0\n\t\t\t) {\n\t\t\t\tthis.data.openedBy.trigger( 'focus' );\n\t\t\t}\n\t\t}\n\t} );\n\n\t/**\n\t * Returns a new modal.\n\t *\n\t * @date\t21/4/20\n\t * @since\t5.9.0\n\t *\n\t * @param\tobject props The modal props.\n\t * @return\tobject\n\t */\n\tacf.newModal = function ( props ) {\n\t\treturn new acf.models.Modal( props );\n\t};\n} )( jQuery );\n","( function ( $, undefined ) {\n\t// Cached regex to split keys for `addEvent`.\n\tvar delegateEventSplitter = /^(\\S+)\\s*(.*)$/;\n\n\t/**\n\t * extend\n\t *\n\t * Helper function to correctly set up the prototype chain for subclasses\n\t * Heavily inspired by backbone.js\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tobject protoProps New properties for this object.\n\t * @return\tfunction.\n\t */\n\n\tvar extend = function ( protoProps ) {\n\t\t// vars\n\t\tvar Parent = this;\n\t\tvar Child;\n\n\t\t// The constructor function for the new subclass is either defined by you\n\t\t// (the \"constructor\" property in your `extend` definition), or defaulted\n\t\t// by us to simply call the parent constructor.\n\t\tif ( protoProps && protoProps.hasOwnProperty( 'constructor' ) ) {\n\t\t\tChild = protoProps.constructor;\n\t\t} else {\n\t\t\tChild = function () {\n\t\t\t\treturn Parent.apply( this, arguments );\n\t\t\t};\n\t\t}\n\n\t\t// Add static properties to the constructor function, if supplied.\n\t\t$.extend( Child, Parent );\n\n\t\t// Set the prototype chain to inherit from `parent`, without calling\n\t\t// `parent`'s constructor function and add the prototype properties.\n\t\tChild.prototype = Object.create( Parent.prototype );\n\t\t$.extend( Child.prototype, protoProps );\n\t\tChild.prototype.constructor = Child;\n\n\t\t// Set a convenience property in case the parent's prototype is needed later.\n\t\t//Child.prototype.__parent__ = Parent.prototype;\n\n\t\t// return\n\t\treturn Child;\n\t};\n\n\t/**\n\t * Model\n\t *\n\t * Base class for all inheritence\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tobject props\n\t * @return\tfunction.\n\t */\n\n\tvar Model = ( acf.Model = function () {\n\t\t// generate uique client id\n\t\tthis.cid = acf.uniqueId( 'acf' );\n\n\t\t// set vars to avoid modifying prototype\n\t\tthis.data = $.extend( true, {}, this.data );\n\n\t\t// pass props to setup function\n\t\tthis.setup.apply( this, arguments );\n\n\t\t// store on element (allow this.setup to create this.$el)\n\t\tif ( this.$el && ! this.$el.data( 'acf' ) ) {\n\t\t\tthis.$el.data( 'acf', this );\n\t\t}\n\n\t\t// initialize\n\t\tvar initialize = function () {\n\t\t\tthis.initialize();\n\t\t\tthis.addEvents();\n\t\t\tthis.addActions();\n\t\t\tthis.addFilters();\n\t\t};\n\n\t\t// initialize on action\n\t\tif ( this.wait && ! acf.didAction( this.wait ) ) {\n\t\t\tthis.addAction( this.wait, initialize );\n\n\t\t\t// initialize now\n\t\t} else {\n\t\t\tinitialize.apply( this );\n\t\t}\n\t} );\n\n\t// Attach all inheritable methods to the Model prototype.\n\t$.extend( Model.prototype, {\n\t\t// Unique model id\n\t\tid: '',\n\n\t\t// Unique client id\n\t\tcid: '',\n\n\t\t// jQuery element\n\t\t$el: null,\n\n\t\t// Data specific to this instance\n\t\tdata: {},\n\n\t\t// toggle used when changing data\n\t\tbusy: false,\n\t\tchanged: false,\n\n\t\t// Setup events hooks\n\t\tevents: {},\n\t\tactions: {},\n\t\tfilters: {},\n\n\t\t// class used to avoid nested event triggers\n\t\teventScope: '',\n\n\t\t// action to wait until initialize\n\t\twait: false,\n\n\t\t// action priority default\n\t\tpriority: 10,\n\n\t\t/**\n\t\t * get\n\t\t *\n\t\t * Gets a specific data value\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tstring name\n\t\t * @return\tmixed\n\t\t */\n\n\t\tget: function ( name ) {\n\t\t\treturn this.data[ name ];\n\t\t},\n\n\t\t/**\n\t\t * has\n\t\t *\n\t\t * Returns `true` if the data exists and is not null\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tstring name\n\t\t * @return\tboolean\n\t\t */\n\n\t\thas: function ( name ) {\n\t\t\treturn this.get( name ) != null;\n\t\t},\n\n\t\t/**\n\t\t * set\n\t\t *\n\t\t * Sets a specific data value\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tstring name\n\t\t * @param\tmixed value\n\t\t * @return\tthis\n\t\t */\n\n\t\tset: function ( name, value, silent ) {\n\t\t\t// bail if unchanged\n\t\t\tvar prevValue = this.get( name );\n\t\t\tif ( prevValue == value ) {\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\t// set data\n\t\t\tthis.data[ name ] = value;\n\n\t\t\t// trigger events\n\t\t\tif ( ! silent ) {\n\t\t\t\tthis.changed = true;\n\t\t\t\tthis.trigger( 'changed:' + name, [ value, prevValue ] );\n\t\t\t\tthis.trigger( 'changed', [ name, value, prevValue ] );\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * inherit\n\t\t *\n\t\t * Inherits the data from a jQuery element\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tjQuery $el\n\t\t * @return\tthis\n\t\t */\n\n\t\tinherit: function ( data ) {\n\t\t\t// allow jQuery\n\t\t\tif ( data instanceof jQuery ) {\n\t\t\t\tdata = data.data();\n\t\t\t}\n\n\t\t\t// extend\n\t\t\t$.extend( this.data, data );\n\n\t\t\t// return\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * prop\n\t\t *\n\t\t * mimics the jQuery prop function\n\t\t *\n\t\t * @date\t4/6/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\ttype $var Description. Default.\n\t\t * @return\ttype Description.\n\t\t */\n\n\t\tprop: function () {\n\t\t\treturn this.$el.prop.apply( this.$el, arguments );\n\t\t},\n\n\t\t/**\n\t\t * setup\n\t\t *\n\t\t * Run during constructor function\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tn/a\n\t\t * @return\tn/a\n\t\t */\n\n\t\tsetup: function ( props ) {\n\t\t\t$.extend( this, props );\n\t\t},\n\n\t\t/**\n\t\t * initialize\n\t\t *\n\t\t * Also run during constructor function\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tn/a\n\t\t * @return\tn/a\n\t\t */\n\n\t\tinitialize: function () {},\n\n\t\t/**\n\t\t * addElements\n\t\t *\n\t\t * Adds multiple jQuery elements to this object\n\t\t *\n\t\t * @date\t9/5/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\ttype $var Description. Default.\n\t\t * @return\ttype Description.\n\t\t */\n\n\t\taddElements: function ( elements ) {\n\t\t\telements = elements || this.elements || null;\n\t\t\tif ( ! elements || ! Object.keys( elements ).length ) return false;\n\t\t\tfor ( var i in elements ) {\n\t\t\t\tthis.addElement( i, elements[ i ] );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * addElement\n\t\t *\n\t\t * description\n\t\t *\n\t\t * @date\t9/5/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\ttype $var Description. Default.\n\t\t * @return\ttype Description.\n\t\t */\n\n\t\taddElement: function ( name, selector ) {\n\t\t\tthis[ '$' + name ] = this.$( selector );\n\t\t},\n\n\t\t/**\n\t\t * addEvents\n\t\t *\n\t\t * Adds multiple event handlers\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tobject events {event1 : callback, event2 : callback, etc }\n\t\t * @return\tn/a\n\t\t */\n\n\t\taddEvents: function ( events ) {\n\t\t\tevents = events || this.events || null;\n\t\t\tif ( ! events ) return false;\n\t\t\tfor ( var key in events ) {\n\t\t\t\tvar match = key.match( delegateEventSplitter );\n\t\t\t\tthis.on( match[ 1 ], match[ 2 ], events[ key ] );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * removeEvents\n\t\t *\n\t\t * Removes multiple event handlers\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tobject events {event1 : callback, event2 : callback, etc }\n\t\t * @return\tn/a\n\t\t */\n\n\t\tremoveEvents: function ( events ) {\n\t\t\tevents = events || this.events || null;\n\t\t\tif ( ! events ) return false;\n\t\t\tfor ( var key in events ) {\n\t\t\t\tvar match = key.match( delegateEventSplitter );\n\t\t\t\tthis.off( match[ 1 ], match[ 2 ], events[ key ] );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * getEventTarget\n\t\t *\n\t\t * Returns a jQuery element to trigger an event on.\n\t\t *\n\t\t * @date\t5/6/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\tjQuery $el\t\tThe default jQuery element. Optional.\n\t\t * @param\tstring event\tThe event name. Optional.\n\t\t * @return\tjQuery\n\t\t */\n\n\t\tgetEventTarget: function ( $el, event ) {\n\t\t\treturn $el || this.$el || $( document );\n\t\t},\n\n\t\t/**\n\t\t * validateEvent\n\t\t *\n\t\t * Returns true if the event target's closest $el is the same as this.$el\n\t\t * Requires both this.el and this.$el to be defined\n\t\t *\n\t\t * @date\t5/6/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\ttype $var Description. Default.\n\t\t * @return\ttype Description.\n\t\t */\n\n\t\tvalidateEvent: function ( e ) {\n\t\t\tif ( this.eventScope ) {\n\t\t\t\treturn $( e.target ).closest( this.eventScope ).is( this.$el );\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * proxyEvent\n\t\t *\n\t\t * Returns a new event callback function scoped to this model\n\t\t *\n\t\t * @date\t29/3/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\tfunction callback\n\t\t * @return\tfunction\n\t\t */\n\n\t\tproxyEvent: function ( callback ) {\n\t\t\treturn this.proxy( function ( e ) {\n\t\t\t\t// validate\n\t\t\t\tif ( ! this.validateEvent( e ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// construct args\n\t\t\t\tvar args = acf.arrayArgs( arguments );\n\t\t\t\tvar extraArgs = args.slice( 1 );\n\t\t\t\tvar eventArgs = [ e, $( e.currentTarget ) ].concat( extraArgs );\n\n\t\t\t\t// callback\n\t\t\t\tcallback.apply( this, eventArgs );\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * on\n\t\t *\n\t\t * Adds an event handler similar to jQuery\n\t\t * Uses the instance 'cid' to namespace event\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tstring name\n\t\t * @param\tstring callback\n\t\t * @return\tn/a\n\t\t */\n\n\t\ton: function ( a1, a2, a3, a4 ) {\n\t\t\t// vars\n\t\t\tvar $el, event, selector, callback, args;\n\n\t\t\t// find args\n\t\t\tif ( a1 instanceof jQuery ) {\n\t\t\t\t// 1. args( $el, event, selector, callback )\n\t\t\t\tif ( a4 ) {\n\t\t\t\t\t$el = a1;\n\t\t\t\t\tevent = a2;\n\t\t\t\t\tselector = a3;\n\t\t\t\t\tcallback = a4;\n\n\t\t\t\t\t// 2. args( $el, event, callback )\n\t\t\t\t} else {\n\t\t\t\t\t$el = a1;\n\t\t\t\t\tevent = a2;\n\t\t\t\t\tcallback = a3;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// 3. args( event, selector, callback )\n\t\t\t\tif ( a3 ) {\n\t\t\t\t\tevent = a1;\n\t\t\t\t\tselector = a2;\n\t\t\t\t\tcallback = a3;\n\n\t\t\t\t\t// 4. args( event, callback )\n\t\t\t\t} else {\n\t\t\t\t\tevent = a1;\n\t\t\t\t\tcallback = a2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// element\n\t\t\t$el = this.getEventTarget( $el );\n\n\t\t\t// modify callback\n\t\t\tif ( typeof callback === 'string' ) {\n\t\t\t\tcallback = this.proxyEvent( this[ callback ] );\n\t\t\t}\n\n\t\t\t// modify event\n\t\t\tevent = event + '.' + this.cid;\n\n\t\t\t// args\n\t\t\tif ( selector ) {\n\t\t\t\targs = [ event, selector, callback ];\n\t\t\t} else {\n\t\t\t\targs = [ event, callback ];\n\t\t\t}\n\n\t\t\t// on()\n\t\t\t$el.on.apply( $el, args );\n\t\t},\n\n\t\t/**\n\t\t * off\n\t\t *\n\t\t * Removes an event handler similar to jQuery\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tstring name\n\t\t * @param\tstring callback\n\t\t * @return\tn/a\n\t\t */\n\n\t\toff: function ( a1, a2, a3 ) {\n\t\t\t// vars\n\t\t\tvar $el, event, selector, args;\n\n\t\t\t// find args\n\t\t\tif ( a1 instanceof jQuery ) {\n\t\t\t\t// 1. args( $el, event, selector )\n\t\t\t\tif ( a3 ) {\n\t\t\t\t\t$el = a1;\n\t\t\t\t\tevent = a2;\n\t\t\t\t\tselector = a3;\n\n\t\t\t\t\t// 2. args( $el, event )\n\t\t\t\t} else {\n\t\t\t\t\t$el = a1;\n\t\t\t\t\tevent = a2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// 3. args( event, selector )\n\t\t\t\tif ( a2 ) {\n\t\t\t\t\tevent = a1;\n\t\t\t\t\tselector = a2;\n\n\t\t\t\t\t// 4. args( event )\n\t\t\t\t} else {\n\t\t\t\t\tevent = a1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// element\n\t\t\t$el = this.getEventTarget( $el );\n\n\t\t\t// modify event\n\t\t\tevent = event + '.' + this.cid;\n\n\t\t\t// args\n\t\t\tif ( selector ) {\n\t\t\t\targs = [ event, selector ];\n\t\t\t} else {\n\t\t\t\targs = [ event ];\n\t\t\t}\n\n\t\t\t// off()\n\t\t\t$el.off.apply( $el, args );\n\t\t},\n\n\t\t/**\n\t\t * trigger\n\t\t *\n\t\t * Triggers an event similar to jQuery\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tstring name\n\t\t * @param\tstring callback\n\t\t * @return\tn/a\n\t\t */\n\n\t\ttrigger: function ( name, args, bubbles ) {\n\t\t\tvar $el = this.getEventTarget();\n\t\t\tif ( bubbles ) {\n\t\t\t\t$el.trigger.apply( $el, arguments );\n\t\t\t} else {\n\t\t\t\t$el.triggerHandler.apply( $el, arguments );\n\t\t\t}\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * addActions\n\t\t *\n\t\t * Adds multiple action handlers\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tobject actions {action1 : callback, action2 : callback, etc }\n\t\t * @return\tn/a\n\t\t */\n\n\t\taddActions: function ( actions ) {\n\t\t\tactions = actions || this.actions || null;\n\t\t\tif ( ! actions ) return false;\n\t\t\tfor ( var i in actions ) {\n\t\t\t\tthis.addAction( i, actions[ i ] );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * removeActions\n\t\t *\n\t\t * Removes multiple action handlers\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tobject actions {action1 : callback, action2 : callback, etc }\n\t\t * @return\tn/a\n\t\t */\n\n\t\tremoveActions: function ( actions ) {\n\t\t\tactions = actions || this.actions || null;\n\t\t\tif ( ! actions ) return false;\n\t\t\tfor ( var i in actions ) {\n\t\t\t\tthis.removeAction( i, actions[ i ] );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * addAction\n\t\t *\n\t\t * Adds an action using the wp.hooks library\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tstring name\n\t\t * @param\tstring callback\n\t\t * @return\tn/a\n\t\t */\n\n\t\taddAction: function ( name, callback, priority ) {\n\t\t\t//console.log('addAction', name, priority);\n\t\t\t// defaults\n\t\t\tpriority = priority || this.priority;\n\n\t\t\t// modify callback\n\t\t\tif ( typeof callback === 'string' ) {\n\t\t\t\tcallback = this[ callback ];\n\t\t\t}\n\n\t\t\t// add\n\t\t\tacf.addAction( name, callback, priority, this );\n\t\t},\n\n\t\t/**\n\t\t * removeAction\n\t\t *\n\t\t * Remove an action using the wp.hooks library\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tstring name\n\t\t * @param\tstring callback\n\t\t * @return\tn/a\n\t\t */\n\n\t\tremoveAction: function ( name, callback ) {\n\t\t\tacf.removeAction( name, this[ callback ] );\n\t\t},\n\n\t\t/**\n\t\t * addFilters\n\t\t *\n\t\t * Adds multiple filter handlers\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tobject filters {filter1 : callback, filter2 : callback, etc }\n\t\t * @return\tn/a\n\t\t */\n\n\t\taddFilters: function ( filters ) {\n\t\t\tfilters = filters || this.filters || null;\n\t\t\tif ( ! filters ) return false;\n\t\t\tfor ( var i in filters ) {\n\t\t\t\tthis.addFilter( i, filters[ i ] );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * addFilter\n\t\t *\n\t\t * Adds a filter using the wp.hooks library\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tstring name\n\t\t * @param\tstring callback\n\t\t * @return\tn/a\n\t\t */\n\n\t\taddFilter: function ( name, callback, priority ) {\n\t\t\t// defaults\n\t\t\tpriority = priority || this.priority;\n\n\t\t\t// modify callback\n\t\t\tif ( typeof callback === 'string' ) {\n\t\t\t\tcallback = this[ callback ];\n\t\t\t}\n\n\t\t\t// add\n\t\t\tacf.addFilter( name, callback, priority, this );\n\t\t},\n\n\t\t/**\n\t\t * removeFilters\n\t\t *\n\t\t * Removes multiple filter handlers\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tobject filters {filter1 : callback, filter2 : callback, etc }\n\t\t * @return\tn/a\n\t\t */\n\n\t\tremoveFilters: function ( filters ) {\n\t\t\tfilters = filters || this.filters || null;\n\t\t\tif ( ! filters ) return false;\n\t\t\tfor ( var i in filters ) {\n\t\t\t\tthis.removeFilter( i, filters[ i ] );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * removeFilter\n\t\t *\n\t\t * Remove a filter using the wp.hooks library\n\t\t *\n\t\t * @date\t14/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\tstring name\n\t\t * @param\tstring callback\n\t\t * @return\tn/a\n\t\t */\n\n\t\tremoveFilter: function ( name, callback ) {\n\t\t\tacf.removeFilter( name, this[ callback ] );\n\t\t},\n\n\t\t/**\n\t\t * $\n\t\t *\n\t\t * description\n\t\t *\n\t\t * @date\t16/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\ttype $var Description. Default.\n\t\t * @return\ttype Description.\n\t\t */\n\n\t\t$: function ( selector ) {\n\t\t\treturn this.$el.find( selector );\n\t\t},\n\n\t\t/**\n\t\t * remove\n\t\t *\n\t\t * Removes the element and listenters\n\t\t *\n\t\t * @date\t19/12/17\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\ttype $var Description. Default.\n\t\t * @return\ttype Description.\n\t\t */\n\n\t\tremove: function () {\n\t\t\tthis.removeEvents();\n\t\t\tthis.removeActions();\n\t\t\tthis.removeFilters();\n\t\t\tthis.$el.remove();\n\t\t},\n\n\t\t/**\n\t\t * setTimeout\n\t\t *\n\t\t * description\n\t\t *\n\t\t * @date\t16/1/18\n\t\t * @since\t5.6.5\n\t\t *\n\t\t * @param\ttype $var Description. Default.\n\t\t * @return\ttype Description.\n\t\t */\n\n\t\tsetTimeout: function ( callback, milliseconds ) {\n\t\t\treturn setTimeout( this.proxy( callback ), milliseconds );\n\t\t},\n\n\t\t/**\n\t\t * time\n\t\t *\n\t\t * used for debugging\n\t\t *\n\t\t * @date\t7/3/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\ttype $var Description. Default.\n\t\t * @return\ttype Description.\n\t\t */\n\n\t\ttime: function () {\n\t\t\tconsole.time( this.id || this.cid );\n\t\t},\n\n\t\t/**\n\t\t * timeEnd\n\t\t *\n\t\t * used for debugging\n\t\t *\n\t\t * @date\t7/3/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\ttype $var Description. Default.\n\t\t * @return\ttype Description.\n\t\t */\n\n\t\ttimeEnd: function () {\n\t\t\tconsole.timeEnd( this.id || this.cid );\n\t\t},\n\n\t\t/**\n\t\t * show\n\t\t *\n\t\t * description\n\t\t *\n\t\t * @date\t15/3/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\ttype $var Description. Default.\n\t\t * @return\ttype Description.\n\t\t */\n\n\t\tshow: function () {\n\t\t\tacf.show( this.$el );\n\t\t},\n\n\t\t/**\n\t\t * hide\n\t\t *\n\t\t * description\n\t\t *\n\t\t * @date\t15/3/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\ttype $var Description. Default.\n\t\t * @return\ttype Description.\n\t\t */\n\n\t\thide: function () {\n\t\t\tacf.hide( this.$el );\n\t\t},\n\n\t\t/**\n\t\t * proxy\n\t\t *\n\t\t * Returns a new function scoped to this model\n\t\t *\n\t\t * @date\t29/3/18\n\t\t * @since\t5.6.9\n\t\t *\n\t\t * @param\tfunction callback\n\t\t * @return\tfunction\n\t\t */\n\n\t\tproxy: function ( callback ) {\n\t\t\treturn $.proxy( callback, this );\n\t\t},\n\t} );\n\n\t// Set up inheritance for the model\n\tModel.extend = extend;\n\n\t// Global model storage\n\tacf.models = {};\n\n\t/**\n\t * acf.getInstance\n\t *\n\t * This function will get an instance from an element\n\t *\n\t * @date\t5/3/18\n\t * @since\t5.6.9\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.getInstance = function ( $el ) {\n\t\treturn $el.data( 'acf' );\n\t};\n\n\t/**\n\t * acf.getInstances\n\t *\n\t * This function will get an array of instances from multiple elements\n\t *\n\t * @date\t5/3/18\n\t * @since\t5.6.9\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.getInstances = function ( $el ) {\n\t\tvar instances = [];\n\t\t$el.each( function () {\n\t\t\tinstances.push( acf.getInstance( $( this ) ) );\n\t\t} );\n\t\treturn instances;\n\t};\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar Notice = acf.Model.extend( {\n\t\tdata: {\n\t\t\ttext: '',\n\t\t\ttype: '',\n\t\t\ttimeout: 0,\n\t\t\tdismiss: true,\n\t\t\ttarget: false,\n\t\t\tclose: function () {},\n\t\t},\n\n\t\tevents: {\n\t\t\t'click .acf-notice-dismiss': 'onClickClose',\n\t\t},\n\n\t\ttmpl: function () {\n\t\t\treturn '
';\n\t\t},\n\n\t\tsetup: function ( props ) {\n\t\t\t$.extend( this.data, props );\n\t\t\tthis.$el = $( this.tmpl() );\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\t// render\n\t\t\tthis.render();\n\n\t\t\t// show\n\t\t\tthis.show();\n\t\t},\n\n\t\trender: function () {\n\t\t\t// class\n\t\t\tthis.type( this.get( 'type' ) );\n\n\t\t\t// text\n\t\t\tthis.html( '' + this.get( 'text' ) + '
' );\n\n\t\t\t// close\n\t\t\tif ( this.get( 'dismiss' ) ) {\n\t\t\t\tthis.$el.append(\n\t\t\t\t\t' '\n\t\t\t\t);\n\t\t\t\tthis.$el.addClass( '-dismiss' );\n\t\t\t}\n\n\t\t\t// timeout\n\t\t\tvar timeout = this.get( 'timeout' );\n\t\t\tif ( timeout ) {\n\t\t\t\tthis.away( timeout );\n\t\t\t}\n\t\t},\n\n\t\tupdate: function ( props ) {\n\t\t\t// update\n\t\t\t$.extend( this.data, props );\n\n\t\t\t// re-initialize\n\t\t\tthis.initialize();\n\n\t\t\t// refresh events\n\t\t\tthis.removeEvents();\n\t\t\tthis.addEvents();\n\t\t},\n\n\t\tshow: function () {\n\t\t\tvar $target = this.get( 'target' );\n\t\t\tif ( $target ) {\n\t\t\t\t$target.prepend( this.$el );\n\t\t\t}\n\t\t},\n\n\t\thide: function () {\n\t\t\tthis.$el.remove();\n\t\t},\n\n\t\taway: function ( timeout ) {\n\t\t\tthis.setTimeout( function () {\n\t\t\t\tacf.remove( this.$el );\n\t\t\t}, timeout );\n\t\t},\n\n\t\ttype: function ( type ) {\n\t\t\t// remove prev type\n\t\t\tvar prevType = this.get( 'type' );\n\t\t\tif ( prevType ) {\n\t\t\t\tthis.$el.removeClass( '-' + prevType );\n\t\t\t}\n\n\t\t\t// add new type\n\t\t\tthis.$el.addClass( '-' + type );\n\n\t\t\t// backwards compatibility\n\t\t\tif ( type == 'error' ) {\n\t\t\t\tthis.$el.addClass( 'acf-error-message' );\n\t\t\t}\n\t\t},\n\n\t\thtml: function ( html ) {\n\t\t\tthis.$el.html( acf.escHtml( html ) );\n\t\t},\n\n\t\ttext: function ( text ) {\n\t\t\tthis.$( 'p' ).html( acf.escHtml( text ) );\n\t\t},\n\n\t\tonClickClose: function ( e, $el ) {\n\t\t\te.preventDefault();\n\t\t\tthis.get( 'close' ).apply( this, arguments );\n\t\t\tthis.remove();\n\t\t},\n\t} );\n\n\tacf.newNotice = function ( props ) {\n\t\t// ensure object\n\t\tif ( typeof props !== 'object' ) {\n\t\t\tprops = { text: props };\n\t\t}\n\n\t\t// instantiate\n\t\treturn new Notice( props );\n\t};\n\n\tvar noticeManager = new acf.Model( {\n\t\twait: 'prepare',\n\t\tpriority: 1,\n\t\tinitialize: function () {\n\t\t\tconst $notices = $( '.acf-admin-notice' );\n\n\t\t\t$notices.each( function() {\n\t\t\t\t// Move to avoid WP flicker.\n\t\t\t\tif ( $( this ).length ) {\n\t\t\t\t\t$( 'h1:first' ).after( $( this ) );\n\t\t\t\t}\n\n\t\t\t\tif ( $( this ).data( 'persisted' ) ) {\n\t\t\t\t\tlet dismissed = acf.getPreference( 'dismissed-notices' );\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tdismissed &&\n\t\t\t\t\t\ttypeof dismissed == 'object' &&\n\t\t\t\t\t\tdismissed.includes( $( this ).data( 'persist-id' ) )\n\t\t\t\t\t) {\n\t\t\t\t\t\t$( this ).remove();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$( this ).on( 'click', '.notice-dismiss', function ( e ) {\n\t\t\t\t\t\t\tdismissed = acf.getPreference( 'dismissed-notices' );\n\t\t\t\t\t\t\tif ( ! dismissed || typeof dismissed != 'object' ) {\n\t\t\t\t\t\t\t\tdismissed = [];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdismissed.push( $( this ).closest( '.acf-admin-notice' ).data( 'persist-id' ) );\n\t\t\t\t\t\t\tacf.setPreference( 'dismissed-notices', dismissed );\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\t} );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tvar panel = new acf.Model( {\n\t\tevents: {\n\t\t\t'click .acf-panel-title': 'onClick',\n\t\t},\n\n\t\tonClick: function ( e, $el ) {\n\t\t\te.preventDefault();\n\t\t\tthis.toggle( $el.parent() );\n\t\t},\n\n\t\tisOpen: function ( $el ) {\n\t\t\treturn $el.hasClass( '-open' );\n\t\t},\n\n\t\ttoggle: function ( $el ) {\n\t\t\tthis.isOpen( $el ) ? this.close( $el ) : this.open( $el );\n\t\t},\n\n\t\topen: function ( $el ) {\n\t\t\t$el.addClass( '-open' );\n\t\t\t$el.find( '.acf-panel-title i' ).attr(\n\t\t\t\t'class',\n\t\t\t\t'dashicons dashicons-arrow-down'\n\t\t\t);\n\t\t},\n\n\t\tclose: function ( $el ) {\n\t\t\t$el.removeClass( '-open' );\n\t\t\t$el.find( '.acf-panel-title i' ).attr(\n\t\t\t\t'class',\n\t\t\t\t'dashicons dashicons-arrow-right'\n\t\t\t);\n\t\t},\n\t} );\n} )( jQuery );\n","( function ( $, undefined ) {\n\tacf.models.Popup = acf.Model.extend( {\n\t\tdata: {\n\t\t\ttitle: '',\n\t\t\tcontent: '',\n\t\t\twidth: 0,\n\t\t\theight: 0,\n\t\t\tloading: false,\n\t\t\topenedBy: null,\n\t\t},\n\n\t\tevents: {\n\t\t\t'click [data-event=\"close\"]': 'onClickClose',\n\t\t\t'click .acf-close-popup': 'onClickClose',\n\t\t\t'keydown': 'onPressEscapeClose',\n\t\t},\n\n\t\tsetup: function ( props ) {\n\t\t\t$.extend( this.data, props );\n\t\t\tthis.$el = $( this.tmpl() );\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\tthis.render();\n\t\t\tthis.open();\n\t\t\tthis.focus();\n\t\t\tthis.lockFocusToPopup( true );\n\t\t},\n\n\t\ttmpl: function () {\n\t\t\treturn [\n\t\t\t\t'',\n\t\t\t].join( '' );\n\t\t},\n\n\t\trender: function () {\n\t\t\t// Extract Vars.\n\t\t\tvar title = this.get( 'title' );\n\t\t\tvar content = this.get( 'content' );\n\t\t\tvar loading = this.get( 'loading' );\n\t\t\tvar width = this.get( 'width' );\n\t\t\tvar height = this.get( 'height' );\n\n\t\t\t// Update.\n\t\t\tthis.title( title );\n\t\t\tthis.content( content );\n\t\t\tif ( width ) {\n\t\t\t\tthis.$( '.acf-popup-box' ).css( 'width', width );\n\t\t\t}\n\t\t\tif ( height ) {\n\t\t\t\tthis.$( '.acf-popup-box' ).css( 'min-height', height );\n\t\t\t}\n\t\t\tthis.loading( loading );\n\n\t\t\t// Trigger action.\n\t\t\tacf.doAction( 'append', this.$el );\n\t\t},\n\n\t\t/**\n\t\t * Places focus within the popup.\n\t\t */\n\t\tfocus: function() {\n\t\t\tthis.$el.find( '.acf-icon' ).first().trigger( 'focus' );\n\t\t},\n\n\t\t/**\n\t\t * Locks focus within the popup.\n\t\t *\n\t\t * @param {boolean} locked True to lock focus, false to unlock.\n\t\t */\n\t\tlockFocusToPopup: function( locked ) {\n\t\t\tlet inertElement = $( '#wpwrap' );\n\n\t\t\tif ( ! inertElement.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinertElement[ 0 ].inert = locked;\n\t\t\tinertElement.attr( 'aria-hidden', locked );\n\t\t},\n\n\t\tupdate: function ( props ) {\n\t\t\tthis.data = acf.parseArgs( props, this.data );\n\t\t\tthis.render();\n\t\t},\n\n\t\ttitle: function ( title ) {\n\t\t\tthis.$( '.title:first h3' ).html( title );\n\t\t},\n\n\t\tcontent: function ( content ) {\n\t\t\tthis.$( '.inner:first' ).html( content );\n\t\t},\n\n\t\tloading: function ( show ) {\n\t\t\tvar $loading = this.$( '.loading:first' );\n\t\t\tshow ? $loading.show() : $loading.hide();\n\t\t},\n\n\t\topen: function () {\n\t\t\t$( 'body' ).append( this.$el );\n\t\t},\n\n\t\tclose: function () {\n\t\t\tthis.lockFocusToPopup( false );\n\t\t\tthis.returnFocusToOrigin();\n\t\t\tthis.remove();\n\t\t},\n\n\t\tonClickClose: function ( e, $el ) {\n\t\t\te.preventDefault();\n\t\t\tthis.close();\n\t\t},\n\n\t\t/**\n\t\t * Closes the popup when the escape key is pressed.\n\t\t *\n\t\t * @param {KeyboardEvent} e\n\t\t */\n\t\tonPressEscapeClose: function( e ) {\n\t\t\tif ( e.key === 'Escape' ) {\n\t\t\t\tthis.close();\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Returns focus to the element that opened the popup\n\t\t * if it still exists in the DOM.\n\t\t */\n\t\treturnFocusToOrigin: function() {\n\t\t\tif (\n\t\t\t\tthis.data.openedBy instanceof $\n\t\t\t\t&& this.data.openedBy.closest( 'body' ).length > 0\n\t\t\t) {\n\t\t\t\tthis.data.openedBy.trigger( 'focus' );\n\t\t\t}\n\t\t}\n\n\t} );\n\n\t/**\n\t * newPopup\n\t *\n\t * Creates a new Popup with the supplied props\n\t *\n\t * @date\t17/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tobject props\n\t * @return\tobject\n\t */\n\n\tacf.newPopup = function ( props ) {\n\t\treturn new acf.models.Popup( props );\n\t};\n} )( jQuery );\n","( function ( $, undefined ) {\n\tacf.newTooltip = function ( props ) {\n\t\t// ensure object\n\t\tif ( typeof props !== 'object' ) {\n\t\t\tprops = { text: props };\n\t\t}\n\n\t\t// confirmRemove\n\t\tif ( props.confirmRemove !== undefined ) {\n\t\t\tprops.textConfirm = acf.__( 'Remove' );\n\t\t\tprops.textCancel = acf.__( 'Cancel' );\n\t\t\treturn new TooltipConfirm( props );\n\n\t\t\t// confirm\n\t\t} else if ( props.confirm !== undefined ) {\n\t\t\treturn new TooltipConfirm( props );\n\n\t\t\t// default\n\t\t} else {\n\t\t\treturn new Tooltip( props );\n\t\t}\n\t};\n\n\tvar Tooltip = acf.Model.extend( {\n\t\tdata: {\n\t\t\ttext: '',\n\t\t\ttimeout: 0,\n\t\t\ttarget: null,\n\t\t},\n\n\t\ttmpl: function () {\n\t\t\treturn '
';\n\t\t},\n\n\t\tsetup: function ( props ) {\n\t\t\t$.extend( this.data, props );\n\t\t\tthis.$el = $( this.tmpl() );\n\t\t},\n\n\t\tinitialize: function () {\n\t\t\t// render\n\t\t\tthis.render();\n\n\t\t\t// append\n\t\t\tthis.show();\n\n\t\t\t// position\n\t\t\tthis.position();\n\n\t\t\t// timeout\n\t\t\tvar timeout = this.get( 'timeout' );\n\t\t\tif ( timeout ) {\n\t\t\t\tsetTimeout( $.proxy( this.fade, this ), timeout );\n\t\t\t}\n\t\t},\n\n\t\tupdate: function ( props ) {\n\t\t\t$.extend( this.data, props );\n\t\t\tthis.initialize();\n\t\t},\n\n\t\trender: function () {\n\t\t\tthis.html( this.get( 'text' ) );\n\t\t},\n\n\t\tshow: function () {\n\t\t\t$( 'body' ).append( this.$el );\n\t\t},\n\n\t\thide: function () {\n\t\t\tthis.$el.remove();\n\t\t},\n\n\t\tfade: function () {\n\t\t\t// add class\n\t\t\tthis.$el.addClass( 'acf-fade-up' );\n\n\t\t\t// remove\n\t\t\tthis.setTimeout( function () {\n\t\t\t\tthis.remove();\n\t\t\t}, 250 );\n\t\t},\n\n\t\thtml: function ( html ) {\n\t\t\tthis.$el.html( html );\n\t\t},\n\n\t\tposition: function () {\n\t\t\t// vars\n\t\t\tvar $tooltip = this.$el;\n\t\t\tvar $target = this.get( 'target' );\n\t\t\tif ( ! $target ) return;\n\n\t\t\t// Reset position.\n\t\t\t$tooltip\n\t\t\t\t.removeClass( 'right left bottom top' )\n\t\t\t\t.css( { top: 0, left: 0 } );\n\n\t\t\t// Declare tollerance to edge of screen.\n\t\t\tvar tolerance = 10;\n\n\t\t\t// Find target position.\n\t\t\tvar targetWidth = $target.outerWidth();\n\t\t\tvar targetHeight = $target.outerHeight();\n\t\t\tvar targetTop = $target.offset().top;\n\t\t\tvar targetLeft = $target.offset().left;\n\n\t\t\t// Find tooltip position.\n\t\t\tvar tooltipWidth = $tooltip.outerWidth();\n\t\t\tvar tooltipHeight = $tooltip.outerHeight();\n\t\t\tvar tooltipTop = $tooltip.offset().top; // Should be 0, but WP media grid causes this to be 32 (toolbar padding).\n\n\t\t\t// Assume default top alignment.\n\t\t\tvar top = targetTop - tooltipHeight - tooltipTop;\n\t\t\tvar left = targetLeft + targetWidth / 2 - tooltipWidth / 2;\n\n\t\t\t// Check if too far left.\n\t\t\tif ( left < tolerance ) {\n\t\t\t\t$tooltip.addClass( 'right' );\n\t\t\t\tleft = targetLeft + targetWidth;\n\t\t\t\ttop =\n\t\t\t\t\ttargetTop +\n\t\t\t\t\ttargetHeight / 2 -\n\t\t\t\t\ttooltipHeight / 2 -\n\t\t\t\t\ttooltipTop;\n\n\t\t\t\t// Check if too far right.\n\t\t\t} else if (\n\t\t\t\tleft + tooltipWidth + tolerance >\n\t\t\t\t$( window ).width()\n\t\t\t) {\n\t\t\t\t$tooltip.addClass( 'left' );\n\t\t\t\tleft = targetLeft - tooltipWidth;\n\t\t\t\ttop =\n\t\t\t\t\ttargetTop +\n\t\t\t\t\ttargetHeight / 2 -\n\t\t\t\t\ttooltipHeight / 2 -\n\t\t\t\t\ttooltipTop;\n\n\t\t\t\t// Check if too far up.\n\t\t\t} else if ( top - $( window ).scrollTop() < tolerance ) {\n\t\t\t\t$tooltip.addClass( 'bottom' );\n\t\t\t\ttop = targetTop + targetHeight - tooltipTop;\n\n\t\t\t\t// No colision with edges.\n\t\t\t} else {\n\t\t\t\t$tooltip.addClass( 'top' );\n\t\t\t}\n\n\t\t\t// update css\n\t\t\t$tooltip.css( { top: top, left: left } );\n\t\t},\n\t} );\n\n\tvar TooltipConfirm = Tooltip.extend( {\n\t\tdata: {\n\t\t\ttext: '',\n\t\t\ttextConfirm: '',\n\t\t\ttextCancel: '',\n\t\t\ttarget: null,\n\t\t\ttargetConfirm: true,\n\t\t\tconfirm: function () {},\n\t\t\tcancel: function () {},\n\t\t\tcontext: false,\n\t\t},\n\n\t\tevents: {\n\t\t\t'click [data-event=\"cancel\"]': 'onCancel',\n\t\t\t'click [data-event=\"confirm\"]': 'onConfirm',\n\t\t},\n\n\t\taddEvents: function () {\n\t\t\t// add events\n\t\t\tacf.Model.prototype.addEvents.apply( this );\n\n\t\t\t// vars\n\t\t\tvar $document = $( document );\n\t\t\tvar $target = this.get( 'target' );\n\n\t\t\t// add global 'cancel' click event\n\t\t\t// - use timeout to avoid the current 'click' event triggering the onCancel function\n\t\t\tthis.setTimeout( function () {\n\t\t\t\tthis.on( $document, 'click', 'onCancel' );\n\t\t\t} );\n\n\t\t\t// add target 'confirm' click event\n\t\t\t// - allow setting to control this feature\n\t\t\tif ( this.get( 'targetConfirm' ) ) {\n\t\t\t\tthis.on( $target, 'click', 'onConfirm' );\n\t\t\t}\n\t\t},\n\n\t\tremoveEvents: function () {\n\t\t\t// remove events\n\t\t\tacf.Model.prototype.removeEvents.apply( this );\n\n\t\t\t// vars\n\t\t\tvar $document = $( document );\n\t\t\tvar $target = this.get( 'target' );\n\n\t\t\t// remove custom events\n\t\t\tthis.off( $document, 'click' );\n\t\t\tthis.off( $target, 'click' );\n\t\t},\n\n\t\trender: function () {\n\t\t\t// defaults\n\t\t\tvar text = this.get( 'text' ) || acf.__( 'Are you sure?' );\n\t\t\tvar textConfirm = this.get( 'textConfirm' ) || acf.__( 'Yes' );\n\t\t\tvar textCancel = this.get( 'textCancel' ) || acf.__( 'No' );\n\n\t\t\t// html\n\t\t\tvar html = [\n\t\t\t\ttext,\n\t\t\t\t'' + textConfirm + ' ',\n\t\t\t\t'' + textCancel + ' ',\n\t\t\t].join( ' ' );\n\n\t\t\t// html\n\t\t\tthis.html( html );\n\n\t\t\t// class\n\t\t\tthis.$el.addClass( '-confirm' );\n\t\t},\n\n\t\tonCancel: function ( e, $el ) {\n\t\t\t// prevent default\n\t\t\te.preventDefault();\n\t\t\te.stopImmediatePropagation();\n\n\t\t\t// callback\n\t\t\tvar callback = this.get( 'cancel' );\n\t\t\tvar context = this.get( 'context' ) || this;\n\t\t\tcallback.apply( context, arguments );\n\n\t\t\t//remove\n\t\t\tthis.remove();\n\t\t},\n\n\t\tonConfirm: function ( e, $el ) {\n\t\t\t// Prevent event from propagating completely to allow \"targetConfirm\" to be clicked.\n\t\t\te.preventDefault();\n\t\t\te.stopImmediatePropagation();\n\n\t\t\t// callback\n\t\t\tvar callback = this.get( 'confirm' );\n\t\t\tvar context = this.get( 'context' ) || this;\n\t\t\tcallback.apply( context, arguments );\n\n\t\t\t//remove\n\t\t\tthis.remove();\n\t\t},\n\t} );\n\n\t// storage\n\tacf.models.Tooltip = Tooltip;\n\tacf.models.TooltipConfirm = TooltipConfirm;\n\n\t/**\n\t * tooltipManager\n\t *\n\t * description\n\t *\n\t * @date\t17/4/18\n\t * @since\t5.6.9\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tvar tooltipHoverHelper = new acf.Model( {\n\t\ttooltip: false,\n\n\t\tevents: {\n\t\t\t'mouseenter .acf-js-tooltip': 'showTitle',\n\t\t\t'mouseup .acf-js-tooltip': 'hideTitle',\n\t\t\t'mouseleave .acf-js-tooltip': 'hideTitle',\n\t\t\t'focus .acf-js-tooltip': 'showTitle',\n\t\t\t'blur .acf-js-tooltip': 'hideTitle',\n\t\t\t'keyup .acf-js-tooltip': 'onKeyUp',\n\t\t},\n\n\t\tshowTitle: function ( e, $el ) {\n\t\t\t// vars\n\t\t\tvar title = $el.attr( 'title' );\n\n\t\t\t// bail early if no title\n\t\t\tif ( ! title ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// clear title to avoid default browser tooltip\n\t\t\t$el.attr( 'title', '' );\n\n\t\t\t// create\n\t\t\tif ( ! this.tooltip ) {\n\t\t\t\tthis.tooltip = acf.newTooltip( {\n\t\t\t\t\ttext: title,\n\t\t\t\t\ttarget: $el,\n\t\t\t\t} );\n\n\t\t\t\t// update\n\t\t\t} else {\n\t\t\t\tthis.tooltip.update( {\n\t\t\t\t\ttext: title,\n\t\t\t\t\ttarget: $el,\n\t\t\t\t} );\n\t\t\t}\n\t\t},\n\n\t\thideTitle: function ( e, $el ) {\n\t\t\t// hide tooltip\n\t\t\tthis.tooltip.hide();\n\n\t\t\t// restore title\n\t\t\t$el.attr( 'title', this.tooltip.get( 'text' ) );\n\t\t},\n\n\t\tonKeyUp: function( e, $el ) {\n\t\t\tif ( 'Escape' === e.key ) {\n\t\t\t\tthis.hideTitle( e, $el );\n\t\t\t}\n\t\t},\n\t} );\n} )( jQuery );\n","( function ( $, undefined ) {\n\t/**\n\t * acf\n\t *\n\t * description\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\t// The global acf object\n\tvar acf = {};\n\n\t// Set as a browser global\n\twindow.acf = acf;\n\n\t/** @var object Data sent from PHP */\n\tacf.data = {};\n\n\t/**\n\t * get\n\t *\n\t * Gets a specific data value\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tstring name\n\t * @return\tmixed\n\t */\n\n\tacf.get = function ( name ) {\n\t\treturn this.data[ name ] || null;\n\t};\n\n\t/**\n\t * has\n\t *\n\t * Returns `true` if the data exists and is not null\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tstring name\n\t * @return\tboolean\n\t */\n\n\tacf.has = function ( name ) {\n\t\treturn this.get( name ) !== null;\n\t};\n\n\t/**\n\t * set\n\t *\n\t * Sets a specific data value\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tstring name\n\t * @param\tmixed value\n\t * @return\tthis\n\t */\n\n\tacf.set = function ( name, value ) {\n\t\tthis.data[ name ] = value;\n\t\treturn this;\n\t};\n\n\t/**\n\t * uniqueId\n\t *\n\t * Returns a unique ID\n\t *\n\t * @date\t9/11/17\n\t * @since\t5.6.3\n\t *\n\t * @param\tstring prefix Optional prefix.\n\t * @return\tstring\n\t */\n\n\tvar idCounter = 0;\n\tacf.uniqueId = function ( prefix ) {\n\t\tvar id = ++idCounter + '';\n\t\treturn prefix ? prefix + id : id;\n\t};\n\n\t/**\n\t * acf.uniqueArray\n\t *\n\t * Returns a new array with only unique values\n\t * Credit: https://stackoverflow.com/questions/1960473/get-all-unique-values-in-an-array-remove-duplicates\n\t *\n\t * @date\t23/3/18\n\t * @since\t5.6.9\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.uniqueArray = function ( array ) {\n\t\tfunction onlyUnique( value, index, self ) {\n\t\t\treturn self.indexOf( value ) === index;\n\t\t}\n\t\treturn array.filter( onlyUnique );\n\t};\n\n\t/**\n\t * uniqid\n\t *\n\t * Returns a unique ID (PHP version)\n\t *\n\t * @date\t9/11/17\n\t * @since\t5.6.3\n\t * @source\thttp://locutus.io/php/misc/uniqid/\n\t *\n\t * @param\tstring prefix Optional prefix.\n\t * @return\tstring\n\t */\n\n\tvar uniqidSeed = '';\n\tacf.uniqid = function ( prefix, moreEntropy ) {\n\t\t// discuss at: http://locutus.io/php/uniqid/\n\t\t// original by: Kevin van Zonneveld (http://kvz.io)\n\t\t// revised by: Kankrelune (http://www.webfaktory.info/)\n\t\t// note 1: Uses an internal counter (in locutus global) to avoid collision\n\t\t// example 1: var $id = uniqid()\n\t\t// example 1: var $result = $id.length === 13\n\t\t// returns 1: true\n\t\t// example 2: var $id = uniqid('foo')\n\t\t// example 2: var $result = $id.length === (13 + 'foo'.length)\n\t\t// returns 2: true\n\t\t// example 3: var $id = uniqid('bar', true)\n\t\t// example 3: var $result = $id.length === (23 + 'bar'.length)\n\t\t// returns 3: true\n\t\tif ( typeof prefix === 'undefined' ) {\n\t\t\tprefix = '';\n\t\t}\n\n\t\tvar retId;\n\t\tvar formatSeed = function ( seed, reqWidth ) {\n\t\t\tseed = parseInt( seed, 10 ).toString( 16 ); // to hex str\n\t\t\tif ( reqWidth < seed.length ) {\n\t\t\t\t// so long we split\n\t\t\t\treturn seed.slice( seed.length - reqWidth );\n\t\t\t}\n\t\t\tif ( reqWidth > seed.length ) {\n\t\t\t\t// so short we pad\n\t\t\t\treturn (\n\t\t\t\t\tArray( 1 + ( reqWidth - seed.length ) ).join( '0' ) + seed\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn seed;\n\t\t};\n\n\t\tif ( ! uniqidSeed ) {\n\t\t\t// init seed with big random int\n\t\t\tuniqidSeed = Math.floor( Math.random() * 0x75bcd15 );\n\t\t}\n\t\tuniqidSeed++;\n\n\t\tretId = prefix; // start with prefix, add current milliseconds hex string\n\t\tretId += formatSeed( parseInt( new Date().getTime() / 1000, 10 ), 8 );\n\t\tretId += formatSeed( uniqidSeed, 5 ); // add seed hex string\n\t\tif ( moreEntropy ) {\n\t\t\t// for more entropy we add a float lower to 10\n\t\t\tretId += ( Math.random() * 10 ).toFixed( 8 ).toString();\n\t\t}\n\n\t\treturn retId;\n\t};\n\n\t/**\n\t * strReplace\n\t *\n\t * Performs a string replace\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tstring search\n\t * @param\tstring replace\n\t * @param\tstring subject\n\t * @return\tstring\n\t */\n\n\tacf.strReplace = function ( search, replace, subject ) {\n\t\treturn subject.split( search ).join( replace );\n\t};\n\n\t/**\n\t * strCamelCase\n\t *\n\t * Converts a string into camelCase\n\t * Thanks to https://stackoverflow.com/questions/2970525/converting-any-string-into-camel-case\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tstring str\n\t * @return\tstring\n\t */\n\n\tacf.strCamelCase = function ( str ) {\n\t\tvar matches = str.match( /([a-zA-Z0-9]+)/g );\n\t\treturn matches\n\t\t\t? matches\n\t\t\t\t\t.map( function ( s, i ) {\n\t\t\t\t\t\tvar c = s.charAt( 0 );\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t( i === 0 ? c.toLowerCase() : c.toUpperCase() ) +\n\t\t\t\t\t\t\ts.slice( 1 )\n\t\t\t\t\t\t);\n\t\t\t\t\t} )\n\t\t\t\t\t.join( '' )\n\t\t\t: '';\n\t};\n\n\t/**\n\t * strPascalCase\n\t *\n\t * Converts a string into PascalCase\n\t * Thanks to https://stackoverflow.com/questions/1026069/how-do-i-make-the-first-letter-of-a-string-uppercase-in-javascript\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tstring str\n\t * @return\tstring\n\t */\n\n\tacf.strPascalCase = function ( str ) {\n\t\tvar camel = acf.strCamelCase( str );\n\t\treturn camel.charAt( 0 ).toUpperCase() + camel.slice( 1 );\n\t};\n\n\t/**\n\t * acf.strSlugify\n\t *\n\t * Converts a string into a HTML class friendly slug\n\t *\n\t * @date\t21/3/18\n\t * @since\t5.6.9\n\t *\n\t * @param\tstring str\n\t * @return\tstring\n\t */\n\n\tacf.strSlugify = function ( str ) {\n\t\treturn acf.strReplace( '_', '-', str.toLowerCase() );\n\t};\n\n\tacf.strSanitize = function ( str ) {\n\t\t// chars (https://jsperf.com/replace-foreign-characters)\n\t\tvar map = {\n\t\t\tÀ: 'A',\n\t\t\tÁ: 'A',\n\t\t\tÂ: 'A',\n\t\t\tÃ: 'A',\n\t\t\tÄ: 'A',\n\t\t\tÅ: 'A',\n\t\t\tÆ: 'AE',\n\t\t\tÇ: 'C',\n\t\t\tÈ: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t\t\tǾ: 'O',\n\t\t\tǿ: 'o',\n\n\t\t\t// extra\n\t\t\t' ': '_',\n\t\t\t\"'\": '',\n\t\t\t'?': '',\n\t\t\t'/': '',\n\t\t\t'\\\\': '',\n\t\t\t'.': '',\n\t\t\t',': '',\n\t\t\t'`': '',\n\t\t\t'>': '',\n\t\t\t'<': '',\n\t\t\t'\"': '',\n\t\t\t'[': '',\n\t\t\t']': '',\n\t\t\t'|': '',\n\t\t\t'{': '',\n\t\t\t'}': '',\n\t\t\t'(': '',\n\t\t\t')': '',\n\t\t};\n\n\t\t// vars\n\t\tvar nonWord = /\\W/g;\n\t\tvar mapping = function ( c ) {\n\t\t\treturn map[ c ] !== undefined ? map[ c ] : c;\n\t\t};\n\n\t\t// replace\n\t\tstr = str.replace( nonWord, mapping );\n\n\t\t// lowercase\n\t\tstr = str.toLowerCase();\n\n\t\t// return\n\t\treturn str;\n\t};\n\n\t/**\n\t * acf.strMatch\n\t *\n\t * Returns the number of characters that match between two strings\n\t *\n\t * @date\t1/2/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.strMatch = function ( s1, s2 ) {\n\t\t// vars\n\t\tvar val = 0;\n\t\tvar min = Math.min( s1.length, s2.length );\n\n\t\t// loop\n\t\tfor ( var i = 0; i < min; i++ ) {\n\t\t\tif ( s1[ i ] !== s2[ i ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tval++;\n\t\t}\n\n\t\t// return\n\t\treturn val;\n\t};\n\n\t/**\n\t * Escapes HTML entities from a string.\n\t *\n\t * @date\t08/06/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring string The input string.\n\t * @return\tstring\n\t */\n\tacf.strEscape = function ( string ) {\n\t\tvar htmlEscapes = {\n\t\t\t'&': '&',\n\t\t\t'<': '<',\n\t\t\t'>': '>',\n\t\t\t'\"': '"',\n\t\t\t\"'\": ''',\n\t\t};\n\t\treturn ( '' + string ).replace( /[&<>\"']/g, function ( chr ) {\n\t\t\treturn htmlEscapes[ chr ];\n\t\t} );\n\t};\n\n\t// Tests.\n\t//console.log( acf.strEscape('Test 1') );\n\t//console.log( acf.strEscape('Test & 1') );\n\t//console.log( acf.strEscape('Test\\'s & 1') );\n\t//console.log( acf.strEscape('') );\n\n\t/**\n\t * Unescapes HTML entities from a string.\n\t *\n\t * @date\t08/06/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring string The input string.\n\t * @return\tstring\n\t */\n\tacf.strUnescape = function ( string ) {\n\t\tvar htmlUnescapes = {\n\t\t\t'&': '&',\n\t\t\t'<': '<',\n\t\t\t'>': '>',\n\t\t\t'"': '\"',\n\t\t\t''': \"'\",\n\t\t};\n\t\treturn ( '' + string ).replace(\n\t\t\t/&|<|>|"|'/g,\n\t\t\tfunction ( entity ) {\n\t\t\t\treturn htmlUnescapes[ entity ];\n\t\t\t}\n\t\t);\n\t};\n\n\t// Tests.\n\t//console.log( acf.strUnescape( acf.strEscape('Test 1') ) );\n\t//console.log( acf.strUnescape( acf.strEscape('Test & 1') ) );\n\t//console.log( acf.strUnescape( acf.strEscape('Test\\'s & 1') ) );\n\t//console.log( acf.strUnescape( acf.strEscape('') ) );\n\n\t/**\n\t * Escapes HTML entities from a string.\n\t *\n\t * @date\t08/06/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring string The input string.\n\t * @return\tstring\n\t */\n\tacf.escAttr = acf.strEscape;\n\n\t/**\n\t * Encodes ') );\n\t//console.log( acf.escHtml( acf.strEscape('') ) );\n\t//console.log( acf.escHtml( '' ) );\n\n\t/**\n\t * acf.decode\n\t *\n\t * description\n\t *\n\t * @date\t13/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.decode = function ( string ) {\n\t\treturn $( '' ).html( string ).text();\n\t};\n\n\t/**\n\t * parseArgs\n\t *\n\t * Merges together defaults and args much like the WP wp_parse_args function\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tobject args\n\t * @param\tobject defaults\n\t * @return\tobject\n\t */\n\n\tacf.parseArgs = function ( args, defaults ) {\n\t\tif ( typeof args !== 'object' ) args = {};\n\t\tif ( typeof defaults !== 'object' ) defaults = {};\n\t\treturn $.extend( {}, defaults, args );\n\t};\n\n\t/**\n\t * __\n\t *\n\t * Retrieve the translation of $text.\n\t *\n\t * @date\t16/4/18\n\t * @since\t5.6.9\n\t *\n\t * @param\tstring text Text to translate.\n\t * @return\tstring Translated text.\n\t */\n\n\tif ( window.acfL10n == undefined ) {\n\t\tacfL10n = {};\n\t}\n\n\tacf.__ = function ( text ) {\n\t\treturn acfL10n[ text ] || text;\n\t};\n\n\t/**\n\t * _x\n\t *\n\t * Retrieve translated string with gettext context.\n\t *\n\t * @date\t16/4/18\n\t * @since\t5.6.9\n\t *\n\t * @param\tstring text Text to translate.\n\t * @param\tstring context Context information for the translators.\n\t * @return\tstring Translated text.\n\t */\n\n\tacf._x = function ( text, context ) {\n\t\treturn acfL10n[ text + '.' + context ] || acfL10n[ text ] || text;\n\t};\n\n\t/**\n\t * _n\n\t *\n\t * Retrieve the plural or single form based on the amount.\n\t *\n\t * @date\t16/4/18\n\t * @since\t5.6.9\n\t *\n\t * @param\tstring single Single text to translate.\n\t * @param\tstring plural Plural text to translate.\n\t * @param\tint number The number to compare against.\n\t * @return\tstring Translated text.\n\t */\n\n\tacf._n = function ( single, plural, number ) {\n\t\tif ( number == 1 ) {\n\t\t\treturn acf.__( single );\n\t\t} else {\n\t\t\treturn acf.__( plural );\n\t\t}\n\t};\n\n\tacf.isArray = function ( a ) {\n\t\treturn Array.isArray( a );\n\t};\n\n\tacf.isObject = function ( a ) {\n\t\treturn typeof a === 'object';\n\t};\n\n\t/**\n\t * serialize\n\t *\n\t * description\n\t *\n\t * @date\t24/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tvar buildObject = function ( obj, name, value ) {\n\t\t// replace [] with placeholder\n\t\tname = name.replace( '[]', '[%%index%%]' );\n\n\t\t// vars\n\t\tvar keys = name.match( /([^\\[\\]])+/g );\n\t\tif ( ! keys ) return;\n\t\tvar length = keys.length;\n\t\tvar ref = obj;\n\n\t\t// loop\n\t\tfor ( var i = 0; i < length; i++ ) {\n\t\t\t// vars\n\t\t\tvar key = String( keys[ i ] );\n\n\t\t\t// value\n\t\t\tif ( i == length - 1 ) {\n\t\t\t\t// %%index%%\n\t\t\t\tif ( key === '%%index%%' ) {\n\t\t\t\t\tref.push( value );\n\n\t\t\t\t\t// default\n\t\t\t\t} else {\n\t\t\t\t\tref[ key ] = value;\n\t\t\t\t}\n\n\t\t\t\t// path\n\t\t\t} else {\n\t\t\t\t// array\n\t\t\t\tif ( keys[ i + 1 ] === '%%index%%' ) {\n\t\t\t\t\tif ( ! acf.isArray( ref[ key ] ) ) {\n\t\t\t\t\t\tref[ key ] = [];\n\t\t\t\t\t}\n\n\t\t\t\t\t// object\n\t\t\t\t} else {\n\t\t\t\t\tif ( ! acf.isObject( ref[ key ] ) ) {\n\t\t\t\t\t\tref[ key ] = {};\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// crawl\n\t\t\t\tref = ref[ key ];\n\t\t\t}\n\t\t}\n\t};\n\n\tacf.serialize = function ( $el, prefix ) {\n\t\t// vars\n\t\tvar obj = {};\n\t\tvar inputs = acf.serializeArray( $el );\n\n\t\t// prefix\n\t\tif ( prefix !== undefined ) {\n\t\t\t// filter and modify\n\t\t\tinputs = inputs\n\t\t\t\t.filter( function ( item ) {\n\t\t\t\t\treturn item.name.indexOf( prefix ) === 0;\n\t\t\t\t} )\n\t\t\t\t.map( function ( item ) {\n\t\t\t\t\titem.name = item.name.slice( prefix.length );\n\t\t\t\t\treturn item;\n\t\t\t\t} );\n\t\t}\n\n\t\t// loop\n\t\tfor ( var i = 0; i < inputs.length; i++ ) {\n\t\t\tbuildObject( obj, inputs[ i ].name, inputs[ i ].value );\n\t\t}\n\n\t\t// return\n\t\treturn obj;\n\t};\n\n\t/**\n\t * acf.serializeArray\n\t *\n\t * Similar to $.serializeArray() but works with a parent wrapping element.\n\t *\n\t * @date\t19/8/18\n\t * @since\t5.7.3\n\t *\n\t * @param\tjQuery $el The element or form to serialize.\n\t * @return\tarray\n\t */\n\n\tacf.serializeArray = function ( $el ) {\n\t\treturn $el.find( 'select, textarea, input' ).serializeArray();\n\t};\n\n\t/**\n\t * acf.serializeForAjax\n\t *\n\t * Returns an object containing name => value data ready to be encoded for Ajax.\n\t *\n\t * @date\t17/12/18\n\t * @since\t5.8.0\n\t *\n\t * @param\tjQUery $el The element or form to serialize.\n\t * @return\tobject\n\t */\n\tacf.serializeForAjax = function ( $el ) {\n\t\t// vars\n\t\tvar data = {};\n\t\tvar index = {};\n\n\t\t// Serialize inputs.\n\t\tvar inputs = acf.serializeArray( $el );\n\n\t\t// Loop over inputs and build data.\n\t\tinputs.map( function ( item ) {\n\t\t\t// Append to array.\n\t\t\tif ( item.name.slice( -2 ) === '[]' ) {\n\t\t\t\tdata[ item.name ] = data[ item.name ] || [];\n\t\t\t\tdata[ item.name ].push( item.value );\n\t\t\t\t// Append\n\t\t\t} else {\n\t\t\t\tdata[ item.name ] = item.value;\n\t\t\t}\n\t\t} );\n\n\t\t// return\n\t\treturn data;\n\t};\n\n\t/**\n\t * addAction\n\t *\n\t * Wrapper for acf.hooks.addAction\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tn/a\n\t * @return\tthis\n\t */\n\n\t/*\n\tvar prefixAction = function( action ){\n\t\treturn 'acf_' + action;\n\t}\n*/\n\n\tacf.addAction = function ( action, callback, priority, context ) {\n\t\t//action = prefixAction(action);\n\t\tacf.hooks.addAction.apply( this, arguments );\n\t\treturn this;\n\t};\n\n\t/**\n\t * removeAction\n\t *\n\t * Wrapper for acf.hooks.removeAction\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tn/a\n\t * @return\tthis\n\t */\n\n\tacf.removeAction = function ( action, callback ) {\n\t\t//action = prefixAction(action);\n\t\tacf.hooks.removeAction.apply( this, arguments );\n\t\treturn this;\n\t};\n\n\t/**\n\t * doAction\n\t *\n\t * Wrapper for acf.hooks.doAction\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tn/a\n\t * @return\tthis\n\t */\n\n\tvar actionHistory = {};\n\t//var currentAction = false;\n\tacf.doAction = function ( action ) {\n\t\t//action = prefixAction(action);\n\t\t//currentAction = action;\n\t\tactionHistory[ action ] = 1;\n\t\tacf.hooks.doAction.apply( this, arguments );\n\t\tactionHistory[ action ] = 0;\n\t\treturn this;\n\t};\n\n\t/**\n\t * doingAction\n\t *\n\t * Return true if doing action\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tn/a\n\t * @return\tthis\n\t */\n\n\tacf.doingAction = function ( action ) {\n\t\t//action = prefixAction(action);\n\t\treturn actionHistory[ action ] === 1;\n\t};\n\n\t/**\n\t * didAction\n\t *\n\t * Wrapper for acf.hooks.doAction\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tn/a\n\t * @return\tthis\n\t */\n\n\tacf.didAction = function ( action ) {\n\t\t//action = prefixAction(action);\n\t\treturn actionHistory[ action ] !== undefined;\n\t};\n\n\t/**\n\t * currentAction\n\t *\n\t * Wrapper for acf.hooks.doAction\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tn/a\n\t * @return\tthis\n\t */\n\n\tacf.currentAction = function () {\n\t\tfor ( var k in actionHistory ) {\n\t\t\tif ( actionHistory[ k ] ) {\n\t\t\t\treturn k;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t};\n\n\t/**\n\t * addFilter\n\t *\n\t * Wrapper for acf.hooks.addFilter\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tn/a\n\t * @return\tthis\n\t */\n\n\tacf.addFilter = function ( action ) {\n\t\t//action = prefixAction(action);\n\t\tacf.hooks.addFilter.apply( this, arguments );\n\t\treturn this;\n\t};\n\n\t/**\n\t * removeFilter\n\t *\n\t * Wrapper for acf.hooks.removeFilter\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tn/a\n\t * @return\tthis\n\t */\n\n\tacf.removeFilter = function ( action ) {\n\t\t//action = prefixAction(action);\n\t\tacf.hooks.removeFilter.apply( this, arguments );\n\t\treturn this;\n\t};\n\n\t/**\n\t * applyFilters\n\t *\n\t * Wrapper for acf.hooks.applyFilters\n\t *\n\t * @date\t14/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tn/a\n\t * @return\tthis\n\t */\n\n\tacf.applyFilters = function ( action ) {\n\t\t//action = prefixAction(action);\n\t\treturn acf.hooks.applyFilters.apply( this, arguments );\n\t};\n\n\t/**\n\t * getArgs\n\t *\n\t * description\n\t *\n\t * @date\t15/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.arrayArgs = function ( args ) {\n\t\treturn Array.prototype.slice.call( args );\n\t};\n\n\t/**\n\t * extendArgs\n\t *\n\t * description\n\t *\n\t * @date\t15/12/17\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\t/*\n\tacf.extendArgs = function( ){\n\t\tvar args = Array.prototype.slice.call( arguments );\n\t\tvar realArgs = args.shift();\n\t\t\t\n\t\tArray.prototype.push.call(arguments, 'bar')\n\t\treturn Array.prototype.push.apply( args, arguments );\n\t};\n*/\n\n\t// Preferences\n\t// - use try/catch to avoid JS error if cookies are disabled on front-end form\n\ttry {\n\t\tvar preferences = JSON.parse( localStorage.getItem( 'acf' ) ) || {};\n\t} catch ( e ) {\n\t\tvar preferences = {};\n\t}\n\n\t/**\n\t * getPreferenceName\n\t *\n\t * Gets the true preference name.\n\t * Converts \"this.thing\" to \"thing-123\" if editing post 123.\n\t *\n\t * @date\t11/11/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tstring name\n\t * @return\tstring\n\t */\n\n\tvar getPreferenceName = function ( name ) {\n\t\tif ( name.substr( 0, 5 ) === 'this.' ) {\n\t\t\tname = name.substr( 5 ) + '-' + acf.get( 'post_id' );\n\t\t}\n\t\treturn name;\n\t};\n\n\t/**\n\t * acf.getPreference\n\t *\n\t * Gets a preference setting or null if not set.\n\t *\n\t * @date\t11/11/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tstring name\n\t * @return\tmixed\n\t */\n\n\tacf.getPreference = function ( name ) {\n\t\tname = getPreferenceName( name );\n\t\treturn preferences[ name ] || null;\n\t};\n\n\t/**\n\t * acf.setPreference\n\t *\n\t * Sets a preference setting.\n\t *\n\t * @date\t11/11/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tstring name\n\t * @param\tmixed value\n\t * @return\tn/a\n\t */\n\n\tacf.setPreference = function ( name, value ) {\n\t\tname = getPreferenceName( name );\n\t\tif ( value === null ) {\n\t\t\tdelete preferences[ name ];\n\t\t} else {\n\t\t\tpreferences[ name ] = value;\n\t\t}\n\t\tlocalStorage.setItem( 'acf', JSON.stringify( preferences ) );\n\t};\n\n\t/**\n\t * acf.removePreference\n\t *\n\t * Removes a preference setting.\n\t *\n\t * @date\t11/11/17\n\t * @since\t5.6.5\n\t *\n\t * @param\tstring name\n\t * @return\tn/a\n\t */\n\n\tacf.removePreference = function ( name ) {\n\t\tacf.setPreference( name, null );\n\t};\n\n\t/**\n\t * remove\n\t *\n\t * Removes an element with fade effect\n\t *\n\t * @date\t1/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.remove = function ( props ) {\n\t\t// allow jQuery\n\t\tif ( props instanceof jQuery ) {\n\t\t\tprops = {\n\t\t\t\ttarget: props,\n\t\t\t};\n\t\t}\n\n\t\t// defaults\n\t\tprops = acf.parseArgs( props, {\n\t\t\ttarget: false,\n\t\t\tendHeight: 0,\n\t\t\tcomplete: function () {},\n\t\t} );\n\n\t\t// action\n\t\tacf.doAction( 'remove', props.target );\n\n\t\t// tr\n\t\tif ( props.target.is( 'tr' ) ) {\n\t\t\tremoveTr( props );\n\n\t\t\t// div\n\t\t} else {\n\t\t\tremoveDiv( props );\n\t\t}\n\t};\n\n\t/**\n\t * removeDiv\n\t *\n\t * description\n\t *\n\t * @date\t16/2/18\n\t * @since\t5.6.9\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tvar removeDiv = function ( props ) {\n\t\t// vars\n\t\tvar $el = props.target;\n\t\tvar height = $el.height();\n\t\tvar width = $el.width();\n\t\tvar margin = $el.css( 'margin' );\n\t\tvar outerHeight = $el.outerHeight( true );\n\t\tvar style = $el.attr( 'style' ) + ''; // needed to copy\n\n\t\t// wrap\n\t\t$el.wrap(\n\t\t\t'
'\n\t\t);\n\t\tvar $wrap = $el.parent();\n\n\t\t// set pos\n\t\t$el.css( {\n\t\t\theight: height,\n\t\t\twidth: width,\n\t\t\tmargin: margin,\n\t\t\tposition: 'absolute',\n\t\t} );\n\n\t\t// fade wrap\n\t\tsetTimeout( function () {\n\t\t\t$wrap.css( {\n\t\t\t\topacity: 0,\n\t\t\t\theight: props.endHeight,\n\t\t\t} );\n\t\t}, 50 );\n\n\t\t// remove\n\t\tsetTimeout( function () {\n\t\t\t$el.attr( 'style', style );\n\t\t\t$wrap.remove();\n\t\t\tprops.complete();\n\t\t}, 301 );\n\t};\n\n\t/**\n\t * removeTr\n\t *\n\t * description\n\t *\n\t * @date\t16/2/18\n\t * @since\t5.6.9\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tvar removeTr = function ( props ) {\n\t\t// vars\n\t\tvar $tr = props.target;\n\t\tvar height = $tr.height();\n\t\tvar children = $tr.children().length;\n\n\t\t// create dummy td\n\t\tvar $td = $(\n\t\t\t' '\n\t\t);\n\n\t\t// fade away tr\n\t\t$tr.addClass( 'acf-remove-element' );\n\n\t\t// update HTML after fade animation\n\t\tsetTimeout( function () {\n\t\t\t$tr.html( $td );\n\t\t}, 251 );\n\n\t\t// allow .acf-temp-remove to exist before changing CSS\n\t\tsetTimeout( function () {\n\t\t\t// remove class\n\t\t\t$tr.removeClass( 'acf-remove-element' );\n\n\t\t\t// collapse\n\t\t\t$td.css( {\n\t\t\t\theight: props.endHeight,\n\t\t\t} );\n\t\t}, 300 );\n\n\t\t// remove\n\t\tsetTimeout( function () {\n\t\t\t$tr.remove();\n\t\t\tprops.complete();\n\t\t}, 451 );\n\t};\n\n\t/**\n\t * duplicate\n\t *\n\t * description\n\t *\n\t * @date\t3/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.duplicate = function ( args ) {\n\t\t// allow jQuery\n\t\tif ( args instanceof jQuery ) {\n\t\t\targs = {\n\t\t\t\ttarget: args,\n\t\t\t};\n\t\t}\n\n\t\t// defaults\n\t\targs = acf.parseArgs( args, {\n\t\t\ttarget: false,\n\t\t\tsearch: '',\n\t\t\treplace: '',\n\t\t\trename: true,\n\t\t\tbefore: function ( $el ) {},\n\t\t\tafter: function ( $el, $el2 ) {},\n\t\t\tappend: function ( $el, $el2 ) {\n\t\t\t\t$el.after( $el2 );\n\t\t\t},\n\t\t} );\n\n\t\t// compatibility\n\t\targs.target = args.target || args.$el;\n\n\t\t// vars\n\t\tvar $el = args.target;\n\n\t\t// search\n\t\targs.search = args.search || $el.attr( 'data-id' );\n\t\targs.replace = args.replace || acf.uniqid();\n\n\t\t// before\n\t\t// - allow acf to modify DOM\n\t\t// - fixes bug where select field option is not selected\n\t\targs.before( $el );\n\t\tacf.doAction( 'before_duplicate', $el );\n\n\t\t// clone\n\t\tvar $el2 = $el.clone();\n\n\t\t// rename\n\t\tif ( args.rename ) {\n\t\t\tacf.rename( {\n\t\t\t\ttarget: $el2,\n\t\t\t\tsearch: args.search,\n\t\t\t\treplace: args.replace,\n\t\t\t\treplacer:\n\t\t\t\t\ttypeof args.rename === 'function' ? args.rename : null,\n\t\t\t} );\n\t\t}\n\n\t\t// remove classes\n\t\t$el2.removeClass( 'acf-clone' );\n\t\t$el2.find( '.ui-sortable' ).removeClass( 'ui-sortable' );\n\n\t\t// remove any initialised select2s prevent the duplicated object stealing the previous select2.\n\t\t$el2.find( '[data-select2-id]' ).removeAttr( 'data-select2-id' );\n\t\t$el2.find( '.select2' ).remove();\n\n\t\t// subfield select2 renames happen after init and contain a duplicated ID. force change those IDs to prevent this.\n\t\t$el2.find( '.acf-is-subfields select[data-ui=\"1\"]' ).each( function () {\n\t\t\t$( this ).prop(\n\t\t\t\t'id',\n\t\t\t\t$( this )\n\t\t\t\t\t.prop( 'id' )\n\t\t\t\t\t.replace(\n\t\t\t\t\t\t'acf_fields',\n\t\t\t\t\t\tacf.uniqid( 'duplicated_' ) + '_acf_fields'\n\t\t\t\t\t)\n\t\t\t);\n\t\t} );\n\n\t\t// remove tab wrapper to ensure proper init\n\t\t$el2.find( '.acf-field-settings > .acf-tab-wrap' ).remove();\n\n\t\t// after\n\t\t// - allow acf to modify DOM\n\t\targs.after( $el, $el2 );\n\t\tacf.doAction( 'after_duplicate', $el, $el2 );\n\n\t\t// append\n\t\targs.append( $el, $el2 );\n\n\t\t/**\n\t\t * Fires after an element has been duplicated and appended to the DOM.\n\t\t *\n\t\t * @date\t30/10/19\n\t\t * @since\t5.8.7\n\t\t *\n\t\t * @param\tjQuery $el The original element.\n\t\t * @param\tjQuery $el2 The duplicated element.\n\t\t */\n\t\tacf.doAction( 'duplicate', $el, $el2 );\n\n\t\t// append\n\t\tacf.doAction( 'append', $el2 );\n\n\t\t// return\n\t\treturn $el2;\n\t};\n\n\t/**\n\t * rename\n\t *\n\t * description\n\t *\n\t * @date\t7/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.rename = function ( args ) {\n\t\t// Allow jQuery param.\n\t\tif ( args instanceof jQuery ) {\n\t\t\targs = {\n\t\t\t\ttarget: args,\n\t\t\t};\n\t\t}\n\n\t\t// Apply default args.\n\t\targs = acf.parseArgs( args, {\n\t\t\ttarget: false,\n\t\t\tdestructive: false,\n\t\t\tsearch: '',\n\t\t\treplace: '',\n\t\t\treplacer: null,\n\t\t} );\n\n\t\t// Extract args.\n\t\tvar $el = args.target;\n\n\t\t// Provide backup for empty args.\n\t\tif ( ! args.search ) {\n\t\t\targs.search = $el.attr( 'data-id' );\n\t\t}\n\t\tif ( ! args.replace ) {\n\t\t\targs.replace = acf.uniqid( 'acf' );\n\t\t}\n\t\tif ( ! args.replacer ) {\n\t\t\targs.replacer = function ( name, value, search, replace ) {\n\t\t\t\treturn value.replace( search, replace );\n\t\t\t};\n\t\t}\n\n\t\t// Callback function for jQuery replacing.\n\t\tvar withReplacer = function ( name ) {\n\t\t\treturn function ( i, value ) {\n\t\t\t\treturn args.replacer( name, value, args.search, args.replace );\n\t\t\t};\n\t\t};\n\n\t\t// Destructive Replace.\n\t\tif ( args.destructive ) {\n\t\t\tvar html = acf.strReplace(\n\t\t\t\targs.search,\n\t\t\t\targs.replace,\n\t\t\t\t$el.outerHTML()\n\t\t\t);\n\t\t\t$el.replaceWith( html );\n\n\t\t\t// Standard Replace.\n\t\t} else {\n\t\t\t$el.attr( 'data-id', args.replace );\n\t\t\t$el.find( '[id*=\"' + args.search + '\"]' ).attr(\n\t\t\t\t'id',\n\t\t\t\twithReplacer( 'id' )\n\t\t\t);\n\t\t\t$el.find( '[for*=\"' + args.search + '\"]' ).attr(\n\t\t\t\t'for',\n\t\t\t\twithReplacer( 'for' )\n\t\t\t);\n\t\t\t$el.find( '[name*=\"' + args.search + '\"]' ).attr(\n\t\t\t\t'name',\n\t\t\t\twithReplacer( 'name' )\n\t\t\t);\n\t\t}\n\n\t\t// return\n\t\treturn $el;\n\t};\n\n\t/**\n\t * acf.prepareForAjax\n\t *\n\t * description\n\t *\n\t * @date\t4/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.prepareForAjax = function ( data ) {\n\t\t// required\n\t\tdata.nonce = acf.get( 'nonce' );\n\t\tdata.post_id = acf.get( 'post_id' );\n\n\t\t// language\n\t\tif ( acf.has( 'language' ) ) {\n\t\t\tdata.lang = acf.get( 'language' );\n\t\t}\n\n\t\t// filter for 3rd party customization\n\t\tdata = acf.applyFilters( 'prepare_for_ajax', data );\n\n\t\t// return\n\t\treturn data;\n\t};\n\n\t/**\n\t * acf.startButtonLoading\n\t *\n\t * description\n\t *\n\t * @date\t5/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.startButtonLoading = function ( $el ) {\n\t\t$el.prop( 'disabled', true );\n\t\t$el.after( ' ' );\n\t};\n\n\tacf.stopButtonLoading = function ( $el ) {\n\t\t$el.prop( 'disabled', false );\n\t\t$el.next( '.acf-loading' ).remove();\n\t};\n\n\t/**\n\t * acf.showLoading\n\t *\n\t * description\n\t *\n\t * @date\t12/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.showLoading = function ( $el ) {\n\t\t$el.append(\n\t\t\t'
'\n\t\t);\n\t};\n\n\tacf.hideLoading = function ( $el ) {\n\t\t$el.children( '.acf-loading-overlay' ).remove();\n\t};\n\n\t/**\n\t * acf.updateUserSetting\n\t *\n\t * description\n\t *\n\t * @date\t5/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.updateUserSetting = function ( name, value ) {\n\t\tvar ajaxData = {\n\t\t\taction: 'acf/ajax/user_setting',\n\t\t\tname: name,\n\t\t\tvalue: value,\n\t\t};\n\n\t\t$.ajax( {\n\t\t\turl: acf.get( 'ajaxurl' ),\n\t\t\tdata: acf.prepareForAjax( ajaxData ),\n\t\t\ttype: 'post',\n\t\t\tdataType: 'html',\n\t\t} );\n\t};\n\n\t/**\n\t * acf.val\n\t *\n\t * description\n\t *\n\t * @date\t8/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.val = function ( $input, value, silent ) {\n\t\t// vars\n\t\tvar prevValue = $input.val();\n\n\t\t// bail if no change\n\t\tif ( value === prevValue ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// update value\n\t\t$input.val( value );\n\n\t\t// prevent select elements displaying blank value if option doesn't exist\n\t\tif ( $input.is( 'select' ) && $input.val() === null ) {\n\t\t\t$input.val( prevValue );\n\t\t\treturn false;\n\t\t}\n\n\t\t// update with trigger\n\t\tif ( silent !== true ) {\n\t\t\t$input.trigger( 'change' );\n\t\t}\n\n\t\t// return\n\t\treturn true;\n\t};\n\n\t/**\n\t * acf.show\n\t *\n\t * description\n\t *\n\t * @date\t9/2/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.show = function ( $el, lockKey ) {\n\t\t// unlock\n\t\tif ( lockKey ) {\n\t\t\tacf.unlock( $el, 'hidden', lockKey );\n\t\t}\n\n\t\t// bail early if $el is still locked\n\t\tif ( acf.isLocked( $el, 'hidden' ) ) {\n\t\t\t//console.log( 'still locked', getLocks( $el, 'hidden' ));\n\t\t\treturn false;\n\t\t}\n\n\t\t// $el is hidden, remove class and return true due to change in visibility\n\t\tif ( $el.hasClass( 'acf-hidden' ) ) {\n\t\t\t$el.removeClass( 'acf-hidden' );\n\t\t\treturn true;\n\n\t\t\t// $el is visible, return false due to no change in visibility\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\t/**\n\t * acf.hide\n\t *\n\t * description\n\t *\n\t * @date\t9/2/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.hide = function ( $el, lockKey ) {\n\t\t// lock\n\t\tif ( lockKey ) {\n\t\t\tacf.lock( $el, 'hidden', lockKey );\n\t\t}\n\n\t\t// $el is hidden, return false due to no change in visibility\n\t\tif ( $el.hasClass( 'acf-hidden' ) ) {\n\t\t\treturn false;\n\n\t\t\t// $el is visible, add class and return true due to change in visibility\n\t\t} else {\n\t\t\t$el.addClass( 'acf-hidden' );\n\t\t\treturn true;\n\t\t}\n\t};\n\n\t/**\n\t * acf.isHidden\n\t *\n\t * description\n\t *\n\t * @date\t9/2/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.isHidden = function ( $el ) {\n\t\treturn $el.hasClass( 'acf-hidden' );\n\t};\n\n\t/**\n\t * acf.isVisible\n\t *\n\t * description\n\t *\n\t * @date\t9/2/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.isVisible = function ( $el ) {\n\t\treturn ! acf.isHidden( $el );\n\t};\n\n\t/**\n\t * enable\n\t *\n\t * description\n\t *\n\t * @date\t12/3/18\n\t * @since\t5.6.9\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tvar enable = function ( $el, lockKey ) {\n\t\t// check class. Allow .acf-disabled to overrule all JS\n\t\tif ( $el.hasClass( 'acf-disabled' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// unlock\n\t\tif ( lockKey ) {\n\t\t\tacf.unlock( $el, 'disabled', lockKey );\n\t\t}\n\n\t\t// bail early if $el is still locked\n\t\tif ( acf.isLocked( $el, 'disabled' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// $el is disabled, remove prop and return true due to change\n\t\tif ( $el.prop( 'disabled' ) ) {\n\t\t\t$el.prop( 'disabled', false );\n\t\t\treturn true;\n\n\t\t\t// $el is enabled, return false due to no change\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\t/**\n\t * acf.enable\n\t *\n\t * description\n\t *\n\t * @date\t9/2/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.enable = function ( $el, lockKey ) {\n\t\t// enable single input\n\t\tif ( $el.attr( 'name' ) ) {\n\t\t\treturn enable( $el, lockKey );\n\t\t}\n\n\t\t// find and enable child inputs\n\t\t// return true if any inputs have changed\n\t\tvar results = false;\n\t\t$el.find( '[name]' ).each( function () {\n\t\t\tvar result = enable( $( this ), lockKey );\n\t\t\tif ( result ) {\n\t\t\t\tresults = true;\n\t\t\t}\n\t\t} );\n\t\treturn results;\n\t};\n\n\t/**\n\t * disable\n\t *\n\t * description\n\t *\n\t * @date\t12/3/18\n\t * @since\t5.6.9\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tvar disable = function ( $el, lockKey ) {\n\t\t// lock\n\t\tif ( lockKey ) {\n\t\t\tacf.lock( $el, 'disabled', lockKey );\n\t\t}\n\n\t\t// $el is disabled, return false due to no change\n\t\tif ( $el.prop( 'disabled' ) ) {\n\t\t\treturn false;\n\n\t\t\t// $el is enabled, add prop and return true due to change\n\t\t} else {\n\t\t\t$el.prop( 'disabled', true );\n\t\t\treturn true;\n\t\t}\n\t};\n\n\t/**\n\t * acf.disable\n\t *\n\t * description\n\t *\n\t * @date\t9/2/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.disable = function ( $el, lockKey ) {\n\t\t// disable single input\n\t\tif ( $el.attr( 'name' ) ) {\n\t\t\treturn disable( $el, lockKey );\n\t\t}\n\n\t\t// find and enable child inputs\n\t\t// return true if any inputs have changed\n\t\tvar results = false;\n\t\t$el.find( '[name]' ).each( function () {\n\t\t\tvar result = disable( $( this ), lockKey );\n\t\t\tif ( result ) {\n\t\t\t\tresults = true;\n\t\t\t}\n\t\t} );\n\t\treturn results;\n\t};\n\n\t/**\n\t * acf.isset\n\t *\n\t * description\n\t *\n\t * @date\t10/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.isset = function ( obj /*, level1, level2, ... */ ) {\n\t\tfor ( var i = 1; i < arguments.length; i++ ) {\n\t\t\tif ( ! obj || ! obj.hasOwnProperty( arguments[ i ] ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tobj = obj[ arguments[ i ] ];\n\t\t}\n\t\treturn true;\n\t};\n\n\t/**\n\t * acf.isget\n\t *\n\t * description\n\t *\n\t * @date\t10/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.isget = function ( obj /*, level1, level2, ... */ ) {\n\t\tfor ( var i = 1; i < arguments.length; i++ ) {\n\t\t\tif ( ! obj || ! obj.hasOwnProperty( arguments[ i ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tobj = obj[ arguments[ i ] ];\n\t\t}\n\t\treturn obj;\n\t};\n\n\t/**\n\t * acf.getFileInputData\n\t *\n\t * description\n\t *\n\t * @date\t10/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.getFileInputData = function ( $input, callback ) {\n\t\t// vars\n\t\tvar value = $input.val();\n\n\t\t// bail early if no value\n\t\tif ( ! value ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// data\n\t\tvar data = {\n\t\t\turl: value,\n\t\t};\n\n\t\t// modern browsers\n\t\tvar file = $input[ 0 ].files.length\n\t\t\t? acf.isget( $input[ 0 ].files, 0 )\n\t\t\t: false;\n\t\tif ( file ) {\n\t\t\t// update data\n\t\t\tdata.size = file.size;\n\t\t\tdata.type = file.type;\n\n\t\t\t// image\n\t\t\tif ( file.type.indexOf( 'image' ) > -1 ) {\n\t\t\t\t// vars\n\t\t\t\tvar windowURL = window.URL || window.webkitURL;\n\t\t\t\tvar img = new Image();\n\n\t\t\t\timg.onload = function () {\n\t\t\t\t\t// update\n\t\t\t\t\tdata.width = this.width;\n\t\t\t\t\tdata.height = this.height;\n\n\t\t\t\t\tcallback( data );\n\t\t\t\t};\n\t\t\t\timg.src = windowURL.createObjectURL( file );\n\t\t\t} else {\n\t\t\t\tcallback( data );\n\t\t\t}\n\t\t} else {\n\t\t\tcallback( data );\n\t\t}\n\t};\n\n\t/**\n\t * acf.isAjaxSuccess\n\t *\n\t * description\n\t *\n\t * @date\t18/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.isAjaxSuccess = function ( json ) {\n\t\treturn json && json.success;\n\t};\n\n\t/**\n\t * acf.getAjaxMessage\n\t *\n\t * description\n\t *\n\t * @date\t18/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.getAjaxMessage = function ( json ) {\n\t\treturn acf.isget( json, 'data', 'message' );\n\t};\n\n\t/**\n\t * acf.getAjaxError\n\t *\n\t * description\n\t *\n\t * @date\t18/1/18\n\t * @since\t5.6.5\n\t *\n\t * @param\ttype $var Description. Default.\n\t * @return\ttype Description.\n\t */\n\n\tacf.getAjaxError = function ( json ) {\n\t\treturn acf.isget( json, 'data', 'error' );\n\t};\n\n\t/**\n\t * Returns the error message from an XHR object.\n\t *\n\t * @date\t17/3/20\n\t * @since\t5.8.9\n\t *\n\t * @param\tobject xhr The XHR object.\n\t * @return\t(string)\n\t */\n\tacf.getXhrError = function ( xhr ) {\n\t\tif ( xhr.responseJSON ) {\n\t\t\t// Responses via `return new WP_Error();`\n\t\t\tif ( xhr.responseJSON.message ) {\n\t\t\t\treturn xhr.responseJSON.message;\n\t\t\t}\n\n\t\t\t// Responses via `wp_send_json_error();`.\n\t\t\tif ( xhr.responseJSON.data && xhr.responseJSON.data.error ) {\n\t\t\t\treturn xhr.responseJSON.data.error;\n\t\t\t}\n\t\t} else if ( xhr.statusText ) {\n\t\t\treturn xhr.statusText;\n\t\t}\n\n\t\treturn '';\n\t};\n\n\t/**\n\t * acf.renderSelect\n\t *\n\t * Renders the innter html for a select field.\n\t *\n\t * @date\t19/2/18\n\t * @since\t5.6.9\n\t *\n\t * @param\tjQuery $select The select element.\n\t * @param\tarray choices An array of choices.\n\t * @return\tvoid\n\t */\n\n\tacf.renderSelect = function ( $select, choices ) {\n\t\t// vars\n\t\tvar value = $select.val();\n\t\tvar values = [];\n\n\t\t// callback\n\t\tvar crawl = function ( items ) {\n\t\t\t// vars\n\t\t\tvar itemsHtml = '';\n\n\t\t\t// loop\n\t\t\titems.map( function ( item ) {\n\t\t\t\t// vars\n\t\t\t\tvar text = item.text || item.label || '';\n\t\t\t\tvar id = item.id || item.value || '';\n\n\t\t\t\t// append\n\t\t\t\tvalues.push( id );\n\n\t\t\t\t// optgroup\n\t\t\t\tif ( item.children ) {\n\t\t\t\t\titemsHtml +=\n\t\t\t\t\t\t'' +\n\t\t\t\t\t\tcrawl( item.children ) +\n\t\t\t\t\t\t' ';\n\n\t\t\t\t\t// option\n\t\t\t\t} else {\n\t\t\t\t\titemsHtml +=\n\t\t\t\t\t\t'' +\n\t\t\t\t\t\tacf.strEscape( text ) +\n\t\t\t\t\t\t' ';\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// return\n\t\t\treturn itemsHtml;\n\t\t};\n\n\t\t// update HTML\n\t\t$select.html( crawl( choices ) );\n\n\t\t// update value\n\t\tif ( values.indexOf( value ) > -1 ) {\n\t\t\t$select.val( value );\n\t\t}\n\n\t\t// return selected value\n\t\treturn $select.val();\n\t};\n\n\t/**\n\t * acf.lock\n\t *\n\t * Creates a \"lock\" on an element for a given type and key\n\t *\n\t * @date\t22/2/18\n\t * @since\t5.6.9\n\t *\n\t * @param\tjQuery $el The element to lock.\n\t * @param\tstring type The type of lock such as \"condition\" or \"visibility\".\n\t * @param\tstring key The key that will be used to unlock.\n\t * @return\tvoid\n\t */\n\n\tvar getLocks = function ( $el, type ) {\n\t\treturn $el.data( 'acf-lock-' + type ) || [];\n\t};\n\n\tvar setLocks = function ( $el, type, locks ) {\n\t\t$el.data( 'acf-lock-' + type, locks );\n\t};\n\n\tacf.lock = function ( $el, type, key ) {\n\t\tvar locks = getLocks( $el, type );\n\t\tvar i = locks.indexOf( key );\n\t\tif ( i < 0 ) {\n\t\t\tlocks.push( key );\n\t\t\tsetLocks( $el, type, locks );\n\t\t}\n\t};\n\n\t/**\n\t * acf.unlock\n\t *\n\t * Unlocks a \"lock\" on an element for a given type and key\n\t *\n\t * @date\t22/2/18\n\t * @since\t5.6.9\n\t *\n\t * @param\tjQuery $el The element to lock.\n\t * @param\tstring type The type of lock such as \"condition\" or \"visibility\".\n\t * @param\tstring key The key that will be used to unlock.\n\t * @return\tvoid\n\t */\n\n\tacf.unlock = function ( $el, type, key ) {\n\t\tvar locks = getLocks( $el, type );\n\t\tvar i = locks.indexOf( key );\n\t\tif ( i > -1 ) {\n\t\t\tlocks.splice( i, 1 );\n\t\t\tsetLocks( $el, type, locks );\n\t\t}\n\n\t\t// return true if is unlocked (no locks)\n\t\treturn locks.length === 0;\n\t};\n\n\t/**\n\t * acf.isLocked\n\t *\n\t * Returns true if a lock exists for a given type\n\t *\n\t * @date\t22/2/18\n\t * @since\t5.6.9\n\t *\n\t * @param\tjQuery $el The element to lock.\n\t * @param\tstring type The type of lock such as \"condition\" or \"visibility\".\n\t * @return\tvoid\n\t */\n\n\tacf.isLocked = function ( $el, type ) {\n\t\treturn getLocks( $el, type ).length > 0;\n\t};\n\n\t/**\n\t * acf.isGutenberg\n\t *\n\t * Returns true if the Gutenberg editor is being used.\n\t *\n\t * @date\t14/11/18\n\t * @since\t5.8.0\n\t *\n\t * @param\tvois\n\t * @return\tbool\n\t */\n\tacf.isGutenberg = function () {\n\t\treturn !! (\n\t\t\twindow.wp &&\n\t\t\twp.data &&\n\t\t\twp.data.select &&\n\t\t\twp.data.select( 'core/editor' )\n\t\t);\n\t};\n\n\t/**\n\t * acf.objectToArray\n\t *\n\t * Returns an array of items from the given object.\n\t *\n\t * @date\t20/11/18\n\t * @since\t5.8.0\n\t *\n\t * @param\tobject obj The object of items.\n\t * @return\tarray\n\t */\n\tacf.objectToArray = function ( obj ) {\n\t\treturn Object.keys( obj ).map( function ( key ) {\n\t\t\treturn obj[ key ];\n\t\t} );\n\t};\n\n\t/**\n\t * acf.debounce\n\t *\n\t * Returns a debounced version of the passed function which will postpone its execution until after `wait` milliseconds have elapsed since the last time it was invoked.\n\t *\n\t * @date\t28/8/19\n\t * @since\t5.8.1\n\t *\n\t * @param\tfunction callback The callback function.\n\t * @return\tint wait The number of milliseconds to wait.\n\t */\n\tacf.debounce = function ( callback, wait ) {\n\t\tvar timeout;\n\t\treturn function () {\n\t\t\tvar context = this;\n\t\t\tvar args = arguments;\n\t\t\tvar later = function () {\n\t\t\t\tcallback.apply( context, args );\n\t\t\t};\n\t\t\tclearTimeout( timeout );\n\t\t\ttimeout = setTimeout( later, wait );\n\t\t};\n\t};\n\n\t/**\n\t * acf.throttle\n\t *\n\t * Returns a throttled version of the passed function which will allow only one execution per `limit` time period.\n\t *\n\t * @date\t28/8/19\n\t * @since\t5.8.1\n\t *\n\t * @param\tfunction callback The callback function.\n\t * @return\tint wait The number of milliseconds to wait.\n\t */\n\tacf.throttle = function ( callback, limit ) {\n\t\tvar busy = false;\n\t\treturn function () {\n\t\t\tif ( busy ) return;\n\t\t\tbusy = true;\n\t\t\tsetTimeout( function () {\n\t\t\t\tbusy = false;\n\t\t\t}, limit );\n\t\t\tcallback.apply( this, arguments );\n\t\t};\n\t};\n\n\t/**\n\t * acf.isInView\n\t *\n\t * Returns true if the given element is in view.\n\t *\n\t * @date\t29/8/19\n\t * @since\t5.8.1\n\t *\n\t * @param\telem el The dom element to inspect.\n\t * @return\tbool\n\t */\n\tacf.isInView = function ( el ) {\n\t\tif ( el instanceof jQuery ) {\n\t\t\tel = el[ 0 ];\n\t\t}\n\t\tvar rect = el.getBoundingClientRect();\n\t\treturn (\n\t\t\trect.top !== rect.bottom &&\n\t\t\trect.top >= 0 &&\n\t\t\trect.left >= 0 &&\n\t\t\trect.bottom <=\n\t\t\t\t( window.innerHeight ||\n\t\t\t\t\tdocument.documentElement.clientHeight ) &&\n\t\t\trect.right <=\n\t\t\t\t( window.innerWidth || document.documentElement.clientWidth )\n\t\t);\n\t};\n\n\t/**\n\t * acf.onceInView\n\t *\n\t * Watches for a dom element to become visible in the browser and then excecutes the passed callback.\n\t *\n\t * @date\t28/8/19\n\t * @since\t5.8.1\n\t *\n\t * @param\tdom el The dom element to inspect.\n\t * @param\tfunction callback The callback function.\n\t */\n\tacf.onceInView = ( function () {\n\t\t// Define list.\n\t\tvar items = [];\n\t\tvar id = 0;\n\n\t\t// Define check function.\n\t\tvar check = function () {\n\t\t\titems.forEach( function ( item ) {\n\t\t\t\tif ( acf.isInView( item.el ) ) {\n\t\t\t\t\titem.callback.apply( this );\n\t\t\t\t\tpop( item.id );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\n\t\t// And create a debounced version.\n\t\tvar debounced = acf.debounce( check, 300 );\n\n\t\t// Define add function.\n\t\tvar push = function ( el, callback ) {\n\t\t\t// Add event listener.\n\t\t\tif ( ! items.length ) {\n\t\t\t\t$( window )\n\t\t\t\t\t.on( 'scroll resize', debounced )\n\t\t\t\t\t.on( 'acfrefresh orientationchange', check );\n\t\t\t}\n\n\t\t\t// Append to list.\n\t\t\titems.push( { id: id++, el: el, callback: callback } );\n\t\t};\n\n\t\t// Define remove function.\n\t\tvar pop = function ( id ) {\n\t\t\t// Remove from list.\n\t\t\titems = items.filter( function ( item ) {\n\t\t\t\treturn item.id !== id;\n\t\t\t} );\n\n\t\t\t// Clean up listener.\n\t\t\tif ( ! items.length ) {\n\t\t\t\t$( window )\n\t\t\t\t\t.off( 'scroll resize', debounced )\n\t\t\t\t\t.off( 'acfrefresh orientationchange', check );\n\t\t\t}\n\t\t};\n\n\t\t// Define returned function.\n\t\treturn function ( el, callback ) {\n\t\t\t// Allow jQuery object.\n\t\t\tif ( el instanceof jQuery ) el = el[ 0 ];\n\n\t\t\t// Execute callback if already in view or add to watch list.\n\t\t\tif ( acf.isInView( el ) ) {\n\t\t\t\tcallback.apply( this );\n\t\t\t} else {\n\t\t\t\tpush( el, callback );\n\t\t\t}\n\t\t};\n\t} )();\n\n\t/**\n\t * acf.once\n\t *\n\t * Creates a function that is restricted to invoking `func` once.\n\t *\n\t * @date\t2/9/19\n\t * @since\t5.8.1\n\t *\n\t * @param\tfunction func The function to restrict.\n\t * @return\tfunction\n\t */\n\tacf.once = function ( func ) {\n\t\tvar i = 0;\n\t\treturn function () {\n\t\t\tif ( i++ > 0 ) {\n\t\t\t\treturn ( func = undefined );\n\t\t\t}\n\t\t\treturn func.apply( this, arguments );\n\t\t};\n\t};\n\n\t/**\n\t * Focuses attention to a specific element.\n\t *\n\t * @date\t05/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tjQuery $el The jQuery element to focus.\n\t * @return\tvoid\n\t */\n\tacf.focusAttention = function ( $el ) {\n\t\tvar wait = 1000;\n\n\t\t// Apply class to focus attention.\n\t\t$el.addClass( 'acf-attention -focused' );\n\n\t\t// Scroll to element if needed.\n\t\tvar scrollTime = 500;\n\t\tif ( ! acf.isInView( $el ) ) {\n\t\t\t$( 'body, html' ).animate(\n\t\t\t\t{\n\t\t\t\t\tscrollTop: $el.offset().top - $( window ).height() / 2,\n\t\t\t\t},\n\t\t\t\tscrollTime\n\t\t\t);\n\t\t\twait += scrollTime;\n\t\t}\n\n\t\t// Remove class after $wait amount of time.\n\t\tvar fadeTime = 250;\n\t\tsetTimeout( function () {\n\t\t\t$el.removeClass( '-focused' );\n\t\t\tsetTimeout( function () {\n\t\t\t\t$el.removeClass( 'acf-attention' );\n\t\t\t}, fadeTime );\n\t\t}, wait );\n\t};\n\n\t/**\n\t * Description\n\t *\n\t * @date\t05/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\ttype Var Description.\n\t * @return\ttype Description.\n\t */\n\tacf.onFocus = function ( $el, callback ) {\n\t\t// Only run once per element.\n\t\t// if( $el.data('acf.onFocus') ) {\n\t\t// \treturn false;\n\t\t// }\n\n\t\t// Vars.\n\t\tvar ignoreBlur = false;\n\t\tvar focus = false;\n\n\t\t// Functions.\n\t\tvar onFocus = function () {\n\t\t\tignoreBlur = true;\n\t\t\tsetTimeout( function () {\n\t\t\t\tignoreBlur = false;\n\t\t\t}, 1 );\n\t\t\tsetFocus( true );\n\t\t};\n\t\tvar onBlur = function () {\n\t\t\tif ( ! ignoreBlur ) {\n\t\t\t\tsetFocus( false );\n\t\t\t}\n\t\t};\n\t\tvar addEvents = function () {\n\t\t\t$( document ).on( 'click', onBlur );\n\t\t\t//$el.on('acfBlur', onBlur);\n\t\t\t$el.on( 'blur', 'input, select, textarea', onBlur );\n\t\t};\n\t\tvar removeEvents = function () {\n\t\t\t$( document ).off( 'click', onBlur );\n\t\t\t//$el.off('acfBlur', onBlur);\n\t\t\t$el.off( 'blur', 'input, select, textarea', onBlur );\n\t\t};\n\t\tvar setFocus = function ( value ) {\n\t\t\tif ( focus === value ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( value ) {\n\t\t\t\taddEvents();\n\t\t\t} else {\n\t\t\t\tremoveEvents();\n\t\t\t}\n\t\t\tfocus = value;\n\t\t\tcallback( value );\n\t\t};\n\n\t\t// Add events and set data.\n\t\t$el.on( 'click', onFocus );\n\t\t//$el.on('acfFocus', onFocus);\n\t\t$el.on( 'focus', 'input, select, textarea', onFocus );\n\t\t//$el.data('acf.onFocus', true);\n\t};\n\n\t/*\n\t * exists\n\t *\n\t * This function will return true if a jQuery selection exists\n\t *\n\t * @type\tfunction\n\t * @date\t8/09/2014\n\t * @since\t5.0.0\n\t *\n\t * @param\tn/a\n\t * @return\t(boolean)\n\t */\n\n\t$.fn.exists = function () {\n\t\treturn $( this ).length > 0;\n\t};\n\n\t/*\n\t * outerHTML\n\t *\n\t * This function will return a string containing the HTML of the selected element\n\t *\n\t * @type\tfunction\n\t * @date\t19/11/2013\n\t * @since\t5.0.0\n\t *\n\t * @param\t$.fn\n\t * @return\t(string)\n\t */\n\n\t$.fn.outerHTML = function () {\n\t\treturn $( this ).get( 0 ).outerHTML;\n\t};\n\n\t/*\n\t * indexOf\n\t *\n\t * This function will provide compatibility for ie8\n\t *\n\t * @type\tfunction\n\t * @date\t5/3/17\n\t * @since\t5.5.10\n\t *\n\t * @param\tn/a\n\t * @return\tn/a\n\t */\n\n\tif ( ! Array.prototype.indexOf ) {\n\t\tArray.prototype.indexOf = function ( val ) {\n\t\t\treturn $.inArray( val, this );\n\t\t};\n\t}\n\n\t/**\n\t * Returns true if value is a number or a numeric string.\n\t *\n\t * @date\t30/11/20\n\t * @since\t5.9.4\n\t * @link\thttps://stackoverflow.com/questions/9716468/pure-javascript-a-function-like-jquerys-isnumeric/9716488#9716488\n\t *\n\t * @param\tmixed n The variable being evaluated.\n\t * @return\tbool.\n\t */\n\tacf.isNumeric = function ( n ) {\n\t\treturn ! isNaN( parseFloat( n ) ) && isFinite( n );\n\t};\n\n\t/**\n\t * Triggers a \"refresh\" action used by various Components to redraw the DOM.\n\t *\n\t * @date\t26/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tvoid\n\t * @return\tvoid\n\t */\n\tacf.refresh = acf.debounce( function () {\n\t\t$( window ).trigger( 'acfrefresh' );\n\t\tacf.doAction( 'refresh' );\n\t}, 0 );\n\n\t// Set up actions from events\n\t$( document ).ready( function () {\n\t\tacf.doAction( 'ready' );\n\t} );\n\n\t$( window ).on( 'load', function () {\n\t\t// Use timeout to ensure action runs after Gutenberg has modified DOM elements during \"DOMContentLoaded\".\n\t\tsetTimeout( function () {\n\t\t\tacf.doAction( 'load' );\n\t\t} );\n\t} );\n\n\t$( window ).on( 'beforeunload', function () {\n\t\tacf.doAction( 'unload' );\n\t} );\n\n\t$( window ).on( 'resize', function () {\n\t\tacf.doAction( 'resize' );\n\t} );\n\n\t$( document ).on( 'sortstart', function ( event, ui ) {\n\t\tacf.doAction( 'sortstart', ui.item, ui.placeholder );\n\t} );\n\n\t$( document ).on( 'sortstop', function ( event, ui ) {\n\t\tacf.doAction( 'sortstop', ui.item, ui.placeholder );\n\t} );\n} )( jQuery );\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import './_acf.js';\nimport './_acf-hooks.js';\nimport './_acf-model.js';\nimport './_acf-popup.js';\nimport './_acf-modal.js';\nimport './_acf-panel.js';\nimport './_acf-notice.js';\nimport './_acf-tooltip.js';\n"],"names":["window","undefined","EventManager","MethodsAvailable","removeFilter","applyFilters","addFilter","removeAction","doAction","addAction","storage","getStorage","STORAGE","actions","filters","action","callback","priority","context","parseInt","_addHook","args","Array","prototype","slice","call","arguments","shift","_runHook","_removeHook","filter","type","hook","handlers","i","length","splice","handler","hookObject","hooks","push","_hookInsertSort","tmpHook","j","prevHook","len","apply","acf","$","models","Modal","Model","extend","data","title","content","toolbar","events","setup","props","$el","render","initialize","open","get","join","replaceWith","update","parseArgs","html","append","close","remove","onClickClose","e","preventDefault","focus","find","first","trigger","lockFocusToModal","locked","inertElement","inert","attr","returnFocusToOrigin","openedBy","closest","newModal","jQuery","delegateEventSplitter","protoProps","Parent","Child","hasOwnProperty","constructor","Object","create","cid","uniqueId","addEvents","addActions","addFilters","wait","didAction","id","busy","changed","eventScope","name","has","set","value","silent","prevValue","inherit","prop","addElements","elements","keys","addElement","selector","key","match","on","removeEvents","off","getEventTarget","event","document","validateEvent","target","is","proxyEvent","proxy","arrayArgs","extraArgs","eventArgs","currentTarget","concat","a1","a2","a3","a4","bubbles","triggerHandler","removeActions","removeFilters","setTimeout","milliseconds","time","console","timeEnd","show","hide","getInstance","getInstances","instances","each","Notice","text","timeout","dismiss","tmpl","addClass","away","$target","prepend","prevType","removeClass","escHtml","newNotice","noticeManager","$notices","after","dismissed","getPreference","includes","setPreference","panel","onClick","toggle","parent","isOpen","hasClass","Popup","width","height","loading","lockFocusToPopup","__","css","$loading","onPressEscapeClose","newPopup","newTooltip","confirmRemove","textConfirm","textCancel","TooltipConfirm","confirm","Tooltip","position","fade","$tooltip","top","left","tolerance","targetWidth","outerWidth","targetHeight","outerHeight","targetTop","offset","targetLeft","tooltipWidth","tooltipHeight","tooltipTop","scrollTop","targetConfirm","cancel","$document","onCancel","stopImmediatePropagation","onConfirm","tooltipHoverHelper","tooltip","showTitle","hideTitle","onKeyUp","idCounter","prefix","uniqueArray","array","onlyUnique","index","self","indexOf","uniqidSeed","uniqid","moreEntropy","retId","formatSeed","seed","reqWidth","toString","Math","floor","random","Date","getTime","toFixed","strReplace","search","replace","subject","split","strCamelCase","str","matches","map","s","c","charAt","toLowerCase","toUpperCase","strPascalCase","camel","strSlugify","strSanitize","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","Ø","Ù","Ú","Û","Ü","Ý","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ñ","ò","ó","ô","õ","ö","ø","ù","ú","û","ü","ý","ÿ","Ā","ā","Ă","ă","Ą","ą","Ć","ć","Ĉ","ĉ","Ċ","ċ","Č","č","Ď","ď","Đ","đ","Ē","ē","Ĕ","ĕ","Ė","ė","Ę","ę","Ě","ě","Ĝ","ĝ","Ğ","ğ","Ġ","ġ","Ģ","ģ","Ĥ","ĥ","Ħ","ħ","Ĩ","ĩ","Ī","ī","Ĭ","ĭ","Į","į","İ","ı","IJ","ij","Ĵ","ĵ","Ķ","ķ","Ĺ","ĺ","Ļ","ļ","Ľ","ľ","Ŀ","ŀ","Ł","ł","Ń","ń","Ņ","ņ","Ň","ň","ʼn","Ō","ō","Ŏ","ŏ","Ő","ő","Œ","œ","Ŕ","ŕ","Ŗ","ŗ","Ř","ř","Ś","ś","Ŝ","ŝ","Ş","ş","Š","š","Ţ","ţ","Ť","ť","Ŧ","ŧ","Ũ","ũ","Ū","ū","Ŭ","ŭ","Ů","ů","Ű","ű","Ų","ų","Ŵ","ŵ","Ŷ","ŷ","Ÿ","Ź","ź","Ż","ż","Ž","ž","ſ","ƒ","Ơ","ơ","Ư","ư","Ǎ","ǎ","Ǐ","ǐ","Ǒ","ǒ","Ǔ","ǔ","Ǖ","ǖ","Ǘ","ǘ","Ǚ","ǚ","Ǜ","ǜ","Ǻ","ǻ","Ǽ","ǽ","Ǿ","ǿ","nonWord","mapping","strMatch","s1","s2","val","min","strEscape","string","htmlEscapes","chr","strUnescape","htmlUnescapes","entity","escAttr","decode","defaults","acfL10n","_x","_n","single","plural","number","isArray","a","isObject","buildObject","obj","ref","String","serialize","inputs","serializeArray","item","serializeForAjax","actionHistory","doingAction","currentAction","k","preferences","JSON","parse","localStorage","getItem","getPreferenceName","substr","setItem","stringify","removePreference","endHeight","complete","removeTr","removeDiv","margin","style","wrap","$wrap","opacity","$tr","children","$td","duplicate","rename","before","$el2","clone","replacer","removeAttr","destructive","withReplacer","outerHTML","prepareForAjax","nonce","post_id","lang","startButtonLoading","stopButtonLoading","next","showLoading","hideLoading","updateUserSetting","ajaxData","ajax","url","dataType","$input","lockKey","unlock","isLocked","lock","isHidden","isVisible","enable","results","result","disable","isset","isget","getFileInputData","file","files","size","windowURL","URL","webkitURL","img","Image","onload","src","createObjectURL","isAjaxSuccess","json","success","getAjaxMessage","getAjaxError","getXhrError","xhr","responseJSON","message","error","statusText","renderSelect","$select","choices","values","crawl","items","itemsHtml","label","disabled","getLocks","setLocks","locks","isGutenberg","wp","select","objectToArray","debounce","later","clearTimeout","throttle","limit","isInView","el","rect","getBoundingClientRect","bottom","innerHeight","documentElement","clientHeight","right","innerWidth","clientWidth","onceInView","check","forEach","pop","debounced","once","func","focusAttention","scrollTime","animate","fadeTime","onFocus","ignoreBlur","setFocus","onBlur","fn","exists","inArray","isNumeric","n","isNaN","parseFloat","isFinite","refresh","ready","ui","placeholder"],"sourceRoot":""}
\ No newline at end of file
diff --git a/assets/build/js/acf.min.js b/assets/build/js/acf.min.js
new file mode 100644
index 0000000..ae614dd
--- /dev/null
+++ b/assets/build/js/acf.min.js
@@ -0,0 +1 @@
+!function(){var t={204:function(){!function(t,e){"use strict";acf.hooks=new function(){var t={removeFilter:function(e,i){return"string"==typeof e&&n("filters",e,i),t},applyFilters:function(){var e=Array.prototype.slice.call(arguments),n=e.shift();return"string"==typeof n?o("filters",n,e):t},addFilter:function(e,n,o,r){return"string"==typeof e&&"function"==typeof n&&i("filters",e,n,o=parseInt(o||10,10),r),t},removeAction:function(e,i){return"string"==typeof e&&n("actions",e,i),t},doAction:function(){var e=Array.prototype.slice.call(arguments),n=e.shift();return"string"==typeof n&&o("actions",n,e),t},addAction:function(e,n,o,r){return"string"==typeof e&&"function"==typeof n&&i("actions",e,n,o=parseInt(o||10,10),r),t},storage:function(){return e}},e={actions:{},filters:{}};function n(t,n,i,o){if(e[t][n])if(i){var r,a=e[t][n];if(o)for(r=a.length;r--;){var s=a[r];s.callback===i&&s.context===o&&a.splice(r,1)}else for(r=a.length;r--;)a[r].callback===i&&a.splice(r,1)}else e[t][n]=[]}function i(t,n,i,o,r){var a={callback:i,priority:o,context:r},s=e[t][n];s?(s.push(a),s=function(t){for(var e,n,i,o=1,r=t.length;oe.priority;)t[n]=t[n-1],--n;t[n]=e}return t}(s)):s=[a],e[t][n]=s}function o(t,n,i){var o=e[t][n];if(!o)return"filters"===t&&i[0];var r=0,a=o.length;if("filters"===t)for(;r",'','
',"
"+e+" ",' ',"",'
'+n+"
",'
'+i+"
","
",'
',""].join(""));this.$el&&this.$el.replaceWith(o),this.$el=o,acf.doAction("append",o)},update:function(t){this.data=acf.parseArgs(t,this.data),this.render()},title:function(t){this.$(".acf-modal-title h2").html(t)},content:function(t){this.$(".acf-modal-content").html(t)},toolbar:function(t){this.$(".acf-modal-toolbar").html(t)},open:function(){t("body").append(this.$el)},close:function(){this.remove()},onClickClose:function(t,e){t.preventDefault(),this.close()},focus:function(){this.$el.find(".acf-icon").first().trigger("focus")},lockFocusToModal:function(e){let n=t("#wpwrap");n.length&&(n[0].inert=e,n.attr("aria-hidden",e))},returnFocusToOrigin:function(){this.data.openedBy instanceof t&&this.data.openedBy.closest("body").length>0&&this.data.openedBy.trigger("focus")}}),acf.newModal=function(t){return new acf.models.Modal(t)}},9653:function(){var t,e,n;t=jQuery,e=/^(\S+)\s*(.*)$/,n=acf.Model=function(){this.cid=acf.uniqueId("acf"),this.data=t.extend(!0,{},this.data),this.setup.apply(this,arguments),this.$el&&!this.$el.data("acf")&&this.$el.data("acf",this);var e=function(){this.initialize(),this.addEvents(),this.addActions(),this.addFilters()};this.wait&&!acf.didAction(this.wait)?this.addAction(this.wait,e):e.apply(this)},t.extend(n.prototype,{id:"",cid:"",$el:null,data:{},busy:!1,changed:!1,events:{},actions:{},filters:{},eventScope:"",wait:!1,priority:10,get:function(t){return this.data[t]},has:function(t){return null!=this.get(t)},set:function(t,e,n){var i=this.get(t);return i==e||(this.data[t]=e,n||(this.changed=!0,this.trigger("changed:"+t,[e,i]),this.trigger("changed",[t,e,i]))),this},inherit:function(e){return e instanceof jQuery&&(e=e.data()),t.extend(this.data,e),this},prop:function(){return this.$el.prop.apply(this.$el,arguments)},setup:function(e){t.extend(this,e)},initialize:function(){},addElements:function(t){if(!(t=t||this.elements||null)||!Object.keys(t).length)return!1;for(var e in t)this.addElement(e,t[e])},addElement:function(t,e){this["$"+t]=this.$(e)},addEvents:function(t){if(!(t=t||this.events||null))return!1;for(var n in t){var i=n.match(e);this.on(i[1],i[2],t[n])}},removeEvents:function(t){if(!(t=t||this.events||null))return!1;for(var n in t){var i=n.match(e);this.off(i[1],i[2],t[n])}},getEventTarget:function(e,n){return e||this.$el||t(document)},validateEvent:function(e){return!this.eventScope||t(e.target).closest(this.eventScope).is(this.$el)},proxyEvent:function(e){return this.proxy((function(n){if(this.validateEvent(n)){var i=acf.arrayArgs(arguments).slice(1),o=[n,t(n.currentTarget)].concat(i);e.apply(this,o)}}))},on:function(t,e,n,i){var o,r,a,s,c;t instanceof jQuery?i?(o=t,r=e,a=n,s=i):(o=t,r=e,s=n):n?(r=t,a=e,s=n):(r=t,s=e),o=this.getEventTarget(o),"string"==typeof s&&(s=this.proxyEvent(this[s])),r=r+"."+this.cid,c=a?[r,a,s]:[r,s],o.on.apply(o,c)},off:function(t,e,n){var i,o,r,a;t instanceof jQuery?n?(i=t,o=e,r=n):(i=t,o=e):e?(o=t,r=e):o=t,i=this.getEventTarget(i),o=o+"."+this.cid,a=r?[o,r]:[o],i.off.apply(i,a)},trigger:function(t,e,n){var i=this.getEventTarget();return n?i.trigger.apply(i,arguments):i.triggerHandler.apply(i,arguments),this},addActions:function(t){if(!(t=t||this.actions||null))return!1;for(var e in t)this.addAction(e,t[e])},removeActions:function(t){if(!(t=t||this.actions||null))return!1;for(var e in t)this.removeAction(e,t[e])},addAction:function(t,e,n){n=n||this.priority,"string"==typeof e&&(e=this[e]),acf.addAction(t,e,n,this)},removeAction:function(t,e){acf.removeAction(t,this[e])},addFilters:function(t){if(!(t=t||this.filters||null))return!1;for(var e in t)this.addFilter(e,t[e])},addFilter:function(t,e,n){n=n||this.priority,"string"==typeof e&&(e=this[e]),acf.addFilter(t,e,n,this)},removeFilters:function(t){if(!(t=t||this.filters||null))return!1;for(var e in t)this.removeFilter(e,t[e])},removeFilter:function(t,e){acf.removeFilter(t,this[e])},$:function(t){return this.$el.find(t)},remove:function(){this.removeEvents(),this.removeActions(),this.removeFilters(),this.$el.remove()},setTimeout:function(t,e){return setTimeout(this.proxy(t),e)},time:function(){console.time(this.id||this.cid)},timeEnd:function(){console.timeEnd(this.id||this.cid)},show:function(){acf.show(this.$el)},hide:function(){acf.hide(this.$el)},proxy:function(e){return t.proxy(e,this)}}),n.extend=function(e){var n,i=this;return n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return i.apply(this,arguments)},t.extend(n,i),n.prototype=Object.create(i.prototype),t.extend(n.prototype,e),n.prototype.constructor=n,n},acf.models={},acf.getInstance=function(t){return t.data("acf")},acf.getInstances=function(e){var n=[];return e.each((function(){n.push(acf.getInstance(t(this)))})),n}},86:function(){var t,e;t=jQuery,e=acf.Model.extend({data:{text:"",type:"",timeout:0,dismiss:!0,target:!1,close:function(){}},events:{"click .acf-notice-dismiss":"onClickClose"},tmpl:function(){return'
'},setup:function(e){t.extend(this.data,e),this.$el=t(this.tmpl())},initialize:function(){this.render(),this.show()},render:function(){this.type(this.get("type")),this.html(""+this.get("text")+"
"),this.get("dismiss")&&(this.$el.append(' '),this.$el.addClass("-dismiss"));var t=this.get("timeout");t&&this.away(t)},update:function(e){t.extend(this.data,e),this.initialize(),this.removeEvents(),this.addEvents()},show:function(){var t=this.get("target");t&&t.prepend(this.$el)},hide:function(){this.$el.remove()},away:function(t){this.setTimeout((function(){acf.remove(this.$el)}),t)},type:function(t){var e=this.get("type");e&&this.$el.removeClass("-"+e),this.$el.addClass("-"+t),"error"==t&&this.$el.addClass("acf-error-message")},html:function(t){this.$el.html(acf.escHtml(t))},text:function(t){this.$("p").html(acf.escHtml(t))},onClickClose:function(t,e){t.preventDefault(),this.get("close").apply(this,arguments),this.remove()}}),acf.newNotice=function(t){return"object"!=typeof t&&(t={text:t}),new e(t)},new acf.Model({wait:"prepare",priority:1,initialize:function(){t(".acf-admin-notice").each((function(){if(t(this).length&&t("h1:first").after(t(this)),t(this).data("persisted")){let e=acf.getPreference("dismissed-notices");e&&"object"==typeof e&&e.includes(t(this).data("persist-id"))?t(this).remove():t(this).on("click",".notice-dismiss",(function(n){e=acf.getPreference("dismissed-notices"),e&&"object"==typeof e||(e=[]),e.push(t(this).closest(".acf-admin-notice").data("persist-id")),acf.setPreference("dismissed-notices",e)}))}}))}})},8729:function(){jQuery,new acf.Model({events:{"click .acf-panel-title":"onClick"},onClick:function(t,e){t.preventDefault(),this.toggle(e.parent())},isOpen:function(t){return t.hasClass("-open")},toggle:function(t){this.isOpen(t)?this.close(t):this.open(t)},open:function(t){t.addClass("-open"),t.find(".acf-panel-title i").attr("class","dashicons dashicons-arrow-down")},close:function(t){t.removeClass("-open"),t.find(".acf-panel-title i").attr("class","dashicons dashicons-arrow-right")}})},7904:function(){var t;t=jQuery,acf.models.Popup=acf.Model.extend({data:{title:"",content:"",width:0,height:0,loading:!1,openedBy:null},events:{'click [data-event="close"]':"onClickClose","click .acf-close-popup":"onClickClose",keydown:"onPressEscapeClose"},setup:function(e){t.extend(this.data,e),this.$el=t(this.tmpl())},initialize:function(){this.render(),this.open(),this.focus(),this.lockFocusToPopup(!0)},tmpl:function(){return['"].join("")},render:function(){var t=this.get("title"),e=this.get("content"),n=this.get("loading"),i=this.get("width"),o=this.get("height");this.title(t),this.content(e),i&&this.$(".acf-popup-box").css("width",i),o&&this.$(".acf-popup-box").css("min-height",o),this.loading(n),acf.doAction("append",this.$el)},focus:function(){this.$el.find(".acf-icon").first().trigger("focus")},lockFocusToPopup:function(e){let n=t("#wpwrap");n.length&&(n[0].inert=e,n.attr("aria-hidden",e))},update:function(t){this.data=acf.parseArgs(t,this.data),this.render()},title:function(t){this.$(".title:first h3").html(t)},content:function(t){this.$(".inner:first").html(t)},loading:function(t){var e=this.$(".loading:first");t?e.show():e.hide()},open:function(){t("body").append(this.$el)},close:function(){this.lockFocusToPopup(!1),this.returnFocusToOrigin(),this.remove()},onClickClose:function(t,e){t.preventDefault(),this.close()},onPressEscapeClose:function(t){"Escape"===t.key&&this.close()},returnFocusToOrigin:function(){this.data.openedBy instanceof t&&this.data.openedBy.closest("body").length>0&&this.data.openedBy.trigger("focus")}}),acf.newPopup=function(t){return new acf.models.Popup(t)}},7861:function(){!function(t,e){acf.newTooltip=function(t){return"object"!=typeof t&&(t={text:t}),t.confirmRemove!==e?(t.textConfirm=acf.__("Remove"),t.textCancel=acf.__("Cancel"),new i(t)):t.confirm!==e?new i(t):new n(t)};var n=acf.Model.extend({data:{text:"",timeout:0,target:null},tmpl:function(){return'
'},setup:function(e){t.extend(this.data,e),this.$el=t(this.tmpl())},initialize:function(){this.render(),this.show(),this.position();var e=this.get("timeout");e&&setTimeout(t.proxy(this.fade,this),e)},update:function(e){t.extend(this.data,e),this.initialize()},render:function(){this.html(this.get("text"))},show:function(){t("body").append(this.$el)},hide:function(){this.$el.remove()},fade:function(){this.$el.addClass("acf-fade-up"),this.setTimeout((function(){this.remove()}),250)},html:function(t){this.$el.html(t)},position:function(){var e=this.$el,n=this.get("target");if(n){e.removeClass("right left bottom top").css({top:0,left:0});var i=n.outerWidth(),o=n.outerHeight(),r=n.offset().top,a=n.offset().left,s=e.outerWidth(),c=e.outerHeight(),l=e.offset().top,u=r-c-l,f=a+i/2-s/2;f<10?(e.addClass("right"),f=a+i,u=r+o/2-c/2-l):f+s+10>t(window).width()?(e.addClass("left"),f=a-s,u=r+o/2-c/2-l):u-t(window).scrollTop()<10?(e.addClass("bottom"),u=r+o-l):e.addClass("top"),e.css({top:u,left:f})}}}),i=n.extend({data:{text:"",textConfirm:"",textCancel:"",target:null,targetConfirm:!0,confirm:function(){},cancel:function(){},context:!1},events:{'click [data-event="cancel"]':"onCancel",'click [data-event="confirm"]':"onConfirm"},addEvents:function(){acf.Model.prototype.addEvents.apply(this);var e=t(document),n=this.get("target");this.setTimeout((function(){this.on(e,"click","onCancel")})),this.get("targetConfirm")&&this.on(n,"click","onConfirm")},removeEvents:function(){acf.Model.prototype.removeEvents.apply(this);var e=t(document),n=this.get("target");this.off(e,"click"),this.off(n,"click")},render:function(){var t=[this.get("text")||acf.__("Are you sure?"),''+(this.get("textConfirm")||acf.__("Yes"))+" ",''+(this.get("textCancel")||acf.__("No"))+" "].join(" ");this.html(t),this.$el.addClass("-confirm")},onCancel:function(t,e){t.preventDefault(),t.stopImmediatePropagation();var n=this.get("cancel"),i=this.get("context")||this;n.apply(i,arguments),this.remove()},onConfirm:function(t,e){t.preventDefault(),t.stopImmediatePropagation();var n=this.get("confirm"),i=this.get("context")||this;n.apply(i,arguments),this.remove()}});acf.models.Tooltip=n,acf.models.TooltipConfirm=i,new acf.Model({tooltip:!1,events:{"mouseenter .acf-js-tooltip":"showTitle","mouseup .acf-js-tooltip":"hideTitle","mouseleave .acf-js-tooltip":"hideTitle","focus .acf-js-tooltip":"showTitle","blur .acf-js-tooltip":"hideTitle","keyup .acf-js-tooltip":"onKeyUp"},showTitle:function(t,e){var n=e.attr("title");n&&(e.attr("title",""),this.tooltip?this.tooltip.update({text:n,target:e}):this.tooltip=acf.newTooltip({text:n,target:e}))},hideTitle:function(t,e){this.tooltip.hide(),e.attr("title",this.tooltip.get("text"))},onKeyUp:function(t,e){"Escape"===t.key&&this.hideTitle(t,e)}})}(jQuery)},7806:function(){!function(t,e){var n={};window.acf=n,n.data={},n.get=function(t){return this.data[t]||null},n.has=function(t){return null!==this.get(t)},n.set=function(t,e){return this.data[t]=e,this};var i=0;n.uniqueId=function(t){var e=++i+"";return t?t+e:e},n.uniqueArray=function(t){return t.filter((function(t,e,n){return n.indexOf(t)===e}))};var o="";n.uniqid=function(t,e){var n;void 0===t&&(t="");var i=function(t,e){return e<(t=parseInt(t,10).toString(16)).length?t.slice(t.length-e):e>t.length?Array(e-t.length+1).join("0")+t:t};return o||(o=Math.floor(123456789*Math.random())),o++,n=t,n+=i(parseInt((new Date).getTime()/1e3,10),8),n+=i(o,5),e&&(n+=(10*Math.random()).toFixed(8).toString()),n},n.strReplace=function(t,e,n){return n.split(t).join(e)},n.strCamelCase=function(t){var e=t.match(/([a-zA-Z0-9]+)/g);return e?e.map((function(t,e){var n=t.charAt(0);return(0===e?n.toLowerCase():n.toUpperCase())+t.slice(1)})).join(""):""},n.strPascalCase=function(t){var e=n.strCamelCase(t);return e.charAt(0).toUpperCase()+e.slice(1)},n.strSlugify=function(t){return n.strReplace("_","-",t.toLowerCase())},n.strSanitize=function(t){var n={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","ß":"s","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","Ċ":"C","ċ":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"D","đ":"d","Ē":"E","ē":"e","Ĕ":"E","ĕ":"e","Ė":"E","ė":"e","Ę":"E","ę":"e","Ě":"E","ě":"e","Ĝ":"G","ĝ":"g","Ğ":"G","ğ":"g","Ġ":"G","ġ":"g","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"l","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ſ":"s","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Ǎ":"A","ǎ":"a","Ǐ":"I","ǐ":"i","Ǒ":"O","ǒ":"o","Ǔ":"U","ǔ":"u","Ǖ":"U","ǖ":"u","Ǘ":"U","ǘ":"u","Ǚ":"U","ǚ":"u","Ǜ":"U","ǜ":"u","Ǻ":"A","ǻ":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","ǿ":"o"," ":"_","'":"","?":"","/":"","\\":"",".":"",",":"","`":"",">":"","<":"",'"':"","[":"","]":"","|":"","{":"","}":"","(":"",")":""};return(t=t.replace(/\W/g,(function(t){return n[t]!==e?n[t]:t}))).toLowerCase()},n.strMatch=function(t,e){for(var n=0,i=Math.min(t.length,e.length),o=0;o":">",'"':""","'":"'"};return(""+t).replace(/[&<>"']/g,(function(t){return e[t]}))},n.strUnescape=function(t){var e={"&":"&","<":"<",">":">",""":'"',"'":"'"};return(""+t).replace(/&|<|>|"|'/g,(function(t){return e[t]}))},n.escAttr=n.strEscape,n.escHtml=function(t){return(""+t).replace(/").html(e).text()},n.parseArgs=function(e,n){return"object"!=typeof e&&(e={}),"object"!=typeof n&&(n={}),t.extend({},n,e)},window.acfL10n==e&&(acfL10n={}),n.__=function(t){return acfL10n[t]||t},n._x=function(t,e){return acfL10n[t+"."+e]||acfL10n[t]||t},n._n=function(t,e,i){return 1==i?n.__(t):n.__(e)},n.isArray=function(t){return Array.isArray(t)},n.isObject=function(t){return"object"==typeof t};var r=function(t,e,i){var o=(e=e.replace("[]","[%%index%%]")).match(/([^\[\]])+/g);if(o)for(var r=o.length,a=t,s=0;s');var s=e.parent();e.css({height:n,width:i,margin:o,position:"absolute"}),setTimeout((function(){s.css({opacity:0,height:t.endHeight})}),50),setTimeout((function(){e.attr("style",a),s.remove(),t.complete()}),301)},u=function(e){var n=e.target,i=n.height(),o=n.children().length,r=t(' ');n.addClass("acf-remove-element"),setTimeout((function(){n.html(r)}),251),setTimeout((function(){n.removeClass("acf-remove-element"),r.css({height:e.endHeight})}),300),setTimeout((function(){n.remove(),e.complete()}),451)};n.duplicate=function(e){e instanceof jQuery&&(e={target:e}),e=n.parseArgs(e,{target:!1,search:"",replace:"",rename:!0,before:function(t){},after:function(t,e){},append:function(t,e){t.after(e)}}),e.target=e.target||e.$el;var i=e.target;e.search=e.search||i.attr("data-id"),e.replace=e.replace||n.uniqid(),e.before(i),n.doAction("before_duplicate",i);var o=i.clone();return e.rename&&n.rename({target:o,search:e.search,replace:e.replace,replacer:"function"==typeof e.rename?e.rename:null}),o.removeClass("acf-clone"),o.find(".ui-sortable").removeClass("ui-sortable"),o.find("[data-select2-id]").removeAttr("data-select2-id"),o.find(".select2").remove(),o.find('.acf-is-subfields select[data-ui="1"]').each((function(){t(this).prop("id",t(this).prop("id").replace("acf_fields",n.uniqid("duplicated_")+"_acf_fields"))})),o.find(".acf-field-settings > .acf-tab-wrap").remove(),e.after(i,o),n.doAction("after_duplicate",i,o),e.append(i,o),n.doAction("duplicate",i,o),n.doAction("append",o),o},n.rename=function(t){t instanceof jQuery&&(t={target:t});var e=(t=n.parseArgs(t,{target:!1,destructive:!1,search:"",replace:"",replacer:null})).target;t.search||(t.search=e.attr("data-id")),t.replace||(t.replace=n.uniqid("acf")),t.replacer||(t.replacer=function(t,e,n,i){return e.replace(n,i)});var i=function(e){return function(n,i){return t.replacer(e,i,t.search,t.replace)}};if(t.destructive){var o=n.strReplace(t.search,t.replace,e.outerHTML());e.replaceWith(o)}else e.attr("data-id",t.replace),e.find('[id*="'+t.search+'"]').attr("id",i("id")),e.find('[for*="'+t.search+'"]').attr("for",i("for")),e.find('[name*="'+t.search+'"]').attr("name",i("name"));return e},n.prepareForAjax=function(t){return t.nonce=n.get("nonce"),t.post_id=n.get("post_id"),n.has("language")&&(t.lang=n.get("language")),n.applyFilters("prepare_for_ajax",t)},n.startButtonLoading=function(t){t.prop("disabled",!0),t.after(' ')},n.stopButtonLoading=function(t){t.prop("disabled",!1),t.next(".acf-loading").remove()},n.showLoading=function(t){t.append('
')},n.hideLoading=function(t){t.children(".acf-loading-overlay").remove()},n.updateUserSetting=function(e,i){var o={action:"acf/ajax/user_setting",name:e,value:i};t.ajax({url:n.get("ajaxurl"),data:n.prepareForAjax(o),type:"post",dataType:"html"})},n.val=function(t,e,n){var i=t.val();return e!==i&&(t.val(e),t.is("select")&&null===t.val()?(t.val(i),!1):(!0!==n&&t.trigger("change"),!0))},n.show=function(t,e){return e&&n.unlock(t,"hidden",e),!n.isLocked(t,"hidden")&&!!t.hasClass("acf-hidden")&&(t.removeClass("acf-hidden"),!0)},n.hide=function(t,e){return e&&n.lock(t,"hidden",e),!t.hasClass("acf-hidden")&&(t.addClass("acf-hidden"),!0)},n.isHidden=function(t){return t.hasClass("acf-hidden")},n.isVisible=function(t){return!n.isHidden(t)};var f=function(t,e){return!(t.hasClass("acf-disabled")||(e&&n.unlock(t,"disabled",e),n.isLocked(t,"disabled")||!t.prop("disabled")||(t.prop("disabled",!1),0)))};n.enable=function(e,n){if(e.attr("name"))return f(e,n);var i=!1;return e.find("[name]").each((function(){f(t(this),n)&&(i=!0)})),i};var d=function(t,e){return e&&n.lock(t,"disabled",e),!t.prop("disabled")&&(t.prop("disabled",!0),!0)};n.disable=function(e,n){if(e.attr("name"))return d(e,n);var i=!1;return e.find("[name]").each((function(){d(t(this),n)&&(i=!0)})),i},n.isset=function(t){for(var e=1;e-1){var a=window.URL||window.webkitURL,s=new Image;s.onload=function(){o.width=this.width,o.height=this.height,e(o)},s.src=a.createObjectURL(r)}else e(o);else e(o)},n.isAjaxSuccess=function(t){return t&&t.success},n.getAjaxMessage=function(t){return n.isget(t,"data","message")},n.getAjaxError=function(t){return n.isget(t,"data","error")},n.getXhrError=function(t){if(t.responseJSON){if(t.responseJSON.message)return t.responseJSON.message;if(t.responseJSON.data&&t.responseJSON.data.error)return t.responseJSON.data.error}else if(t.statusText)return t.statusText;return""},n.renderSelect=function(t,e){var i=t.val(),o=[],r=function(t){var e="";return t.map((function(t){var i=t.text||t.label||"",a=t.id||t.value||"";o.push(a),t.children?e+=''+r(t.children)+" ":e+='"+n.strEscape(i)+" "})),e};return t.html(r(e)),o.indexOf(i)>-1&&t.val(i),t.val()};var h,p,g,v,m,y=function(t,e){return t.data("acf-lock-"+e)||[]},w=function(t,e,n){t.data("acf-lock-"+e,n)};n.lock=function(t,e,n){var i=y(t,e);i.indexOf(n)<0&&(i.push(n),w(t,e,i))},n.unlock=function(t,e,n){var i=y(t,e),o=i.indexOf(n);return o>-1&&(i.splice(o,1),w(t,e,i)),0===i.length},n.isLocked=function(t,e){return y(t,e).length>0},n.isGutenberg=function(){return!!(window.wp&&wp.data&&wp.data.select&&wp.data.select("core/editor"))},n.objectToArray=function(t){return Object.keys(t).map((function(e){return t[e]}))},n.debounce=function(t,e){var n;return function(){var i=this,o=arguments;clearTimeout(n),n=setTimeout((function(){t.apply(i,o)}),e)}},n.throttle=function(t,e){var n=!1;return function(){n||(n=!0,setTimeout((function(){n=!1}),e),t.apply(this,arguments))}},n.isInView=function(t){t instanceof jQuery&&(t=t[0]);var e=t.getBoundingClientRect();return e.top!==e.bottom&&e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)},n.onceInView=(h=[],p=0,g=function(){h.forEach((function(t){n.isInView(t.el)&&(t.callback.apply(this),m(t.id))}))},v=n.debounce(g,300),m=function(e){(h=h.filter((function(t){return t.id!==e}))).length||t(window).off("scroll resize",v).off("acfrefresh orientationchange",g)},function(e,i){e instanceof jQuery&&(e=e[0]),n.isInView(e)?i.apply(this):function(e,n){h.length||t(window).on("scroll resize",v).on("acfrefresh orientationchange",g),h.push({id:p++,el:e,callback:n})}(e,i)}),n.once=function(t){var n=0;return function(){return n++>0?t=e:t.apply(this,arguments)}},n.focusAttention=function(e){var i=1e3;e.addClass("acf-attention -focused"),n.isInView(e)||(t("body, html").animate({scrollTop:e.offset().top-t(window).height()/2},500),i+=500),setTimeout((function(){e.removeClass("-focused"),setTimeout((function(){e.removeClass("acf-attention")}),250)}),i)},n.onFocus=function(e,n){var i=!1,o=!1,r=function(){i=!0,setTimeout((function(){i=!1}),1),s(!0)},a=function(){i||s(!1)},s=function(i){o!==i&&(i?(t(document).on("click",a),e.on("blur","input, select, textarea",a)):(t(document).off("click",a),e.off("blur","input, select, textarea",a)),o=i,n(i))};e.on("click",r),e.on("focus","input, select, textarea",r)},t.fn.exists=function(){return t(this).length>0},t.fn.outerHTML=function(){return t(this).get(0).outerHTML},Array.prototype.indexOf||(Array.prototype.indexOf=function(e){return t.inArray(e,this)}),n.isNumeric=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},n.refresh=n.debounce((function(){t(window).trigger("acfrefresh"),n.doAction("refresh")}),0),t(document).ready((function(){n.doAction("ready")})),t(window).on("load",(function(){setTimeout((function(){n.doAction("load")}))})),t(window).on("beforeunload",(function(){n.doAction("unload")})),t(window).on("resize",(function(){n.doAction("resize")})),t(document).on("sortstart",(function(t,e){n.doAction("sortstart",e.item,e.placeholder)})),t(document).on("sortstop",(function(t,e){n.doAction("sortstop",e.item,e.placeholder)}))}(jQuery)}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";n(7806),n(204),n(9653),n(7904),n(2206),n(8729),n(86),n(7861)}()}();
\ No newline at end of file
diff --git a/assets/build/js/pro/acf-pro-blocks-legacy.js b/assets/build/js/pro/acf-pro-blocks-legacy.js
new file mode 100644
index 0000000..234b915
--- /dev/null
+++ b/assets/build/js/pro/acf-pro-blocks-legacy.js
@@ -0,0 +1,4558 @@
+/******/ (function() { // webpackBootstrap
+/******/ var __webpack_modules__ = ({
+
+/***/ "./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-blocks-legacy.js":
+/*!********************************************************************************!*\
+ !*** ./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-blocks-legacy.js ***!
+ \********************************************************************************/
+/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
+/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "./node_modules/react/index.js");
+/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
+
+
+function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
+function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
+(function ($, undefined) {
+ // Dependencies.
+ const {
+ BlockControls,
+ InspectorControls,
+ InnerBlocks
+ } = wp.blockEditor;
+ const {
+ Toolbar,
+ IconButton,
+ Placeholder,
+ Spinner
+ } = wp.components;
+ const {
+ Fragment
+ } = wp.element;
+ const {
+ Component
+ } = React;
+ const {
+ withSelect
+ } = wp.data;
+ const {
+ createHigherOrderComponent
+ } = wp.compose;
+
+ /**
+ * Storage for registered block types.
+ *
+ * @since 5.8.0
+ * @var object
+ */
+ const blockTypes = {};
+
+ /**
+ * Returns a block type for the given name.
+ *
+ * @date 20/2/19
+ * @since 5.8.0
+ *
+ * @param string name The block name.
+ * @return (object|false)
+ */
+ function getBlockType(name) {
+ return blockTypes[name] || false;
+ }
+
+ /**
+ * Returns true if a block exists for the given name.
+ *
+ * @date 20/2/19
+ * @since 5.8.0
+ *
+ * @param string name The block name.
+ * @return bool
+ */
+ function isBlockType(name) {
+ return !!blockTypes[name];
+ }
+
+ /**
+ * Returns true if the provided block is new.
+ *
+ * @date 31/07/2020
+ * @since 5.9.0
+ *
+ * @param object props The block props.
+ * @return bool
+ */
+ function isNewBlock(props) {
+ return !props.attributes.id;
+ }
+
+ /**
+ * Returns true if the provided block is a duplicate:
+ * True when there are is another block with the same "id", but a different "clientId".
+ *
+ * @date 31/07/2020
+ * @since 5.9.0
+ *
+ * @param object props The block props.
+ * @return bool
+ */
+ function isDuplicateBlock(props) {
+ return getBlocks().filter(block => block.attributes.id === props.attributes.id).filter(block => block.clientId !== props.clientId).length;
+ }
+
+ /**
+ * Registers a block type.
+ *
+ * @date 19/2/19
+ * @since 5.8.0
+ *
+ * @param object blockType The block type settings localized from PHP.
+ * @return object The result from wp.blocks.registerBlockType().
+ */
+ function registerBlockType(blockType) {
+ // bail early if is excluded post_type.
+ var allowedTypes = blockType.post_types || [];
+ if (allowedTypes.length) {
+ // Always allow block to appear on "Edit reusable Block" screen.
+ allowedTypes.push('wp_block');
+
+ // Check post type.
+ var postType = acf.get('postType');
+ if (allowedTypes.indexOf(postType) === -1) {
+ return false;
+ }
+ }
+
+ // Handle svg HTML.
+ if (typeof blockType.icon === 'string' && blockType.icon.substr(0, 4) === ' cat.slug === blockType.category).pop();
+ if (!category) {
+ //console.warn( `The block "${blockType.name}" is registered with an unknown category "${blockType.category}".` );
+ blockType.category = 'common';
+ }
+
+ // Define block type attributes.
+ // Leave default undefined to allow WP to serialize attributes in HTML comments.
+ // See https://github.com/WordPress/gutenberg/issues/7342
+ let attributes = {
+ id: {
+ type: 'string'
+ },
+ name: {
+ type: 'string'
+ },
+ data: {
+ type: 'object'
+ },
+ align: {
+ type: 'string'
+ },
+ mode: {
+ type: 'string'
+ }
+ };
+
+ // Append edit and save functions.
+ let ThisBlockEdit = BlockEdit;
+ let ThisBlockSave = BlockSave;
+
+ // Apply align_text functionality.
+ if (blockType.supports.align_text) {
+ attributes = withAlignTextAttributes(attributes);
+ ThisBlockEdit = withAlignTextComponent(ThisBlockEdit, blockType);
+ }
+
+ // Apply align_content functionality.
+ if (blockType.supports.align_content) {
+ attributes = withAlignContentAttributes(attributes);
+ ThisBlockEdit = withAlignContentComponent(ThisBlockEdit, blockType);
+ }
+
+ // Merge in block settings.
+ blockType = acf.parseArgs(blockType, {
+ title: '',
+ name: '',
+ category: '',
+ attributes: attributes,
+ edit: function (props) {
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(ThisBlockEdit, props);
+ },
+ save: function (props) {
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(ThisBlockSave, props);
+ }
+ });
+
+ // Remove all attribute defaults from PHP values to allow serialisation.
+ // https://github.com/WordPress/gutenberg/issues/7342
+ for (const key in blockType.attributes) {
+ delete blockType.attributes[key].default;
+ }
+
+ // Add to storage.
+ blockTypes[blockType.name] = blockType;
+
+ // Register with WP.
+ var result = wp.blocks.registerBlockType(blockType.name, blockType);
+
+ // Fix bug in 'core/anchor/attribute' filter overwriting attribute.
+ // See https://github.com/WordPress/gutenberg/issues/15240
+ if (result.attributes.anchor) {
+ result.attributes.anchor = {
+ type: 'string'
+ };
+ }
+
+ // Return result.
+ return result;
+ }
+
+ /**
+ * Returns the wp.data.select() response with backwards compatibility.
+ *
+ * @date 17/06/2020
+ * @since 5.9.0
+ *
+ * @param string selector The selector name.
+ * @return mixed
+ */
+ function select(selector) {
+ if (selector === 'core/block-editor') {
+ return wp.data.select('core/block-editor') || wp.data.select('core/editor');
+ }
+ return wp.data.select(selector);
+ }
+
+ /**
+ * Returns the wp.data.dispatch() response with backwards compatibility.
+ *
+ * @date 17/06/2020
+ * @since 5.9.0
+ *
+ * @param string selector The selector name.
+ * @return mixed
+ */
+ function dispatch(selector) {
+ return wp.data.dispatch(selector);
+ }
+
+ /**
+ * Returns an array of all blocks for the given args.
+ *
+ * @date 27/2/19
+ * @since 5.7.13
+ *
+ * @param object args An object of key=>value pairs used to filter results.
+ * @return array.
+ */
+ function getBlocks(args) {
+ // Get all blocks (avoid deprecated warning).
+ let blocks = select('core/block-editor').getBlocks();
+
+ // Append innerBlocks.
+ let i = 0;
+ while (i < blocks.length) {
+ blocks = blocks.concat(blocks[i].innerBlocks);
+ i++;
+ }
+
+ // Loop over args and filter.
+ for (var k in args) {
+ blocks = blocks.filter(block => block.attributes[k] === args[k]);
+ }
+
+ // Return results.
+ return blocks;
+ }
+
+ // Data storage for AJAX requests.
+ const ajaxQueue = {};
+
+ /**
+ * Fetches a JSON result from the AJAX API.
+ *
+ * @date 28/2/19
+ * @since 5.7.13
+ *
+ * @param object block The block props.
+ * @query object The query args used in AJAX callback.
+ * @return object The AJAX promise.
+ */
+ function fetchBlock(args) {
+ const {
+ attributes = {},
+ query = {},
+ delay = 0
+ } = args;
+
+ // Use storage or default data.
+ const {
+ id
+ } = attributes;
+ const data = ajaxQueue[id] || {
+ query: {},
+ timeout: false,
+ promise: $.Deferred()
+ };
+
+ // Append query args to storage.
+ data.query = _objectSpread(_objectSpread({}, data.query), query);
+
+ // Set fresh timeout.
+ clearTimeout(data.timeout);
+ data.timeout = setTimeout(function () {
+ $.ajax({
+ url: acf.get('ajaxurl'),
+ dataType: 'json',
+ type: 'post',
+ cache: false,
+ data: acf.prepareForAjax({
+ action: 'acf/ajax/fetch-block',
+ block: JSON.stringify(attributes),
+ query: data.query
+ })
+ }).always(function () {
+ // Clean up queue after AJAX request is complete.
+ ajaxQueue[id] = null;
+ }).done(function () {
+ data.promise.resolve.apply(this, arguments);
+ }).fail(function () {
+ data.promise.reject.apply(this, arguments);
+ });
+ }, delay);
+
+ // Update storage.
+ ajaxQueue[id] = data;
+
+ // Return promise.
+ return data.promise;
+ }
+
+ /**
+ * Returns true if both object are the same.
+ *
+ * @date 19/05/2020
+ * @since 5.9.0
+ *
+ * @param object obj1
+ * @param object obj2
+ * @return bool
+ */
+ function compareObjects(obj1, obj2) {
+ return JSON.stringify(obj1) === JSON.stringify(obj2);
+ }
+
+ /**
+ * Converts HTML into a React element.
+ *
+ * @date 19/05/2020
+ * @since 5.9.0
+ *
+ * @param string html The HTML to convert.
+ * @return object Result of React.createElement().
+ */
+ acf.parseJSX = function (html) {
+ return parseNode($(html)[0]);
+ };
+
+ /**
+ * Converts a DOM node into a React element.
+ *
+ * @date 19/05/2020
+ * @since 5.9.0
+ *
+ * @param DOM node The DOM node.
+ * @return object Result of React.createElement().
+ */
+ function parseNode(node) {
+ // Get node name.
+ var nodeName = parseNodeName(node.nodeName.toLowerCase());
+ if (!nodeName) {
+ return null;
+ }
+
+ // Get node attributes in React friendly format.
+ var nodeAttrs = {};
+ acf.arrayArgs(node.attributes).map(parseNodeAttr).forEach(function (attr) {
+ nodeAttrs[attr.name] = attr.value;
+ });
+
+ // Define args for React.createElement().
+ var args = [nodeName, nodeAttrs];
+ acf.arrayArgs(node.childNodes).forEach(function (child) {
+ if (child instanceof Text) {
+ var text = child.textContent;
+ if (text) {
+ args.push(text);
+ }
+ } else {
+ args.push(parseNode(child));
+ }
+ });
+
+ // Return element.
+ return React.createElement.apply(this, args);
+ }
+
+ /**
+ * Converts a node or attribute name into it's JSX compliant name
+ *
+ * @date 05/07/2021
+ * @since 5.9.8
+ *
+ * @param string name The node or attribute name.
+ * @returns string
+ */
+ function getJSXName(name) {
+ var replacement = acf.isget(acf, 'jsxNameReplacements', name);
+ if (replacement) return replacement;
+ return name;
+ }
+
+ /**
+ * Converts the given name into a React friendly name or component.
+ *
+ * @date 19/05/2020
+ * @since 5.9.0
+ *
+ * @param string name The node name in lowercase.
+ * @return mixed
+ */
+ function parseNodeName(name) {
+ switch (name) {
+ case 'innerblocks':
+ return InnerBlocks;
+ case 'script':
+ return Script;
+ case '#comment':
+ return null;
+ default:
+ // Replace names for JSX counterparts.
+ name = getJSXName(name);
+ }
+ return name;
+ }
+
+ /**
+ * Converts the given attribute into a React friendly name and value object.
+ *
+ * @date 19/05/2020
+ * @since 5.9.0
+ *
+ * @param obj nodeAttr The node attribute.
+ * @return obj
+ */
+ function parseNodeAttr(nodeAttr) {
+ var name = nodeAttr.name;
+ var value = nodeAttr.value;
+ switch (name) {
+ // Class.
+ case 'class':
+ name = 'className';
+ break;
+
+ // Style.
+ case 'style':
+ var css = {};
+ value.split(';').forEach(function (s) {
+ var pos = s.indexOf(':');
+ if (pos > 0) {
+ var ruleName = s.substr(0, pos).trim();
+ var ruleValue = s.substr(pos + 1).trim();
+
+ // Rename core properties, but not CSS variables.
+ if (ruleName.charAt(0) !== '-') {
+ ruleName = acf.strCamelCase(ruleName);
+ }
+ css[ruleName] = ruleValue;
+ }
+ });
+ value = css;
+ break;
+
+ // Default.
+ default:
+ // No formatting needed for "data-x" attributes.
+ if (name.indexOf('data-') === 0) {
+ break;
+ }
+
+ // Replace names for JSX counterparts.
+ name = getJSXName(name);
+
+ // Convert JSON values.
+ var c1 = value.charAt(0);
+ if (c1 === '[' || c1 === '{') {
+ value = JSON.parse(value);
+ }
+
+ // Convert bool values.
+ if (value === 'true' || value === 'false') {
+ value = value === 'true';
+ }
+ break;
+ }
+ return {
+ name: name,
+ value: value
+ };
+ }
+
+ /**
+ * Higher Order Component used to set default block attribute values.
+ *
+ * By modifying block attributes directly, instead of defining defaults in registerBlockType(),
+ * WordPress will include them always within the saved block serialized JSON.
+ *
+ * @date 31/07/2020
+ * @since 5.9.0
+ *
+ * @param Component BlockListBlock The BlockListBlock Component.
+ * @return Component
+ */
+ var withDefaultAttributes = createHigherOrderComponent(function (BlockListBlock) {
+ return class WrappedBlockEdit extends Component {
+ constructor(props) {
+ super(props);
+
+ // Extract vars.
+ const {
+ name,
+ attributes
+ } = this.props;
+
+ // Only run on ACF Blocks.
+ const blockType = getBlockType(name);
+ if (!blockType) {
+ return;
+ }
+
+ // Set unique ID and default attributes for newly added blocks.
+ if (isNewBlock(props)) {
+ attributes.id = acf.uniqid('block_');
+ for (let attribute in blockType.attributes) {
+ if (attributes[attribute] === undefined && blockType[attribute] !== undefined) {
+ attributes[attribute] = blockType[attribute];
+ }
+ }
+ return;
+ }
+
+ // Generate new ID for duplicated blocks.
+ if (isDuplicateBlock(props)) {
+ attributes.id = acf.uniqid('block_');
+ return;
+ }
+ }
+ render() {
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockListBlock, this.props);
+ }
+ };
+ }, 'withDefaultAttributes');
+ wp.hooks.addFilter('editor.BlockListBlock', 'acf/with-default-attributes', withDefaultAttributes);
+
+ /**
+ * The BlockSave functional component.
+ *
+ * @date 08/07/2020
+ * @since 5.9.0
+ */
+ function BlockSave() {
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(InnerBlocks.Content, null);
+ }
+
+ /**
+ * The BlockEdit component.
+ *
+ * @date 19/2/19
+ * @since 5.7.12
+ */
+ class BlockEdit extends Component {
+ constructor(props) {
+ super(props);
+ this.setup();
+ }
+ setup() {
+ const {
+ name,
+ attributes
+ } = this.props;
+ const blockType = getBlockType(name);
+
+ // Restrict current mode.
+ function restrictMode(modes) {
+ if (modes.indexOf(attributes.mode) === -1) {
+ attributes.mode = modes[0];
+ }
+ }
+ switch (blockType.mode) {
+ case 'edit':
+ restrictMode(['edit', 'preview']);
+ break;
+ case 'preview':
+ restrictMode(['preview', 'edit']);
+ break;
+ default:
+ restrictMode(['auto']);
+ break;
+ }
+ }
+ render() {
+ const {
+ name,
+ attributes,
+ setAttributes
+ } = this.props;
+ const {
+ mode
+ } = attributes;
+ const blockType = getBlockType(name);
+
+ // Show toggle only for edit/preview modes.
+ let showToggle = blockType.supports.mode;
+ if (mode === 'auto') {
+ showToggle = false;
+ }
+
+ // Configure toggle variables.
+ const toggleText = mode === 'preview' ? acf.__('Switch to Edit') : acf.__('Switch to Preview');
+ const toggleIcon = mode === 'preview' ? 'edit' : 'welcome-view-site';
+ function toggleMode() {
+ setAttributes({
+ mode: mode === 'preview' ? 'edit' : 'preview'
+ });
+ }
+
+ // Return template.
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockControls, null, showToggle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Toolbar, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(IconButton, {
+ className: "components-icon-button components-toolbar__control",
+ label: toggleText,
+ icon: toggleIcon,
+ onClick: toggleMode
+ }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(InspectorControls, null, mode === 'preview' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
+ className: "acf-block-component acf-block-panel"
+ }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockForm, this.props))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockBody, this.props));
+ }
+ }
+
+ /**
+ * The BlockBody component.
+ *
+ * @date 19/2/19
+ * @since 5.7.12
+ */
+ class _BlockBody extends Component {
+ render() {
+ const {
+ attributes,
+ isSelected
+ } = this.props;
+ const {
+ mode
+ } = attributes;
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
+ className: "acf-block-component acf-block-body"
+ }, mode === 'auto' && isSelected ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockForm, this.props) : mode === 'auto' && !isSelected ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockPreview, this.props) : mode === 'preview' ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockPreview, this.props) : (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockForm, this.props));
+ }
+ }
+
+ // Append blockIndex to component props.
+ const BlockBody = withSelect(function (select, ownProps) {
+ const {
+ clientId
+ } = ownProps;
+ // Use optional rootClientId to allow discoverability of child blocks.
+ const rootClientId = select('core/block-editor').getBlockRootClientId(clientId);
+ const index = select('core/block-editor').getBlockIndex(clientId, rootClientId);
+ return {
+ index
+ };
+ })(_BlockBody);
+
+ /**
+ * A react component to append HTMl.
+ *
+ * @date 19/2/19
+ * @since 5.7.12
+ *
+ * @param string children The html to insert.
+ * @return void
+ */
+ class Div extends Component {
+ render() {
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
+ dangerouslySetInnerHTML: {
+ __html: this.props.children
+ }
+ });
+ }
+ }
+
+ /**
+ * A react Component for inline scripts.
+ *
+ * This Component uses a combination of React references and jQuery to append the
+ * inline `);
+ }
+ componentDidUpdate() {
+ this.setHTML(this.props.children);
+ }
+ componentDidMount() {
+ this.setHTML(this.props.children);
+ }
+ }
+
+ // Data storage for DynamicHTML components.
+ const store = {};
+
+ /**
+ * DynamicHTML Class.
+ *
+ * A react componenet to load and insert dynamic HTML.
+ *
+ * @date 19/2/19
+ * @since 5.7.12
+ *
+ * @param void
+ * @return void
+ */
+ class DynamicHTML extends Component {
+ constructor(props) {
+ super(props);
+
+ // Bind callbacks.
+ this.setRef = this.setRef.bind(this);
+
+ // Define default props and call setup().
+ this.id = '';
+ this.el = false;
+ this.subscribed = true;
+ this.renderMethod = 'jQuery';
+ this.setup(props);
+
+ // Load state.
+ this.loadState();
+ }
+ setup(props) {
+ // Do nothing.
+ }
+ fetch() {
+ // Do nothing.
+ }
+ loadState() {
+ this.state = store[this.id] || {};
+ }
+ setState(state) {
+ store[this.id] = _objectSpread(_objectSpread({}, this.state), state);
+
+ // Update component state if subscribed.
+ // - Allows AJAX callback to update store without modifying state of an unmounted component.
+ if (this.subscribed) {
+ super.setState(state);
+ }
+ }
+ setHtml(html) {
+ html = html ? html.trim() : '';
+
+ // Bail early if html has not changed.
+ if (html === this.state.html) {
+ return;
+ }
+
+ // Update state.
+ var state = {
+ html: html
+ };
+ if (this.renderMethod === 'jsx') {
+ state.jsx = acf.parseJSX(html);
+ state.$el = $(this.el);
+ } else {
+ state.$el = $(html);
+ }
+ this.setState(state);
+ }
+ setRef(el) {
+ this.el = el;
+ }
+ render() {
+ // Render JSX.
+ if (this.state.jsx) {
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
+ ref: this.setRef
+ }, this.state.jsx);
+ }
+
+ // Return HTML.
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
+ ref: this.setRef
+ }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Placeholder, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Spinner, null)));
+ }
+ shouldComponentUpdate(nextProps, nextState) {
+ if (nextProps.index !== this.props.index) {
+ this.componentWillMove();
+ }
+ return nextState.html !== this.state.html;
+ }
+ display(context) {
+ // This method is called after setting new HTML and the Component render.
+ // The jQuery render method simply needs to move $el into place.
+ if (this.renderMethod === 'jQuery') {
+ var $el = this.state.$el;
+ var $prevParent = $el.parent();
+ var $thisParent = $(this.el);
+
+ // Move $el into place.
+ $thisParent.html($el);
+
+ // Special case for reusable blocks.
+ // Multiple instances of the same reusable block share the same block id.
+ // This causes all instances to share the same state (cool), which unfortunately
+ // pulls $el back and forth between the last rendered reusable block.
+ // This simple fix leaves a "clone" behind :)
+ if ($prevParent.length && $prevParent[0] !== $thisParent[0]) {
+ $prevParent.html($el.clone());
+ }
+ }
+
+ // Call context specific method.
+ switch (context) {
+ case 'append':
+ this.componentDidAppend();
+ break;
+ case 'remount':
+ this.componentDidRemount();
+ break;
+ }
+ }
+ componentDidMount() {
+ // Fetch on first load.
+ if (this.state.html === undefined) {
+ //console.log('componentDidMount', this.id);
+ this.fetch();
+
+ // Or remount existing HTML.
+ } else {
+ this.display('remount');
+ }
+ }
+ componentDidUpdate(prevProps, prevState) {
+ // HTML has changed.
+ this.display('append');
+ }
+ componentDidAppend() {
+ acf.doAction('append', this.state.$el);
+ }
+ componentWillUnmount() {
+ acf.doAction('unmount', this.state.$el);
+
+ // Unsubscribe this component from state.
+ this.subscribed = false;
+ }
+ componentDidRemount() {
+ this.subscribed = true;
+
+ // Use setTimeout to avoid incorrect timing of events.
+ // React will unmount and mount components in DOM order.
+ // This means a new component can be mounted before an old one is unmounted.
+ // ACF shares $el across new/old components which is un-React-like.
+ // This timout ensures that unmounting occurs before remounting.
+ setTimeout(() => {
+ acf.doAction('remount', this.state.$el);
+ });
+ }
+ componentWillMove() {
+ acf.doAction('unmount', this.state.$el);
+ setTimeout(() => {
+ acf.doAction('remount', this.state.$el);
+ });
+ }
+ }
+
+ /**
+ * BlockForm Class.
+ *
+ * A react componenet to handle the block form.
+ *
+ * @date 19/2/19
+ * @since 5.7.12
+ *
+ * @param string id the block id.
+ * @return void
+ */
+ class BlockForm extends DynamicHTML {
+ setup(props) {
+ this.id = `BlockForm-${props.attributes.id}`;
+ }
+ fetch() {
+ // Extract props.
+ const {
+ attributes
+ } = this.props;
+
+ // Request AJAX and update HTML on complete.
+ fetchBlock({
+ attributes: attributes,
+ query: {
+ form: true
+ }
+ }).done(json => {
+ this.setHtml(json.data.form);
+ });
+ }
+ componentDidAppend() {
+ super.componentDidAppend();
+
+ // Extract props.
+ const {
+ attributes,
+ setAttributes
+ } = this.props;
+ const {
+ $el
+ } = this.state;
+
+ // Callback for updating block data.
+ function serializeData() {
+ let silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+ const data = acf.serialize($el, `acf-${attributes.id}`);
+ if (silent) {
+ attributes.data = data;
+ } else {
+ setAttributes({
+ data: data
+ });
+ }
+ }
+
+ // Add events.
+ var timeout = false;
+ $el.on('change keyup', function () {
+ clearTimeout(timeout);
+ timeout = setTimeout(serializeData, 300);
+ });
+
+ // Ensure newly added block is saved with data.
+ // Do it silently to avoid triggering a preview render.
+ if (!attributes.data) {
+ serializeData(true);
+ }
+ }
+ }
+
+ /**
+ * BlockPreview Class.
+ *
+ * A react componenet to handle the block preview.
+ *
+ * @date 19/2/19
+ * @since 5.7.12
+ *
+ * @param string id the block id.
+ * @return void
+ */
+ class BlockPreview extends DynamicHTML {
+ setup(props) {
+ this.id = `BlockPreview-${props.attributes.id}`;
+ var blockType = getBlockType(props.name);
+ if (blockType.supports.jsx) {
+ this.renderMethod = 'jsx';
+ }
+ //console.log('setup', this.id);
+ }
+
+ fetch() {
+ let args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+ const {
+ attributes = this.props.attributes,
+ delay = 0
+ } = args;
+
+ // Remember attributes used to fetch HTML.
+ this.setState({
+ prevAttributes: attributes
+ });
+
+ // Request AJAX and update HTML on complete.
+ fetchBlock({
+ attributes: attributes,
+ query: {
+ preview: true
+ },
+ delay: delay
+ }).done(json => {
+ this.setHtml('' + json.data.preview + '
');
+ });
+ }
+ componentDidAppend() {
+ super.componentDidAppend();
+
+ // Extract props.
+ const {
+ attributes
+ } = this.props;
+ const {
+ $el
+ } = this.state;
+
+ // Generate action friendly type.
+ const type = attributes.name.replace('acf/', '');
+
+ // Do action.
+ acf.doAction('render_block_preview', $el, attributes);
+ acf.doAction(`render_block_preview/type=${type}`, $el, attributes);
+ }
+ shouldComponentUpdate(nextProps, nextState) {
+ const nextAttributes = nextProps.attributes;
+ const thisAttributes = this.props.attributes;
+
+ // Update preview if block data has changed.
+ if (!compareObjects(nextAttributes, thisAttributes)) {
+ let delay = 0;
+
+ // Delay fetch when editing className or anchor to simulate conscistent logic to custom fields.
+ if (nextAttributes.className !== thisAttributes.className) {
+ delay = 300;
+ }
+ if (nextAttributes.anchor !== thisAttributes.anchor) {
+ delay = 300;
+ }
+ this.fetch({
+ attributes: nextAttributes,
+ delay: delay
+ });
+ }
+ return super.shouldComponentUpdate(nextProps, nextState);
+ }
+ componentDidRemount() {
+ super.componentDidRemount();
+
+ // Update preview if data has changed since last render (changing from "edit" to "preview").
+ if (!compareObjects(this.state.prevAttributes, this.props.attributes)) {
+ //console.log('componentDidRemount', this.id);
+ this.fetch();
+ }
+ }
+ }
+
+ /**
+ * Initializes ACF Blocks logic and registration.
+ *
+ * @since 5.9.0
+ */
+ function initialize() {
+ // Add support for WordPress versions before 5.2.
+ if (!wp.blockEditor) {
+ wp.blockEditor = wp.editor;
+ }
+
+ // Register block types.
+ var blockTypes = acf.get('blockTypes');
+ if (blockTypes) {
+ blockTypes.map(registerBlockType);
+ }
+ }
+
+ // Run the initialize callback during the "prepare" action.
+ // This ensures that all localized data is available and that blocks are registered before the WP editor has been instantiated.
+ acf.addAction('prepare', initialize);
+
+ /**
+ * Returns a valid vertical alignment.
+ *
+ * @date 07/08/2020
+ * @since 5.9.0
+ *
+ * @param string align A vertical alignment.
+ * @return string
+ */
+ function validateVerticalAlignment(align) {
+ const ALIGNMENTS = ['top', 'center', 'bottom'];
+ const DEFAULT = 'top';
+ return ALIGNMENTS.includes(align) ? align : DEFAULT;
+ }
+
+ /**
+ * Returns a valid horizontal alignment.
+ *
+ * @date 07/08/2020
+ * @since 5.9.0
+ *
+ * @param string align A horizontal alignment.
+ * @return string
+ */
+ function validateHorizontalAlignment(align) {
+ const ALIGNMENTS = ['left', 'center', 'right'];
+ const DEFAULT = acf.get('rtl') ? 'right' : 'left';
+ return ALIGNMENTS.includes(align) ? align : DEFAULT;
+ }
+
+ /**
+ * Returns a valid matrix alignment.
+ *
+ * Written for "upgrade-path" compatibility from vertical alignment to matrix alignment.
+ *
+ * @date 07/08/2020
+ * @since 5.9.0
+ *
+ * @param string align A matrix alignment.
+ * @return string
+ */
+ function validateMatrixAlignment(align) {
+ const DEFAULT = 'center center';
+ if (align) {
+ const [y, x] = align.split(' ');
+ return validateVerticalAlignment(y) + ' ' + validateHorizontalAlignment(x);
+ }
+ return DEFAULT;
+ }
+
+ // Dependencies.
+ const {
+ AlignmentToolbar,
+ BlockVerticalAlignmentToolbar
+ } = wp.blockEditor;
+ const BlockAlignmentMatrixToolbar = wp.blockEditor.__experimentalBlockAlignmentMatrixToolbar || wp.blockEditor.BlockAlignmentMatrixToolbar;
+ // Gutenberg v10.x begins transition from Toolbar components to Control components.
+ const BlockAlignmentMatrixControl = wp.blockEditor.__experimentalBlockAlignmentMatrixControl || wp.blockEditor.BlockAlignmentMatrixControl;
+
+ /**
+ * Appends extra attributes for block types that support align_content.
+ *
+ * @date 08/07/2020
+ * @since 5.9.0
+ *
+ * @param object attributes The block type attributes.
+ * @return object
+ */
+ function withAlignContentAttributes(attributes) {
+ attributes.align_content = {
+ type: 'string'
+ };
+ return attributes;
+ }
+
+ /**
+ * A higher order component adding align_content editing functionality.
+ *
+ * @date 08/07/2020
+ * @since 5.9.0
+ *
+ * @param component OriginalBlockEdit The original BlockEdit component.
+ * @param object blockType The block type settings.
+ * @return component
+ */
+ function withAlignContentComponent(OriginalBlockEdit, blockType) {
+ // Determine alignment vars
+ let type = blockType.supports.align_content;
+ let AlignmentComponent, validateAlignment;
+ switch (type) {
+ case 'matrix':
+ AlignmentComponent = BlockAlignmentMatrixControl || BlockAlignmentMatrixToolbar;
+ validateAlignment = validateMatrixAlignment;
+ break;
+ default:
+ AlignmentComponent = BlockVerticalAlignmentToolbar;
+ validateAlignment = validateVerticalAlignment;
+ break;
+ }
+
+ // Ensure alignment component exists.
+ if (AlignmentComponent === undefined) {
+ console.warn(`The "${type}" alignment component was not found.`);
+ return OriginalBlockEdit;
+ }
+
+ // Ensure correct block attribute data is sent in intial preview AJAX request.
+ blockType.align_content = validateAlignment(blockType.align_content);
+
+ // Return wrapped component.
+ return class WrappedBlockEdit extends Component {
+ render() {
+ const {
+ attributes,
+ setAttributes
+ } = this.props;
+ const {
+ align_content
+ } = attributes;
+ function onChangeAlignContent(align_content) {
+ setAttributes({
+ align_content: validateAlignment(align_content)
+ });
+ }
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockControls, {
+ group: "block"
+ }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(AlignmentComponent, {
+ label: acf.__('Change content alignment'),
+ value: validateAlignment(align_content),
+ onChange: onChangeAlignContent
+ })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(OriginalBlockEdit, this.props));
+ }
+ };
+ }
+
+ /**
+ * Appends extra attributes for block types that support align_text.
+ *
+ * @date 08/07/2020
+ * @since 5.9.0
+ *
+ * @param object attributes The block type attributes.
+ * @return object
+ */
+ function withAlignTextAttributes(attributes) {
+ attributes.align_text = {
+ type: 'string'
+ };
+ return attributes;
+ }
+
+ /**
+ * A higher order component adding align_text editing functionality.
+ *
+ * @date 08/07/2020
+ * @since 5.9.0
+ *
+ * @param component OriginalBlockEdit The original BlockEdit component.
+ * @param object blockType The block type settings.
+ * @return component
+ */
+ function withAlignTextComponent(OriginalBlockEdit, blockType) {
+ const validateAlignment = validateHorizontalAlignment;
+
+ // Ensure correct block attribute data is sent in intial preview AJAX request.
+ blockType.align_text = validateAlignment(blockType.align_text);
+
+ // Return wrapped component.
+ return class WrappedBlockEdit extends Component {
+ render() {
+ const {
+ attributes,
+ setAttributes
+ } = this.props;
+ const {
+ align_text
+ } = attributes;
+ function onChangeAlignText(align_text) {
+ setAttributes({
+ align_text: validateAlignment(align_text)
+ });
+ }
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(AlignmentToolbar, {
+ value: validateAlignment(align_text),
+ onChange: onChangeAlignText
+ })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(OriginalBlockEdit, this.props));
+ }
+ };
+ }
+})(jQuery);
+
+/***/ }),
+
+/***/ "./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-jsx-names.js":
+/*!****************************************************************************!*\
+ !*** ./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-jsx-names.js ***!
+ \****************************************************************************/
+/***/ (function() {
+
+(function ($, undefined) {
+ acf.jsxNameReplacements = {
+ 'accent-height': 'accentHeight',
+ accentheight: 'accentHeight',
+ 'accept-charset': 'acceptCharset',
+ acceptcharset: 'acceptCharset',
+ accesskey: 'accessKey',
+ 'alignment-baseline': 'alignmentBaseline',
+ alignmentbaseline: 'alignmentBaseline',
+ allowedblocks: 'allowedBlocks',
+ allowfullscreen: 'allowFullScreen',
+ allowreorder: 'allowReorder',
+ 'arabic-form': 'arabicForm',
+ arabicform: 'arabicForm',
+ attributename: 'attributeName',
+ attributetype: 'attributeType',
+ autocapitalize: 'autoCapitalize',
+ autocomplete: 'autoComplete',
+ autocorrect: 'autoCorrect',
+ autofocus: 'autoFocus',
+ autoplay: 'autoPlay',
+ autoreverse: 'autoReverse',
+ autosave: 'autoSave',
+ basefrequency: 'baseFrequency',
+ 'baseline-shift': 'baselineShift',
+ baselineshift: 'baselineShift',
+ baseprofile: 'baseProfile',
+ calcmode: 'calcMode',
+ 'cap-height': 'capHeight',
+ capheight: 'capHeight',
+ cellpadding: 'cellPadding',
+ cellspacing: 'cellSpacing',
+ charset: 'charSet',
+ class: 'className',
+ classid: 'classID',
+ classname: 'className',
+ 'clip-path': 'clipPath',
+ 'clip-rule': 'clipRule',
+ clippath: 'clipPath',
+ clippathunits: 'clipPathUnits',
+ cliprule: 'clipRule',
+ 'color-interpolation': 'colorInterpolation',
+ 'color-interpolation-filters': 'colorInterpolationFilters',
+ 'color-profile': 'colorProfile',
+ 'color-rendering': 'colorRendering',
+ colorinterpolation: 'colorInterpolation',
+ colorinterpolationfilters: 'colorInterpolationFilters',
+ colorprofile: 'colorProfile',
+ colorrendering: 'colorRendering',
+ colspan: 'colSpan',
+ contenteditable: 'contentEditable',
+ contentscripttype: 'contentScriptType',
+ contentstyletype: 'contentStyleType',
+ contextmenu: 'contextMenu',
+ controlslist: 'controlsList',
+ crossorigin: 'crossOrigin',
+ dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
+ datetime: 'dateTime',
+ defaultchecked: 'defaultChecked',
+ defaultvalue: 'defaultValue',
+ diffuseconstant: 'diffuseConstant',
+ disablepictureinpicture: 'disablePictureInPicture',
+ disableremoteplayback: 'disableRemotePlayback',
+ 'dominant-baseline': 'dominantBaseline',
+ dominantbaseline: 'dominantBaseline',
+ edgemode: 'edgeMode',
+ 'enable-background': 'enableBackground',
+ enablebackground: 'enableBackground',
+ enctype: 'encType',
+ enterkeyhint: 'enterKeyHint',
+ externalresourcesrequired: 'externalResourcesRequired',
+ 'fill-opacity': 'fillOpacity',
+ 'fill-rule': 'fillRule',
+ fillopacity: 'fillOpacity',
+ fillrule: 'fillRule',
+ filterres: 'filterRes',
+ filterunits: 'filterUnits',
+ 'flood-color': 'floodColor',
+ 'flood-opacity': 'floodOpacity',
+ floodcolor: 'floodColor',
+ floodopacity: 'floodOpacity',
+ 'font-family': 'fontFamily',
+ 'font-size': 'fontSize',
+ 'font-size-adjust': 'fontSizeAdjust',
+ 'font-stretch': 'fontStretch',
+ 'font-style': 'fontStyle',
+ 'font-variant': 'fontVariant',
+ 'font-weight': 'fontWeight',
+ fontfamily: 'fontFamily',
+ fontsize: 'fontSize',
+ fontsizeadjust: 'fontSizeAdjust',
+ fontstretch: 'fontStretch',
+ fontstyle: 'fontStyle',
+ fontvariant: 'fontVariant',
+ fontweight: 'fontWeight',
+ for: 'htmlFor',
+ foreignobject: 'foreignObject',
+ formaction: 'formAction',
+ formenctype: 'formEncType',
+ formmethod: 'formMethod',
+ formnovalidate: 'formNoValidate',
+ formtarget: 'formTarget',
+ frameborder: 'frameBorder',
+ 'glyph-name': 'glyphName',
+ 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
+ 'glyph-orientation-vertical': 'glyphOrientationVertical',
+ glyphname: 'glyphName',
+ glyphorientationhorizontal: 'glyphOrientationHorizontal',
+ glyphorientationvertical: 'glyphOrientationVertical',
+ glyphref: 'glyphRef',
+ gradienttransform: 'gradientTransform',
+ gradientunits: 'gradientUnits',
+ 'horiz-adv-x': 'horizAdvX',
+ 'horiz-origin-x': 'horizOriginX',
+ horizadvx: 'horizAdvX',
+ horizoriginx: 'horizOriginX',
+ hreflang: 'hrefLang',
+ htmlfor: 'htmlFor',
+ 'http-equiv': 'httpEquiv',
+ httpequiv: 'httpEquiv',
+ 'image-rendering': 'imageRendering',
+ imagerendering: 'imageRendering',
+ innerhtml: 'innerHTML',
+ inputmode: 'inputMode',
+ itemid: 'itemID',
+ itemprop: 'itemProp',
+ itemref: 'itemRef',
+ itemscope: 'itemScope',
+ itemtype: 'itemType',
+ kernelmatrix: 'kernelMatrix',
+ kernelunitlength: 'kernelUnitLength',
+ keyparams: 'keyParams',
+ keypoints: 'keyPoints',
+ keysplines: 'keySplines',
+ keytimes: 'keyTimes',
+ keytype: 'keyType',
+ lengthadjust: 'lengthAdjust',
+ 'letter-spacing': 'letterSpacing',
+ letterspacing: 'letterSpacing',
+ 'lighting-color': 'lightingColor',
+ lightingcolor: 'lightingColor',
+ limitingconeangle: 'limitingConeAngle',
+ marginheight: 'marginHeight',
+ marginwidth: 'marginWidth',
+ 'marker-end': 'markerEnd',
+ 'marker-mid': 'markerMid',
+ 'marker-start': 'markerStart',
+ markerend: 'markerEnd',
+ markerheight: 'markerHeight',
+ markermid: 'markerMid',
+ markerstart: 'markerStart',
+ markerunits: 'markerUnits',
+ markerwidth: 'markerWidth',
+ maskcontentunits: 'maskContentUnits',
+ maskunits: 'maskUnits',
+ maxlength: 'maxLength',
+ mediagroup: 'mediaGroup',
+ minlength: 'minLength',
+ nomodule: 'noModule',
+ novalidate: 'noValidate',
+ numoctaves: 'numOctaves',
+ 'overline-position': 'overlinePosition',
+ 'overline-thickness': 'overlineThickness',
+ overlineposition: 'overlinePosition',
+ overlinethickness: 'overlineThickness',
+ 'paint-order': 'paintOrder',
+ paintorder: 'paintOrder',
+ 'panose-1': 'panose1',
+ pathlength: 'pathLength',
+ patterncontentunits: 'patternContentUnits',
+ patterntransform: 'patternTransform',
+ patternunits: 'patternUnits',
+ playsinline: 'playsInline',
+ 'pointer-events': 'pointerEvents',
+ pointerevents: 'pointerEvents',
+ pointsatx: 'pointsAtX',
+ pointsaty: 'pointsAtY',
+ pointsatz: 'pointsAtZ',
+ preservealpha: 'preserveAlpha',
+ preserveaspectratio: 'preserveAspectRatio',
+ primitiveunits: 'primitiveUnits',
+ radiogroup: 'radioGroup',
+ readonly: 'readOnly',
+ referrerpolicy: 'referrerPolicy',
+ refx: 'refX',
+ refy: 'refY',
+ 'rendering-intent': 'renderingIntent',
+ renderingintent: 'renderingIntent',
+ repeatcount: 'repeatCount',
+ repeatdur: 'repeatDur',
+ requiredextensions: 'requiredExtensions',
+ requiredfeatures: 'requiredFeatures',
+ rowspan: 'rowSpan',
+ 'shape-rendering': 'shapeRendering',
+ shaperendering: 'shapeRendering',
+ specularconstant: 'specularConstant',
+ specularexponent: 'specularExponent',
+ spellcheck: 'spellCheck',
+ spreadmethod: 'spreadMethod',
+ srcdoc: 'srcDoc',
+ srclang: 'srcLang',
+ srcset: 'srcSet',
+ startoffset: 'startOffset',
+ stddeviation: 'stdDeviation',
+ stitchtiles: 'stitchTiles',
+ 'stop-color': 'stopColor',
+ 'stop-opacity': 'stopOpacity',
+ stopcolor: 'stopColor',
+ stopopacity: 'stopOpacity',
+ 'strikethrough-position': 'strikethroughPosition',
+ 'strikethrough-thickness': 'strikethroughThickness',
+ strikethroughposition: 'strikethroughPosition',
+ strikethroughthickness: 'strikethroughThickness',
+ 'stroke-dasharray': 'strokeDasharray',
+ 'stroke-dashoffset': 'strokeDashoffset',
+ 'stroke-linecap': 'strokeLinecap',
+ 'stroke-linejoin': 'strokeLinejoin',
+ 'stroke-miterlimit': 'strokeMiterlimit',
+ 'stroke-opacity': 'strokeOpacity',
+ 'stroke-width': 'strokeWidth',
+ strokedasharray: 'strokeDasharray',
+ strokedashoffset: 'strokeDashoffset',
+ strokelinecap: 'strokeLinecap',
+ strokelinejoin: 'strokeLinejoin',
+ strokemiterlimit: 'strokeMiterlimit',
+ strokeopacity: 'strokeOpacity',
+ strokewidth: 'strokeWidth',
+ suppresscontenteditablewarning: 'suppressContentEditableWarning',
+ suppresshydrationwarning: 'suppressHydrationWarning',
+ surfacescale: 'surfaceScale',
+ systemlanguage: 'systemLanguage',
+ tabindex: 'tabIndex',
+ tablevalues: 'tableValues',
+ targetx: 'targetX',
+ targety: 'targetY',
+ templatelock: 'templateLock',
+ 'text-anchor': 'textAnchor',
+ 'text-decoration': 'textDecoration',
+ 'text-rendering': 'textRendering',
+ textanchor: 'textAnchor',
+ textdecoration: 'textDecoration',
+ textlength: 'textLength',
+ textrendering: 'textRendering',
+ 'underline-position': 'underlinePosition',
+ 'underline-thickness': 'underlineThickness',
+ underlineposition: 'underlinePosition',
+ underlinethickness: 'underlineThickness',
+ 'unicode-bidi': 'unicodeBidi',
+ 'unicode-range': 'unicodeRange',
+ unicodebidi: 'unicodeBidi',
+ unicoderange: 'unicodeRange',
+ 'units-per-em': 'unitsPerEm',
+ unitsperem: 'unitsPerEm',
+ usemap: 'useMap',
+ 'v-alphabetic': 'vAlphabetic',
+ 'v-hanging': 'vHanging',
+ 'v-ideographic': 'vIdeographic',
+ 'v-mathematical': 'vMathematical',
+ valphabetic: 'vAlphabetic',
+ 'vector-effect': 'vectorEffect',
+ vectoreffect: 'vectorEffect',
+ 'vert-adv-y': 'vertAdvY',
+ 'vert-origin-x': 'vertOriginX',
+ 'vert-origin-y': 'vertOriginY',
+ vertadvy: 'vertAdvY',
+ vertoriginx: 'vertOriginX',
+ vertoriginy: 'vertOriginY',
+ vhanging: 'vHanging',
+ videographic: 'vIdeographic',
+ viewbox: 'viewBox',
+ viewtarget: 'viewTarget',
+ vmathematical: 'vMathematical',
+ 'word-spacing': 'wordSpacing',
+ wordspacing: 'wordSpacing',
+ 'writing-mode': 'writingMode',
+ writingmode: 'writingMode',
+ 'x-height': 'xHeight',
+ xchannelselector: 'xChannelSelector',
+ xheight: 'xHeight',
+ 'xlink:actuate': 'xlinkActuate',
+ 'xlink:arcrole': 'xlinkArcrole',
+ 'xlink:href': 'xlinkHref',
+ 'xlink:role': 'xlinkRole',
+ 'xlink:show': 'xlinkShow',
+ 'xlink:title': 'xlinkTitle',
+ 'xlink:type': 'xlinkType',
+ xlinkactuate: 'xlinkActuate',
+ xlinkarcrole: 'xlinkArcrole',
+ xlinkhref: 'xlinkHref',
+ xlinkrole: 'xlinkRole',
+ xlinkshow: 'xlinkShow',
+ xlinktitle: 'xlinkTitle',
+ xlinktype: 'xlinkType',
+ 'xml:base': 'xmlBase',
+ 'xml:lang': 'xmlLang',
+ 'xml:space': 'xmlSpace',
+ xmlbase: 'xmlBase',
+ xmllang: 'xmlLang',
+ 'xmlns:xlink': 'xmlnsXlink',
+ xmlnsxlink: 'xmlnsXlink',
+ xmlspace: 'xmlSpace',
+ ychannelselector: 'yChannelSelector',
+ zoomandpan: 'zoomAndPan'
+ };
+})(jQuery);
+
+/***/ }),
+
+/***/ "./node_modules/react/cjs/react.development.js":
+/*!*****************************************************!*\
+ !*** ./node_modules/react/cjs/react.development.js ***!
+ \*****************************************************/
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* module decorator */ module = __webpack_require__.nmd(module);
+/**
+ * @license React
+ * react.development.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+if (true) {
+ (function() {
+
+ 'use strict';
+
+/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
+if (
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
+ 'function'
+) {
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
+}
+ var ReactVersion = '18.2.0';
+
+// ATTENTION
+// When adding new symbols to this file,
+// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
+// The Symbol used to tag the ReactElement-like types.
+var REACT_ELEMENT_TYPE = Symbol.for('react.element');
+var REACT_PORTAL_TYPE = Symbol.for('react.portal');
+var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
+var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
+var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
+var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
+var REACT_CONTEXT_TYPE = Symbol.for('react.context');
+var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
+var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
+var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
+var REACT_MEMO_TYPE = Symbol.for('react.memo');
+var REACT_LAZY_TYPE = Symbol.for('react.lazy');
+var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
+var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
+var FAUX_ITERATOR_SYMBOL = '@@iterator';
+function getIteratorFn(maybeIterable) {
+ if (maybeIterable === null || typeof maybeIterable !== 'object') {
+ return null;
+ }
+
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
+
+ if (typeof maybeIterator === 'function') {
+ return maybeIterator;
+ }
+
+ return null;
+}
+
+/**
+ * Keeps track of the current dispatcher.
+ */
+var ReactCurrentDispatcher = {
+ /**
+ * @internal
+ * @type {ReactComponent}
+ */
+ current: null
+};
+
+/**
+ * Keeps track of the current batch's configuration such as how long an update
+ * should suspend for if it needs to.
+ */
+var ReactCurrentBatchConfig = {
+ transition: null
+};
+
+var ReactCurrentActQueue = {
+ current: null,
+ // Used to reproduce behavior of `batchedUpdates` in legacy mode.
+ isBatchingLegacy: false,
+ didScheduleLegacyUpdate: false
+};
+
+/**
+ * Keeps track of the current owner.
+ *
+ * The current owner is the component who should own any components that are
+ * currently being constructed.
+ */
+var ReactCurrentOwner = {
+ /**
+ * @internal
+ * @type {ReactComponent}
+ */
+ current: null
+};
+
+var ReactDebugCurrentFrame = {};
+var currentExtraStackFrame = null;
+function setExtraStackFrame(stack) {
+ {
+ currentExtraStackFrame = stack;
+ }
+}
+
+{
+ ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {
+ {
+ currentExtraStackFrame = stack;
+ }
+ }; // Stack implementation injected by the current renderer.
+
+
+ ReactDebugCurrentFrame.getCurrentStack = null;
+
+ ReactDebugCurrentFrame.getStackAddendum = function () {
+ var stack = ''; // Add an extra top frame while an element is being validated
+
+ if (currentExtraStackFrame) {
+ stack += currentExtraStackFrame;
+ } // Delegate to the injected renderer-specific implementation
+
+
+ var impl = ReactDebugCurrentFrame.getCurrentStack;
+
+ if (impl) {
+ stack += impl() || '';
+ }
+
+ return stack;
+ };
+}
+
+// -----------------------------------------------------------------------------
+
+var enableScopeAPI = false; // Experimental Create Event Handle API.
+var enableCacheElement = false;
+var enableTransitionTracing = false; // No known bugs, but needs performance testing
+
+var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
+// stuff. Intended to enable React core members to more easily debug scheduling
+// issues in DEV builds.
+
+var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
+
+var ReactSharedInternals = {
+ ReactCurrentDispatcher: ReactCurrentDispatcher,
+ ReactCurrentBatchConfig: ReactCurrentBatchConfig,
+ ReactCurrentOwner: ReactCurrentOwner
+};
+
+{
+ ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
+ ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
+}
+
+// by calls to these methods by a Babel plugin.
+//
+// In PROD (or in packages without access to React internals),
+// they are left as they are instead.
+
+function warn(format) {
+ {
+ {
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+
+ printWarning('warn', format, args);
+ }
+ }
+}
+function error(format) {
+ {
+ {
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
+ args[_key2 - 1] = arguments[_key2];
+ }
+
+ printWarning('error', format, args);
+ }
+ }
+}
+
+function printWarning(level, format, args) {
+ // When changing this logic, you might want to also
+ // update consoleWithStackDev.www.js as well.
+ {
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
+
+ if (stack !== '') {
+ format += '%s';
+ args = args.concat([stack]);
+ } // eslint-disable-next-line react-internal/safe-string-coercion
+
+
+ var argsWithFormat = args.map(function (item) {
+ return String(item);
+ }); // Careful: RN currently depends on this prefix
+
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
+ // breaks IE9: https://github.com/facebook/react/issues/13610
+ // eslint-disable-next-line react-internal/no-production-logging
+
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
+ }
+}
+
+var didWarnStateUpdateForUnmountedComponent = {};
+
+function warnNoop(publicInstance, callerName) {
+ {
+ var _constructor = publicInstance.constructor;
+ var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
+ var warningKey = componentName + "." + callerName;
+
+ if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
+ return;
+ }
+
+ error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
+
+ didWarnStateUpdateForUnmountedComponent[warningKey] = true;
+ }
+}
+/**
+ * This is the abstract API for an update queue.
+ */
+
+
+var ReactNoopUpdateQueue = {
+ /**
+ * Checks whether or not this composite component is mounted.
+ * @param {ReactClass} publicInstance The instance we want to test.
+ * @return {boolean} True if mounted, false otherwise.
+ * @protected
+ * @final
+ */
+ isMounted: function (publicInstance) {
+ return false;
+ },
+
+ /**
+ * Forces an update. This should only be invoked when it is known with
+ * certainty that we are **not** in a DOM transaction.
+ *
+ * You may want to call this when you know that some deeper aspect of the
+ * component's state has changed but `setState` was not called.
+ *
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
+ * `componentWillUpdate` and `componentDidUpdate`.
+ *
+ * @param {ReactClass} publicInstance The instance that should rerender.
+ * @param {?function} callback Called after component is updated.
+ * @param {?string} callerName name of the calling function in the public API.
+ * @internal
+ */
+ enqueueForceUpdate: function (publicInstance, callback, callerName) {
+ warnNoop(publicInstance, 'forceUpdate');
+ },
+
+ /**
+ * Replaces all of the state. Always use this or `setState` to mutate state.
+ * You should treat `this.state` as immutable.
+ *
+ * There is no guarantee that `this.state` will be immediately updated, so
+ * accessing `this.state` after calling this method may return the old value.
+ *
+ * @param {ReactClass} publicInstance The instance that should rerender.
+ * @param {object} completeState Next state.
+ * @param {?function} callback Called after component is updated.
+ * @param {?string} callerName name of the calling function in the public API.
+ * @internal
+ */
+ enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
+ warnNoop(publicInstance, 'replaceState');
+ },
+
+ /**
+ * Sets a subset of the state. This only exists because _pendingState is
+ * internal. This provides a merging strategy that is not available to deep
+ * properties which is confusing. TODO: Expose pendingState or don't use it
+ * during the merge.
+ *
+ * @param {ReactClass} publicInstance The instance that should rerender.
+ * @param {object} partialState Next partial state to be merged with state.
+ * @param {?function} callback Called after component is updated.
+ * @param {?string} Name of the calling function in the public API.
+ * @internal
+ */
+ enqueueSetState: function (publicInstance, partialState, callback, callerName) {
+ warnNoop(publicInstance, 'setState');
+ }
+};
+
+var assign = Object.assign;
+
+var emptyObject = {};
+
+{
+ Object.freeze(emptyObject);
+}
+/**
+ * Base class helpers for the updating state of a component.
+ */
+
+
+function Component(props, context, updater) {
+ this.props = props;
+ this.context = context; // If a component has string refs, we will assign a different object later.
+
+ this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
+ // renderer.
+
+ this.updater = updater || ReactNoopUpdateQueue;
+}
+
+Component.prototype.isReactComponent = {};
+/**
+ * Sets a subset of the state. Always use this to mutate
+ * state. You should treat `this.state` as immutable.
+ *
+ * There is no guarantee that `this.state` will be immediately updated, so
+ * accessing `this.state` after calling this method may return the old value.
+ *
+ * There is no guarantee that calls to `setState` will run synchronously,
+ * as they may eventually be batched together. You can provide an optional
+ * callback that will be executed when the call to setState is actually
+ * completed.
+ *
+ * When a function is provided to setState, it will be called at some point in
+ * the future (not synchronously). It will be called with the up to date
+ * component arguments (state, props, context). These values can be different
+ * from this.* because your function may be called after receiveProps but before
+ * shouldComponentUpdate, and this new state, props, and context will not yet be
+ * assigned to this.
+ *
+ * @param {object|function} partialState Next partial state or function to
+ * produce next partial state to be merged with current state.
+ * @param {?function} callback Called after state is updated.
+ * @final
+ * @protected
+ */
+
+Component.prototype.setState = function (partialState, callback) {
+ if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {
+ throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');
+ }
+
+ this.updater.enqueueSetState(this, partialState, callback, 'setState');
+};
+/**
+ * Forces an update. This should only be invoked when it is known with
+ * certainty that we are **not** in a DOM transaction.
+ *
+ * You may want to call this when you know that some deeper aspect of the
+ * component's state has changed but `setState` was not called.
+ *
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
+ * `componentWillUpdate` and `componentDidUpdate`.
+ *
+ * @param {?function} callback Called after update is complete.
+ * @final
+ * @protected
+ */
+
+
+Component.prototype.forceUpdate = function (callback) {
+ this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
+};
+/**
+ * Deprecated APIs. These APIs used to exist on classic React classes but since
+ * we would like to deprecate them, we're not going to move them over to this
+ * modern base class. Instead, we define a getter that warns if it's accessed.
+ */
+
+
+{
+ var deprecatedAPIs = {
+ isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
+ replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
+ };
+
+ var defineDeprecationWarning = function (methodName, info) {
+ Object.defineProperty(Component.prototype, methodName, {
+ get: function () {
+ warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
+
+ return undefined;
+ }
+ });
+ };
+
+ for (var fnName in deprecatedAPIs) {
+ if (deprecatedAPIs.hasOwnProperty(fnName)) {
+ defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
+ }
+ }
+}
+
+function ComponentDummy() {}
+
+ComponentDummy.prototype = Component.prototype;
+/**
+ * Convenience component with default shallow equality check for sCU.
+ */
+
+function PureComponent(props, context, updater) {
+ this.props = props;
+ this.context = context; // If a component has string refs, we will assign a different object later.
+
+ this.refs = emptyObject;
+ this.updater = updater || ReactNoopUpdateQueue;
+}
+
+var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
+pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
+
+assign(pureComponentPrototype, Component.prototype);
+pureComponentPrototype.isPureReactComponent = true;
+
+// an immutable object with a single mutable value
+function createRef() {
+ var refObject = {
+ current: null
+ };
+
+ {
+ Object.seal(refObject);
+ }
+
+ return refObject;
+}
+
+var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
+
+function isArray(a) {
+ return isArrayImpl(a);
+}
+
+/*
+ * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
+ * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
+ *
+ * The functions in this module will throw an easier-to-understand,
+ * easier-to-debug exception with a clear errors message message explaining the
+ * problem. (Instead of a confusing exception thrown inside the implementation
+ * of the `value` object).
+ */
+// $FlowFixMe only called in DEV, so void return is not possible.
+function typeName(value) {
+ {
+ // toStringTag is needed for namespaced types like Temporal.Instant
+ var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
+ var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
+ return type;
+ }
+} // $FlowFixMe only called in DEV, so void return is not possible.
+
+
+function willCoercionThrow(value) {
+ {
+ try {
+ testStringCoercion(value);
+ return false;
+ } catch (e) {
+ return true;
+ }
+ }
+}
+
+function testStringCoercion(value) {
+ // If you ended up here by following an exception call stack, here's what's
+ // happened: you supplied an object or symbol value to React (as a prop, key,
+ // DOM attribute, CSS property, string ref, etc.) and when React tried to
+ // coerce it to a string using `'' + value`, an exception was thrown.
+ //
+ // The most common types that will cause this exception are `Symbol` instances
+ // and Temporal objects like `Temporal.Instant`. But any object that has a
+ // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
+ // exception. (Library authors do this to prevent users from using built-in
+ // numeric operators like `+` or comparison operators like `>=` because custom
+ // methods are needed to perform accurate arithmetic or comparison.)
+ //
+ // To fix the problem, coerce this object or symbol value to a string before
+ // passing it to React. The most reliable way is usually `String(value)`.
+ //
+ // To find which value is throwing, check the browser or debugger console.
+ // Before this exception was thrown, there should be `console.error` output
+ // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
+ // problem and how that type was used: key, atrribute, input value prop, etc.
+ // In most cases, this console output also shows the component and its
+ // ancestor components where the exception happened.
+ //
+ // eslint-disable-next-line react-internal/safe-string-coercion
+ return '' + value;
+}
+function checkKeyStringCoercion(value) {
+ {
+ if (willCoercionThrow(value)) {
+ error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
+
+ return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
+ }
+ }
+}
+
+function getWrappedName(outerType, innerType, wrapperName) {
+ var displayName = outerType.displayName;
+
+ if (displayName) {
+ return displayName;
+ }
+
+ var functionName = innerType.displayName || innerType.name || '';
+ return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
+} // Keep in sync with react-reconciler/getComponentNameFromFiber
+
+
+function getContextName(type) {
+ return type.displayName || 'Context';
+} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
+
+
+function getComponentNameFromType(type) {
+ if (type == null) {
+ // Host root, text node or just invalid type.
+ return null;
+ }
+
+ {
+ if (typeof type.tag === 'number') {
+ error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
+ }
+ }
+
+ if (typeof type === 'function') {
+ return type.displayName || type.name || null;
+ }
+
+ if (typeof type === 'string') {
+ return type;
+ }
+
+ switch (type) {
+ case REACT_FRAGMENT_TYPE:
+ return 'Fragment';
+
+ case REACT_PORTAL_TYPE:
+ return 'Portal';
+
+ case REACT_PROFILER_TYPE:
+ return 'Profiler';
+
+ case REACT_STRICT_MODE_TYPE:
+ return 'StrictMode';
+
+ case REACT_SUSPENSE_TYPE:
+ return 'Suspense';
+
+ case REACT_SUSPENSE_LIST_TYPE:
+ return 'SuspenseList';
+
+ }
+
+ if (typeof type === 'object') {
+ switch (type.$$typeof) {
+ case REACT_CONTEXT_TYPE:
+ var context = type;
+ return getContextName(context) + '.Consumer';
+
+ case REACT_PROVIDER_TYPE:
+ var provider = type;
+ return getContextName(provider._context) + '.Provider';
+
+ case REACT_FORWARD_REF_TYPE:
+ return getWrappedName(type, type.render, 'ForwardRef');
+
+ case REACT_MEMO_TYPE:
+ var outerName = type.displayName || null;
+
+ if (outerName !== null) {
+ return outerName;
+ }
+
+ return getComponentNameFromType(type.type) || 'Memo';
+
+ case REACT_LAZY_TYPE:
+ {
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+
+ try {
+ return getComponentNameFromType(init(payload));
+ } catch (x) {
+ return null;
+ }
+ }
+
+ // eslint-disable-next-line no-fallthrough
+ }
+ }
+
+ return null;
+}
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+var RESERVED_PROPS = {
+ key: true,
+ ref: true,
+ __self: true,
+ __source: true
+};
+var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
+
+{
+ didWarnAboutStringRefs = {};
+}
+
+function hasValidRef(config) {
+ {
+ if (hasOwnProperty.call(config, 'ref')) {
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
+
+ if (getter && getter.isReactWarning) {
+ return false;
+ }
+ }
+ }
+
+ return config.ref !== undefined;
+}
+
+function hasValidKey(config) {
+ {
+ if (hasOwnProperty.call(config, 'key')) {
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
+
+ if (getter && getter.isReactWarning) {
+ return false;
+ }
+ }
+ }
+
+ return config.key !== undefined;
+}
+
+function defineKeyPropWarningGetter(props, displayName) {
+ var warnAboutAccessingKey = function () {
+ {
+ if (!specialPropKeyWarningShown) {
+ specialPropKeyWarningShown = true;
+
+ error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
+ }
+ }
+ };
+
+ warnAboutAccessingKey.isReactWarning = true;
+ Object.defineProperty(props, 'key', {
+ get: warnAboutAccessingKey,
+ configurable: true
+ });
+}
+
+function defineRefPropWarningGetter(props, displayName) {
+ var warnAboutAccessingRef = function () {
+ {
+ if (!specialPropRefWarningShown) {
+ specialPropRefWarningShown = true;
+
+ error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
+ }
+ }
+ };
+
+ warnAboutAccessingRef.isReactWarning = true;
+ Object.defineProperty(props, 'ref', {
+ get: warnAboutAccessingRef,
+ configurable: true
+ });
+}
+
+function warnIfStringRefCannotBeAutoConverted(config) {
+ {
+ if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
+ var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
+
+ if (!didWarnAboutStringRefs[componentName]) {
+ error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
+
+ didWarnAboutStringRefs[componentName] = true;
+ }
+ }
+ }
+}
+/**
+ * Factory method to create a new React element. This no longer adheres to
+ * the class pattern, so do not use new to call it. Also, instanceof check
+ * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
+ * if something is a React Element.
+ *
+ * @param {*} type
+ * @param {*} props
+ * @param {*} key
+ * @param {string|object} ref
+ * @param {*} owner
+ * @param {*} self A *temporary* helper to detect places where `this` is
+ * different from the `owner` when React.createElement is called, so that we
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
+ * functions, and as long as `this` and owner are the same, there will be no
+ * change in behavior.
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
+ * indicating filename, line number, and/or other information.
+ * @internal
+ */
+
+
+var ReactElement = function (type, key, ref, self, source, owner, props) {
+ var element = {
+ // This tag allows us to uniquely identify this as a React Element
+ $$typeof: REACT_ELEMENT_TYPE,
+ // Built-in properties that belong on the element
+ type: type,
+ key: key,
+ ref: ref,
+ props: props,
+ // Record the component responsible for creating this element.
+ _owner: owner
+ };
+
+ {
+ // The validation flag is currently mutative. We put it on
+ // an external backing store so that we can freeze the whole object.
+ // This can be replaced with a WeakMap once they are implemented in
+ // commonly used development environments.
+ element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
+ // the validation flag non-enumerable (where possible, which should
+ // include every environment we run tests in), so the test framework
+ // ignores it.
+
+ Object.defineProperty(element._store, 'validated', {
+ configurable: false,
+ enumerable: false,
+ writable: true,
+ value: false
+ }); // self and source are DEV only properties.
+
+ Object.defineProperty(element, '_self', {
+ configurable: false,
+ enumerable: false,
+ writable: false,
+ value: self
+ }); // Two elements created in two different places should be considered
+ // equal for testing purposes and therefore we hide it from enumeration.
+
+ Object.defineProperty(element, '_source', {
+ configurable: false,
+ enumerable: false,
+ writable: false,
+ value: source
+ });
+
+ if (Object.freeze) {
+ Object.freeze(element.props);
+ Object.freeze(element);
+ }
+ }
+
+ return element;
+};
+/**
+ * Create and return a new ReactElement of the given type.
+ * See https://reactjs.org/docs/react-api.html#createelement
+ */
+
+function createElement(type, config, children) {
+ var propName; // Reserved names are extracted
+
+ var props = {};
+ var key = null;
+ var ref = null;
+ var self = null;
+ var source = null;
+
+ if (config != null) {
+ if (hasValidRef(config)) {
+ ref = config.ref;
+
+ {
+ warnIfStringRefCannotBeAutoConverted(config);
+ }
+ }
+
+ if (hasValidKey(config)) {
+ {
+ checkKeyStringCoercion(config.key);
+ }
+
+ key = '' + config.key;
+ }
+
+ self = config.__self === undefined ? null : config.__self;
+ source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
+
+ for (propName in config) {
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
+ props[propName] = config[propName];
+ }
+ }
+ } // Children can be more than one argument, and those are transferred onto
+ // the newly allocated props object.
+
+
+ var childrenLength = arguments.length - 2;
+
+ if (childrenLength === 1) {
+ props.children = children;
+ } else if (childrenLength > 1) {
+ var childArray = Array(childrenLength);
+
+ for (var i = 0; i < childrenLength; i++) {
+ childArray[i] = arguments[i + 2];
+ }
+
+ {
+ if (Object.freeze) {
+ Object.freeze(childArray);
+ }
+ }
+
+ props.children = childArray;
+ } // Resolve default props
+
+
+ if (type && type.defaultProps) {
+ var defaultProps = type.defaultProps;
+
+ for (propName in defaultProps) {
+ if (props[propName] === undefined) {
+ props[propName] = defaultProps[propName];
+ }
+ }
+ }
+
+ {
+ if (key || ref) {
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
+
+ if (key) {
+ defineKeyPropWarningGetter(props, displayName);
+ }
+
+ if (ref) {
+ defineRefPropWarningGetter(props, displayName);
+ }
+ }
+ }
+
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
+}
+function cloneAndReplaceKey(oldElement, newKey) {
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
+ return newElement;
+}
+/**
+ * Clone and return a new ReactElement using element as the starting point.
+ * See https://reactjs.org/docs/react-api.html#cloneelement
+ */
+
+function cloneElement(element, config, children) {
+ if (element === null || element === undefined) {
+ throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
+ }
+
+ var propName; // Original props are copied
+
+ var props = assign({}, element.props); // Reserved names are extracted
+
+ var key = element.key;
+ var ref = element.ref; // Self is preserved since the owner is preserved.
+
+ var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
+ // transpiler, and the original source is probably a better indicator of the
+ // true owner.
+
+ var source = element._source; // Owner will be preserved, unless ref is overridden
+
+ var owner = element._owner;
+
+ if (config != null) {
+ if (hasValidRef(config)) {
+ // Silently steal the ref from the parent.
+ ref = config.ref;
+ owner = ReactCurrentOwner.current;
+ }
+
+ if (hasValidKey(config)) {
+ {
+ checkKeyStringCoercion(config.key);
+ }
+
+ key = '' + config.key;
+ } // Remaining properties override existing props
+
+
+ var defaultProps;
+
+ if (element.type && element.type.defaultProps) {
+ defaultProps = element.type.defaultProps;
+ }
+
+ for (propName in config) {
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
+ if (config[propName] === undefined && defaultProps !== undefined) {
+ // Resolve default props
+ props[propName] = defaultProps[propName];
+ } else {
+ props[propName] = config[propName];
+ }
+ }
+ }
+ } // Children can be more than one argument, and those are transferred onto
+ // the newly allocated props object.
+
+
+ var childrenLength = arguments.length - 2;
+
+ if (childrenLength === 1) {
+ props.children = children;
+ } else if (childrenLength > 1) {
+ var childArray = Array(childrenLength);
+
+ for (var i = 0; i < childrenLength; i++) {
+ childArray[i] = arguments[i + 2];
+ }
+
+ props.children = childArray;
+ }
+
+ return ReactElement(element.type, key, ref, self, source, owner, props);
+}
+/**
+ * Verifies the object is a ReactElement.
+ * See https://reactjs.org/docs/react-api.html#isvalidelement
+ * @param {?object} object
+ * @return {boolean} True if `object` is a ReactElement.
+ * @final
+ */
+
+function isValidElement(object) {
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
+}
+
+var SEPARATOR = '.';
+var SUBSEPARATOR = ':';
+/**
+ * Escape and wrap key so it is safe to use as a reactid
+ *
+ * @param {string} key to be escaped.
+ * @return {string} the escaped key.
+ */
+
+function escape(key) {
+ var escapeRegex = /[=:]/g;
+ var escaperLookup = {
+ '=': '=0',
+ ':': '=2'
+ };
+ var escapedString = key.replace(escapeRegex, function (match) {
+ return escaperLookup[match];
+ });
+ return '$' + escapedString;
+}
+/**
+ * TODO: Test that a single child and an array with one item have the same key
+ * pattern.
+ */
+
+
+var didWarnAboutMaps = false;
+var userProvidedKeyEscapeRegex = /\/+/g;
+
+function escapeUserProvidedKey(text) {
+ return text.replace(userProvidedKeyEscapeRegex, '$&/');
+}
+/**
+ * Generate a key string that identifies a element within a set.
+ *
+ * @param {*} element A element that could contain a manual key.
+ * @param {number} index Index that is used if a manual key is not provided.
+ * @return {string}
+ */
+
+
+function getElementKey(element, index) {
+ // Do some typechecking here since we call this blindly. We want to ensure
+ // that we don't block potential future ES APIs.
+ if (typeof element === 'object' && element !== null && element.key != null) {
+ // Explicit key
+ {
+ checkKeyStringCoercion(element.key);
+ }
+
+ return escape('' + element.key);
+ } // Implicit key determined by the index in the set
+
+
+ return index.toString(36);
+}
+
+function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
+ var type = typeof children;
+
+ if (type === 'undefined' || type === 'boolean') {
+ // All of the above are perceived as null.
+ children = null;
+ }
+
+ var invokeCallback = false;
+
+ if (children === null) {
+ invokeCallback = true;
+ } else {
+ switch (type) {
+ case 'string':
+ case 'number':
+ invokeCallback = true;
+ break;
+
+ case 'object':
+ switch (children.$$typeof) {
+ case REACT_ELEMENT_TYPE:
+ case REACT_PORTAL_TYPE:
+ invokeCallback = true;
+ }
+
+ }
+ }
+
+ if (invokeCallback) {
+ var _child = children;
+ var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array
+ // so that it's consistent if the number of children grows:
+
+ var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
+
+ if (isArray(mappedChild)) {
+ var escapedChildKey = '';
+
+ if (childKey != null) {
+ escapedChildKey = escapeUserProvidedKey(childKey) + '/';
+ }
+
+ mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {
+ return c;
+ });
+ } else if (mappedChild != null) {
+ if (isValidElement(mappedChild)) {
+ {
+ // The `if` statement here prevents auto-disabling of the safe
+ // coercion ESLint rule, so we must manually disable it below.
+ // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
+ if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
+ checkKeyStringCoercion(mappedChild.key);
+ }
+ }
+
+ mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
+ // traverseAllChildren used to do for objects as children
+ escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
+ mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
+ // eslint-disable-next-line react-internal/safe-string-coercion
+ escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);
+ }
+
+ array.push(mappedChild);
+ }
+
+ return 1;
+ }
+
+ var child;
+ var nextName;
+ var subtreeCount = 0; // Count of children found in the current subtree.
+
+ var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
+
+ if (isArray(children)) {
+ for (var i = 0; i < children.length; i++) {
+ child = children[i];
+ nextName = nextNamePrefix + getElementKey(child, i);
+ subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
+ }
+ } else {
+ var iteratorFn = getIteratorFn(children);
+
+ if (typeof iteratorFn === 'function') {
+ var iterableChildren = children;
+
+ {
+ // Warn about using Maps as children
+ if (iteratorFn === iterableChildren.entries) {
+ if (!didWarnAboutMaps) {
+ warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
+ }
+
+ didWarnAboutMaps = true;
+ }
+ }
+
+ var iterator = iteratorFn.call(iterableChildren);
+ var step;
+ var ii = 0;
+
+ while (!(step = iterator.next()).done) {
+ child = step.value;
+ nextName = nextNamePrefix + getElementKey(child, ii++);
+ subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
+ }
+ } else if (type === 'object') {
+ // eslint-disable-next-line react-internal/safe-string-coercion
+ var childrenString = String(children);
+ throw new Error("Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.');
+ }
+ }
+
+ return subtreeCount;
+}
+
+/**
+ * Maps children that are typically specified as `props.children`.
+ *
+ * See https://reactjs.org/docs/react-api.html#reactchildrenmap
+ *
+ * The provided mapFunction(child, index) will be called for each
+ * leaf child.
+ *
+ * @param {?*} children Children tree container.
+ * @param {function(*, int)} func The map function.
+ * @param {*} context Context for mapFunction.
+ * @return {object} Object containing the ordered map of results.
+ */
+function mapChildren(children, func, context) {
+ if (children == null) {
+ return children;
+ }
+
+ var result = [];
+ var count = 0;
+ mapIntoArray(children, result, '', '', function (child) {
+ return func.call(context, child, count++);
+ });
+ return result;
+}
+/**
+ * Count the number of children that are typically specified as
+ * `props.children`.
+ *
+ * See https://reactjs.org/docs/react-api.html#reactchildrencount
+ *
+ * @param {?*} children Children tree container.
+ * @return {number} The number of children.
+ */
+
+
+function countChildren(children) {
+ var n = 0;
+ mapChildren(children, function () {
+ n++; // Don't return anything
+ });
+ return n;
+}
+
+/**
+ * Iterates through children that are typically specified as `props.children`.
+ *
+ * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
+ *
+ * The provided forEachFunc(child, index) will be called for each
+ * leaf child.
+ *
+ * @param {?*} children Children tree container.
+ * @param {function(*, int)} forEachFunc
+ * @param {*} forEachContext Context for forEachContext.
+ */
+function forEachChildren(children, forEachFunc, forEachContext) {
+ mapChildren(children, function () {
+ forEachFunc.apply(this, arguments); // Don't return anything.
+ }, forEachContext);
+}
+/**
+ * Flatten a children object (typically specified as `props.children`) and
+ * return an array with appropriately re-keyed children.
+ *
+ * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
+ */
+
+
+function toArray(children) {
+ return mapChildren(children, function (child) {
+ return child;
+ }) || [];
+}
+/**
+ * Returns the first child in a collection of children and verifies that there
+ * is only one child in the collection.
+ *
+ * See https://reactjs.org/docs/react-api.html#reactchildrenonly
+ *
+ * The current implementation of this function assumes that a single child gets
+ * passed without a wrapper, but the purpose of this helper function is to
+ * abstract away the particular structure of children.
+ *
+ * @param {?object} children Child collection structure.
+ * @return {ReactElement} The first and only `ReactElement` contained in the
+ * structure.
+ */
+
+
+function onlyChild(children) {
+ if (!isValidElement(children)) {
+ throw new Error('React.Children.only expected to receive a single React element child.');
+ }
+
+ return children;
+}
+
+function createContext(defaultValue) {
+ // TODO: Second argument used to be an optional `calculateChangedBits`
+ // function. Warn to reserve for future use?
+ var context = {
+ $$typeof: REACT_CONTEXT_TYPE,
+ // As a workaround to support multiple concurrent renderers, we categorize
+ // some renderers as primary and others as secondary. We only expect
+ // there to be two concurrent renderers at most: React Native (primary) and
+ // Fabric (secondary); React DOM (primary) and React ART (secondary).
+ // Secondary renderers store their context values on separate fields.
+ _currentValue: defaultValue,
+ _currentValue2: defaultValue,
+ // Used to track how many concurrent renderers this context currently
+ // supports within in a single renderer. Such as parallel server rendering.
+ _threadCount: 0,
+ // These are circular
+ Provider: null,
+ Consumer: null,
+ // Add these to use same hidden class in VM as ServerContext
+ _defaultValue: null,
+ _globalName: null
+ };
+ context.Provider = {
+ $$typeof: REACT_PROVIDER_TYPE,
+ _context: context
+ };
+ var hasWarnedAboutUsingNestedContextConsumers = false;
+ var hasWarnedAboutUsingConsumerProvider = false;
+ var hasWarnedAboutDisplayNameOnConsumer = false;
+
+ {
+ // A separate object, but proxies back to the original context object for
+ // backwards compatibility. It has a different $$typeof, so we can properly
+ // warn for the incorrect usage of Context as a Consumer.
+ var Consumer = {
+ $$typeof: REACT_CONTEXT_TYPE,
+ _context: context
+ }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
+
+ Object.defineProperties(Consumer, {
+ Provider: {
+ get: function () {
+ if (!hasWarnedAboutUsingConsumerProvider) {
+ hasWarnedAboutUsingConsumerProvider = true;
+
+ error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');
+ }
+
+ return context.Provider;
+ },
+ set: function (_Provider) {
+ context.Provider = _Provider;
+ }
+ },
+ _currentValue: {
+ get: function () {
+ return context._currentValue;
+ },
+ set: function (_currentValue) {
+ context._currentValue = _currentValue;
+ }
+ },
+ _currentValue2: {
+ get: function () {
+ return context._currentValue2;
+ },
+ set: function (_currentValue2) {
+ context._currentValue2 = _currentValue2;
+ }
+ },
+ _threadCount: {
+ get: function () {
+ return context._threadCount;
+ },
+ set: function (_threadCount) {
+ context._threadCount = _threadCount;
+ }
+ },
+ Consumer: {
+ get: function () {
+ if (!hasWarnedAboutUsingNestedContextConsumers) {
+ hasWarnedAboutUsingNestedContextConsumers = true;
+
+ error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');
+ }
+
+ return context.Consumer;
+ }
+ },
+ displayName: {
+ get: function () {
+ return context.displayName;
+ },
+ set: function (displayName) {
+ if (!hasWarnedAboutDisplayNameOnConsumer) {
+ warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName);
+
+ hasWarnedAboutDisplayNameOnConsumer = true;
+ }
+ }
+ }
+ }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
+
+ context.Consumer = Consumer;
+ }
+
+ {
+ context._currentRenderer = null;
+ context._currentRenderer2 = null;
+ }
+
+ return context;
+}
+
+var Uninitialized = -1;
+var Pending = 0;
+var Resolved = 1;
+var Rejected = 2;
+
+function lazyInitializer(payload) {
+ if (payload._status === Uninitialized) {
+ var ctor = payload._result;
+ var thenable = ctor(); // Transition to the next state.
+ // This might throw either because it's missing or throws. If so, we treat it
+ // as still uninitialized and try again next time. Which is the same as what
+ // happens if the ctor or any wrappers processing the ctor throws. This might
+ // end up fixing it if the resolution was a concurrency bug.
+
+ thenable.then(function (moduleObject) {
+ if (payload._status === Pending || payload._status === Uninitialized) {
+ // Transition to the next state.
+ var resolved = payload;
+ resolved._status = Resolved;
+ resolved._result = moduleObject;
+ }
+ }, function (error) {
+ if (payload._status === Pending || payload._status === Uninitialized) {
+ // Transition to the next state.
+ var rejected = payload;
+ rejected._status = Rejected;
+ rejected._result = error;
+ }
+ });
+
+ if (payload._status === Uninitialized) {
+ // In case, we're still uninitialized, then we're waiting for the thenable
+ // to resolve. Set it as pending in the meantime.
+ var pending = payload;
+ pending._status = Pending;
+ pending._result = thenable;
+ }
+ }
+
+ if (payload._status === Resolved) {
+ var moduleObject = payload._result;
+
+ {
+ if (moduleObject === undefined) {
+ error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
+ 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))\n\n" + 'Did you accidentally put curly braces around the import?', moduleObject);
+ }
+ }
+
+ {
+ if (!('default' in moduleObject)) {
+ error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
+ 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
+ }
+ }
+
+ return moduleObject.default;
+ } else {
+ throw payload._result;
+ }
+}
+
+function lazy(ctor) {
+ var payload = {
+ // We use these fields to store the result.
+ _status: Uninitialized,
+ _result: ctor
+ };
+ var lazyType = {
+ $$typeof: REACT_LAZY_TYPE,
+ _payload: payload,
+ _init: lazyInitializer
+ };
+
+ {
+ // In production, this would just set it on the object.
+ var defaultProps;
+ var propTypes; // $FlowFixMe
+
+ Object.defineProperties(lazyType, {
+ defaultProps: {
+ configurable: true,
+ get: function () {
+ return defaultProps;
+ },
+ set: function (newDefaultProps) {
+ error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
+
+ defaultProps = newDefaultProps; // Match production behavior more closely:
+ // $FlowFixMe
+
+ Object.defineProperty(lazyType, 'defaultProps', {
+ enumerable: true
+ });
+ }
+ },
+ propTypes: {
+ configurable: true,
+ get: function () {
+ return propTypes;
+ },
+ set: function (newPropTypes) {
+ error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
+
+ propTypes = newPropTypes; // Match production behavior more closely:
+ // $FlowFixMe
+
+ Object.defineProperty(lazyType, 'propTypes', {
+ enumerable: true
+ });
+ }
+ }
+ });
+ }
+
+ return lazyType;
+}
+
+function forwardRef(render) {
+ {
+ if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
+ error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
+ } else if (typeof render !== 'function') {
+ error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
+ } else {
+ if (render.length !== 0 && render.length !== 2) {
+ error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
+ }
+ }
+
+ if (render != null) {
+ if (render.defaultProps != null || render.propTypes != null) {
+ error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
+ }
+ }
+ }
+
+ var elementType = {
+ $$typeof: REACT_FORWARD_REF_TYPE,
+ render: render
+ };
+
+ {
+ var ownName;
+ Object.defineProperty(elementType, 'displayName', {
+ enumerable: false,
+ configurable: true,
+ get: function () {
+ return ownName;
+ },
+ set: function (name) {
+ ownName = name; // The inner component shouldn't inherit this display name in most cases,
+ // because the component may be used elsewhere.
+ // But it's nice for anonymous functions to inherit the name,
+ // so that our component-stack generation logic will display their frames.
+ // An anonymous function generally suggests a pattern like:
+ // React.forwardRef((props, ref) => {...});
+ // This kind of inner function is not used elsewhere so the side effect is okay.
+
+ if (!render.name && !render.displayName) {
+ render.displayName = name;
+ }
+ }
+ });
+ }
+
+ return elementType;
+}
+
+var REACT_MODULE_REFERENCE;
+
+{
+ REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
+}
+
+function isValidElementType(type) {
+ if (typeof type === 'string' || typeof type === 'function') {
+ return true;
+ } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
+
+
+ if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
+ return true;
+ }
+
+ if (typeof type === 'object' && type !== null) {
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
+ // types supported by any Flight configuration anywhere since
+ // we don't know which Flight build this will end up being used
+ // with.
+ type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function memo(type, compare) {
+ {
+ if (!isValidElementType(type)) {
+ error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
+ }
+ }
+
+ var elementType = {
+ $$typeof: REACT_MEMO_TYPE,
+ type: type,
+ compare: compare === undefined ? null : compare
+ };
+
+ {
+ var ownName;
+ Object.defineProperty(elementType, 'displayName', {
+ enumerable: false,
+ configurable: true,
+ get: function () {
+ return ownName;
+ },
+ set: function (name) {
+ ownName = name; // The inner component shouldn't inherit this display name in most cases,
+ // because the component may be used elsewhere.
+ // But it's nice for anonymous functions to inherit the name,
+ // so that our component-stack generation logic will display their frames.
+ // An anonymous function generally suggests a pattern like:
+ // React.memo((props) => {...});
+ // This kind of inner function is not used elsewhere so the side effect is okay.
+
+ if (!type.name && !type.displayName) {
+ type.displayName = name;
+ }
+ }
+ });
+ }
+
+ return elementType;
+}
+
+function resolveDispatcher() {
+ var dispatcher = ReactCurrentDispatcher.current;
+
+ {
+ if (dispatcher === null) {
+ error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');
+ }
+ } // Will result in a null access error if accessed outside render phase. We
+ // intentionally don't throw our own error because this is in a hot path.
+ // Also helps ensure this is inlined.
+
+
+ return dispatcher;
+}
+function useContext(Context) {
+ var dispatcher = resolveDispatcher();
+
+ {
+ // TODO: add a more generic warning for invalid values.
+ if (Context._context !== undefined) {
+ var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
+ // and nobody should be using this in existing code.
+
+ if (realContext.Consumer === Context) {
+ error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
+ } else if (realContext.Provider === Context) {
+ error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
+ }
+ }
+ }
+
+ return dispatcher.useContext(Context);
+}
+function useState(initialState) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useState(initialState);
+}
+function useReducer(reducer, initialArg, init) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useReducer(reducer, initialArg, init);
+}
+function useRef(initialValue) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useRef(initialValue);
+}
+function useEffect(create, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useEffect(create, deps);
+}
+function useInsertionEffect(create, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useInsertionEffect(create, deps);
+}
+function useLayoutEffect(create, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useLayoutEffect(create, deps);
+}
+function useCallback(callback, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useCallback(callback, deps);
+}
+function useMemo(create, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useMemo(create, deps);
+}
+function useImperativeHandle(ref, create, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useImperativeHandle(ref, create, deps);
+}
+function useDebugValue(value, formatterFn) {
+ {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useDebugValue(value, formatterFn);
+ }
+}
+function useTransition() {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useTransition();
+}
+function useDeferredValue(value) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useDeferredValue(value);
+}
+function useId() {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useId();
+}
+function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
+}
+
+// Helpers to patch console.logs to avoid logging during side-effect free
+// replaying on render function. This currently only patches the object
+// lazily which won't cover if the log function was extracted eagerly.
+// We could also eagerly patch the method.
+var disabledDepth = 0;
+var prevLog;
+var prevInfo;
+var prevWarn;
+var prevError;
+var prevGroup;
+var prevGroupCollapsed;
+var prevGroupEnd;
+
+function disabledLog() {}
+
+disabledLog.__reactDisabledLog = true;
+function disableLogs() {
+ {
+ if (disabledDepth === 0) {
+ /* eslint-disable react-internal/no-production-logging */
+ prevLog = console.log;
+ prevInfo = console.info;
+ prevWarn = console.warn;
+ prevError = console.error;
+ prevGroup = console.group;
+ prevGroupCollapsed = console.groupCollapsed;
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
+
+ var props = {
+ configurable: true,
+ enumerable: true,
+ value: disabledLog,
+ writable: true
+ }; // $FlowFixMe Flow thinks console is immutable.
+
+ Object.defineProperties(console, {
+ info: props,
+ log: props,
+ warn: props,
+ error: props,
+ group: props,
+ groupCollapsed: props,
+ groupEnd: props
+ });
+ /* eslint-enable react-internal/no-production-logging */
+ }
+
+ disabledDepth++;
+ }
+}
+function reenableLogs() {
+ {
+ disabledDepth--;
+
+ if (disabledDepth === 0) {
+ /* eslint-disable react-internal/no-production-logging */
+ var props = {
+ configurable: true,
+ enumerable: true,
+ writable: true
+ }; // $FlowFixMe Flow thinks console is immutable.
+
+ Object.defineProperties(console, {
+ log: assign({}, props, {
+ value: prevLog
+ }),
+ info: assign({}, props, {
+ value: prevInfo
+ }),
+ warn: assign({}, props, {
+ value: prevWarn
+ }),
+ error: assign({}, props, {
+ value: prevError
+ }),
+ group: assign({}, props, {
+ value: prevGroup
+ }),
+ groupCollapsed: assign({}, props, {
+ value: prevGroupCollapsed
+ }),
+ groupEnd: assign({}, props, {
+ value: prevGroupEnd
+ })
+ });
+ /* eslint-enable react-internal/no-production-logging */
+ }
+
+ if (disabledDepth < 0) {
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
+ }
+ }
+}
+
+var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
+var prefix;
+function describeBuiltInComponentFrame(name, source, ownerFn) {
+ {
+ if (prefix === undefined) {
+ // Extract the VM specific prefix used by each line.
+ try {
+ throw Error();
+ } catch (x) {
+ var match = x.stack.trim().match(/\n( *(at )?)/);
+ prefix = match && match[1] || '';
+ }
+ } // We use the prefix to ensure our stacks line up with native stack frames.
+
+
+ return '\n' + prefix + name;
+ }
+}
+var reentry = false;
+var componentFrameCache;
+
+{
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
+ componentFrameCache = new PossiblyWeakMap();
+}
+
+function describeNativeComponentFrame(fn, construct) {
+ // If something asked for a stack inside a fake render, it should get ignored.
+ if ( !fn || reentry) {
+ return '';
+ }
+
+ {
+ var frame = componentFrameCache.get(fn);
+
+ if (frame !== undefined) {
+ return frame;
+ }
+ }
+
+ var control;
+ reentry = true;
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
+
+ Error.prepareStackTrace = undefined;
+ var previousDispatcher;
+
+ {
+ previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function
+ // for warnings.
+
+ ReactCurrentDispatcher$1.current = null;
+ disableLogs();
+ }
+
+ try {
+ // This should throw.
+ if (construct) {
+ // Something should be setting the props in the constructor.
+ var Fake = function () {
+ throw Error();
+ }; // $FlowFixMe
+
+
+ Object.defineProperty(Fake.prototype, 'props', {
+ set: function () {
+ // We use a throwing setter instead of frozen or non-writable props
+ // because that won't throw in a non-strict mode function.
+ throw Error();
+ }
+ });
+
+ if (typeof Reflect === 'object' && Reflect.construct) {
+ // We construct a different control for this case to include any extra
+ // frames added by the construct call.
+ try {
+ Reflect.construct(Fake, []);
+ } catch (x) {
+ control = x;
+ }
+
+ Reflect.construct(fn, [], Fake);
+ } else {
+ try {
+ Fake.call();
+ } catch (x) {
+ control = x;
+ }
+
+ fn.call(Fake.prototype);
+ }
+ } else {
+ try {
+ throw Error();
+ } catch (x) {
+ control = x;
+ }
+
+ fn();
+ }
+ } catch (sample) {
+ // This is inlined manually because closure doesn't do it for us.
+ if (sample && control && typeof sample.stack === 'string') {
+ // This extracts the first frame from the sample that isn't also in the control.
+ // Skipping one frame that we assume is the frame that calls the two.
+ var sampleLines = sample.stack.split('\n');
+ var controlLines = control.stack.split('\n');
+ var s = sampleLines.length - 1;
+ var c = controlLines.length - 1;
+
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
+ // We expect at least one stack frame to be shared.
+ // Typically this will be the root most one. However, stack frames may be
+ // cut off due to maximum stack limits. In this case, one maybe cut off
+ // earlier than the other. We assume that the sample is longer or the same
+ // and there for cut off earlier. So we should find the root most frame in
+ // the sample somewhere in the control.
+ c--;
+ }
+
+ for (; s >= 1 && c >= 0; s--, c--) {
+ // Next we find the first one that isn't the same which should be the
+ // frame that called our sample function and the control.
+ if (sampleLines[s] !== controlLines[c]) {
+ // In V8, the first line is describing the message but other VMs don't.
+ // If we're about to return the first line, and the control is also on the same
+ // line, that's a pretty good indicator that our sample threw at same line as
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
+ // This can happen if you passed a class to function component, or non-function.
+ if (s !== 1 || c !== 1) {
+ do {
+ s--;
+ c--; // We may still have similar intermediate frames from the construct call.
+ // The next one that isn't the same should be our match though.
+
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled ""
+ // but we have a user-provided "displayName"
+ // splice it in to make the stack more readable.
+
+
+ if (fn.displayName && _frame.includes('')) {
+ _frame = _frame.replace('', fn.displayName);
+ }
+
+ {
+ if (typeof fn === 'function') {
+ componentFrameCache.set(fn, _frame);
+ }
+ } // Return the line we found.
+
+
+ return _frame;
+ }
+ } while (s >= 1 && c >= 0);
+ }
+
+ break;
+ }
+ }
+ }
+ } finally {
+ reentry = false;
+
+ {
+ ReactCurrentDispatcher$1.current = previousDispatcher;
+ reenableLogs();
+ }
+
+ Error.prepareStackTrace = previousPrepareStackTrace;
+ } // Fallback to just using the name if we couldn't make it throw.
+
+
+ var name = fn ? fn.displayName || fn.name : '';
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
+
+ {
+ if (typeof fn === 'function') {
+ componentFrameCache.set(fn, syntheticFrame);
+ }
+ }
+
+ return syntheticFrame;
+}
+function describeFunctionComponentFrame(fn, source, ownerFn) {
+ {
+ return describeNativeComponentFrame(fn, false);
+ }
+}
+
+function shouldConstruct(Component) {
+ var prototype = Component.prototype;
+ return !!(prototype && prototype.isReactComponent);
+}
+
+function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
+
+ if (type == null) {
+ return '';
+ }
+
+ if (typeof type === 'function') {
+ {
+ return describeNativeComponentFrame(type, shouldConstruct(type));
+ }
+ }
+
+ if (typeof type === 'string') {
+ return describeBuiltInComponentFrame(type);
+ }
+
+ switch (type) {
+ case REACT_SUSPENSE_TYPE:
+ return describeBuiltInComponentFrame('Suspense');
+
+ case REACT_SUSPENSE_LIST_TYPE:
+ return describeBuiltInComponentFrame('SuspenseList');
+ }
+
+ if (typeof type === 'object') {
+ switch (type.$$typeof) {
+ case REACT_FORWARD_REF_TYPE:
+ return describeFunctionComponentFrame(type.render);
+
+ case REACT_MEMO_TYPE:
+ // Memo may contain any component type so we recursively resolve it.
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
+
+ case REACT_LAZY_TYPE:
+ {
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+
+ try {
+ // Lazy may contain any component type so we recursively resolve it.
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
+ } catch (x) {}
+ }
+ }
+ }
+
+ return '';
+}
+
+var loggedTypeFailures = {};
+var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
+
+function setCurrentlyValidatingElement(element) {
+ {
+ if (element) {
+ var owner = element._owner;
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
+ } else {
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
+ }
+ }
+}
+
+function checkPropTypes(typeSpecs, values, location, componentName, element) {
+ {
+ // $FlowFixMe This is okay but Flow doesn't know it.
+ var has = Function.call.bind(hasOwnProperty);
+
+ for (var typeSpecName in typeSpecs) {
+ if (has(typeSpecs, typeSpecName)) {
+ var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
+ // fail the render phase where it didn't fail before. So we log it.
+ // After these have been cleaned up, we'll let them throw.
+
+ try {
+ // This is intentionally an invariant that gets caught. It's the same
+ // behavior as without this statement except with a better message.
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
+ // eslint-disable-next-line react-internal/prod-error-codes
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
+ err.name = 'Invariant Violation';
+ throw err;
+ }
+
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
+ } catch (ex) {
+ error$1 = ex;
+ }
+
+ if (error$1 && !(error$1 instanceof Error)) {
+ setCurrentlyValidatingElement(element);
+
+ error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
+
+ setCurrentlyValidatingElement(null);
+ }
+
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
+ // Only monitor this failure once because there tends to be a lot of the
+ // same error.
+ loggedTypeFailures[error$1.message] = true;
+ setCurrentlyValidatingElement(element);
+
+ error('Failed %s type: %s', location, error$1.message);
+
+ setCurrentlyValidatingElement(null);
+ }
+ }
+ }
+ }
+}
+
+function setCurrentlyValidatingElement$1(element) {
+ {
+ if (element) {
+ var owner = element._owner;
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
+ setExtraStackFrame(stack);
+ } else {
+ setExtraStackFrame(null);
+ }
+ }
+}
+
+var propTypesMisspellWarningShown;
+
+{
+ propTypesMisspellWarningShown = false;
+}
+
+function getDeclarationErrorAddendum() {
+ if (ReactCurrentOwner.current) {
+ var name = getComponentNameFromType(ReactCurrentOwner.current.type);
+
+ if (name) {
+ return '\n\nCheck the render method of `' + name + '`.';
+ }
+ }
+
+ return '';
+}
+
+function getSourceInfoErrorAddendum(source) {
+ if (source !== undefined) {
+ var fileName = source.fileName.replace(/^.*[\\\/]/, '');
+ var lineNumber = source.lineNumber;
+ return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
+ }
+
+ return '';
+}
+
+function getSourceInfoErrorAddendumForProps(elementProps) {
+ if (elementProps !== null && elementProps !== undefined) {
+ return getSourceInfoErrorAddendum(elementProps.__source);
+ }
+
+ return '';
+}
+/**
+ * Warn if there's no key explicitly set on dynamic arrays of children or
+ * object keys are not valid. This allows us to keep track of children between
+ * updates.
+ */
+
+
+var ownerHasKeyUseWarning = {};
+
+function getCurrentComponentErrorInfo(parentType) {
+ var info = getDeclarationErrorAddendum();
+
+ if (!info) {
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
+
+ if (parentName) {
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
+ }
+ }
+
+ return info;
+}
+/**
+ * Warn if the element doesn't have an explicit key assigned to it.
+ * This element is in an array. The array could grow and shrink or be
+ * reordered. All children that haven't already been validated are required to
+ * have a "key" property assigned to it. Error statuses are cached so a warning
+ * will only be shown once.
+ *
+ * @internal
+ * @param {ReactElement} element Element that requires a key.
+ * @param {*} parentType element's parent's type.
+ */
+
+
+function validateExplicitKey(element, parentType) {
+ if (!element._store || element._store.validated || element.key != null) {
+ return;
+ }
+
+ element._store.validated = true;
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
+
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
+ return;
+ }
+
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
+ // property, it may be the creator of the child that's responsible for
+ // assigning it a key.
+
+ var childOwner = '';
+
+ if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
+ // Give the component that originally created this child.
+ childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
+ }
+
+ {
+ setCurrentlyValidatingElement$1(element);
+
+ error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
+
+ setCurrentlyValidatingElement$1(null);
+ }
+}
+/**
+ * Ensure that every element either is passed in a static location, in an
+ * array with an explicit keys property defined, or in an object literal
+ * with valid key property.
+ *
+ * @internal
+ * @param {ReactNode} node Statically passed child of any type.
+ * @param {*} parentType node's parent's type.
+ */
+
+
+function validateChildKeys(node, parentType) {
+ if (typeof node !== 'object') {
+ return;
+ }
+
+ if (isArray(node)) {
+ for (var i = 0; i < node.length; i++) {
+ var child = node[i];
+
+ if (isValidElement(child)) {
+ validateExplicitKey(child, parentType);
+ }
+ }
+ } else if (isValidElement(node)) {
+ // This element was passed in a valid location.
+ if (node._store) {
+ node._store.validated = true;
+ }
+ } else if (node) {
+ var iteratorFn = getIteratorFn(node);
+
+ if (typeof iteratorFn === 'function') {
+ // Entry iterators used to provide implicit keys,
+ // but now we print a separate warning for them later.
+ if (iteratorFn !== node.entries) {
+ var iterator = iteratorFn.call(node);
+ var step;
+
+ while (!(step = iterator.next()).done) {
+ if (isValidElement(step.value)) {
+ validateExplicitKey(step.value, parentType);
+ }
+ }
+ }
+ }
+ }
+}
+/**
+ * Given an element, validate that its props follow the propTypes definition,
+ * provided by the type.
+ *
+ * @param {ReactElement} element
+ */
+
+
+function validatePropTypes(element) {
+ {
+ var type = element.type;
+
+ if (type === null || type === undefined || typeof type === 'string') {
+ return;
+ }
+
+ var propTypes;
+
+ if (typeof type === 'function') {
+ propTypes = type.propTypes;
+ } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
+ // Inner props are checked in the reconciler.
+ type.$$typeof === REACT_MEMO_TYPE)) {
+ propTypes = type.propTypes;
+ } else {
+ return;
+ }
+
+ if (propTypes) {
+ // Intentionally inside to avoid triggering lazy initializers:
+ var name = getComponentNameFromType(type);
+ checkPropTypes(propTypes, element.props, 'prop', name, element);
+ } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
+ propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
+
+ var _name = getComponentNameFromType(type);
+
+ error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
+ }
+
+ if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
+ error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
+ }
+ }
+}
+/**
+ * Given a fragment, validate that it can only be provided with fragment props
+ * @param {ReactElement} fragment
+ */
+
+
+function validateFragmentProps(fragment) {
+ {
+ var keys = Object.keys(fragment.props);
+
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+
+ if (key !== 'children' && key !== 'key') {
+ setCurrentlyValidatingElement$1(fragment);
+
+ error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
+
+ setCurrentlyValidatingElement$1(null);
+ break;
+ }
+ }
+
+ if (fragment.ref !== null) {
+ setCurrentlyValidatingElement$1(fragment);
+
+ error('Invalid attribute `ref` supplied to `React.Fragment`.');
+
+ setCurrentlyValidatingElement$1(null);
+ }
+ }
+}
+function createElementWithValidation(type, props, children) {
+ var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
+ // succeed and there will likely be errors in render.
+
+ if (!validType) {
+ var info = '';
+
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
+ info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
+ }
+
+ var sourceInfo = getSourceInfoErrorAddendumForProps(props);
+
+ if (sourceInfo) {
+ info += sourceInfo;
+ } else {
+ info += getDeclarationErrorAddendum();
+ }
+
+ var typeString;
+
+ if (type === null) {
+ typeString = 'null';
+ } else if (isArray(type)) {
+ typeString = 'array';
+ } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
+ typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
+ info = ' Did you accidentally export a JSX literal instead of a component?';
+ } else {
+ typeString = typeof type;
+ }
+
+ {
+ error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
+ }
+ }
+
+ var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
+ // TODO: Drop this when these are no longer allowed as the type argument.
+
+ if (element == null) {
+ return element;
+ } // Skip key warning if the type isn't valid since our key validation logic
+ // doesn't expect a non-string/function type and can throw confusing errors.
+ // We don't want exception behavior to differ between dev and prod.
+ // (Rendering will throw with a helpful message and as soon as the type is
+ // fixed, the key warnings will appear.)
+
+
+ if (validType) {
+ for (var i = 2; i < arguments.length; i++) {
+ validateChildKeys(arguments[i], type);
+ }
+ }
+
+ if (type === REACT_FRAGMENT_TYPE) {
+ validateFragmentProps(element);
+ } else {
+ validatePropTypes(element);
+ }
+
+ return element;
+}
+var didWarnAboutDeprecatedCreateFactory = false;
+function createFactoryWithValidation(type) {
+ var validatedFactory = createElementWithValidation.bind(null, type);
+ validatedFactory.type = type;
+
+ {
+ if (!didWarnAboutDeprecatedCreateFactory) {
+ didWarnAboutDeprecatedCreateFactory = true;
+
+ warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
+ } // Legacy hook: remove it
+
+
+ Object.defineProperty(validatedFactory, 'type', {
+ enumerable: false,
+ get: function () {
+ warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
+
+ Object.defineProperty(this, 'type', {
+ value: type
+ });
+ return type;
+ }
+ });
+ }
+
+ return validatedFactory;
+}
+function cloneElementWithValidation(element, props, children) {
+ var newElement = cloneElement.apply(this, arguments);
+
+ for (var i = 2; i < arguments.length; i++) {
+ validateChildKeys(arguments[i], newElement.type);
+ }
+
+ validatePropTypes(newElement);
+ return newElement;
+}
+
+function startTransition(scope, options) {
+ var prevTransition = ReactCurrentBatchConfig.transition;
+ ReactCurrentBatchConfig.transition = {};
+ var currentTransition = ReactCurrentBatchConfig.transition;
+
+ {
+ ReactCurrentBatchConfig.transition._updatedFibers = new Set();
+ }
+
+ try {
+ scope();
+ } finally {
+ ReactCurrentBatchConfig.transition = prevTransition;
+
+ {
+ if (prevTransition === null && currentTransition._updatedFibers) {
+ var updatedFibersCount = currentTransition._updatedFibers.size;
+
+ if (updatedFibersCount > 10) {
+ warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');
+ }
+
+ currentTransition._updatedFibers.clear();
+ }
+ }
+ }
+}
+
+var didWarnAboutMessageChannel = false;
+var enqueueTaskImpl = null;
+function enqueueTask(task) {
+ if (enqueueTaskImpl === null) {
+ try {
+ // read require off the module object to get around the bundlers.
+ // we don't want them to detect a require and bundle a Node polyfill.
+ var requireString = ('require' + Math.random()).slice(0, 7);
+ var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's
+ // version of setImmediate, bypassing fake timers if any.
+
+ enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;
+ } catch (_err) {
+ // we're in a browser
+ // we can't use regular timers because they may still be faked
+ // so we try MessageChannel+postMessage instead
+ enqueueTaskImpl = function (callback) {
+ {
+ if (didWarnAboutMessageChannel === false) {
+ didWarnAboutMessageChannel = true;
+
+ if (typeof MessageChannel === 'undefined') {
+ error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');
+ }
+ }
+ }
+
+ var channel = new MessageChannel();
+ channel.port1.onmessage = callback;
+ channel.port2.postMessage(undefined);
+ };
+ }
+ }
+
+ return enqueueTaskImpl(task);
+}
+
+var actScopeDepth = 0;
+var didWarnNoAwaitAct = false;
+function act(callback) {
+ {
+ // `act` calls can be nested, so we track the depth. This represents the
+ // number of `act` scopes on the stack.
+ var prevActScopeDepth = actScopeDepth;
+ actScopeDepth++;
+
+ if (ReactCurrentActQueue.current === null) {
+ // This is the outermost `act` scope. Initialize the queue. The reconciler
+ // will detect the queue and use it instead of Scheduler.
+ ReactCurrentActQueue.current = [];
+ }
+
+ var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
+ var result;
+
+ try {
+ // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only
+ // set to `true` while the given callback is executed, not for updates
+ // triggered during an async event, because this is how the legacy
+ // implementation of `act` behaved.
+ ReactCurrentActQueue.isBatchingLegacy = true;
+ result = callback(); // Replicate behavior of original `act` implementation in legacy mode,
+ // which flushed updates immediately after the scope function exits, even
+ // if it's an async function.
+
+ if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
+ var queue = ReactCurrentActQueue.current;
+
+ if (queue !== null) {
+ ReactCurrentActQueue.didScheduleLegacyUpdate = false;
+ flushActQueue(queue);
+ }
+ }
+ } catch (error) {
+ popActScope(prevActScopeDepth);
+ throw error;
+ } finally {
+ ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
+ }
+
+ if (result !== null && typeof result === 'object' && typeof result.then === 'function') {
+ var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait
+ // for it to resolve before exiting the current scope.
+
+ var wasAwaited = false;
+ var thenable = {
+ then: function (resolve, reject) {
+ wasAwaited = true;
+ thenableResult.then(function (returnValue) {
+ popActScope(prevActScopeDepth);
+
+ if (actScopeDepth === 0) {
+ // We've exited the outermost act scope. Recursively flush the
+ // queue until there's no remaining work.
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
+ } else {
+ resolve(returnValue);
+ }
+ }, function (error) {
+ // The callback threw an error.
+ popActScope(prevActScopeDepth);
+ reject(error);
+ });
+ }
+ };
+
+ {
+ if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {
+ // eslint-disable-next-line no-undef
+ Promise.resolve().then(function () {}).then(function () {
+ if (!wasAwaited) {
+ didWarnNoAwaitAct = true;
+
+ error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');
+ }
+ });
+ }
+ }
+
+ return thenable;
+ } else {
+ var returnValue = result; // The callback is not an async function. Exit the current scope
+ // immediately, without awaiting.
+
+ popActScope(prevActScopeDepth);
+
+ if (actScopeDepth === 0) {
+ // Exiting the outermost act scope. Flush the queue.
+ var _queue = ReactCurrentActQueue.current;
+
+ if (_queue !== null) {
+ flushActQueue(_queue);
+ ReactCurrentActQueue.current = null;
+ } // Return a thenable. If the user awaits it, we'll flush again in
+ // case additional work was scheduled by a microtask.
+
+
+ var _thenable = {
+ then: function (resolve, reject) {
+ // Confirm we haven't re-entered another `act` scope, in case
+ // the user does something weird like await the thenable
+ // multiple times.
+ if (ReactCurrentActQueue.current === null) {
+ // Recursively flush the queue until there's no remaining work.
+ ReactCurrentActQueue.current = [];
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
+ } else {
+ resolve(returnValue);
+ }
+ }
+ };
+ return _thenable;
+ } else {
+ // Since we're inside a nested `act` scope, the returned thenable
+ // immediately resolves. The outer scope will flush the queue.
+ var _thenable2 = {
+ then: function (resolve, reject) {
+ resolve(returnValue);
+ }
+ };
+ return _thenable2;
+ }
+ }
+ }
+}
+
+function popActScope(prevActScopeDepth) {
+ {
+ if (prevActScopeDepth !== actScopeDepth - 1) {
+ error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
+ }
+
+ actScopeDepth = prevActScopeDepth;
+ }
+}
+
+function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
+ {
+ var queue = ReactCurrentActQueue.current;
+
+ if (queue !== null) {
+ try {
+ flushActQueue(queue);
+ enqueueTask(function () {
+ if (queue.length === 0) {
+ // No additional work was scheduled. Finish.
+ ReactCurrentActQueue.current = null;
+ resolve(returnValue);
+ } else {
+ // Keep flushing work until there's none left.
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
+ }
+ });
+ } catch (error) {
+ reject(error);
+ }
+ } else {
+ resolve(returnValue);
+ }
+ }
+}
+
+var isFlushing = false;
+
+function flushActQueue(queue) {
+ {
+ if (!isFlushing) {
+ // Prevent re-entrance.
+ isFlushing = true;
+ var i = 0;
+
+ try {
+ for (; i < queue.length; i++) {
+ var callback = queue[i];
+
+ do {
+ callback = callback(true);
+ } while (callback !== null);
+ }
+
+ queue.length = 0;
+ } catch (error) {
+ // If something throws, leave the remaining callbacks on the queue.
+ queue = queue.slice(i + 1);
+ throw error;
+ } finally {
+ isFlushing = false;
+ }
+ }
+ }
+}
+
+var createElement$1 = createElementWithValidation ;
+var cloneElement$1 = cloneElementWithValidation ;
+var createFactory = createFactoryWithValidation ;
+var Children = {
+ map: mapChildren,
+ forEach: forEachChildren,
+ count: countChildren,
+ toArray: toArray,
+ only: onlyChild
+};
+
+exports.Children = Children;
+exports.Component = Component;
+exports.Fragment = REACT_FRAGMENT_TYPE;
+exports.Profiler = REACT_PROFILER_TYPE;
+exports.PureComponent = PureComponent;
+exports.StrictMode = REACT_STRICT_MODE_TYPE;
+exports.Suspense = REACT_SUSPENSE_TYPE;
+exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
+exports.cloneElement = cloneElement$1;
+exports.createContext = createContext;
+exports.createElement = createElement$1;
+exports.createFactory = createFactory;
+exports.createRef = createRef;
+exports.forwardRef = forwardRef;
+exports.isValidElement = isValidElement;
+exports.lazy = lazy;
+exports.memo = memo;
+exports.startTransition = startTransition;
+exports.unstable_act = act;
+exports.useCallback = useCallback;
+exports.useContext = useContext;
+exports.useDebugValue = useDebugValue;
+exports.useDeferredValue = useDeferredValue;
+exports.useEffect = useEffect;
+exports.useId = useId;
+exports.useImperativeHandle = useImperativeHandle;
+exports.useInsertionEffect = useInsertionEffect;
+exports.useLayoutEffect = useLayoutEffect;
+exports.useMemo = useMemo;
+exports.useReducer = useReducer;
+exports.useRef = useRef;
+exports.useState = useState;
+exports.useSyncExternalStore = useSyncExternalStore;
+exports.useTransition = useTransition;
+exports.version = ReactVersion;
+ /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
+if (
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
+ 'function'
+) {
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
+}
+
+ })();
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/react/index.js":
+/*!*************************************!*\
+ !*** ./node_modules/react/index.js ***!
+ \*************************************/
+/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
+
+"use strict";
+
+
+if (false) {} else {
+ module.exports = __webpack_require__(/*! ./cjs/react.development.js */ "./node_modules/react/cjs/react.development.js");
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js":
+/*!*******************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
+ \*******************************************************************/
+/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": function() { return /* binding */ _defineProperty; }
+/* harmony export */ });
+/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");
+
+function _defineProperty(obj, key, value) {
+ key = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key);
+ if (key in obj) {
+ Object.defineProperty(obj, key, {
+ value: value,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ } else {
+ obj[key] = value;
+ }
+ return obj;
+}
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/esm/toPrimitive.js":
+/*!****************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js ***!
+ \****************************************************************/
+/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": function() { return /* binding */ _toPrimitive; }
+/* harmony export */ });
+/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
+
+function _toPrimitive(input, hint) {
+ if ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(input) !== "object" || input === null) return input;
+ var prim = input[Symbol.toPrimitive];
+ if (prim !== undefined) {
+ var res = prim.call(input, hint || "default");
+ if ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(res) !== "object") return res;
+ throw new TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return (hint === "string" ? String : Number)(input);
+}
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js":
+/*!******************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js ***!
+ \******************************************************************/
+/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": function() { return /* binding */ _toPropertyKey; }
+/* harmony export */ });
+/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
+/* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toPrimitive.js */ "./node_modules/@babel/runtime/helpers/esm/toPrimitive.js");
+
+
+function _toPropertyKey(arg) {
+ var key = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arg, "string");
+ return (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key) === "symbol" ? key : String(key);
+}
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js":
+/*!***********************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***!
+ \***********************************************************/
+/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": function() { return /* binding */ _typeof; }
+/* harmony export */ });
+function _typeof(obj) {
+ "@babel/helpers - typeof";
+
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
+ return typeof obj;
+ } : function (obj) {
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+ }, _typeof(obj);
+}
+
+/***/ })
+
+/******/ });
+/************************************************************************/
+/******/ // The module cache
+/******/ var __webpack_module_cache__ = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/ // Check if module is in cache
+/******/ var cachedModule = __webpack_module_cache__[moduleId];
+/******/ if (cachedModule !== undefined) {
+/******/ return cachedModule.exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = __webpack_module_cache__[moduleId] = {
+/******/ id: moduleId,
+/******/ loaded: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/************************************************************************/
+/******/ /* webpack/runtime/compat get default export */
+/******/ !function() {
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function() { return module['default']; } :
+/******/ function() { return module; };
+/******/ __webpack_require__.d(getter, { a: getter });
+/******/ return getter;
+/******/ };
+/******/ }();
+/******/
+/******/ /* webpack/runtime/define property getters */
+/******/ !function() {
+/******/ // define getter functions for harmony exports
+/******/ __webpack_require__.d = function(exports, definition) {
+/******/ for(var key in definition) {
+/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
+/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
+/******/ }
+/******/ }
+/******/ };
+/******/ }();
+/******/
+/******/ /* webpack/runtime/hasOwnProperty shorthand */
+/******/ !function() {
+/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
+/******/ }();
+/******/
+/******/ /* webpack/runtime/make namespace object */
+/******/ !function() {
+/******/ // define __esModule on exports
+/******/ __webpack_require__.r = function(exports) {
+/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ }
+/******/ Object.defineProperty(exports, '__esModule', { value: true });
+/******/ };
+/******/ }();
+/******/
+/******/ /* webpack/runtime/node module decorator */
+/******/ !function() {
+/******/ __webpack_require__.nmd = function(module) {
+/******/ module.paths = [];
+/******/ if (!module.children) module.children = [];
+/******/ return module;
+/******/ };
+/******/ }();
+/******/
+/************************************************************************/
+var __webpack_exports__ = {};
+// This entry need to be wrapped in an IIFE because it need to be in strict mode.
+!function() {
+"use strict";
+/*!***********************************************************************************!*\
+ !*** ./src/advanced-custom-fields-pro/assets/src/js/pro/acf-pro-blocks-legacy.js ***!
+ \***********************************************************************************/
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _acf_jsx_names_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_acf-jsx-names.js */ "./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-jsx-names.js");
+/* harmony import */ var _acf_jsx_names_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_acf_jsx_names_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _acf_blocks_legacy_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_acf-blocks-legacy.js */ "./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-blocks-legacy.js");
+
+
+}();
+/******/ })()
+;
+//# sourceMappingURL=acf-pro-blocks-legacy.js.map
\ No newline at end of file
diff --git a/assets/build/js/pro/acf-pro-blocks-legacy.js.map b/assets/build/js/pro/acf-pro-blocks-legacy.js.map
new file mode 100644
index 0000000..8c965ca
--- /dev/null
+++ b/assets/build/js/pro/acf-pro-blocks-legacy.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"acf-pro-blocks-legacy.js","mappings":";;;;;;;;;;;;;;;;;;AAAA,CAAE,UAAWA,CAAC,EAAEC,SAAS,EAAG;EAC3B;EACA,MAAM;IAAEC,aAAa;IAAEC,iBAAiB;IAAEC;EAAY,CAAC,GAAGC,EAAE,CAACC,WAAW;EACxE,MAAM;IAAEC,OAAO;IAAEC,UAAU;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAGL,EAAE,CAACM,UAAU;EACnE,MAAM;IAAEC;EAAS,CAAC,GAAGP,EAAE,CAACQ,OAAO;EAC/B,MAAM;IAAEC;EAAU,CAAC,GAAGC,KAAK;EAC3B,MAAM;IAAEC;EAAW,CAAC,GAAGX,EAAE,CAACY,IAAI;EAC9B,MAAM;IAAEC;EAA2B,CAAC,GAAGb,EAAE,CAACc,OAAO;;EAEjD;AACD;AACA;AACA;AACA;AACA;EACC,MAAMC,UAAU,GAAG,CAAC,CAAC;;EAErB;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,SAASC,YAAYA,CAAEC,IAAI,EAAG;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;IACxBC,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,UAAU;IACvBC,OAAO,EAAE,SAAS;IAClBC,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,YAAY;IAC3BC,UAAU,EAAE,YAAY;IACxBC,QAAQ,EAAE,UAAU;IACpBC,gBAAgB,EAAE,kBAAkB;IACpCC,UAAU,EAAE;EACb,CAAC;AACF,CAAC,EAAIzN,MAAM,CAAE;;;;;;;;;;;;AChTb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,IAAI,IAAqC;AACzC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;;AAGL;;AAEA;AACA,oBAAoB;;AAEpB;AACA;AACA,MAAM;;;AAGN;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,4BAA4B;AAC5B;AACA,qCAAqC;;AAErC,gCAAgC;AAChC;AACA;;AAEA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6FAA6F,aAAa;AAC1G;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG,eAAe;AAChH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA,KAAK,GAAG;;AAER,kDAAkD;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,8MAA8M;;AAE9M;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,aAAa,YAAY;AACzB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,WAAW;AACxB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,QAAQ;AACrB,aAAa,WAAW;AACxB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,QAAQ;AACrB,aAAa,WAAW;AACxB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,0BAA0B;;AAE1B,2BAA2B;AAC3B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA,WAAW,WAAW;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,0BAA0B;;AAE1B;AACA;AACA;;AAEA;AACA,oDAAoD;;AAEpD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,iCAAiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wCAAwC;AACxC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;;AAGF;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,WAAW,GAAG;AACd,WAAW,eAAe;AAC1B,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,qEAAqE;;AAErE;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;;AAGA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA,oBAAoB,oBAAoB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAgB;;AAEhB,uBAAuB,kBAAkB;;AAEzC;AACA,yBAAyB;;AAEzB,4BAA4B;AAC5B;AACA;;AAEA,gCAAgC;;AAEhC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM;;;AAGN;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,IAAI;AACJ;;;AAGA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA,oBAAoB,oBAAoB;AACxC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,YAAY;AACZ;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wCAAwC;AACxC;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wBAAwB;;AAExB;;AAEA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,qIAAqI,yCAAyC;AAC9K;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,kBAAkB;AAC7B,WAAW,GAAG;AACd,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,YAAY,QAAQ;AACpB;;;AAGA;AACA;AACA;AACA,SAAS;AACT,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,kBAAkB;AAC7B,WAAW,GAAG;AACd;AACA;AACA;AACA,wCAAwC;AACxC,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,YAAY,cAAc;AAC1B;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA,0CAA0C;AAC1C;;AAEA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA,oCAAoC;AACpC;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,+CAA+C,IAAI;AACnD;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,oCAAoC,IAAI;AACxC;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0CAA0C;AAC1C;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA,sBAAsB;AACtB;AACA,SAAS;AACT,uBAAuB;AACvB;AACA,SAAS;AACT,uBAAuB;AACvB;AACA,SAAS;AACT,wBAAwB;AACxB;AACA,SAAS;AACT,wBAAwB;AACxB;AACA,SAAS;AACT,iCAAiC;AACjC;AACA,SAAS;AACT,2BAA2B;AAC3B;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,2DAA2D;;AAE3D;AACA;;AAEA;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA,gFAAgF;AAChF;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;;;AAGlB;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2HAA2H;AAC3H;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;;AAEA;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,GAAG;AACd;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,2DAA2D;AAC3D;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,GAAG;AACd;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,4CAA4C;;AAE5C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;;AAGA;AACA;AACA;;AAEA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA,sDAAsD;AACtD;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;;AAGA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB,sBAAsB;AACxC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,mCAAmC;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;;AAEA,0OAA0O;AAC1O;AACA,WAAW;AACX;AACA;;AAEA;AACA,MAAM;AACN,gCAAgC;AAChC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;;AAEA;AACA;AACA,YAAY;AACZ;;AAEA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB,iBAAiB;AACjB,gBAAgB;AAChB,gBAAgB;AAChB,qBAAqB;AACrB,kBAAkB;AAClB,gBAAgB;AAChB,0DAA0D;AAC1D,oBAAoB;AACpB,qBAAqB;AACrB,qBAAqB;AACrB,qBAAqB;AACrB,iBAAiB;AACjB,kBAAkB;AAClB,sBAAsB;AACtB,YAAY;AACZ,YAAY;AACZ,uBAAuB;AACvB,oBAAoB;AACpB,mBAAmB;AACnB,kBAAkB;AAClB,qBAAqB;AACrB,wBAAwB;AACxB,iBAAiB;AACjB,aAAa;AACb,2BAA2B;AAC3B,0BAA0B;AAC1B,uBAAuB;AACvB,eAAe;AACf,kBAAkB;AAClB,cAAc;AACd,gBAAgB;AAChB,4BAA4B;AAC5B,qBAAqB;AACrB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;AClrFa;;AAEb,IAAI,KAAqC,EAAE,EAE1C,CAAC;AACF,EAAE,uHAAsD;AACxD;;;;;;;;;;;;;;;;;ACN+C;AAChC;AACf,QAAQ,6DAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACdkC;AACnB;AACf,MAAM,sDAAO;AACb;AACA;AACA;AACA,QAAQ,sDAAO;AACf;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACVkC;AACS;AAC5B;AACf,YAAY,2DAAW;AACvB,SAAS,sDAAO;AAChB;;;;;;;;;;;;;;;ACLe;AACf;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH;;;;;;UCRA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCzBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;WACA;WACA;WACA;WACA;;;;;;;;;;;;;;;ACJ6B","sources":["webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-blocks-legacy.js","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-jsx-names.js","webpack://advanced-custom-fields-pro/./node_modules/react/cjs/react.development.js","webpack://advanced-custom-fields-pro/./node_modules/react/index.js","webpack://advanced-custom-fields-pro/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://advanced-custom-fields-pro/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://advanced-custom-fields-pro/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://advanced-custom-fields-pro/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://advanced-custom-fields-pro/webpack/bootstrap","webpack://advanced-custom-fields-pro/webpack/runtime/compat get default export","webpack://advanced-custom-fields-pro/webpack/runtime/define property getters","webpack://advanced-custom-fields-pro/webpack/runtime/hasOwnProperty shorthand","webpack://advanced-custom-fields-pro/webpack/runtime/make namespace object","webpack://advanced-custom-fields-pro/webpack/runtime/node module decorator","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/pro/acf-pro-blocks-legacy.js"],"sourcesContent":["( function ( $, undefined ) {\n\t// Dependencies.\n\tconst { BlockControls, InspectorControls, InnerBlocks } = wp.blockEditor;\n\tconst { Toolbar, IconButton, Placeholder, Spinner } = wp.components;\n\tconst { Fragment } = wp.element;\n\tconst { Component } = React;\n\tconst { withSelect } = wp.data;\n\tconst { createHigherOrderComponent } = wp.compose;\n\n\t/**\n\t * Storage for registered block types.\n\t *\n\t * @since 5.8.0\n\t * @var object\n\t */\n\tconst blockTypes = {};\n\n\t/**\n\t * Returns a block type for the given name.\n\t *\n\t * @date\t20/2/19\n\t * @since\t5.8.0\n\t *\n\t * @param\tstring name The block name.\n\t * @return\t(object|false)\n\t */\n\tfunction getBlockType( name ) {\n\t\treturn blockTypes[ name ] || false;\n\t}\n\n\t/**\n\t * Returns true if a block exists for the given name.\n\t *\n\t * @date\t20/2/19\n\t * @since\t5.8.0\n\t *\n\t * @param\tstring name The block name.\n\t * @return\tbool\n\t */\n\tfunction isBlockType( name ) {\n\t\treturn !! blockTypes[ name ];\n\t}\n\n\t/**\n\t * Returns true if the provided block is new.\n\t *\n\t * @date\t31/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tobject props The block props.\n\t * @return\tbool\n\t */\n\tfunction isNewBlock( props ) {\n\t\treturn ! props.attributes.id;\n\t}\n\n\t/**\n\t * Returns true if the provided block is a duplicate:\n\t * True when there are is another block with the same \"id\", but a different \"clientId\".\n\t *\n\t * @date\t31/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tobject props The block props.\n\t * @return\tbool\n\t */\n\tfunction isDuplicateBlock( props ) {\n\t\treturn getBlocks()\n\t\t\t.filter( ( block ) => block.attributes.id === props.attributes.id )\n\t\t\t.filter( ( block ) => block.clientId !== props.clientId ).length;\n\t}\n\n\t/**\n\t * Registers a block type.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.8.0\n\t *\n\t * @param\tobject blockType The block type settings localized from PHP.\n\t * @return\tobject The result from wp.blocks.registerBlockType().\n\t */\n\tfunction registerBlockType( blockType ) {\n\t\t// bail early if is excluded post_type.\n\t\tvar allowedTypes = blockType.post_types || [];\n\t\tif ( allowedTypes.length ) {\n\t\t\t// Always allow block to appear on \"Edit reusable Block\" screen.\n\t\t\tallowedTypes.push( 'wp_block' );\n\n\t\t\t// Check post type.\n\t\t\tvar postType = acf.get( 'postType' );\n\t\t\tif ( allowedTypes.indexOf( postType ) === -1 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Handle svg HTML.\n\t\tif (\n\t\t\ttypeof blockType.icon === 'string' &&\n\t\t\tblockType.icon.substr( 0, 4 ) === '{ iconHTML };\n\t\t}\n\n\t\t// Remove icon if empty to allow for default \"block\".\n\t\t// Avoids JS error preventing block from being registered.\n\t\tif ( ! blockType.icon ) {\n\t\t\tdelete blockType.icon;\n\t\t}\n\n\t\t// Check category exists and fallback to \"common\".\n\t\tvar category = wp.blocks\n\t\t\t.getCategories()\n\t\t\t.filter( ( cat ) => cat.slug === blockType.category )\n\t\t\t.pop();\n\t\tif ( ! category ) {\n\t\t\t//console.warn( `The block \"${blockType.name}\" is registered with an unknown category \"${blockType.category}\".` );\n\t\t\tblockType.category = 'common';\n\t\t}\n\n\t\t// Define block type attributes.\n\t\t// Leave default undefined to allow WP to serialize attributes in HTML comments.\n\t\t// See https://github.com/WordPress/gutenberg/issues/7342\n\t\tlet attributes = {\n\t\t\tid: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tname: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t\talign: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tmode: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t};\n\n\t\t// Append edit and save functions.\n\t\tlet ThisBlockEdit = BlockEdit;\n\t\tlet ThisBlockSave = BlockSave;\n\n\t\t// Apply align_text functionality.\n\t\tif ( blockType.supports.align_text ) {\n\t\t\tattributes = withAlignTextAttributes( attributes );\n\t\t\tThisBlockEdit = withAlignTextComponent( ThisBlockEdit, blockType );\n\t\t}\n\n\t\t// Apply align_content functionality.\n\t\tif ( blockType.supports.align_content ) {\n\t\t\tattributes = withAlignContentAttributes( attributes );\n\t\t\tThisBlockEdit = withAlignContentComponent(\n\t\t\t\tThisBlockEdit,\n\t\t\t\tblockType\n\t\t\t);\n\t\t}\n\n\t\t// Merge in block settings.\n\t\tblockType = acf.parseArgs( blockType, {\n\t\t\ttitle: '',\n\t\t\tname: '',\n\t\t\tcategory: '',\n\t\t\tattributes: attributes,\n\t\t\tedit: function ( props ) {\n\t\t\t\treturn ;\n\t\t\t},\n\t\t\tsave: function ( props ) {\n\t\t\t\treturn ;\n\t\t\t},\n\t\t} );\n\n\t\t// Remove all attribute defaults from PHP values to allow serialisation.\n\t\t// https://github.com/WordPress/gutenberg/issues/7342\n\t\tfor ( const key in blockType.attributes ) {\n\t\t\tdelete blockType.attributes[ key ].default;\n\t\t}\n\n\t\t// Add to storage.\n\t\tblockTypes[ blockType.name ] = blockType;\n\n\t\t// Register with WP.\n\t\tvar result = wp.blocks.registerBlockType( blockType.name, blockType );\n\n\t\t// Fix bug in 'core/anchor/attribute' filter overwriting attribute.\n\t\t// See https://github.com/WordPress/gutenberg/issues/15240\n\t\tif ( result.attributes.anchor ) {\n\t\t\tresult.attributes.anchor = {\n\t\t\t\ttype: 'string',\n\t\t\t};\n\t\t}\n\n\t\t// Return result.\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns the wp.data.select() response with backwards compatibility.\n\t *\n\t * @date\t17/06/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring selector The selector name.\n\t * @return\tmixed\n\t */\n\tfunction select( selector ) {\n\t\tif ( selector === 'core/block-editor' ) {\n\t\t\treturn (\n\t\t\t\twp.data.select( 'core/block-editor' ) ||\n\t\t\t\twp.data.select( 'core/editor' )\n\t\t\t);\n\t\t}\n\t\treturn wp.data.select( selector );\n\t}\n\n\t/**\n\t * Returns the wp.data.dispatch() response with backwards compatibility.\n\t *\n\t * @date\t17/06/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring selector The selector name.\n\t * @return\tmixed\n\t */\n\tfunction dispatch( selector ) {\n\t\treturn wp.data.dispatch( selector );\n\t}\n\n\t/**\n\t * Returns an array of all blocks for the given args.\n\t *\n\t * @date\t27/2/19\n\t * @since\t5.7.13\n\t *\n\t * @param\tobject args An object of key=>value pairs used to filter results.\n\t * @return\tarray.\n\t */\n\tfunction getBlocks( args ) {\n\t\t// Get all blocks (avoid deprecated warning).\n\t\tlet blocks = select( 'core/block-editor' ).getBlocks();\n\n\t\t// Append innerBlocks.\n\t\tlet i = 0;\n\t\twhile ( i < blocks.length ) {\n\t\t\tblocks = blocks.concat( blocks[ i ].innerBlocks );\n\t\t\ti++;\n\t\t}\n\n\t\t// Loop over args and filter.\n\t\tfor ( var k in args ) {\n\t\t\tblocks = blocks.filter(\n\t\t\t\t( block ) => block.attributes[ k ] === args[ k ]\n\t\t\t);\n\t\t}\n\n\t\t// Return results.\n\t\treturn blocks;\n\t}\n\n\t// Data storage for AJAX requests.\n\tconst ajaxQueue = {};\n\n\t/**\n\t * Fetches a JSON result from the AJAX API.\n\t *\n\t * @date\t28/2/19\n\t * @since\t5.7.13\n\t *\n\t * @param\tobject block The block props.\n\t * @query\tobject The query args used in AJAX callback.\n\t * @return\tobject The AJAX promise.\n\t */\n\tfunction fetchBlock( args ) {\n\t\tconst { attributes = {}, query = {}, delay = 0 } = args;\n\n\t\t// Use storage or default data.\n\t\tconst { id } = attributes;\n\t\tconst data = ajaxQueue[ id ] || {\n\t\t\tquery: {},\n\t\t\ttimeout: false,\n\t\t\tpromise: $.Deferred(),\n\t\t};\n\n\t\t// Append query args to storage.\n\t\tdata.query = { ...data.query, ...query };\n\n\t\t// Set fresh timeout.\n\t\tclearTimeout( data.timeout );\n\t\tdata.timeout = setTimeout( function () {\n\t\t\t$.ajax( {\n\t\t\t\turl: acf.get( 'ajaxurl' ),\n\t\t\t\tdataType: 'json',\n\t\t\t\ttype: 'post',\n\t\t\t\tcache: false,\n\t\t\t\tdata: acf.prepareForAjax( {\n\t\t\t\t\taction: 'acf/ajax/fetch-block',\n\t\t\t\t\tblock: JSON.stringify( attributes ),\n\t\t\t\t\tquery: data.query,\n\t\t\t\t} ),\n\t\t\t} )\n\t\t\t\t.always( function () {\n\t\t\t\t\t// Clean up queue after AJAX request is complete.\n\t\t\t\t\tajaxQueue[ id ] = null;\n\t\t\t\t} )\n\t\t\t\t.done( function () {\n\t\t\t\t\tdata.promise.resolve.apply( this, arguments );\n\t\t\t\t} )\n\t\t\t\t.fail( function () {\n\t\t\t\t\tdata.promise.reject.apply( this, arguments );\n\t\t\t\t} );\n\t\t}, delay );\n\n\t\t// Update storage.\n\t\tajaxQueue[ id ] = data;\n\n\t\t// Return promise.\n\t\treturn data.promise;\n\t}\n\n\t/**\n\t * Returns true if both object are the same.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tobject obj1\n\t * @param\tobject obj2\n\t * @return\tbool\n\t */\n\tfunction compareObjects( obj1, obj2 ) {\n\t\treturn JSON.stringify( obj1 ) === JSON.stringify( obj2 );\n\t}\n\n\t/**\n\t * Converts HTML into a React element.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring html The HTML to convert.\n\t * @return\tobject Result of React.createElement().\n\t */\n\tacf.parseJSX = function ( html ) {\n\t\treturn parseNode( $( html )[ 0 ] );\n\t};\n\n\t/**\n\t * Converts a DOM node into a React element.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tDOM node The DOM node.\n\t * @return\tobject Result of React.createElement().\n\t */\n\tfunction parseNode( node ) {\n\t\t// Get node name.\n\t\tvar nodeName = parseNodeName( node.nodeName.toLowerCase() );\n\t\tif ( ! nodeName ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Get node attributes in React friendly format.\n\t\tvar nodeAttrs = {};\n\t\tacf.arrayArgs( node.attributes )\n\t\t\t.map( parseNodeAttr )\n\t\t\t.forEach( function ( attr ) {\n\t\t\t\tnodeAttrs[ attr.name ] = attr.value;\n\t\t\t} );\n\n\t\t// Define args for React.createElement().\n\t\tvar args = [ nodeName, nodeAttrs ];\n\t\tacf.arrayArgs( node.childNodes ).forEach( function ( child ) {\n\t\t\tif ( child instanceof Text ) {\n\t\t\t\tvar text = child.textContent;\n\t\t\t\tif ( text ) {\n\t\t\t\t\targs.push( text );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\targs.push( parseNode( child ) );\n\t\t\t}\n\t\t} );\n\n\t\t// Return element.\n\t\treturn React.createElement.apply( this, args );\n\t}\n\n\t/**\n\t * Converts a node or attribute name into it's JSX compliant name\n\t *\n\t * @date 05/07/2021\n\t * @since 5.9.8\n\t *\n\t * @param string name The node or attribute name.\n\t * @returns string\n\t */\n\tfunction getJSXName( name ) {\n\t\tvar replacement = acf.isget( acf, 'jsxNameReplacements', name );\n\t\tif ( replacement ) return replacement;\n\t\treturn name;\n\t}\n\n\t/**\n\t * Converts the given name into a React friendly name or component.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring name The node name in lowercase.\n\t * @return\tmixed\n\t */\n\tfunction parseNodeName( name ) {\n\t\tswitch ( name ) {\n\t\t\tcase 'innerblocks':\n\t\t\t\treturn InnerBlocks;\n\t\t\tcase 'script':\n\t\t\t\treturn Script;\n\t\t\tcase '#comment':\n\t\t\t\treturn null;\n\t\t\tdefault:\n\t\t\t\t// Replace names for JSX counterparts.\n\t\t\t\tname = getJSXName( name );\n\t\t}\n\t\treturn name;\n\t}\n\n\t/**\n\t * Converts the given attribute into a React friendly name and value object.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tobj nodeAttr The node attribute.\n\t * @return\tobj\n\t */\n\tfunction parseNodeAttr( nodeAttr ) {\n\t\tvar name = nodeAttr.name;\n\t\tvar value = nodeAttr.value;\n\t\tswitch ( name ) {\n\t\t\t// Class.\n\t\t\tcase 'class':\n\t\t\t\tname = 'className';\n\t\t\t\tbreak;\n\n\t\t\t// Style.\n\t\t\tcase 'style':\n\t\t\t\tvar css = {};\n\t\t\t\tvalue.split( ';' ).forEach( function ( s ) {\n\t\t\t\t\tvar pos = s.indexOf( ':' );\n\t\t\t\t\tif ( pos > 0 ) {\n\t\t\t\t\t\tvar ruleName = s.substr( 0, pos ).trim();\n\t\t\t\t\t\tvar ruleValue = s.substr( pos + 1 ).trim();\n\n\t\t\t\t\t\t// Rename core properties, but not CSS variables.\n\t\t\t\t\t\tif ( ruleName.charAt( 0 ) !== '-' ) {\n\t\t\t\t\t\t\truleName = acf.strCamelCase( ruleName );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcss[ ruleName ] = ruleValue;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\tvalue = css;\n\t\t\t\tbreak;\n\n\t\t\t// Default.\n\t\t\tdefault:\n\t\t\t\t// No formatting needed for \"data-x\" attributes.\n\t\t\t\tif ( name.indexOf( 'data-' ) === 0 ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Replace names for JSX counterparts.\n\t\t\t\tname = getJSXName( name );\n\n\t\t\t\t// Convert JSON values.\n\t\t\t\tvar c1 = value.charAt( 0 );\n\t\t\t\tif ( c1 === '[' || c1 === '{' ) {\n\t\t\t\t\tvalue = JSON.parse( value );\n\t\t\t\t}\n\n\t\t\t\t// Convert bool values.\n\t\t\t\tif ( value === 'true' || value === 'false' ) {\n\t\t\t\t\tvalue = value === 'true';\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\treturn {\n\t\t\tname: name,\n\t\t\tvalue: value,\n\t\t};\n\t}\n\n\t/**\n\t * Higher Order Component used to set default block attribute values.\n\t *\n\t * By modifying block attributes directly, instead of defining defaults in registerBlockType(),\n\t * WordPress will include them always within the saved block serialized JSON.\n\t *\n\t * @date\t31/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tComponent BlockListBlock The BlockListBlock Component.\n\t * @return\tComponent\n\t */\n\tvar withDefaultAttributes = createHigherOrderComponent( function (\n\t\tBlockListBlock\n\t) {\n\t\treturn class WrappedBlockEdit extends Component {\n\t\t\tconstructor( props ) {\n\t\t\t\tsuper( props );\n\n\t\t\t\t// Extract vars.\n\t\t\t\tconst { name, attributes } = this.props;\n\n\t\t\t\t// Only run on ACF Blocks.\n\t\t\t\tconst blockType = getBlockType( name );\n\t\t\t\tif ( ! blockType ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Set unique ID and default attributes for newly added blocks.\n\t\t\t\tif ( isNewBlock( props ) ) {\n\t\t\t\t\tattributes.id = acf.uniqid( 'block_' );\n\t\t\t\t\tfor ( let attribute in blockType.attributes ) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tattributes[ attribute ] === undefined &&\n\t\t\t\t\t\t\tblockType[ attribute ] !== undefined\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tattributes[ attribute ] = blockType[ attribute ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Generate new ID for duplicated blocks.\n\t\t\t\tif ( isDuplicateBlock( props ) ) {\n\t\t\t\t\tattributes.id = acf.uniqid( 'block_' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\trender() {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t};\n\t},\n\t'withDefaultAttributes' );\n\twp.hooks.addFilter(\n\t\t'editor.BlockListBlock',\n\t\t'acf/with-default-attributes',\n\t\twithDefaultAttributes\n\t);\n\n\t/**\n\t * The BlockSave functional component.\n\t *\n\t * @date\t08/07/2020\n\t * @since\t5.9.0\n\t */\n\tfunction BlockSave() {\n\t\treturn ;\n\t}\n\n\t/**\n\t * The BlockEdit component.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t */\n\tclass BlockEdit extends Component {\n\t\tconstructor( props ) {\n\t\t\tsuper( props );\n\t\t\tthis.setup();\n\t\t}\n\n\t\tsetup() {\n\t\t\tconst { name, attributes } = this.props;\n\t\t\tconst blockType = getBlockType( name );\n\n\t\t\t// Restrict current mode.\n\t\t\tfunction restrictMode( modes ) {\n\t\t\t\tif ( modes.indexOf( attributes.mode ) === -1 ) {\n\t\t\t\t\tattributes.mode = modes[ 0 ];\n\t\t\t\t}\n\t\t\t}\n\t\t\tswitch ( blockType.mode ) {\n\t\t\t\tcase 'edit':\n\t\t\t\t\trestrictMode( [ 'edit', 'preview' ] );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'preview':\n\t\t\t\t\trestrictMode( [ 'preview', 'edit' ] );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\trestrictMode( [ 'auto' ] );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\trender() {\n\t\t\tconst { name, attributes, setAttributes } = this.props;\n\t\t\tconst { mode } = attributes;\n\t\t\tconst blockType = getBlockType( name );\n\n\t\t\t// Show toggle only for edit/preview modes.\n\t\t\tlet showToggle = blockType.supports.mode;\n\t\t\tif ( mode === 'auto' ) {\n\t\t\t\tshowToggle = false;\n\t\t\t}\n\n\t\t\t// Configure toggle variables.\n\t\t\tconst toggleText =\n\t\t\t\tmode === 'preview'\n\t\t\t\t\t? acf.__( 'Switch to Edit' )\n\t\t\t\t\t: acf.__( 'Switch to Preview' );\n\t\t\tconst toggleIcon =\n\t\t\t\tmode === 'preview' ? 'edit' : 'welcome-view-site';\n\t\t\tfunction toggleMode() {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tmode: mode === 'preview' ? 'edit' : 'preview',\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Return template.\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ showToggle && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t) }\n\t\t\t\t\t \n\n\t\t\t\t\t\n\t\t\t\t\t\t{ mode === 'preview' && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t) }\n\t\t\t\t\t \n\n\t\t\t\t\t \n\t\t\t\t \n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * The BlockBody component.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t */\n\tclass _BlockBody extends Component {\n\t\trender() {\n\t\t\tconst { attributes, isSelected } = this.props;\n\t\t\tconst { mode } = attributes;\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t{ mode === 'auto' && isSelected ? (\n\t\t\t\t\t\t \n\t\t\t\t\t) : mode === 'auto' && ! isSelected ? (\n\t\t\t\t\t\t \n\t\t\t\t\t) : mode === 'preview' ? (\n\t\t\t\t\t\t \n\t\t\t\t\t) : (\n\t\t\t\t\t\t \n\t\t\t\t\t) }\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\t}\n\n\t// Append blockIndex to component props.\n\tconst BlockBody = withSelect( function ( select, ownProps ) {\n\t\tconst { clientId } = ownProps;\n\t\t// Use optional rootClientId to allow discoverability of child blocks.\n\t\tconst rootClientId = select( 'core/block-editor' ).getBlockRootClientId(\n\t\t\tclientId\n\t\t);\n\t\tconst index = select( 'core/block-editor' ).getBlockIndex(\n\t\t\tclientId,\n\t\t\trootClientId\n\t\t);\n\t\treturn {\n\t\t\tindex,\n\t\t};\n\t} )( _BlockBody );\n\n\t/**\n\t * A react component to append HTMl.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t *\n\t * @param\tstring children The html to insert.\n\t * @return\tvoid\n\t */\n\tclass Div extends Component {\n\t\trender() {\n\t\t\treturn (\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * A react Component for inline scripts.\n\t *\n\t * This Component uses a combination of React references and jQuery to append the\n\t * inline ` );\n\t\t}\n\t\tcomponentDidUpdate() {\n\t\t\tthis.setHTML( this.props.children );\n\t\t}\n\t\tcomponentDidMount() {\n\t\t\tthis.setHTML( this.props.children );\n\t\t}\n\t}\n\n\t// Data storage for DynamicHTML components.\n\tconst store = {};\n\n\t/**\n\t * DynamicHTML Class.\n\t *\n\t * A react componenet to load and insert dynamic HTML.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t *\n\t * @param\tvoid\n\t * @return\tvoid\n\t */\n\tclass DynamicHTML extends Component {\n\t\tconstructor( props ) {\n\t\t\tsuper( props );\n\n\t\t\t// Bind callbacks.\n\t\t\tthis.setRef = this.setRef.bind( this );\n\n\t\t\t// Define default props and call setup().\n\t\t\tthis.id = '';\n\t\t\tthis.el = false;\n\t\t\tthis.subscribed = true;\n\t\t\tthis.renderMethod = 'jQuery';\n\t\t\tthis.setup( props );\n\n\t\t\t// Load state.\n\t\t\tthis.loadState();\n\t\t}\n\n\t\tsetup( props ) {\n\t\t\t// Do nothing.\n\t\t}\n\n\t\tfetch() {\n\t\t\t// Do nothing.\n\t\t}\n\n\t\tloadState() {\n\t\t\tthis.state = store[ this.id ] || {};\n\t\t}\n\n\t\tsetState( state ) {\n\t\t\tstore[ this.id ] = { ...this.state, ...state };\n\n\t\t\t// Update component state if subscribed.\n\t\t\t// - Allows AJAX callback to update store without modifying state of an unmounted component.\n\t\t\tif ( this.subscribed ) {\n\t\t\t\tsuper.setState( state );\n\t\t\t}\n\t\t}\n\n\t\tsetHtml( html ) {\n\t\t\thtml = html ? html.trim() : '';\n\n\t\t\t// Bail early if html has not changed.\n\t\t\tif ( html === this.state.html ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Update state.\n\t\t\tvar state = {\n\t\t\t\thtml: html,\n\t\t\t};\n\t\t\tif ( this.renderMethod === 'jsx' ) {\n\t\t\t\tstate.jsx = acf.parseJSX( html );\n\t\t\t\tstate.$el = $( this.el );\n\t\t\t} else {\n\t\t\t\tstate.$el = $( html );\n\t\t\t}\n\t\t\tthis.setState( state );\n\t\t}\n\n\t\tsetRef( el ) {\n\t\t\tthis.el = el;\n\t\t}\n\n\t\trender() {\n\t\t\t// Render JSX.\n\t\t\tif ( this.state.jsx ) {\n\t\t\t\treturn { this.state.jsx }
;\n\t\t\t}\n\n\t\t\t// Return HTML.\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\tshouldComponentUpdate( nextProps, nextState ) {\n\t\t\tif ( nextProps.index !== this.props.index ) {\n\t\t\t\tthis.componentWillMove();\n\t\t\t}\n\t\t\treturn nextState.html !== this.state.html;\n\t\t}\n\n\t\tdisplay( context ) {\n\t\t\t// This method is called after setting new HTML and the Component render.\n\t\t\t// The jQuery render method simply needs to move $el into place.\n\t\t\tif ( this.renderMethod === 'jQuery' ) {\n\t\t\t\tvar $el = this.state.$el;\n\t\t\t\tvar $prevParent = $el.parent();\n\t\t\t\tvar $thisParent = $( this.el );\n\n\t\t\t\t// Move $el into place.\n\t\t\t\t$thisParent.html( $el );\n\n\t\t\t\t// Special case for reusable blocks.\n\t\t\t\t// Multiple instances of the same reusable block share the same block id.\n\t\t\t\t// This causes all instances to share the same state (cool), which unfortunately\n\t\t\t\t// pulls $el back and forth between the last rendered reusable block.\n\t\t\t\t// This simple fix leaves a \"clone\" behind :)\n\t\t\t\tif (\n\t\t\t\t\t$prevParent.length &&\n\t\t\t\t\t$prevParent[ 0 ] !== $thisParent[ 0 ]\n\t\t\t\t) {\n\t\t\t\t\t$prevParent.html( $el.clone() );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Call context specific method.\n\t\t\tswitch ( context ) {\n\t\t\t\tcase 'append':\n\t\t\t\t\tthis.componentDidAppend();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'remount':\n\t\t\t\t\tthis.componentDidRemount();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tcomponentDidMount() {\n\t\t\t// Fetch on first load.\n\t\t\tif ( this.state.html === undefined ) {\n\t\t\t\t//console.log('componentDidMount', this.id);\n\t\t\t\tthis.fetch();\n\n\t\t\t\t// Or remount existing HTML.\n\t\t\t} else {\n\t\t\t\tthis.display( 'remount' );\n\t\t\t}\n\t\t}\n\n\t\tcomponentDidUpdate( prevProps, prevState ) {\n\t\t\t// HTML has changed.\n\t\t\tthis.display( 'append' );\n\t\t}\n\n\t\tcomponentDidAppend() {\n\t\t\tacf.doAction( 'append', this.state.$el );\n\t\t}\n\n\t\tcomponentWillUnmount() {\n\t\t\tacf.doAction( 'unmount', this.state.$el );\n\n\t\t\t// Unsubscribe this component from state.\n\t\t\tthis.subscribed = false;\n\t\t}\n\n\t\tcomponentDidRemount() {\n\t\t\tthis.subscribed = true;\n\n\t\t\t// Use setTimeout to avoid incorrect timing of events.\n\t\t\t// React will unmount and mount components in DOM order.\n\t\t\t// This means a new component can be mounted before an old one is unmounted.\n\t\t\t// ACF shares $el across new/old components which is un-React-like.\n\t\t\t// This timout ensures that unmounting occurs before remounting.\n\t\t\tsetTimeout( () => {\n\t\t\t\tacf.doAction( 'remount', this.state.$el );\n\t\t\t} );\n\t\t}\n\n\t\tcomponentWillMove() {\n\t\t\tacf.doAction( 'unmount', this.state.$el );\n\t\t\tsetTimeout( () => {\n\t\t\t\tacf.doAction( 'remount', this.state.$el );\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * BlockForm Class.\n\t *\n\t * A react componenet to handle the block form.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t *\n\t * @param\tstring id the block id.\n\t * @return\tvoid\n\t */\n\tclass BlockForm extends DynamicHTML {\n\t\tsetup( props ) {\n\t\t\tthis.id = `BlockForm-${ props.attributes.id }`;\n\t\t}\n\n\t\tfetch() {\n\t\t\t// Extract props.\n\t\t\tconst { attributes } = this.props;\n\n\t\t\t// Request AJAX and update HTML on complete.\n\t\t\tfetchBlock( {\n\t\t\t\tattributes: attributes,\n\t\t\t\tquery: {\n\t\t\t\t\tform: true,\n\t\t\t\t},\n\t\t\t} ).done( ( json ) => {\n\t\t\t\tthis.setHtml( json.data.form );\n\t\t\t} );\n\t\t}\n\n\t\tcomponentDidAppend() {\n\t\t\tsuper.componentDidAppend();\n\n\t\t\t// Extract props.\n\t\t\tconst { attributes, setAttributes } = this.props;\n\t\t\tconst { $el } = this.state;\n\n\t\t\t// Callback for updating block data.\n\t\t\tfunction serializeData( silent = false ) {\n\t\t\t\tconst data = acf.serialize( $el, `acf-${ attributes.id }` );\n\t\t\t\tif ( silent ) {\n\t\t\t\t\tattributes.data = data;\n\t\t\t\t} else {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tdata: data,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add events.\n\t\t\tvar timeout = false;\n\t\t\t$el.on( 'change keyup', function () {\n\t\t\t\tclearTimeout( timeout );\n\t\t\t\ttimeout = setTimeout( serializeData, 300 );\n\t\t\t} );\n\n\t\t\t// Ensure newly added block is saved with data.\n\t\t\t// Do it silently to avoid triggering a preview render.\n\t\t\tif ( ! attributes.data ) {\n\t\t\t\tserializeData( true );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * BlockPreview Class.\n\t *\n\t * A react componenet to handle the block preview.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t *\n\t * @param\tstring id the block id.\n\t * @return\tvoid\n\t */\n\tclass BlockPreview extends DynamicHTML {\n\t\tsetup( props ) {\n\t\t\tthis.id = `BlockPreview-${ props.attributes.id }`;\n\t\t\tvar blockType = getBlockType( props.name );\n\t\t\tif ( blockType.supports.jsx ) {\n\t\t\t\tthis.renderMethod = 'jsx';\n\t\t\t}\n\t\t\t//console.log('setup', this.id);\n\t\t}\n\n\t\tfetch( args = {} ) {\n\t\t\tconst { attributes = this.props.attributes, delay = 0 } = args;\n\n\t\t\t// Remember attributes used to fetch HTML.\n\t\t\tthis.setState( {\n\t\t\t\tprevAttributes: attributes,\n\t\t\t} );\n\n\t\t\t// Request AJAX and update HTML on complete.\n\t\t\tfetchBlock( {\n\t\t\t\tattributes: attributes,\n\t\t\t\tquery: {\n\t\t\t\t\tpreview: true,\n\t\t\t\t},\n\t\t\t\tdelay: delay,\n\t\t\t} ).done( ( json ) => {\n\t\t\t\tthis.setHtml( '' + json.data.preview + '
' );\n\t\t\t} );\n\t\t}\n\n\t\tcomponentDidAppend() {\n\t\t\tsuper.componentDidAppend();\n\n\t\t\t// Extract props.\n\t\t\tconst { attributes } = this.props;\n\t\t\tconst { $el } = this.state;\n\n\t\t\t// Generate action friendly type.\n\t\t\tconst type = attributes.name.replace( 'acf/', '' );\n\n\t\t\t// Do action.\n\t\t\tacf.doAction( 'render_block_preview', $el, attributes );\n\t\t\tacf.doAction(\n\t\t\t\t`render_block_preview/type=${ type }`,\n\t\t\t\t$el,\n\t\t\t\tattributes\n\t\t\t);\n\t\t}\n\n\t\tshouldComponentUpdate( nextProps, nextState ) {\n\t\t\tconst nextAttributes = nextProps.attributes;\n\t\t\tconst thisAttributes = this.props.attributes;\n\n\t\t\t// Update preview if block data has changed.\n\t\t\tif ( ! compareObjects( nextAttributes, thisAttributes ) ) {\n\t\t\t\tlet delay = 0;\n\n\t\t\t\t// Delay fetch when editing className or anchor to simulate conscistent logic to custom fields.\n\t\t\t\tif ( nextAttributes.className !== thisAttributes.className ) {\n\t\t\t\t\tdelay = 300;\n\t\t\t\t}\n\t\t\t\tif ( nextAttributes.anchor !== thisAttributes.anchor ) {\n\t\t\t\t\tdelay = 300;\n\t\t\t\t}\n\n\t\t\t\tthis.fetch( {\n\t\t\t\t\tattributes: nextAttributes,\n\t\t\t\t\tdelay: delay,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn super.shouldComponentUpdate( nextProps, nextState );\n\t\t}\n\n\t\tcomponentDidRemount() {\n\t\t\tsuper.componentDidRemount();\n\n\t\t\t// Update preview if data has changed since last render (changing from \"edit\" to \"preview\").\n\t\t\tif (\n\t\t\t\t! compareObjects(\n\t\t\t\t\tthis.state.prevAttributes,\n\t\t\t\t\tthis.props.attributes\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t//console.log('componentDidRemount', this.id);\n\t\t\t\tthis.fetch();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Initializes ACF Blocks logic and registration.\n\t *\n\t * @since 5.9.0\n\t */\n\tfunction initialize() {\n\t\t// Add support for WordPress versions before 5.2.\n\t\tif ( ! wp.blockEditor ) {\n\t\t\twp.blockEditor = wp.editor;\n\t\t}\n\n\t\t// Register block types.\n\t\tvar blockTypes = acf.get( 'blockTypes' );\n\t\tif ( blockTypes ) {\n\t\t\tblockTypes.map( registerBlockType );\n\t\t}\n\t}\n\n\t// Run the initialize callback during the \"prepare\" action.\n\t// This ensures that all localized data is available and that blocks are registered before the WP editor has been instantiated.\n\tacf.addAction( 'prepare', initialize );\n\n\t/**\n\t * Returns a valid vertical alignment.\n\t *\n\t * @date\t07/08/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring align A vertical alignment.\n\t * @return\tstring\n\t */\n\tfunction validateVerticalAlignment( align ) {\n\t\tconst ALIGNMENTS = [ 'top', 'center', 'bottom' ];\n\t\tconst DEFAULT = 'top';\n\t\treturn ALIGNMENTS.includes( align ) ? align : DEFAULT;\n\t}\n\n\t/**\n\t * Returns a valid horizontal alignment.\n\t *\n\t * @date\t07/08/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring align A horizontal alignment.\n\t * @return\tstring\n\t */\n\tfunction validateHorizontalAlignment( align ) {\n\t\tconst ALIGNMENTS = [ 'left', 'center', 'right' ];\n\t\tconst DEFAULT = acf.get( 'rtl' ) ? 'right' : 'left';\n\t\treturn ALIGNMENTS.includes( align ) ? align : DEFAULT;\n\t}\n\n\t/**\n\t * Returns a valid matrix alignment.\n\t *\n\t * Written for \"upgrade-path\" compatibility from vertical alignment to matrix alignment.\n\t *\n\t * @date\t07/08/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring align A matrix alignment.\n\t * @return\tstring\n\t */\n\tfunction validateMatrixAlignment( align ) {\n\t\tconst DEFAULT = 'center center';\n\t\tif ( align ) {\n\t\t\tconst [ y, x ] = align.split( ' ' );\n\t\t\treturn (\n\t\t\t\tvalidateVerticalAlignment( y ) +\n\t\t\t\t' ' +\n\t\t\t\tvalidateHorizontalAlignment( x )\n\t\t\t);\n\t\t}\n\t\treturn DEFAULT;\n\t}\n\n\t// Dependencies.\n\tconst { AlignmentToolbar, BlockVerticalAlignmentToolbar } = wp.blockEditor;\n\tconst BlockAlignmentMatrixToolbar =\n\t\twp.blockEditor.__experimentalBlockAlignmentMatrixToolbar ||\n\t\twp.blockEditor.BlockAlignmentMatrixToolbar;\n\t// Gutenberg v10.x begins transition from Toolbar components to Control components.\n\tconst BlockAlignmentMatrixControl =\n\t\twp.blockEditor.__experimentalBlockAlignmentMatrixControl ||\n\t\twp.blockEditor.BlockAlignmentMatrixControl;\n\n\t/**\n\t * Appends extra attributes for block types that support align_content.\n\t *\n\t * @date\t08/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tobject attributes The block type attributes.\n\t * @return\tobject\n\t */\n\tfunction withAlignContentAttributes( attributes ) {\n\t\tattributes.align_content = {\n\t\t\ttype: 'string',\n\t\t};\n\t\treturn attributes;\n\t}\n\n\t/**\n\t * A higher order component adding align_content editing functionality.\n\t *\n\t * @date\t08/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tcomponent OriginalBlockEdit The original BlockEdit component.\n\t * @param\tobject blockType The block type settings.\n\t * @return\tcomponent\n\t */\n\tfunction withAlignContentComponent( OriginalBlockEdit, blockType ) {\n\t\t// Determine alignment vars\n\t\tlet type = blockType.supports.align_content;\n\t\tlet AlignmentComponent, validateAlignment;\n\t\tswitch ( type ) {\n\t\t\tcase 'matrix':\n\t\t\t\tAlignmentComponent =\n\t\t\t\t\tBlockAlignmentMatrixControl || BlockAlignmentMatrixToolbar;\n\t\t\t\tvalidateAlignment = validateMatrixAlignment;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tAlignmentComponent = BlockVerticalAlignmentToolbar;\n\t\t\t\tvalidateAlignment = validateVerticalAlignment;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Ensure alignment component exists.\n\t\tif ( AlignmentComponent === undefined ) {\n\t\t\tconsole.warn(\n\t\t\t\t`The \"${ type }\" alignment component was not found.`\n\t\t\t);\n\t\t\treturn OriginalBlockEdit;\n\t\t}\n\n\t\t// Ensure correct block attribute data is sent in intial preview AJAX request.\n\t\tblockType.align_content = validateAlignment( blockType.align_content );\n\n\t\t// Return wrapped component.\n\t\treturn class WrappedBlockEdit extends Component {\n\t\t\trender() {\n\t\t\t\tconst { attributes, setAttributes } = this.props;\n\t\t\t\tconst { align_content } = attributes;\n\t\t\t\tfunction onChangeAlignContent( align_content ) {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\talign_content: validateAlignment( align_content ),\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Appends extra attributes for block types that support align_text.\n\t *\n\t * @date\t08/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tobject attributes The block type attributes.\n\t * @return\tobject\n\t */\n\tfunction withAlignTextAttributes( attributes ) {\n\t\tattributes.align_text = {\n\t\t\ttype: 'string',\n\t\t};\n\t\treturn attributes;\n\t}\n\n\t/**\n\t * A higher order component adding align_text editing functionality.\n\t *\n\t * @date\t08/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tcomponent OriginalBlockEdit The original BlockEdit component.\n\t * @param\tobject blockType The block type settings.\n\t * @return\tcomponent\n\t */\n\tfunction withAlignTextComponent( OriginalBlockEdit, blockType ) {\n\t\tconst validateAlignment = validateHorizontalAlignment;\n\n\t\t// Ensure correct block attribute data is sent in intial preview AJAX request.\n\t\tblockType.align_text = validateAlignment( blockType.align_text );\n\n\t\t// Return wrapped component.\n\t\treturn class WrappedBlockEdit extends Component {\n\t\t\trender() {\n\t\t\t\tconst { attributes, setAttributes } = this.props;\n\t\t\t\tconst { align_text } = attributes;\n\n\t\t\t\tfunction onChangeAlignText( align_text ) {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\talign_text: validateAlignment( align_text ),\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}\n} )( jQuery );\n","( function ( $, undefined ) {\n\tacf.jsxNameReplacements = {\n\t\t'accent-height': 'accentHeight',\n\t\taccentheight: 'accentHeight',\n\t\t'accept-charset': 'acceptCharset',\n\t\tacceptcharset: 'acceptCharset',\n\t\taccesskey: 'accessKey',\n\t\t'alignment-baseline': 'alignmentBaseline',\n\t\talignmentbaseline: 'alignmentBaseline',\n\t\tallowedblocks: 'allowedBlocks',\n\t\tallowfullscreen: 'allowFullScreen',\n\t\tallowreorder: 'allowReorder',\n\t\t'arabic-form': 'arabicForm',\n\t\tarabicform: 'arabicForm',\n\t\tattributename: 'attributeName',\n\t\tattributetype: 'attributeType',\n\t\tautocapitalize: 'autoCapitalize',\n\t\tautocomplete: 'autoComplete',\n\t\tautocorrect: 'autoCorrect',\n\t\tautofocus: 'autoFocus',\n\t\tautoplay: 'autoPlay',\n\t\tautoreverse: 'autoReverse',\n\t\tautosave: 'autoSave',\n\t\tbasefrequency: 'baseFrequency',\n\t\t'baseline-shift': 'baselineShift',\n\t\tbaselineshift: 'baselineShift',\n\t\tbaseprofile: 'baseProfile',\n\t\tcalcmode: 'calcMode',\n\t\t'cap-height': 'capHeight',\n\t\tcapheight: 'capHeight',\n\t\tcellpadding: 'cellPadding',\n\t\tcellspacing: 'cellSpacing',\n\t\tcharset: 'charSet',\n\t\tclass: 'className',\n\t\tclassid: 'classID',\n\t\tclassname: 'className',\n\t\t'clip-path': 'clipPath',\n\t\t'clip-rule': 'clipRule',\n\t\tclippath: 'clipPath',\n\t\tclippathunits: 'clipPathUnits',\n\t\tcliprule: 'clipRule',\n\t\t'color-interpolation': 'colorInterpolation',\n\t\t'color-interpolation-filters': 'colorInterpolationFilters',\n\t\t'color-profile': 'colorProfile',\n\t\t'color-rendering': 'colorRendering',\n\t\tcolorinterpolation: 'colorInterpolation',\n\t\tcolorinterpolationfilters: 'colorInterpolationFilters',\n\t\tcolorprofile: 'colorProfile',\n\t\tcolorrendering: 'colorRendering',\n\t\tcolspan: 'colSpan',\n\t\tcontenteditable: 'contentEditable',\n\t\tcontentscripttype: 'contentScriptType',\n\t\tcontentstyletype: 'contentStyleType',\n\t\tcontextmenu: 'contextMenu',\n\t\tcontrolslist: 'controlsList',\n\t\tcrossorigin: 'crossOrigin',\n\t\tdangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n\t\tdatetime: 'dateTime',\n\t\tdefaultchecked: 'defaultChecked',\n\t\tdefaultvalue: 'defaultValue',\n\t\tdiffuseconstant: 'diffuseConstant',\n\t\tdisablepictureinpicture: 'disablePictureInPicture',\n\t\tdisableremoteplayback: 'disableRemotePlayback',\n\t\t'dominant-baseline': 'dominantBaseline',\n\t\tdominantbaseline: 'dominantBaseline',\n\t\tedgemode: 'edgeMode',\n\t\t'enable-background': 'enableBackground',\n\t\tenablebackground: 'enableBackground',\n\t\tenctype: 'encType',\n\t\tenterkeyhint: 'enterKeyHint',\n\t\texternalresourcesrequired: 'externalResourcesRequired',\n\t\t'fill-opacity': 'fillOpacity',\n\t\t'fill-rule': 'fillRule',\n\t\tfillopacity: 'fillOpacity',\n\t\tfillrule: 'fillRule',\n\t\tfilterres: 'filterRes',\n\t\tfilterunits: 'filterUnits',\n\t\t'flood-color': 'floodColor',\n\t\t'flood-opacity': 'floodOpacity',\n\t\tfloodcolor: 'floodColor',\n\t\tfloodopacity: 'floodOpacity',\n\t\t'font-family': 'fontFamily',\n\t\t'font-size': 'fontSize',\n\t\t'font-size-adjust': 'fontSizeAdjust',\n\t\t'font-stretch': 'fontStretch',\n\t\t'font-style': 'fontStyle',\n\t\t'font-variant': 'fontVariant',\n\t\t'font-weight': 'fontWeight',\n\t\tfontfamily: 'fontFamily',\n\t\tfontsize: 'fontSize',\n\t\tfontsizeadjust: 'fontSizeAdjust',\n\t\tfontstretch: 'fontStretch',\n\t\tfontstyle: 'fontStyle',\n\t\tfontvariant: 'fontVariant',\n\t\tfontweight: 'fontWeight',\n\t\tfor: 'htmlFor',\n\t\tforeignobject: 'foreignObject',\n\t\tformaction: 'formAction',\n\t\tformenctype: 'formEncType',\n\t\tformmethod: 'formMethod',\n\t\tformnovalidate: 'formNoValidate',\n\t\tformtarget: 'formTarget',\n\t\tframeborder: 'frameBorder',\n\t\t'glyph-name': 'glyphName',\n\t\t'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n\t\t'glyph-orientation-vertical': 'glyphOrientationVertical',\n\t\tglyphname: 'glyphName',\n\t\tglyphorientationhorizontal: 'glyphOrientationHorizontal',\n\t\tglyphorientationvertical: 'glyphOrientationVertical',\n\t\tglyphref: 'glyphRef',\n\t\tgradienttransform: 'gradientTransform',\n\t\tgradientunits: 'gradientUnits',\n\t\t'horiz-adv-x': 'horizAdvX',\n\t\t'horiz-origin-x': 'horizOriginX',\n\t\thorizadvx: 'horizAdvX',\n\t\thorizoriginx: 'horizOriginX',\n\t\threflang: 'hrefLang',\n\t\thtmlfor: 'htmlFor',\n\t\t'http-equiv': 'httpEquiv',\n\t\thttpequiv: 'httpEquiv',\n\t\t'image-rendering': 'imageRendering',\n\t\timagerendering: 'imageRendering',\n\t\tinnerhtml: 'innerHTML',\n\t\tinputmode: 'inputMode',\n\t\titemid: 'itemID',\n\t\titemprop: 'itemProp',\n\t\titemref: 'itemRef',\n\t\titemscope: 'itemScope',\n\t\titemtype: 'itemType',\n\t\tkernelmatrix: 'kernelMatrix',\n\t\tkernelunitlength: 'kernelUnitLength',\n\t\tkeyparams: 'keyParams',\n\t\tkeypoints: 'keyPoints',\n\t\tkeysplines: 'keySplines',\n\t\tkeytimes: 'keyTimes',\n\t\tkeytype: 'keyType',\n\t\tlengthadjust: 'lengthAdjust',\n\t\t'letter-spacing': 'letterSpacing',\n\t\tletterspacing: 'letterSpacing',\n\t\t'lighting-color': 'lightingColor',\n\t\tlightingcolor: 'lightingColor',\n\t\tlimitingconeangle: 'limitingConeAngle',\n\t\tmarginheight: 'marginHeight',\n\t\tmarginwidth: 'marginWidth',\n\t\t'marker-end': 'markerEnd',\n\t\t'marker-mid': 'markerMid',\n\t\t'marker-start': 'markerStart',\n\t\tmarkerend: 'markerEnd',\n\t\tmarkerheight: 'markerHeight',\n\t\tmarkermid: 'markerMid',\n\t\tmarkerstart: 'markerStart',\n\t\tmarkerunits: 'markerUnits',\n\t\tmarkerwidth: 'markerWidth',\n\t\tmaskcontentunits: 'maskContentUnits',\n\t\tmaskunits: 'maskUnits',\n\t\tmaxlength: 'maxLength',\n\t\tmediagroup: 'mediaGroup',\n\t\tminlength: 'minLength',\n\t\tnomodule: 'noModule',\n\t\tnovalidate: 'noValidate',\n\t\tnumoctaves: 'numOctaves',\n\t\t'overline-position': 'overlinePosition',\n\t\t'overline-thickness': 'overlineThickness',\n\t\toverlineposition: 'overlinePosition',\n\t\toverlinethickness: 'overlineThickness',\n\t\t'paint-order': 'paintOrder',\n\t\tpaintorder: 'paintOrder',\n\t\t'panose-1': 'panose1',\n\t\tpathlength: 'pathLength',\n\t\tpatterncontentunits: 'patternContentUnits',\n\t\tpatterntransform: 'patternTransform',\n\t\tpatternunits: 'patternUnits',\n\t\tplaysinline: 'playsInline',\n\t\t'pointer-events': 'pointerEvents',\n\t\tpointerevents: 'pointerEvents',\n\t\tpointsatx: 'pointsAtX',\n\t\tpointsaty: 'pointsAtY',\n\t\tpointsatz: 'pointsAtZ',\n\t\tpreservealpha: 'preserveAlpha',\n\t\tpreserveaspectratio: 'preserveAspectRatio',\n\t\tprimitiveunits: 'primitiveUnits',\n\t\tradiogroup: 'radioGroup',\n\t\treadonly: 'readOnly',\n\t\treferrerpolicy: 'referrerPolicy',\n\t\trefx: 'refX',\n\t\trefy: 'refY',\n\t\t'rendering-intent': 'renderingIntent',\n\t\trenderingintent: 'renderingIntent',\n\t\trepeatcount: 'repeatCount',\n\t\trepeatdur: 'repeatDur',\n\t\trequiredextensions: 'requiredExtensions',\n\t\trequiredfeatures: 'requiredFeatures',\n\t\trowspan: 'rowSpan',\n\t\t'shape-rendering': 'shapeRendering',\n\t\tshaperendering: 'shapeRendering',\n\t\tspecularconstant: 'specularConstant',\n\t\tspecularexponent: 'specularExponent',\n\t\tspellcheck: 'spellCheck',\n\t\tspreadmethod: 'spreadMethod',\n\t\tsrcdoc: 'srcDoc',\n\t\tsrclang: 'srcLang',\n\t\tsrcset: 'srcSet',\n\t\tstartoffset: 'startOffset',\n\t\tstddeviation: 'stdDeviation',\n\t\tstitchtiles: 'stitchTiles',\n\t\t'stop-color': 'stopColor',\n\t\t'stop-opacity': 'stopOpacity',\n\t\tstopcolor: 'stopColor',\n\t\tstopopacity: 'stopOpacity',\n\t\t'strikethrough-position': 'strikethroughPosition',\n\t\t'strikethrough-thickness': 'strikethroughThickness',\n\t\tstrikethroughposition: 'strikethroughPosition',\n\t\tstrikethroughthickness: 'strikethroughThickness',\n\t\t'stroke-dasharray': 'strokeDasharray',\n\t\t'stroke-dashoffset': 'strokeDashoffset',\n\t\t'stroke-linecap': 'strokeLinecap',\n\t\t'stroke-linejoin': 'strokeLinejoin',\n\t\t'stroke-miterlimit': 'strokeMiterlimit',\n\t\t'stroke-opacity': 'strokeOpacity',\n\t\t'stroke-width': 'strokeWidth',\n\t\tstrokedasharray: 'strokeDasharray',\n\t\tstrokedashoffset: 'strokeDashoffset',\n\t\tstrokelinecap: 'strokeLinecap',\n\t\tstrokelinejoin: 'strokeLinejoin',\n\t\tstrokemiterlimit: 'strokeMiterlimit',\n\t\tstrokeopacity: 'strokeOpacity',\n\t\tstrokewidth: 'strokeWidth',\n\t\tsuppresscontenteditablewarning: 'suppressContentEditableWarning',\n\t\tsuppresshydrationwarning: 'suppressHydrationWarning',\n\t\tsurfacescale: 'surfaceScale',\n\t\tsystemlanguage: 'systemLanguage',\n\t\ttabindex: 'tabIndex',\n\t\ttablevalues: 'tableValues',\n\t\ttargetx: 'targetX',\n\t\ttargety: 'targetY',\n\t\ttemplatelock: 'templateLock',\n\t\t'text-anchor': 'textAnchor',\n\t\t'text-decoration': 'textDecoration',\n\t\t'text-rendering': 'textRendering',\n\t\ttextanchor: 'textAnchor',\n\t\ttextdecoration: 'textDecoration',\n\t\ttextlength: 'textLength',\n\t\ttextrendering: 'textRendering',\n\t\t'underline-position': 'underlinePosition',\n\t\t'underline-thickness': 'underlineThickness',\n\t\tunderlineposition: 'underlinePosition',\n\t\tunderlinethickness: 'underlineThickness',\n\t\t'unicode-bidi': 'unicodeBidi',\n\t\t'unicode-range': 'unicodeRange',\n\t\tunicodebidi: 'unicodeBidi',\n\t\tunicoderange: 'unicodeRange',\n\t\t'units-per-em': 'unitsPerEm',\n\t\tunitsperem: 'unitsPerEm',\n\t\tusemap: 'useMap',\n\t\t'v-alphabetic': 'vAlphabetic',\n\t\t'v-hanging': 'vHanging',\n\t\t'v-ideographic': 'vIdeographic',\n\t\t'v-mathematical': 'vMathematical',\n\t\tvalphabetic: 'vAlphabetic',\n\t\t'vector-effect': 'vectorEffect',\n\t\tvectoreffect: 'vectorEffect',\n\t\t'vert-adv-y': 'vertAdvY',\n\t\t'vert-origin-x': 'vertOriginX',\n\t\t'vert-origin-y': 'vertOriginY',\n\t\tvertadvy: 'vertAdvY',\n\t\tvertoriginx: 'vertOriginX',\n\t\tvertoriginy: 'vertOriginY',\n\t\tvhanging: 'vHanging',\n\t\tvideographic: 'vIdeographic',\n\t\tviewbox: 'viewBox',\n\t\tviewtarget: 'viewTarget',\n\t\tvmathematical: 'vMathematical',\n\t\t'word-spacing': 'wordSpacing',\n\t\twordspacing: 'wordSpacing',\n\t\t'writing-mode': 'writingMode',\n\t\twritingmode: 'writingMode',\n\t\t'x-height': 'xHeight',\n\t\txchannelselector: 'xChannelSelector',\n\t\txheight: 'xHeight',\n\t\t'xlink:actuate': 'xlinkActuate',\n\t\t'xlink:arcrole': 'xlinkArcrole',\n\t\t'xlink:href': 'xlinkHref',\n\t\t'xlink:role': 'xlinkRole',\n\t\t'xlink:show': 'xlinkShow',\n\t\t'xlink:title': 'xlinkTitle',\n\t\t'xlink:type': 'xlinkType',\n\t\txlinkactuate: 'xlinkActuate',\n\t\txlinkarcrole: 'xlinkArcrole',\n\t\txlinkhref: 'xlinkHref',\n\t\txlinkrole: 'xlinkRole',\n\t\txlinkshow: 'xlinkShow',\n\t\txlinktitle: 'xlinkTitle',\n\t\txlinktype: 'xlinkType',\n\t\t'xml:base': 'xmlBase',\n\t\t'xml:lang': 'xmlLang',\n\t\t'xml:space': 'xmlSpace',\n\t\txmlbase: 'xmlBase',\n\t\txmllang: 'xmlLang',\n\t\t'xmlns:xlink': 'xmlnsXlink',\n\t\txmlnsxlink: 'xmlnsXlink',\n\t\txmlspace: 'xmlSpace',\n\t\tychannelselector: 'yChannelSelector',\n\t\tzoomandpan: 'zoomAndPan',\n\t};\n} )( jQuery );\n","/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var ReactVersion = '18.2.0';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nvar ReactCurrentDispatcher = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nvar ReactCurrentBatchConfig = {\n transition: null\n};\n\nvar ReactCurrentActQueue = {\n current: null,\n // Used to reproduce behavior of `batchedUpdates` in legacy mode.\n isBatchingLegacy: false,\n didScheduleLegacyUpdate: false\n};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nvar ReactDebugCurrentFrame = {};\nvar currentExtraStackFrame = null;\nfunction setExtraStackFrame(stack) {\n {\n currentExtraStackFrame = stack;\n }\n}\n\n{\n ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {\n {\n currentExtraStackFrame = stack;\n }\n }; // Stack implementation injected by the current renderer.\n\n\n ReactDebugCurrentFrame.getCurrentStack = null;\n\n ReactDebugCurrentFrame.getStackAddendum = function () {\n var stack = ''; // Add an extra top frame while an element is being validated\n\n if (currentExtraStackFrame) {\n stack += currentExtraStackFrame;\n } // Delegate to the injected renderer-specific implementation\n\n\n var impl = ReactDebugCurrentFrame.getCurrentStack;\n\n if (impl) {\n stack += impl() || '';\n }\n\n return stack;\n };\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar ReactSharedInternals = {\n ReactCurrentDispatcher: ReactCurrentDispatcher,\n ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n ReactCurrentOwner: ReactCurrentOwner\n};\n\n{\n ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;\n ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + \".\" + callerName;\n\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n\n error(\"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n}\n/**\n * This is the abstract API for an update queue.\n */\n\n\nvar ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nvar assign = Object.assign;\n\nvar emptyObject = {};\n\n{\n Object.freeze(emptyObject);\n}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {\n throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n{\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n\n return undefined;\n }\n });\n };\n\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n var refObject = {\n current: null\n };\n\n {\n Object.seal(refObject);\n }\n\n return refObject;\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n if (element === null || element === undefined) {\n throw new Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n\n var propName; // Original props are copied\n\n var props = assign({}, element.props); // Reserved names are extracted\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = key.replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\nvar didWarnAboutMaps = false;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof element === 'object' && element !== null && element.key != null) {\n // Explicit key\n {\n checkKeyStringCoercion(element.key);\n }\n\n return escape('' + element.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n var _child = children;\n var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;\n\n if (isArray(mappedChild)) {\n var escapedChildKey = '';\n\n if (childKey != null) {\n escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n }\n\n mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n {\n // The `if` statement here prevents auto-disabling of the safe\n // coercion ESLint rule, so we must manually disable it below.\n // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {\n checkKeyStringCoercion(mappedChild.key);\n }\n }\n\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n // eslint-disable-next-line react-internal/safe-string-coercion\n escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);\n }\n\n array.push(mappedChild);\n }\n\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getElementKey(child, i);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var iterableChildren = children;\n\n {\n // Warn about using Maps as children\n if (iteratorFn === iterableChildren.entries) {\n if (!didWarnAboutMaps) {\n warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n\n var iterator = iteratorFn.call(iterableChildren);\n var step;\n var ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getElementKey(child, ii++);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else if (type === 'object') {\n // eslint-disable-next-line react-internal/safe-string-coercion\n var childrenString = String(children);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n var result = [];\n var count = 0;\n mapIntoArray(children, result, '', '', function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n var n = 0;\n mapChildren(children, function () {\n n++; // Don't return anything\n });\n return n;\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n mapChildren(children, function () {\n forEachFunc.apply(this, arguments); // Don't return anything.\n }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n throw new Error('React.Children.only expected to receive a single React element child.');\n }\n\n return children;\n}\n\nfunction createContext(defaultValue) {\n // TODO: Second argument used to be an optional `calculateChangedBits`\n // function. Warn to reserve for future use?\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null,\n // Add these to use same hidden class in VM as ServerContext\n _defaultValue: null,\n _globalName: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n var hasWarnedAboutUsingNestedContextConsumers = false;\n var hasWarnedAboutUsingConsumerProvider = false;\n var hasWarnedAboutDisplayNameOnConsumer = false;\n\n {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context\n }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n if (!hasWarnedAboutUsingConsumerProvider) {\n hasWarnedAboutUsingConsumerProvider = true;\n\n error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n _threadCount: {\n get: function () {\n return context._threadCount;\n },\n set: function (_threadCount) {\n context._threadCount = _threadCount;\n }\n },\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingNestedContextConsumers) {\n hasWarnedAboutUsingNestedContextConsumers = true;\n\n error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Consumer;\n }\n },\n displayName: {\n get: function () {\n return context.displayName;\n },\n set: function (displayName) {\n if (!hasWarnedAboutDisplayNameOnConsumer) {\n warn('Setting `displayName` on Context.Consumer has no effect. ' + \"You should set it directly on the context with Context.displayName = '%s'.\", displayName);\n\n hasWarnedAboutDisplayNameOnConsumer = true;\n }\n }\n }\n }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n context.Consumer = Consumer;\n }\n\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n\n return context;\n}\n\nvar Uninitialized = -1;\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\n\nfunction lazyInitializer(payload) {\n if (payload._status === Uninitialized) {\n var ctor = payload._result;\n var thenable = ctor(); // Transition to the next state.\n // This might throw either because it's missing or throws. If so, we treat it\n // as still uninitialized and try again next time. Which is the same as what\n // happens if the ctor or any wrappers processing the ctor throws. This might\n // end up fixing it if the resolution was a concurrency bug.\n\n thenable.then(function (moduleObject) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var resolved = payload;\n resolved._status = Resolved;\n resolved._result = moduleObject;\n }\n }, function (error) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var rejected = payload;\n rejected._status = Rejected;\n rejected._result = error;\n }\n });\n\n if (payload._status === Uninitialized) {\n // In case, we're still uninitialized, then we're waiting for the thenable\n // to resolve. Set it as pending in the meantime.\n var pending = payload;\n pending._status = Pending;\n pending._result = thenable;\n }\n }\n\n if (payload._status === Resolved) {\n var moduleObject = payload._result;\n\n {\n if (moduleObject === undefined) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\\n\\n\" + 'Did you accidentally put curly braces around the import?', moduleObject);\n }\n }\n\n {\n if (!('default' in moduleObject)) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\", moduleObject);\n }\n }\n\n return moduleObject.default;\n } else {\n throw payload._result;\n }\n}\n\nfunction lazy(ctor) {\n var payload = {\n // We use these fields to store the result.\n _status: Uninitialized,\n _result: ctor\n };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: payload,\n _init: lazyInitializer\n };\n\n {\n // In production, this would just set it on the object.\n var defaultProps;\n var propTypes; // $FlowFixMe\n\n Object.defineProperties(lazyType, {\n defaultProps: {\n configurable: true,\n get: function () {\n return defaultProps;\n },\n set: function (newDefaultProps) {\n error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n defaultProps = newDefaultProps; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'defaultProps', {\n enumerable: true\n });\n }\n },\n propTypes: {\n configurable: true,\n get: function () {\n return propTypes;\n },\n set: function (newPropTypes) {\n error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n propTypes = newPropTypes; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'propTypes', {\n enumerable: true\n });\n }\n }\n });\n }\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n {\n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n } else if (typeof render !== 'function') {\n error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n if (render.length !== 0 && render.length !== 2) {\n error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');\n }\n }\n\n if (render != null) {\n if (render.defaultProps != null || render.propTypes != null) {\n error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');\n }\n }\n }\n\n var elementType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.forwardRef((props, ref) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!render.name && !render.displayName) {\n render.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n\n var elementType = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.memo((props) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!type.name && !type.displayName) {\n type.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nfunction resolveDispatcher() {\n var dispatcher = ReactCurrentDispatcher.current;\n\n {\n if (dispatcher === null) {\n error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n }\n } // Will result in a null access error if accessed outside render phase. We\n // intentionally don't throw our own error because this is in a hot path.\n // Also helps ensure this is inlined.\n\n\n return dispatcher;\n}\nfunction useContext(Context) {\n var dispatcher = resolveDispatcher();\n\n {\n // TODO: add a more generic warning for invalid values.\n if (Context._context !== undefined) {\n var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n if (realContext.Consumer === Context) {\n error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');\n } else if (realContext.Provider === Context) {\n error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n }\n }\n }\n\n return dispatcher.useContext(Context);\n}\nfunction useState(initialState) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useInsertionEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useInsertionEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDebugValue(value, formatterFn);\n }\n}\nfunction useTransition() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useTransition();\n}\nfunction useDeferredValue(value) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDeferredValue(value);\n}\nfunction useId() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useId();\n}\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher$1.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('')) {\n _frame = _frame.replace('', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher$1.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n setExtraStackFrame(stack);\n } else {\n setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendumForProps(elementProps) {\n if (elementProps !== null && elementProps !== undefined) {\n return getSourceInfoErrorAddendum(elementProps.__source);\n }\n\n return '';\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n {\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\nfunction createElementWithValidation(type, props, children) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n {\n error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n }\n\n var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n}\nvar didWarnAboutDeprecatedCreateFactory = false;\nfunction createFactoryWithValidation(type) {\n var validatedFactory = createElementWithValidation.bind(null, type);\n validatedFactory.type = type;\n\n {\n if (!didWarnAboutDeprecatedCreateFactory) {\n didWarnAboutDeprecatedCreateFactory = true;\n\n warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');\n } // Legacy hook: remove it\n\n\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n\n return validatedFactory;\n}\nfunction cloneElementWithValidation(element, props, children) {\n var newElement = cloneElement.apply(this, arguments);\n\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n\n validatePropTypes(newElement);\n return newElement;\n}\n\nfunction startTransition(scope, options) {\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = {};\n var currentTransition = ReactCurrentBatchConfig.transition;\n\n {\n ReactCurrentBatchConfig.transition._updatedFibers = new Set();\n }\n\n try {\n scope();\n } finally {\n ReactCurrentBatchConfig.transition = prevTransition;\n\n {\n if (prevTransition === null && currentTransition._updatedFibers) {\n var updatedFibersCount = currentTransition._updatedFibers.size;\n\n if (updatedFibersCount > 10) {\n warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n }\n\n currentTransition._updatedFibers.clear();\n }\n }\n }\n}\n\nvar didWarnAboutMessageChannel = false;\nvar enqueueTaskImpl = null;\nfunction enqueueTask(task) {\n if (enqueueTaskImpl === null) {\n try {\n // read require off the module object to get around the bundlers.\n // we don't want them to detect a require and bundle a Node polyfill.\n var requireString = ('require' + Math.random()).slice(0, 7);\n var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's\n // version of setImmediate, bypassing fake timers if any.\n\n enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;\n } catch (_err) {\n // we're in a browser\n // we can't use regular timers because they may still be faked\n // so we try MessageChannel+postMessage instead\n enqueueTaskImpl = function (callback) {\n {\n if (didWarnAboutMessageChannel === false) {\n didWarnAboutMessageChannel = true;\n\n if (typeof MessageChannel === 'undefined') {\n error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');\n }\n }\n }\n\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(undefined);\n };\n }\n }\n\n return enqueueTaskImpl(task);\n}\n\nvar actScopeDepth = 0;\nvar didWarnNoAwaitAct = false;\nfunction act(callback) {\n {\n // `act` calls can be nested, so we track the depth. This represents the\n // number of `act` scopes on the stack.\n var prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n\n if (ReactCurrentActQueue.current === null) {\n // This is the outermost `act` scope. Initialize the queue. The reconciler\n // will detect the queue and use it instead of Scheduler.\n ReactCurrentActQueue.current = [];\n }\n\n var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;\n var result;\n\n try {\n // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only\n // set to `true` while the given callback is executed, not for updates\n // triggered during an async event, because this is how the legacy\n // implementation of `act` behaved.\n ReactCurrentActQueue.isBatchingLegacy = true;\n result = callback(); // Replicate behavior of original `act` implementation in legacy mode,\n // which flushed updates immediately after the scope function exits, even\n // if it's an async function.\n\n if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n ReactCurrentActQueue.didScheduleLegacyUpdate = false;\n flushActQueue(queue);\n }\n }\n } catch (error) {\n popActScope(prevActScopeDepth);\n throw error;\n } finally {\n ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;\n }\n\n if (result !== null && typeof result === 'object' && typeof result.then === 'function') {\n var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait\n // for it to resolve before exiting the current scope.\n\n var wasAwaited = false;\n var thenable = {\n then: function (resolve, reject) {\n wasAwaited = true;\n thenableResult.then(function (returnValue) {\n popActScope(prevActScopeDepth);\n\n if (actScopeDepth === 0) {\n // We've exited the outermost act scope. Recursively flush the\n // queue until there's no remaining work.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n } else {\n resolve(returnValue);\n }\n }, function (error) {\n // The callback threw an error.\n popActScope(prevActScopeDepth);\n reject(error);\n });\n }\n };\n\n {\n if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {\n // eslint-disable-next-line no-undef\n Promise.resolve().then(function () {}).then(function () {\n if (!wasAwaited) {\n didWarnNoAwaitAct = true;\n\n error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');\n }\n });\n }\n }\n\n return thenable;\n } else {\n var returnValue = result; // The callback is not an async function. Exit the current scope\n // immediately, without awaiting.\n\n popActScope(prevActScopeDepth);\n\n if (actScopeDepth === 0) {\n // Exiting the outermost act scope. Flush the queue.\n var _queue = ReactCurrentActQueue.current;\n\n if (_queue !== null) {\n flushActQueue(_queue);\n ReactCurrentActQueue.current = null;\n } // Return a thenable. If the user awaits it, we'll flush again in\n // case additional work was scheduled by a microtask.\n\n\n var _thenable = {\n then: function (resolve, reject) {\n // Confirm we haven't re-entered another `act` scope, in case\n // the user does something weird like await the thenable\n // multiple times.\n if (ReactCurrentActQueue.current === null) {\n // Recursively flush the queue until there's no remaining work.\n ReactCurrentActQueue.current = [];\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n } else {\n resolve(returnValue);\n }\n }\n };\n return _thenable;\n } else {\n // Since we're inside a nested `act` scope, the returned thenable\n // immediately resolves. The outer scope will flush the queue.\n var _thenable2 = {\n then: function (resolve, reject) {\n resolve(returnValue);\n }\n };\n return _thenable2;\n }\n }\n }\n}\n\nfunction popActScope(prevActScopeDepth) {\n {\n if (prevActScopeDepth !== actScopeDepth - 1) {\n error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');\n }\n\n actScopeDepth = prevActScopeDepth;\n }\n}\n\nfunction recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n {\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n if (queue.length === 0) {\n // No additional work was scheduled. Finish.\n ReactCurrentActQueue.current = null;\n resolve(returnValue);\n } else {\n // Keep flushing work until there's none left.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n }\n });\n } catch (error) {\n reject(error);\n }\n } else {\n resolve(returnValue);\n }\n }\n}\n\nvar isFlushing = false;\n\nfunction flushActQueue(queue) {\n {\n if (!isFlushing) {\n // Prevent re-entrance.\n isFlushing = true;\n var i = 0;\n\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n\n do {\n callback = callback(true);\n } while (callback !== null);\n }\n\n queue.length = 0;\n } catch (error) {\n // If something throws, leave the remaining callbacks on the queue.\n queue = queue.slice(i + 1);\n throw error;\n } finally {\n isFlushing = false;\n }\n }\n }\n}\n\nvar createElement$1 = createElementWithValidation ;\nvar cloneElement$1 = cloneElementWithValidation ;\nvar createFactory = createFactoryWithValidation ;\nvar Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.cloneElement = cloneElement$1;\nexports.createContext = createContext;\nexports.createElement = createElement$1;\nexports.createFactory = createFactory;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.startTransition = startTransition;\nexports.unstable_act = act;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useDeferredValue = useDeferredValue;\nexports.useEffect = useEffect;\nexports.useId = useId;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useInsertionEffect = useInsertionEffect;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.useSyncExternalStore = useSyncExternalStore;\nexports.useTransition = useTransition;\nexports.version = ReactVersion;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import './_acf-jsx-names.js';\nimport './_acf-blocks-legacy.js';\n"],"names":["$","undefined","BlockControls","InspectorControls","InnerBlocks","wp","blockEditor","Toolbar","IconButton","Placeholder","Spinner","components","Fragment","element","Component","React","withSelect","data","createHigherOrderComponent","compose","blockTypes","getBlockType","name","isBlockType","isNewBlock","props","attributes","id","isDuplicateBlock","getBlocks","filter","block","clientId","length","registerBlockType","blockType","allowedTypes","post_types","push","postType","acf","get","indexOf","icon","substr","iconHTML","createElement","Div","category","blocks","getCategories","cat","slug","pop","type","align","mode","ThisBlockEdit","BlockEdit","ThisBlockSave","BlockSave","supports","align_text","withAlignTextAttributes","withAlignTextComponent","align_content","withAlignContentAttributes","withAlignContentComponent","parseArgs","title","edit","save","key","default","result","anchor","select","selector","dispatch","args","i","concat","innerBlocks","k","ajaxQueue","fetchBlock","query","delay","timeout","promise","Deferred","_objectSpread","clearTimeout","setTimeout","ajax","url","dataType","cache","prepareForAjax","action","JSON","stringify","always","done","resolve","apply","arguments","fail","reject","compareObjects","obj1","obj2","parseJSX","html","parseNode","node","nodeName","parseNodeName","toLowerCase","nodeAttrs","arrayArgs","map","parseNodeAttr","forEach","attr","value","childNodes","child","Text","text","textContent","getJSXName","replacement","isget","Script","nodeAttr","css","split","s","pos","ruleName","trim","ruleValue","charAt","strCamelCase","c1","parse","withDefaultAttributes","BlockListBlock","WrappedBlockEdit","constructor","uniqid","attribute","render","hooks","addFilter","Content","setup","restrictMode","modes","setAttributes","showToggle","toggleText","__","toggleIcon","toggleMode","className","label","onClick","BlockForm","BlockBody","_BlockBody","isSelected","BlockPreview","ownProps","rootClientId","getBlockRootClientId","index","getBlockIndex","dangerouslySetInnerHTML","__html","children","ref","el","setHTML","componentDidUpdate","componentDidMount","store","DynamicHTML","setRef","bind","subscribed","renderMethod","loadState","fetch","state","setState","setHtml","jsx","$el","shouldComponentUpdate","nextProps","nextState","componentWillMove","display","context","$prevParent","parent","$thisParent","clone","componentDidAppend","componentDidRemount","prevProps","prevState","doAction","componentWillUnmount","form","json","serializeData","silent","serialize","on","prevAttributes","preview","replace","nextAttributes","thisAttributes","initialize","editor","addAction","validateVerticalAlignment","ALIGNMENTS","DEFAULT","includes","validateHorizontalAlignment","validateMatrixAlignment","y","x","AlignmentToolbar","BlockVerticalAlignmentToolbar","BlockAlignmentMatrixToolbar","__experimentalBlockAlignmentMatrixToolbar","BlockAlignmentMatrixControl","__experimentalBlockAlignmentMatrixControl","OriginalBlockEdit","AlignmentComponent","validateAlignment","console","warn","onChangeAlignContent","group","onChange","onChangeAlignText","jQuery","jsxNameReplacements","accentheight","acceptcharset","accesskey","alignmentbaseline","allowedblocks","allowfullscreen","allowreorder","arabicform","attributename","attributetype","autocapitalize","autocomplete","autocorrect","autofocus","autoplay","autoreverse","autosave","basefrequency","baselineshift","baseprofile","calcmode","capheight","cellpadding","cellspacing","charset","class","classid","classname","clippath","clippathunits","cliprule","colorinterpolation","colorinterpolationfilters","colorprofile","colorrendering","colspan","contenteditable","contentscripttype","contentstyletype","contextmenu","controlslist","crossorigin","dangerouslysetinnerhtml","datetime","defaultchecked","defaultvalue","diffuseconstant","disablepictureinpicture","disableremoteplayback","dominantbaseline","edgemode","enablebackground","enctype","enterkeyhint","externalresourcesrequired","fillopacity","fillrule","filterres","filterunits","floodcolor","floodopacity","fontfamily","fontsize","fontsizeadjust","fontstretch","fontstyle","fontvariant","fontweight","for","foreignobject","formaction","formenctype","formmethod","formnovalidate","formtarget","frameborder","glyphname","glyphorientationhorizontal","glyphorientationvertical","glyphref","gradienttransform","gradientunits","horizadvx","horizoriginx","hreflang","htmlfor","httpequiv","imagerendering","innerhtml","inputmode","itemid","itemprop","itemref","itemscope","itemtype","kernelmatrix","kernelunitlength","keyparams","keypoints","keysplines","keytimes","keytype","lengthadjust","letterspacing","lightingcolor","limitingconeangle","marginheight","marginwidth","markerend","markerheight","markermid","markerstart","markerunits","markerwidth","maskcontentunits","maskunits","maxlength","mediagroup","minlength","nomodule","novalidate","numoctaves","overlineposition","overlinethickness","paintorder","pathlength","patterncontentunits","patterntransform","patternunits","playsinline","pointerevents","pointsatx","pointsaty","pointsatz","preservealpha","preserveaspectratio","primitiveunits","radiogroup","readonly","referrerpolicy","refx","refy","renderingintent","repeatcount","repeatdur","requiredextensions","requiredfeatures","rowspan","shaperendering","specularconstant","specularexponent","spellcheck","spreadmethod","srcdoc","srclang","srcset","startoffset","stddeviation","stitchtiles","stopcolor","stopopacity","strikethroughposition","strikethroughthickness","strokedasharray","strokedashoffset","strokelinecap","strokelinejoin","strokemiterlimit","strokeopacity","strokewidth","suppresscontenteditablewarning","suppresshydrationwarning","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","templatelock","textanchor","textdecoration","textlength","textrendering","underlineposition","underlinethickness","unicodebidi","unicoderange","unitsperem","usemap","valphabetic","vectoreffect","vertadvy","vertoriginx","vertoriginy","vhanging","videographic","viewbox","viewtarget","vmathematical","wordspacing","writingmode","xchannelselector","xheight","xlinkactuate","xlinkarcrole","xlinkhref","xlinkrole","xlinkshow","xlinktitle","xlinktype","xmlbase","xmllang","xmlnsxlink","xmlspace","ychannelselector","zoomandpan"],"sourceRoot":""}
\ No newline at end of file
diff --git a/assets/build/js/pro/acf-pro-blocks-legacy.min.js b/assets/build/js/pro/acf-pro-blocks-legacy.min.js
new file mode 100644
index 0000000..09c3b6d
--- /dev/null
+++ b/assets/build/js/pro/acf-pro-blocks-legacy.min.js
@@ -0,0 +1 @@
+!function(){var e={905:function(){jQuery,acf.jsxNameReplacements={"accent-height":"accentHeight",accentheight:"accentHeight","accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey","alignment-baseline":"alignmentBaseline",alignmentbaseline:"alignmentBaseline",allowedblocks:"allowedBlocks",allowfullscreen:"allowFullScreen",allowreorder:"allowReorder","arabic-form":"arabicForm",arabicform:"arabicForm",attributename:"attributeName",attributetype:"attributeType",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autoreverse:"autoReverse",autosave:"autoSave",basefrequency:"baseFrequency","baseline-shift":"baselineShift",baselineshift:"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode","cap-height":"capHeight",capheight:"capHeight",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className","clip-path":"clipPath","clip-rule":"clipRule",clippath:"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","color-interpolation":"colorInterpolation","color-interpolation-filters":"colorInterpolationFilters","color-profile":"colorProfile","color-rendering":"colorRendering",colorinterpolation:"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters",colorprofile:"colorProfile",colorrendering:"colorRendering",colspan:"colSpan",contenteditable:"contentEditable",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",diffuseconstant:"diffuseConstant",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback","dominant-baseline":"dominantBaseline",dominantbaseline:"dominantBaseline",edgemode:"edgeMode","enable-background":"enableBackground",enablebackground:"enableBackground",enctype:"encType",enterkeyhint:"enterKeyHint",externalresourcesrequired:"externalResourcesRequired","fill-opacity":"fillOpacity","fill-rule":"fillRule",fillopacity:"fillOpacity",fillrule:"fillRule",filterres:"filterRes",filterunits:"filterUnits","flood-color":"floodColor","flood-opacity":"floodOpacity",floodcolor:"floodColor",floodopacity:"floodOpacity","font-family":"fontFamily","font-size":"fontSize","font-size-adjust":"fontSizeAdjust","font-stretch":"fontStretch","font-style":"fontStyle","font-variant":"fontVariant","font-weight":"fontWeight",fontfamily:"fontFamily",fontsize:"fontSize",fontsizeadjust:"fontSizeAdjust",fontstretch:"fontStretch",fontstyle:"fontStyle",fontvariant:"fontVariant",fontweight:"fontWeight",for:"htmlFor",foreignobject:"foreignObject",formaction:"formAction",formenctype:"formEncType",formmethod:"formMethod",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder","glyph-name":"glyphName","glyph-orientation-horizontal":"glyphOrientationHorizontal","glyph-orientation-vertical":"glyphOrientationVertical",glyphname:"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits","horiz-adv-x":"horizAdvX","horiz-origin-x":"horizOriginX",horizadvx:"horizAdvX",horizoriginx:"horizOriginX",hreflang:"hrefLang",htmlfor:"htmlFor","http-equiv":"httpEquiv",httpequiv:"httpEquiv","image-rendering":"imageRendering",imagerendering:"imageRendering",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keyparams:"keyParams",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",keytype:"keyType",lengthadjust:"lengthAdjust","letter-spacing":"letterSpacing",letterspacing:"letterSpacing","lighting-color":"lightingColor",lightingcolor:"lightingColor",limitingconeangle:"limitingConeAngle",marginheight:"marginHeight",marginwidth:"marginWidth","marker-end":"markerEnd","marker-mid":"markerMid","marker-start":"markerStart",markerend:"markerEnd",markerheight:"markerHeight",markermid:"markerMid",markerstart:"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",numoctaves:"numOctaves","overline-position":"overlinePosition","overline-thickness":"overlineThickness",overlineposition:"overlinePosition",overlinethickness:"overlineThickness","paint-order":"paintOrder",paintorder:"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",playsinline:"playsInline","pointer-events":"pointerEvents",pointerevents:"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",refx:"refX",refy:"refY","rendering-intent":"renderingIntent",renderingintent:"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",rowspan:"rowSpan","shape-rendering":"shapeRendering",shaperendering:"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spellcheck:"spellCheck",spreadmethod:"spreadMethod",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles","stop-color":"stopColor","stop-opacity":"stopOpacity",stopcolor:"stopColor",stopopacity:"stopOpacity","strikethrough-position":"strikethroughPosition","strikethrough-thickness":"strikethroughThickness",strikethroughposition:"strikethroughPosition",strikethroughthickness:"strikethroughThickness","stroke-dasharray":"strokeDasharray","stroke-dashoffset":"strokeDashoffset","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","stroke-miterlimit":"strokeMiterlimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth",strokedasharray:"strokeDasharray",strokedashoffset:"strokeDashoffset",strokelinecap:"strokeLinecap",strokelinejoin:"strokeLinejoin",strokemiterlimit:"strokeMiterlimit",strokeopacity:"strokeOpacity",strokewidth:"strokeWidth",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tabindex:"tabIndex",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",templatelock:"templateLock","text-anchor":"textAnchor","text-decoration":"textDecoration","text-rendering":"textRendering",textanchor:"textAnchor",textdecoration:"textDecoration",textlength:"textLength",textrendering:"textRendering","underline-position":"underlinePosition","underline-thickness":"underlineThickness",underlineposition:"underlinePosition",underlinethickness:"underlineThickness","unicode-bidi":"unicodeBidi","unicode-range":"unicodeRange",unicodebidi:"unicodeBidi",unicoderange:"unicodeRange","units-per-em":"unitsPerEm",unitsperem:"unitsPerEm",usemap:"useMap","v-alphabetic":"vAlphabetic","v-hanging":"vHanging","v-ideographic":"vIdeographic","v-mathematical":"vMathematical",valphabetic:"vAlphabetic","vector-effect":"vectorEffect",vectoreffect:"vectorEffect","vert-adv-y":"vertAdvY","vert-origin-x":"vertOriginX","vert-origin-y":"vertOriginY",vertadvy:"vertAdvY",vertoriginx:"vertOriginX",vertoriginy:"vertOriginY",vhanging:"vHanging",videographic:"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","word-spacing":"wordSpacing",wordspacing:"wordSpacing","writing-mode":"writingMode",writingmode:"writingMode","x-height":"xHeight",xchannelselector:"xChannelSelector",xheight:"xHeight","xlink:actuate":"xlinkActuate","xlink:arcrole":"xlinkArcrole","xlink:href":"xlinkHref","xlink:role":"xlinkRole","xlink:show":"xlinkShow","xlink:title":"xlinkTitle","xlink:type":"xlinkType",xlinkactuate:"xlinkActuate",xlinkarcrole:"xlinkArcrole",xlinkhref:"xlinkHref",xlinkrole:"xlinkRole",xlinkshow:"xlinkShow",xlinktitle:"xlinkTitle",xlinktype:"xlinkType","xml:base":"xmlBase","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlbase:"xmlBase",xmllang:"xmlLang","xmlns:xlink":"xmlnsXlink",xmlnsxlink:"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"}},408:function(e,t){"use strict";var r=Symbol.for("react.element"),n=(Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.iterator,{isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}}),i=Object.assign,o={};function a(e,t,r){this.props=e,this.context=t,this.refs=o,this.updater=r||n}function s(){}function l(e,t,r){this.props=e,this.context=t,this.refs=o,this.updater=r||n}a.prototype.isReactComponent={},a.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},s.prototype=a.prototype;var c=l.prototype=new s;c.constructor=l,i(c,a.prototype),c.isPureReactComponent=!0;Array.isArray;var p=Object.prototype.hasOwnProperty,u=null,d={key:!0,ref:!0,__self:!0,__source:!0};t.createElement=function(e,t,n){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)p.call(t,i)&&!d.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=n;else if(1t.slug===e.category)).pop()||(e.category="common");let a={id:{type:"string"},name:{type:"string"},data:{type:"object"},align:{type:"string"},mode:{type:"string"}},s=O,l=A;e.supports.align_text&&(a=function(e){return e.align_text={type:"string"},e}(a),s=function(e,t){const i=B;return t.align_text=i(t.align_text),class extends d{render(){const{attributes:t,setAttributes:o}=this.props,{align_text:a}=t;return(0,n.createElement)(u,null,(0,n.createElement)(r,null,(0,n.createElement)(z,{value:i(a),onChange:function(e){o({align_text:i(e)})}})),(0,n.createElement)(e,this.props))}}}(s,e)),e.supports.align_content&&(a=function(e){return e.align_content={type:"string"},e}(a),s=function(e,i){let o,a,s=i.supports.align_content;return"matrix"===s?(o=I||L,a=q):(o=H,a=D),o===t?(console.warn(`The "${s}" alignment component was not found.`),e):(i.align_content=a(i.align_content),class extends d{render(){const{attributes:t,setAttributes:i}=this.props,{align_content:s}=t;return(0,n.createElement)(u,null,(0,n.createElement)(r,{group:"block"},(0,n.createElement)(o,{label:acf.__("Change content alignment"),value:a(s),onChange:function(e){i({align_content:a(e)})}})),(0,n.createElement)(e,this.props))}})}(s,e)),e=acf.parseArgs(e,{title:"",name:"",category:"",attributes:a,edit:function(e){return(0,n.createElement)(s,e)},save:function(e){return(0,n.createElement)(l,e)}});for(const t in e.attributes)delete e.attributes[t].default;m[e.name]=e;var c=wp.blocks.registerBlockType(e.name,e);return c.attributes.anchor&&(c.attributes.anchor={type:"string"}),c}const b={};function k(t){const{attributes:r={},query:n={},delay:i=0}=t,{id:a}=r,s=b[a]||{query:{},timeout:!1,promise:e.Deferred()};return s.query=o(o({},s.query),n),clearTimeout(s.timeout),s.timeout=setTimeout((function(){e.ajax({url:acf.get("ajaxurl"),dataType:"json",type:"post",cache:!1,data:acf.prepareForAjax({action:"acf/ajax/fetch-block",block:JSON.stringify(r),query:s.query})}).always((function(){b[a]=null})).done((function(){s.promise.resolve.apply(this,arguments)})).fail((function(){s.promise.reject.apply(this,arguments)}))}),i),b[a]=s,s.promise}function v(e,t){return JSON.stringify(e)===JSON.stringify(t)}function x(e){var t=function(e){switch(e){case"innerblocks":return a;case"script":return C;case"#comment":return null;default:e=w(e)}return e}(e.nodeName.toLowerCase());if(!t)return null;var r={};acf.arrayArgs(e.attributes).map(S).forEach((function(e){r[e.name]=e.value}));var n=[t,r];return acf.arrayArgs(e.childNodes).forEach((function(e){if(e instanceof Text){var t=e.textContent;t&&n.push(t)}else n.push(x(e))})),React.createElement.apply(this,n)}function w(e){return acf.isget(acf,"jsxNameReplacements",e)||e}function S(e){var t=e.name,r=e.value;switch(t){case"class":t="className";break;case"style":var n={};r.split(";").forEach((function(e){var t=e.indexOf(":");if(t>0){var r=e.substr(0,t).trim(),i=e.substr(t+1).trim();"-"!==r.charAt(0)&&(r=acf.strCamelCase(r)),n[r]=i}})),r=n;break;default:if(0===t.indexOf("data-"))break;t=w(t);var i=r.charAt(0);"["!==i&&"{"!==i||(r=JSON.parse(r)),"true"!==r&&"false"!==r||(r="true"===r)}return{name:t,value:r}}acf.parseJSX=function(t){return x(e(t)[0])};var E=f((function(e){return class extends d{constructor(e){super(e);const{name:r,attributes:n}=this.props,i=g(r);if(i)if(function(e){return!e.attributes.id}(e)){n.id=acf.uniqid("block_");for(let e in i.attributes)n[e]===t&&i[e]!==t&&(n[e]=i[e])}else(function(e){return function(e){let t=(wp.data.select("core/block-editor")||wp.data.select("core/editor")).getBlocks(),r=0;for(;rt.attributes[n]===e[n]));return t}().filter((t=>t.attributes.id===e.attributes.id)).filter((t=>t.clientId!==e.clientId)).length})(e)&&(n.id=acf.uniqid("block_"))}render(){return(0,n.createElement)(e,this.props)}}}),"withDefaultAttributes");function A(){return(0,n.createElement)(a.Content,null)}wp.hooks.addFilter("editor.BlockListBlock","acf/with-default-attributes",E);class O extends d{constructor(e){super(e),this.setup()}setup(){const{name:e,attributes:t}=this.props;function r(e){-1===e.indexOf(t.mode)&&(t.mode=e[0])}switch(g(e).mode){case"edit":r(["edit","preview"]);break;case"preview":r(["preview","edit"]);break;default:r(["auto"])}}render(){const{name:e,attributes:t,setAttributes:o}=this.props,{mode:a}=t;let c=g(e).supports.mode;"auto"===a&&(c=!1);const p="preview"===a?acf.__("Switch to Edit"):acf.__("Switch to Preview"),d="preview"===a?"edit":"welcome-view-site";return(0,n.createElement)(u,null,(0,n.createElement)(r,null,c&&(0,n.createElement)(s,null,(0,n.createElement)(l,{className:"components-icon-button components-toolbar__control",label:p,icon:d,onClick:function(){o({mode:"preview"===a?"edit":"preview"})}}))),(0,n.createElement)(i,null,"preview"===a&&(0,n.createElement)("div",{className:"acf-block-component acf-block-panel"},(0,n.createElement)(_,this.props))),(0,n.createElement)(j,this.props))}}const j=h((function(e,t){const{clientId:r}=t,n=e("core/block-editor").getBlockRootClientId(r);return{index:e("core/block-editor").getBlockIndex(r,n)}}))(class extends d{render(){const{attributes:e,isSelected:t}=this.props,{mode:r}=e;return(0,n.createElement)("div",{className:"acf-block-component acf-block-body"},"auto"===r&&t?(0,n.createElement)(_,this.props):"auto"!==r||t?"preview"===r?(0,n.createElement)(M,this.props):(0,n.createElement)(_,this.props):(0,n.createElement)(M,this.props))}});class T extends d{render(){return(0,n.createElement)("div",{dangerouslySetInnerHTML:{__html:this.props.children}})}}class C extends d{render(){return(0,n.createElement)("div",{ref:e=>this.el=e})}setHTML(t){e(this.el).html(``);
+ }
+ componentDidUpdate() {
+ this.setHTML(this.props.children);
+ }
+ componentDidMount() {
+ this.setHTML(this.props.children);
+ }
+ }
+
+ // Data storage for DynamicHTML components.
+ const store = {};
+
+ /**
+ * DynamicHTML Class.
+ *
+ * A react componenet to load and insert dynamic HTML.
+ *
+ * @date 19/2/19
+ * @since 5.7.12
+ *
+ * @param void
+ * @return void
+ */
+ class DynamicHTML extends Component {
+ constructor(props) {
+ super(props);
+
+ // Bind callbacks.
+ this.setRef = this.setRef.bind(this);
+
+ // Define default props and call setup().
+ this.id = '';
+ this.el = false;
+ this.subscribed = true;
+ this.renderMethod = 'jQuery';
+ this.setup(props);
+
+ // Load state.
+ this.loadState();
+ }
+ setup(props) {
+ // Do nothing.
+ }
+ fetch() {
+ // Do nothing.
+ }
+ maybePreload(blockId, clientId, form) {
+ if (this.state.html === undefined && !isBlockInQueryLoop(this.props.clientId)) {
+ const preloadedBlocks = acf.get('preloadedBlocks');
+ const modeText = form ? 'form' : 'preview';
+ if (preloadedBlocks && preloadedBlocks[blockId]) {
+ // Ensure we only preload the correct block state (form or preview).
+ if (form && !preloadedBlocks[blockId].form || !form && preloadedBlocks[blockId].form) return false;
+
+ // Set HTML to the preloaded version.
+ return preloadedBlocks[blockId].html.replaceAll(blockId, clientId);
+ }
+ }
+ return false;
+ }
+ loadState() {
+ this.state = store[this.id] || {};
+ }
+ setState(state) {
+ store[this.id] = _objectSpread(_objectSpread({}, this.state), state);
+
+ // Update component state if subscribed.
+ // - Allows AJAX callback to update store without modifying state of an unmounted component.
+ if (this.subscribed) {
+ super.setState(state);
+ }
+ }
+ setHtml(html) {
+ html = html ? html.trim() : '';
+
+ // Bail early if html has not changed.
+ if (html === this.state.html) {
+ return;
+ }
+
+ // Update state.
+ const state = {
+ html
+ };
+ if (this.renderMethod === 'jsx') {
+ state.jsx = acf.parseJSX(html, getBlockVersion(this.props.name));
+
+ // Handle templates which don't contain any valid JSX parsable elements.
+ if (!state.jsx) {
+ console.warn('Your ACF block template contains no valid HTML elements. Appending a empty div to prevent React JS errors.');
+ state.html += '
';
+ state.jsx = acf.parseJSX(state.html, getBlockVersion(this.props.name));
+ }
+
+ // If we've got an object (as an array) find the first valid React ref.
+ if (Array.isArray(state.jsx)) {
+ let refElement = state.jsx.find(element => React.isValidElement(element));
+ state.ref = refElement.ref;
+ } else {
+ state.ref = state.jsx.ref;
+ }
+ state.$el = $(this.el);
+ } else {
+ state.$el = $(html);
+ }
+ this.setState(state);
+ }
+ setRef(el) {
+ this.el = el;
+ }
+ render() {
+ // Render JSX.
+ if (this.state.jsx) {
+ // If we're a v2+ block, use the jsx element itself as our ref.
+ if (getBlockVersion(this.props.name) > 1) {
+ this.setRef(this.state.jsx);
+ return this.state.jsx;
+ } else {
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
+ ref: this.setRef
+ }, this.state.jsx);
+ }
+ }
+
+ // Return HTML.
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
+ ref: this.setRef
+ }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Placeholder, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Spinner, null)));
+ }
+ shouldComponentUpdate(_ref4, _ref5) {
+ let {
+ index
+ } = _ref4;
+ let {
+ html
+ } = _ref5;
+ if (index !== this.props.index) {
+ this.componentWillMove();
+ }
+ return html !== this.state.html;
+ }
+ display(context) {
+ // This method is called after setting new HTML and the Component render.
+ // The jQuery render method simply needs to move $el into place.
+ if (this.renderMethod === 'jQuery') {
+ const $el = this.state.$el;
+ const $prevParent = $el.parent();
+ const $thisParent = $(this.el);
+
+ // Move $el into place.
+ $thisParent.html($el);
+
+ // Special case for reusable blocks.
+ // Multiple instances of the same reusable block share the same block id.
+ // This causes all instances to share the same state (cool), which unfortunately
+ // pulls $el back and forth between the last rendered reusable block.
+ // This simple fix leaves a "clone" behind :)
+ if ($prevParent.length && $prevParent[0] !== $thisParent[0]) {
+ $prevParent.html($el.clone());
+ }
+ }
+
+ // Call context specific method.
+ switch (context) {
+ case 'append':
+ this.componentDidAppend();
+ break;
+ case 'remount':
+ this.componentDidRemount();
+ break;
+ }
+ }
+ componentDidMount() {
+ // Fetch on first load.
+ if (this.state.html === undefined) {
+ this.fetch();
+
+ // Or remount existing HTML.
+ } else {
+ this.display('remount');
+ }
+ }
+ componentDidUpdate(prevProps, prevState) {
+ // HTML has changed.
+ this.display('append');
+ }
+ componentDidAppend() {
+ acf.doAction('append', this.state.$el);
+ }
+ componentWillUnmount() {
+ acf.doAction('unmount', this.state.$el);
+
+ // Unsubscribe this component from state.
+ this.subscribed = false;
+ }
+ componentDidRemount() {
+ this.subscribed = true;
+
+ // Use setTimeout to avoid incorrect timing of events.
+ // React will unmount and mount components in DOM order.
+ // This means a new component can be mounted before an old one is unmounted.
+ // ACF shares $el across new/old components which is un-React-like.
+ // This timout ensures that unmounting occurs before remounting.
+ setTimeout(() => {
+ acf.doAction('remount', this.state.$el);
+ });
+ }
+ componentWillMove() {
+ acf.doAction('unmount', this.state.$el);
+ setTimeout(() => {
+ acf.doAction('remount', this.state.$el);
+ });
+ }
+ }
+
+ /**
+ * BlockForm Class.
+ *
+ * A react componenet to handle the block form.
+ *
+ * @date 19/2/19
+ * @since 5.7.12
+ *
+ * @param string id the block id.
+ * @return void
+ */
+ class BlockForm extends DynamicHTML {
+ setup(_ref6) {
+ let {
+ clientId
+ } = _ref6;
+ this.id = `BlockForm-${clientId}`;
+ }
+ fetch() {
+ // Extract props.
+ const {
+ attributes,
+ context,
+ clientId
+ } = this.props;
+ const hash = createBlockAttributesHash(attributes, context);
+
+ // Try preloaded data first.
+ const preloaded = this.maybePreload(hash, clientId, true);
+ if (preloaded) {
+ this.setHtml(preloaded);
+ return;
+ }
+
+ // Request AJAX and update HTML on complete.
+ fetchBlock({
+ attributes,
+ context,
+ clientId,
+ query: {
+ form: true
+ }
+ }).done(_ref7 => {
+ let {
+ data
+ } = _ref7;
+ this.setHtml(data.form.replaceAll(data.clientId, clientId));
+ });
+ }
+ componentDidRemount() {
+ super.componentDidRemount();
+ const {
+ $el
+ } = this.state;
+
+ // Make sure our on append events are registered.
+ if ($el.data('acf-events-added') !== true) {
+ this.componentDidAppend();
+ }
+ }
+ componentDidAppend() {
+ super.componentDidAppend();
+
+ // Extract props.
+ const {
+ attributes,
+ setAttributes,
+ clientId
+ } = this.props;
+ const props = this.props;
+ const {
+ $el
+ } = this.state;
+
+ // Callback for updating block data.
+ function serializeData() {
+ let silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
+ const data = acf.serialize($el, `acf-${clientId}`);
+ if (silent) {
+ attributes.data = data;
+ } else {
+ setAttributes({
+ data
+ });
+ }
+ }
+
+ // Add events.
+ let timeout = false;
+ $el.on('change keyup', () => {
+ clearTimeout(timeout);
+ timeout = setTimeout(serializeData, 300);
+ });
+
+ // Log initialization for remount check on the persistent element.
+ $el.data('acf-events-added', true);
+
+ // Ensure newly added block is saved with data.
+ // Do it silently to avoid triggering a preview render.
+ if (!attributes.data) {
+ serializeData(true);
+ }
+ }
+ }
+
+ /**
+ * BlockPreview Class.
+ *
+ * A react componenet to handle the block preview.
+ *
+ * @date 19/2/19
+ * @since 5.7.12
+ *
+ * @param string id the block id.
+ * @return void
+ */
+ class BlockPreview extends DynamicHTML {
+ setup(_ref8) {
+ let {
+ clientId,
+ name
+ } = _ref8;
+ const blockType = getBlockType(name);
+ const contextPostId = acf.isget(this.props, 'context', 'postId');
+ this.id = `BlockPreview-${clientId}`;
+
+ // Apply the contextPostId to the ID if set to stop query loop ID duplication.
+ if (contextPostId) {
+ this.id = `BlockPreview-${clientId}-${contextPostId}`;
+ }
+ if (blockType.supports.jsx) {
+ this.renderMethod = 'jsx';
+ }
+ }
+ fetch() {
+ let args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+ const {
+ attributes = this.props.attributes,
+ clientId = this.props.clientId,
+ context = this.props.context,
+ delay = 0
+ } = args;
+ const {
+ name
+ } = this.props;
+
+ // Remember attributes used to fetch HTML.
+ this.setState({
+ prevAttributes: attributes,
+ prevContext: context
+ });
+ const hash = createBlockAttributesHash(attributes, context);
+
+ // Try preloaded data first.
+ let preloaded = this.maybePreload(hash, clientId, false);
+ if (preloaded) {
+ if (getBlockVersion(name) == 1) {
+ preloaded = '' + preloaded + '
';
+ }
+ this.setHtml(preloaded);
+ return;
+ }
+
+ // Request AJAX and update HTML on complete.
+ fetchBlock({
+ attributes,
+ context,
+ clientId,
+ query: {
+ preview: true
+ },
+ delay
+ }).done(_ref9 => {
+ let {
+ data
+ } = _ref9;
+ let replaceHtml = data.preview.replaceAll(data.clientId, clientId);
+ if (getBlockVersion(name) == 1) {
+ replaceHtml = '' + replaceHtml + '
';
+ }
+ this.setHtml(replaceHtml);
+ });
+ }
+ componentDidAppend() {
+ super.componentDidAppend();
+ this.renderBlockPreviewEvent();
+ }
+ shouldComponentUpdate(nextProps, nextState) {
+ const nextAttributes = nextProps.attributes;
+ const thisAttributes = this.props.attributes;
+
+ // Update preview if block data has changed.
+ if (!compareObjects(nextAttributes, thisAttributes) || !compareObjects(nextProps.context, this.props.context)) {
+ let delay = 0;
+
+ // Delay fetch when editing className or anchor to simulate consistent logic to custom fields.
+ if (nextAttributes.className !== thisAttributes.className) {
+ delay = 300;
+ }
+ if (nextAttributes.anchor !== thisAttributes.anchor) {
+ delay = 300;
+ }
+ this.fetch({
+ attributes: nextAttributes,
+ context: nextProps.context,
+ delay
+ });
+ }
+ return super.shouldComponentUpdate(nextProps, nextState);
+ }
+ renderBlockPreviewEvent() {
+ // Extract props.
+ const {
+ attributes,
+ name
+ } = this.props;
+ const {
+ $el,
+ ref
+ } = this.state;
+ var blockElement;
+
+ // Generate action friendly type.
+ const type = attributes.name.replace('acf/', '');
+ if (ref && ref.current) {
+ // We've got a react ref from a JSX container. Use the parent as the blockElement
+ blockElement = $(ref.current).parent();
+ } else if (getBlockVersion(name) == 1) {
+ blockElement = $el;
+ } else {
+ blockElement = $el.parents('.acf-block-preview');
+ }
+
+ // Do action.
+ acf.doAction('render_block_preview', blockElement, attributes);
+ acf.doAction(`render_block_preview/type=${type}`, blockElement, attributes);
+ }
+ componentDidRemount() {
+ super.componentDidRemount();
+
+ // Update preview if data has changed since last render (changing from "edit" to "preview").
+ if (!compareObjects(this.state.prevAttributes, this.props.attributes) || !compareObjects(this.state.prevContext, this.props.context)) {
+ this.fetch();
+ }
+
+ // Fire the block preview event so blocks can reinit JS elements.
+ // React reusing DOM elements covers any potential race condition from the above fetch.
+ this.renderBlockPreviewEvent();
+ }
+ }
+
+ /**
+ * Initializes ACF Blocks logic and registration.
+ *
+ * @since 5.9.0
+ */
+ function initialize() {
+ // Add support for WordPress versions before 5.2.
+ if (!wp.blockEditor) {
+ wp.blockEditor = wp.editor;
+ }
+
+ // Register block types.
+ const blockTypes = acf.get('blockTypes');
+ if (blockTypes) {
+ blockTypes.map(registerBlockType);
+ }
+ }
+
+ // Run the initialize callback during the "prepare" action.
+ // This ensures that all localized data is available and that blocks are registered before the WP editor has been instantiated.
+ acf.addAction('prepare', initialize);
+
+ /**
+ * Returns a valid vertical alignment.
+ *
+ * @date 07/08/2020
+ * @since 5.9.0
+ *
+ * @param string align A vertical alignment.
+ * @return string
+ */
+ function validateVerticalAlignment(align) {
+ const ALIGNMENTS = ['top', 'center', 'bottom'];
+ const DEFAULT = 'top';
+ return ALIGNMENTS.includes(align) ? align : DEFAULT;
+ }
+
+ /**
+ * Returns a valid horizontal alignment.
+ *
+ * @date 07/08/2020
+ * @since 5.9.0
+ *
+ * @param string align A horizontal alignment.
+ * @return string
+ */
+ function validateHorizontalAlignment(align) {
+ const ALIGNMENTS = ['left', 'center', 'right'];
+ const DEFAULT = acf.get('rtl') ? 'right' : 'left';
+ return ALIGNMENTS.includes(align) ? align : DEFAULT;
+ }
+
+ /**
+ * Returns a valid matrix alignment.
+ *
+ * Written for "upgrade-path" compatibility from vertical alignment to matrix alignment.
+ *
+ * @date 07/08/2020
+ * @since 5.9.0
+ *
+ * @param string align A matrix alignment.
+ * @return string
+ */
+ function validateMatrixAlignment(align) {
+ const DEFAULT = 'center center';
+ if (align) {
+ const [y, x] = align.split(' ');
+ return `${validateVerticalAlignment(y)} ${validateHorizontalAlignment(x)}`;
+ }
+ return DEFAULT;
+ }
+
+ /**
+ * A higher order component adding alignContent editing functionality.
+ *
+ * @date 08/07/2020
+ * @since 5.9.0
+ *
+ * @param component OriginalBlockEdit The original BlockEdit component.
+ * @param object blockType The block type settings.
+ * @return component
+ */
+ function withAlignContentComponent(OriginalBlockEdit, blockType) {
+ // Determine alignment vars
+ let type = blockType.supports.align_content || blockType.supports.alignContent;
+ let AlignmentComponent;
+ let validateAlignment;
+ switch (type) {
+ case 'matrix':
+ AlignmentComponent = BlockAlignmentMatrixControl || BlockAlignmentMatrixToolbar;
+ validateAlignment = validateMatrixAlignment;
+ break;
+ default:
+ AlignmentComponent = BlockVerticalAlignmentToolbar;
+ validateAlignment = validateVerticalAlignment;
+ break;
+ }
+
+ // Ensure alignment component exists.
+ if (AlignmentComponent === undefined) {
+ console.warn(`The "${type}" alignment component was not found.`);
+ return OriginalBlockEdit;
+ }
+
+ // Ensure correct block attribute data is sent in intial preview AJAX request.
+ blockType.alignContent = validateAlignment(blockType.alignContent);
+
+ // Return wrapped component.
+ return class WrappedBlockEdit extends Component {
+ render() {
+ const {
+ attributes,
+ setAttributes
+ } = this.props;
+ const {
+ alignContent
+ } = attributes;
+ function onChangeAlignContent(alignContent) {
+ setAttributes({
+ alignContent: validateAlignment(alignContent)
+ });
+ }
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockControls, {
+ group: "block"
+ }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(AlignmentComponent, {
+ label: acf.__('Change content alignment'),
+ value: validateAlignment(alignContent),
+ onChange: onChangeAlignContent
+ })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(OriginalBlockEdit, this.props));
+ }
+ };
+ }
+
+ /**
+ * A higher order component adding alignText editing functionality.
+ *
+ * @date 08/07/2020
+ * @since 5.9.0
+ *
+ * @param component OriginalBlockEdit The original BlockEdit component.
+ * @param object blockType The block type settings.
+ * @return component
+ */
+ function withAlignTextComponent(OriginalBlockEdit, blockType) {
+ const validateAlignment = validateHorizontalAlignment;
+
+ // Ensure correct block attribute data is sent in intial preview AJAX request.
+ blockType.alignText = validateAlignment(blockType.alignText);
+
+ // Return wrapped component.
+ return class WrappedBlockEdit extends Component {
+ render() {
+ const {
+ attributes,
+ setAttributes
+ } = this.props;
+ const {
+ alignText
+ } = attributes;
+ function onChangeAlignText(alignText) {
+ setAttributes({
+ alignText: validateAlignment(alignText)
+ });
+ }
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockControls, {
+ group: "block"
+ }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(AlignmentToolbar, {
+ value: validateAlignment(alignText),
+ onChange: onChangeAlignText
+ })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(OriginalBlockEdit, this.props));
+ }
+ };
+ }
+
+ /**
+ * A higher order component adding full height support.
+ *
+ * @date 19/07/2021
+ * @since 5.10.0
+ *
+ * @param component OriginalBlockEdit The original BlockEdit component.
+ * @param object blockType The block type settings.
+ * @return component
+ */
+ function withFullHeightComponent(OriginalBlockEdit, blockType) {
+ if (!BlockFullHeightAlignmentControl) return OriginalBlockEdit;
+
+ // Return wrapped component.
+ return class WrappedBlockEdit extends Component {
+ render() {
+ const {
+ attributes,
+ setAttributes
+ } = this.props;
+ const {
+ fullHeight
+ } = attributes;
+ function onToggleFullHeight(fullHeight) {
+ setAttributes({
+ fullHeight
+ });
+ }
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockControls, {
+ group: "block"
+ }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockFullHeightAlignmentControl, {
+ isActive: fullHeight,
+ onToggle: onToggleFullHeight
+ })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(OriginalBlockEdit, this.props));
+ }
+ };
+ }
+
+ /**
+ * Appends a backwards compatibility attribute for conversion.
+ *
+ * @since 6.0
+ *
+ * @param object attributes The block type attributes.
+ * @return object
+ */
+ function addBackCompatAttribute(attributes, new_attribute, type) {
+ attributes[new_attribute] = {
+ type: type
+ };
+ return attributes;
+ }
+
+ /**
+ * Create a block hash from attributes
+ *
+ * @since 6.0
+ *
+ * @param object attributes The block type attributes.
+ * @param object context The current block context object.
+ * @return string
+ */
+ function createBlockAttributesHash(attributes, context) {
+ attributes['_acf_context'] = context;
+ return md5(JSON.stringify(Object.keys(attributes).sort().reduce((acc, currValue) => {
+ acc[currValue] = attributes[currValue];
+ return acc;
+ }, {})));
+ }
+})(jQuery);
+
+/***/ }),
+
+/***/ "./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-jsx-names.js":
+/*!****************************************************************************!*\
+ !*** ./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-jsx-names.js ***!
+ \****************************************************************************/
+/***/ (function() {
+
+(function ($, undefined) {
+ acf.jsxNameReplacements = {
+ 'accent-height': 'accentHeight',
+ accentheight: 'accentHeight',
+ 'accept-charset': 'acceptCharset',
+ acceptcharset: 'acceptCharset',
+ accesskey: 'accessKey',
+ 'alignment-baseline': 'alignmentBaseline',
+ alignmentbaseline: 'alignmentBaseline',
+ allowedblocks: 'allowedBlocks',
+ allowfullscreen: 'allowFullScreen',
+ allowreorder: 'allowReorder',
+ 'arabic-form': 'arabicForm',
+ arabicform: 'arabicForm',
+ attributename: 'attributeName',
+ attributetype: 'attributeType',
+ autocapitalize: 'autoCapitalize',
+ autocomplete: 'autoComplete',
+ autocorrect: 'autoCorrect',
+ autofocus: 'autoFocus',
+ autoplay: 'autoPlay',
+ autoreverse: 'autoReverse',
+ autosave: 'autoSave',
+ basefrequency: 'baseFrequency',
+ 'baseline-shift': 'baselineShift',
+ baselineshift: 'baselineShift',
+ baseprofile: 'baseProfile',
+ calcmode: 'calcMode',
+ 'cap-height': 'capHeight',
+ capheight: 'capHeight',
+ cellpadding: 'cellPadding',
+ cellspacing: 'cellSpacing',
+ charset: 'charSet',
+ class: 'className',
+ classid: 'classID',
+ classname: 'className',
+ 'clip-path': 'clipPath',
+ 'clip-rule': 'clipRule',
+ clippath: 'clipPath',
+ clippathunits: 'clipPathUnits',
+ cliprule: 'clipRule',
+ 'color-interpolation': 'colorInterpolation',
+ 'color-interpolation-filters': 'colorInterpolationFilters',
+ 'color-profile': 'colorProfile',
+ 'color-rendering': 'colorRendering',
+ colorinterpolation: 'colorInterpolation',
+ colorinterpolationfilters: 'colorInterpolationFilters',
+ colorprofile: 'colorProfile',
+ colorrendering: 'colorRendering',
+ colspan: 'colSpan',
+ contenteditable: 'contentEditable',
+ contentscripttype: 'contentScriptType',
+ contentstyletype: 'contentStyleType',
+ contextmenu: 'contextMenu',
+ controlslist: 'controlsList',
+ crossorigin: 'crossOrigin',
+ dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
+ datetime: 'dateTime',
+ defaultchecked: 'defaultChecked',
+ defaultvalue: 'defaultValue',
+ diffuseconstant: 'diffuseConstant',
+ disablepictureinpicture: 'disablePictureInPicture',
+ disableremoteplayback: 'disableRemotePlayback',
+ 'dominant-baseline': 'dominantBaseline',
+ dominantbaseline: 'dominantBaseline',
+ edgemode: 'edgeMode',
+ 'enable-background': 'enableBackground',
+ enablebackground: 'enableBackground',
+ enctype: 'encType',
+ enterkeyhint: 'enterKeyHint',
+ externalresourcesrequired: 'externalResourcesRequired',
+ 'fill-opacity': 'fillOpacity',
+ 'fill-rule': 'fillRule',
+ fillopacity: 'fillOpacity',
+ fillrule: 'fillRule',
+ filterres: 'filterRes',
+ filterunits: 'filterUnits',
+ 'flood-color': 'floodColor',
+ 'flood-opacity': 'floodOpacity',
+ floodcolor: 'floodColor',
+ floodopacity: 'floodOpacity',
+ 'font-family': 'fontFamily',
+ 'font-size': 'fontSize',
+ 'font-size-adjust': 'fontSizeAdjust',
+ 'font-stretch': 'fontStretch',
+ 'font-style': 'fontStyle',
+ 'font-variant': 'fontVariant',
+ 'font-weight': 'fontWeight',
+ fontfamily: 'fontFamily',
+ fontsize: 'fontSize',
+ fontsizeadjust: 'fontSizeAdjust',
+ fontstretch: 'fontStretch',
+ fontstyle: 'fontStyle',
+ fontvariant: 'fontVariant',
+ fontweight: 'fontWeight',
+ for: 'htmlFor',
+ foreignobject: 'foreignObject',
+ formaction: 'formAction',
+ formenctype: 'formEncType',
+ formmethod: 'formMethod',
+ formnovalidate: 'formNoValidate',
+ formtarget: 'formTarget',
+ frameborder: 'frameBorder',
+ 'glyph-name': 'glyphName',
+ 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
+ 'glyph-orientation-vertical': 'glyphOrientationVertical',
+ glyphname: 'glyphName',
+ glyphorientationhorizontal: 'glyphOrientationHorizontal',
+ glyphorientationvertical: 'glyphOrientationVertical',
+ glyphref: 'glyphRef',
+ gradienttransform: 'gradientTransform',
+ gradientunits: 'gradientUnits',
+ 'horiz-adv-x': 'horizAdvX',
+ 'horiz-origin-x': 'horizOriginX',
+ horizadvx: 'horizAdvX',
+ horizoriginx: 'horizOriginX',
+ hreflang: 'hrefLang',
+ htmlfor: 'htmlFor',
+ 'http-equiv': 'httpEquiv',
+ httpequiv: 'httpEquiv',
+ 'image-rendering': 'imageRendering',
+ imagerendering: 'imageRendering',
+ innerhtml: 'innerHTML',
+ inputmode: 'inputMode',
+ itemid: 'itemID',
+ itemprop: 'itemProp',
+ itemref: 'itemRef',
+ itemscope: 'itemScope',
+ itemtype: 'itemType',
+ kernelmatrix: 'kernelMatrix',
+ kernelunitlength: 'kernelUnitLength',
+ keyparams: 'keyParams',
+ keypoints: 'keyPoints',
+ keysplines: 'keySplines',
+ keytimes: 'keyTimes',
+ keytype: 'keyType',
+ lengthadjust: 'lengthAdjust',
+ 'letter-spacing': 'letterSpacing',
+ letterspacing: 'letterSpacing',
+ 'lighting-color': 'lightingColor',
+ lightingcolor: 'lightingColor',
+ limitingconeangle: 'limitingConeAngle',
+ marginheight: 'marginHeight',
+ marginwidth: 'marginWidth',
+ 'marker-end': 'markerEnd',
+ 'marker-mid': 'markerMid',
+ 'marker-start': 'markerStart',
+ markerend: 'markerEnd',
+ markerheight: 'markerHeight',
+ markermid: 'markerMid',
+ markerstart: 'markerStart',
+ markerunits: 'markerUnits',
+ markerwidth: 'markerWidth',
+ maskcontentunits: 'maskContentUnits',
+ maskunits: 'maskUnits',
+ maxlength: 'maxLength',
+ mediagroup: 'mediaGroup',
+ minlength: 'minLength',
+ nomodule: 'noModule',
+ novalidate: 'noValidate',
+ numoctaves: 'numOctaves',
+ 'overline-position': 'overlinePosition',
+ 'overline-thickness': 'overlineThickness',
+ overlineposition: 'overlinePosition',
+ overlinethickness: 'overlineThickness',
+ 'paint-order': 'paintOrder',
+ paintorder: 'paintOrder',
+ 'panose-1': 'panose1',
+ pathlength: 'pathLength',
+ patterncontentunits: 'patternContentUnits',
+ patterntransform: 'patternTransform',
+ patternunits: 'patternUnits',
+ playsinline: 'playsInline',
+ 'pointer-events': 'pointerEvents',
+ pointerevents: 'pointerEvents',
+ pointsatx: 'pointsAtX',
+ pointsaty: 'pointsAtY',
+ pointsatz: 'pointsAtZ',
+ preservealpha: 'preserveAlpha',
+ preserveaspectratio: 'preserveAspectRatio',
+ primitiveunits: 'primitiveUnits',
+ radiogroup: 'radioGroup',
+ readonly: 'readOnly',
+ referrerpolicy: 'referrerPolicy',
+ refx: 'refX',
+ refy: 'refY',
+ 'rendering-intent': 'renderingIntent',
+ renderingintent: 'renderingIntent',
+ repeatcount: 'repeatCount',
+ repeatdur: 'repeatDur',
+ requiredextensions: 'requiredExtensions',
+ requiredfeatures: 'requiredFeatures',
+ rowspan: 'rowSpan',
+ 'shape-rendering': 'shapeRendering',
+ shaperendering: 'shapeRendering',
+ specularconstant: 'specularConstant',
+ specularexponent: 'specularExponent',
+ spellcheck: 'spellCheck',
+ spreadmethod: 'spreadMethod',
+ srcdoc: 'srcDoc',
+ srclang: 'srcLang',
+ srcset: 'srcSet',
+ startoffset: 'startOffset',
+ stddeviation: 'stdDeviation',
+ stitchtiles: 'stitchTiles',
+ 'stop-color': 'stopColor',
+ 'stop-opacity': 'stopOpacity',
+ stopcolor: 'stopColor',
+ stopopacity: 'stopOpacity',
+ 'strikethrough-position': 'strikethroughPosition',
+ 'strikethrough-thickness': 'strikethroughThickness',
+ strikethroughposition: 'strikethroughPosition',
+ strikethroughthickness: 'strikethroughThickness',
+ 'stroke-dasharray': 'strokeDasharray',
+ 'stroke-dashoffset': 'strokeDashoffset',
+ 'stroke-linecap': 'strokeLinecap',
+ 'stroke-linejoin': 'strokeLinejoin',
+ 'stroke-miterlimit': 'strokeMiterlimit',
+ 'stroke-opacity': 'strokeOpacity',
+ 'stroke-width': 'strokeWidth',
+ strokedasharray: 'strokeDasharray',
+ strokedashoffset: 'strokeDashoffset',
+ strokelinecap: 'strokeLinecap',
+ strokelinejoin: 'strokeLinejoin',
+ strokemiterlimit: 'strokeMiterlimit',
+ strokeopacity: 'strokeOpacity',
+ strokewidth: 'strokeWidth',
+ suppresscontenteditablewarning: 'suppressContentEditableWarning',
+ suppresshydrationwarning: 'suppressHydrationWarning',
+ surfacescale: 'surfaceScale',
+ systemlanguage: 'systemLanguage',
+ tabindex: 'tabIndex',
+ tablevalues: 'tableValues',
+ targetx: 'targetX',
+ targety: 'targetY',
+ templatelock: 'templateLock',
+ 'text-anchor': 'textAnchor',
+ 'text-decoration': 'textDecoration',
+ 'text-rendering': 'textRendering',
+ textanchor: 'textAnchor',
+ textdecoration: 'textDecoration',
+ textlength: 'textLength',
+ textrendering: 'textRendering',
+ 'underline-position': 'underlinePosition',
+ 'underline-thickness': 'underlineThickness',
+ underlineposition: 'underlinePosition',
+ underlinethickness: 'underlineThickness',
+ 'unicode-bidi': 'unicodeBidi',
+ 'unicode-range': 'unicodeRange',
+ unicodebidi: 'unicodeBidi',
+ unicoderange: 'unicodeRange',
+ 'units-per-em': 'unitsPerEm',
+ unitsperem: 'unitsPerEm',
+ usemap: 'useMap',
+ 'v-alphabetic': 'vAlphabetic',
+ 'v-hanging': 'vHanging',
+ 'v-ideographic': 'vIdeographic',
+ 'v-mathematical': 'vMathematical',
+ valphabetic: 'vAlphabetic',
+ 'vector-effect': 'vectorEffect',
+ vectoreffect: 'vectorEffect',
+ 'vert-adv-y': 'vertAdvY',
+ 'vert-origin-x': 'vertOriginX',
+ 'vert-origin-y': 'vertOriginY',
+ vertadvy: 'vertAdvY',
+ vertoriginx: 'vertOriginX',
+ vertoriginy: 'vertOriginY',
+ vhanging: 'vHanging',
+ videographic: 'vIdeographic',
+ viewbox: 'viewBox',
+ viewtarget: 'viewTarget',
+ vmathematical: 'vMathematical',
+ 'word-spacing': 'wordSpacing',
+ wordspacing: 'wordSpacing',
+ 'writing-mode': 'writingMode',
+ writingmode: 'writingMode',
+ 'x-height': 'xHeight',
+ xchannelselector: 'xChannelSelector',
+ xheight: 'xHeight',
+ 'xlink:actuate': 'xlinkActuate',
+ 'xlink:arcrole': 'xlinkArcrole',
+ 'xlink:href': 'xlinkHref',
+ 'xlink:role': 'xlinkRole',
+ 'xlink:show': 'xlinkShow',
+ 'xlink:title': 'xlinkTitle',
+ 'xlink:type': 'xlinkType',
+ xlinkactuate: 'xlinkActuate',
+ xlinkarcrole: 'xlinkArcrole',
+ xlinkhref: 'xlinkHref',
+ xlinkrole: 'xlinkRole',
+ xlinkshow: 'xlinkShow',
+ xlinktitle: 'xlinkTitle',
+ xlinktype: 'xlinkType',
+ 'xml:base': 'xmlBase',
+ 'xml:lang': 'xmlLang',
+ 'xml:space': 'xmlSpace',
+ xmlbase: 'xmlBase',
+ xmllang: 'xmlLang',
+ 'xmlns:xlink': 'xmlnsXlink',
+ xmlnsxlink: 'xmlnsXlink',
+ xmlspace: 'xmlSpace',
+ ychannelselector: 'yChannelSelector',
+ zoomandpan: 'zoomAndPan'
+ };
+})(jQuery);
+
+/***/ }),
+
+/***/ "./node_modules/charenc/charenc.js":
+/*!*****************************************!*\
+ !*** ./node_modules/charenc/charenc.js ***!
+ \*****************************************/
+/***/ (function(module) {
+
+var charenc = {
+ // UTF-8 encoding
+ utf8: {
+ // Convert a string to a byte array
+ stringToBytes: function(str) {
+ return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
+ },
+
+ // Convert a byte array to a string
+ bytesToString: function(bytes) {
+ return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
+ }
+ },
+
+ // Binary encoding
+ bin: {
+ // Convert a string to a byte array
+ stringToBytes: function(str) {
+ for (var bytes = [], i = 0; i < str.length; i++)
+ bytes.push(str.charCodeAt(i) & 0xFF);
+ return bytes;
+ },
+
+ // Convert a byte array to a string
+ bytesToString: function(bytes) {
+ for (var str = [], i = 0; i < bytes.length; i++)
+ str.push(String.fromCharCode(bytes[i]));
+ return str.join('');
+ }
+ }
+};
+
+module.exports = charenc;
+
+
+/***/ }),
+
+/***/ "./node_modules/crypt/crypt.js":
+/*!*************************************!*\
+ !*** ./node_modules/crypt/crypt.js ***!
+ \*************************************/
+/***/ (function(module) {
+
+(function() {
+ var base64map
+ = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
+
+ crypt = {
+ // Bit-wise rotation left
+ rotl: function(n, b) {
+ return (n << b) | (n >>> (32 - b));
+ },
+
+ // Bit-wise rotation right
+ rotr: function(n, b) {
+ return (n << (32 - b)) | (n >>> b);
+ },
+
+ // Swap big-endian to little-endian and vice versa
+ endian: function(n) {
+ // If number given, swap endian
+ if (n.constructor == Number) {
+ return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;
+ }
+
+ // Else, assume array and swap all items
+ for (var i = 0; i < n.length; i++)
+ n[i] = crypt.endian(n[i]);
+ return n;
+ },
+
+ // Generate an array of any length of random bytes
+ randomBytes: function(n) {
+ for (var bytes = []; n > 0; n--)
+ bytes.push(Math.floor(Math.random() * 256));
+ return bytes;
+ },
+
+ // Convert a byte array to big-endian 32-bit words
+ bytesToWords: function(bytes) {
+ for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
+ words[b >>> 5] |= bytes[i] << (24 - b % 32);
+ return words;
+ },
+
+ // Convert big-endian 32-bit words to a byte array
+ wordsToBytes: function(words) {
+ for (var bytes = [], b = 0; b < words.length * 32; b += 8)
+ bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
+ return bytes;
+ },
+
+ // Convert a byte array to a hex string
+ bytesToHex: function(bytes) {
+ for (var hex = [], i = 0; i < bytes.length; i++) {
+ hex.push((bytes[i] >>> 4).toString(16));
+ hex.push((bytes[i] & 0xF).toString(16));
+ }
+ return hex.join('');
+ },
+
+ // Convert a hex string to a byte array
+ hexToBytes: function(hex) {
+ for (var bytes = [], c = 0; c < hex.length; c += 2)
+ bytes.push(parseInt(hex.substr(c, 2), 16));
+ return bytes;
+ },
+
+ // Convert a byte array to a base-64 string
+ bytesToBase64: function(bytes) {
+ for (var base64 = [], i = 0; i < bytes.length; i += 3) {
+ var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
+ for (var j = 0; j < 4; j++)
+ if (i * 8 + j * 6 <= bytes.length * 8)
+ base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));
+ else
+ base64.push('=');
+ }
+ return base64.join('');
+ },
+
+ // Convert a base-64 string to a byte array
+ base64ToBytes: function(base64) {
+ // Remove non-base-64 characters
+ base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');
+
+ for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
+ imod4 = ++i % 4) {
+ if (imod4 == 0) continue;
+ bytes.push(((base64map.indexOf(base64.charAt(i - 1))
+ & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
+ | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
+ }
+ return bytes;
+ }
+ };
+
+ module.exports = crypt;
+})();
+
+
+/***/ }),
+
+/***/ "./node_modules/is-buffer/index.js":
+/*!*****************************************!*\
+ !*** ./node_modules/is-buffer/index.js ***!
+ \*****************************************/
+/***/ (function(module) {
+
+/*!
+ * Determine if an object is a Buffer
+ *
+ * @author Feross Aboukhadijeh
+ * @license MIT
+ */
+
+// The _isBuffer check is for Safari 5-7 support, because it's missing
+// Object.prototype.constructor. Remove this eventually
+module.exports = function (obj) {
+ return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
+}
+
+function isBuffer (obj) {
+ return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
+}
+
+// For Node v0.10 support. Remove this eventually.
+function isSlowBuffer (obj) {
+ return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/md5/md5.js":
+/*!*********************************!*\
+ !*** ./node_modules/md5/md5.js ***!
+ \*********************************/
+/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
+
+(function(){
+ var crypt = __webpack_require__(/*! crypt */ "./node_modules/crypt/crypt.js"),
+ utf8 = (__webpack_require__(/*! charenc */ "./node_modules/charenc/charenc.js").utf8),
+ isBuffer = __webpack_require__(/*! is-buffer */ "./node_modules/is-buffer/index.js"),
+ bin = (__webpack_require__(/*! charenc */ "./node_modules/charenc/charenc.js").bin),
+
+ // The core
+ md5 = function (message, options) {
+ // Convert to byte array
+ if (message.constructor == String)
+ if (options && options.encoding === 'binary')
+ message = bin.stringToBytes(message);
+ else
+ message = utf8.stringToBytes(message);
+ else if (isBuffer(message))
+ message = Array.prototype.slice.call(message, 0);
+ else if (!Array.isArray(message) && message.constructor !== Uint8Array)
+ message = message.toString();
+ // else, assume byte array already
+
+ var m = crypt.bytesToWords(message),
+ l = message.length * 8,
+ a = 1732584193,
+ b = -271733879,
+ c = -1732584194,
+ d = 271733878;
+
+ // Swap endian
+ for (var i = 0; i < m.length; i++) {
+ m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |
+ ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;
+ }
+
+ // Padding
+ m[l >>> 5] |= 0x80 << (l % 32);
+ m[(((l + 64) >>> 9) << 4) + 14] = l;
+
+ // Method shortcuts
+ var FF = md5._ff,
+ GG = md5._gg,
+ HH = md5._hh,
+ II = md5._ii;
+
+ for (var i = 0; i < m.length; i += 16) {
+
+ var aa = a,
+ bb = b,
+ cc = c,
+ dd = d;
+
+ a = FF(a, b, c, d, m[i+ 0], 7, -680876936);
+ d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
+ c = FF(c, d, a, b, m[i+ 2], 17, 606105819);
+ b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
+ a = FF(a, b, c, d, m[i+ 4], 7, -176418897);
+ d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);
+ c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
+ b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
+ a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);
+ d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
+ c = FF(c, d, a, b, m[i+10], 17, -42063);
+ b = FF(b, c, d, a, m[i+11], 22, -1990404162);
+ a = FF(a, b, c, d, m[i+12], 7, 1804603682);
+ d = FF(d, a, b, c, m[i+13], 12, -40341101);
+ c = FF(c, d, a, b, m[i+14], 17, -1502002290);
+ b = FF(b, c, d, a, m[i+15], 22, 1236535329);
+
+ a = GG(a, b, c, d, m[i+ 1], 5, -165796510);
+ d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);
+ c = GG(c, d, a, b, m[i+11], 14, 643717713);
+ b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
+ a = GG(a, b, c, d, m[i+ 5], 5, -701558691);
+ d = GG(d, a, b, c, m[i+10], 9, 38016083);
+ c = GG(c, d, a, b, m[i+15], 14, -660478335);
+ b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
+ a = GG(a, b, c, d, m[i+ 9], 5, 568446438);
+ d = GG(d, a, b, c, m[i+14], 9, -1019803690);
+ c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
+ b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);
+ a = GG(a, b, c, d, m[i+13], 5, -1444681467);
+ d = GG(d, a, b, c, m[i+ 2], 9, -51403784);
+ c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);
+ b = GG(b, c, d, a, m[i+12], 20, -1926607734);
+
+ a = HH(a, b, c, d, m[i+ 5], 4, -378558);
+ d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
+ c = HH(c, d, a, b, m[i+11], 16, 1839030562);
+ b = HH(b, c, d, a, m[i+14], 23, -35309556);
+ a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);
+ d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);
+ c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
+ b = HH(b, c, d, a, m[i+10], 23, -1094730640);
+ a = HH(a, b, c, d, m[i+13], 4, 681279174);
+ d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
+ c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
+ b = HH(b, c, d, a, m[i+ 6], 23, 76029189);
+ a = HH(a, b, c, d, m[i+ 9], 4, -640364487);
+ d = HH(d, a, b, c, m[i+12], 11, -421815835);
+ c = HH(c, d, a, b, m[i+15], 16, 530742520);
+ b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
+
+ a = II(a, b, c, d, m[i+ 0], 6, -198630844);
+ d = II(d, a, b, c, m[i+ 7], 10, 1126891415);
+ c = II(c, d, a, b, m[i+14], 15, -1416354905);
+ b = II(b, c, d, a, m[i+ 5], 21, -57434055);
+ a = II(a, b, c, d, m[i+12], 6, 1700485571);
+ d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
+ c = II(c, d, a, b, m[i+10], 15, -1051523);
+ b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
+ a = II(a, b, c, d, m[i+ 8], 6, 1873313359);
+ d = II(d, a, b, c, m[i+15], 10, -30611744);
+ c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
+ b = II(b, c, d, a, m[i+13], 21, 1309151649);
+ a = II(a, b, c, d, m[i+ 4], 6, -145523070);
+ d = II(d, a, b, c, m[i+11], 10, -1120210379);
+ c = II(c, d, a, b, m[i+ 2], 15, 718787259);
+ b = II(b, c, d, a, m[i+ 9], 21, -343485551);
+
+ a = (a + aa) >>> 0;
+ b = (b + bb) >>> 0;
+ c = (c + cc) >>> 0;
+ d = (d + dd) >>> 0;
+ }
+
+ return crypt.endian([a, b, c, d]);
+ };
+
+ // Auxiliary functions
+ md5._ff = function (a, b, c, d, x, s, t) {
+ var n = a + (b & c | ~b & d) + (x >>> 0) + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ };
+ md5._gg = function (a, b, c, d, x, s, t) {
+ var n = a + (b & d | c & ~d) + (x >>> 0) + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ };
+ md5._hh = function (a, b, c, d, x, s, t) {
+ var n = a + (b ^ c ^ d) + (x >>> 0) + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ };
+ md5._ii = function (a, b, c, d, x, s, t) {
+ var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ };
+
+ // Package private blocksize
+ md5._blocksize = 16;
+ md5._digestsize = 16;
+
+ module.exports = function (message, options) {
+ if (message === undefined || message === null)
+ throw new Error('Illegal argument ' + message);
+
+ var digestbytes = crypt.wordsToBytes(md5(message, options));
+ return options && options.asBytes ? digestbytes :
+ options && options.asString ? bin.bytesToString(digestbytes) :
+ crypt.bytesToHex(digestbytes);
+ };
+
+})();
+
+
+/***/ }),
+
+/***/ "./node_modules/react/cjs/react.development.js":
+/*!*****************************************************!*\
+ !*** ./node_modules/react/cjs/react.development.js ***!
+ \*****************************************************/
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* module decorator */ module = __webpack_require__.nmd(module);
+/**
+ * @license React
+ * react.development.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+
+
+if (true) {
+ (function() {
+
+ 'use strict';
+
+/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
+if (
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
+ 'function'
+) {
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
+}
+ var ReactVersion = '18.2.0';
+
+// ATTENTION
+// When adding new symbols to this file,
+// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
+// The Symbol used to tag the ReactElement-like types.
+var REACT_ELEMENT_TYPE = Symbol.for('react.element');
+var REACT_PORTAL_TYPE = Symbol.for('react.portal');
+var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
+var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
+var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
+var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
+var REACT_CONTEXT_TYPE = Symbol.for('react.context');
+var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
+var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
+var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
+var REACT_MEMO_TYPE = Symbol.for('react.memo');
+var REACT_LAZY_TYPE = Symbol.for('react.lazy');
+var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
+var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
+var FAUX_ITERATOR_SYMBOL = '@@iterator';
+function getIteratorFn(maybeIterable) {
+ if (maybeIterable === null || typeof maybeIterable !== 'object') {
+ return null;
+ }
+
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
+
+ if (typeof maybeIterator === 'function') {
+ return maybeIterator;
+ }
+
+ return null;
+}
+
+/**
+ * Keeps track of the current dispatcher.
+ */
+var ReactCurrentDispatcher = {
+ /**
+ * @internal
+ * @type {ReactComponent}
+ */
+ current: null
+};
+
+/**
+ * Keeps track of the current batch's configuration such as how long an update
+ * should suspend for if it needs to.
+ */
+var ReactCurrentBatchConfig = {
+ transition: null
+};
+
+var ReactCurrentActQueue = {
+ current: null,
+ // Used to reproduce behavior of `batchedUpdates` in legacy mode.
+ isBatchingLegacy: false,
+ didScheduleLegacyUpdate: false
+};
+
+/**
+ * Keeps track of the current owner.
+ *
+ * The current owner is the component who should own any components that are
+ * currently being constructed.
+ */
+var ReactCurrentOwner = {
+ /**
+ * @internal
+ * @type {ReactComponent}
+ */
+ current: null
+};
+
+var ReactDebugCurrentFrame = {};
+var currentExtraStackFrame = null;
+function setExtraStackFrame(stack) {
+ {
+ currentExtraStackFrame = stack;
+ }
+}
+
+{
+ ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {
+ {
+ currentExtraStackFrame = stack;
+ }
+ }; // Stack implementation injected by the current renderer.
+
+
+ ReactDebugCurrentFrame.getCurrentStack = null;
+
+ ReactDebugCurrentFrame.getStackAddendum = function () {
+ var stack = ''; // Add an extra top frame while an element is being validated
+
+ if (currentExtraStackFrame) {
+ stack += currentExtraStackFrame;
+ } // Delegate to the injected renderer-specific implementation
+
+
+ var impl = ReactDebugCurrentFrame.getCurrentStack;
+
+ if (impl) {
+ stack += impl() || '';
+ }
+
+ return stack;
+ };
+}
+
+// -----------------------------------------------------------------------------
+
+var enableScopeAPI = false; // Experimental Create Event Handle API.
+var enableCacheElement = false;
+var enableTransitionTracing = false; // No known bugs, but needs performance testing
+
+var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
+// stuff. Intended to enable React core members to more easily debug scheduling
+// issues in DEV builds.
+
+var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
+
+var ReactSharedInternals = {
+ ReactCurrentDispatcher: ReactCurrentDispatcher,
+ ReactCurrentBatchConfig: ReactCurrentBatchConfig,
+ ReactCurrentOwner: ReactCurrentOwner
+};
+
+{
+ ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
+ ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
+}
+
+// by calls to these methods by a Babel plugin.
+//
+// In PROD (or in packages without access to React internals),
+// they are left as they are instead.
+
+function warn(format) {
+ {
+ {
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+
+ printWarning('warn', format, args);
+ }
+ }
+}
+function error(format) {
+ {
+ {
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
+ args[_key2 - 1] = arguments[_key2];
+ }
+
+ printWarning('error', format, args);
+ }
+ }
+}
+
+function printWarning(level, format, args) {
+ // When changing this logic, you might want to also
+ // update consoleWithStackDev.www.js as well.
+ {
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
+
+ if (stack !== '') {
+ format += '%s';
+ args = args.concat([stack]);
+ } // eslint-disable-next-line react-internal/safe-string-coercion
+
+
+ var argsWithFormat = args.map(function (item) {
+ return String(item);
+ }); // Careful: RN currently depends on this prefix
+
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
+ // breaks IE9: https://github.com/facebook/react/issues/13610
+ // eslint-disable-next-line react-internal/no-production-logging
+
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
+ }
+}
+
+var didWarnStateUpdateForUnmountedComponent = {};
+
+function warnNoop(publicInstance, callerName) {
+ {
+ var _constructor = publicInstance.constructor;
+ var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
+ var warningKey = componentName + "." + callerName;
+
+ if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
+ return;
+ }
+
+ error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
+
+ didWarnStateUpdateForUnmountedComponent[warningKey] = true;
+ }
+}
+/**
+ * This is the abstract API for an update queue.
+ */
+
+
+var ReactNoopUpdateQueue = {
+ /**
+ * Checks whether or not this composite component is mounted.
+ * @param {ReactClass} publicInstance The instance we want to test.
+ * @return {boolean} True if mounted, false otherwise.
+ * @protected
+ * @final
+ */
+ isMounted: function (publicInstance) {
+ return false;
+ },
+
+ /**
+ * Forces an update. This should only be invoked when it is known with
+ * certainty that we are **not** in a DOM transaction.
+ *
+ * You may want to call this when you know that some deeper aspect of the
+ * component's state has changed but `setState` was not called.
+ *
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
+ * `componentWillUpdate` and `componentDidUpdate`.
+ *
+ * @param {ReactClass} publicInstance The instance that should rerender.
+ * @param {?function} callback Called after component is updated.
+ * @param {?string} callerName name of the calling function in the public API.
+ * @internal
+ */
+ enqueueForceUpdate: function (publicInstance, callback, callerName) {
+ warnNoop(publicInstance, 'forceUpdate');
+ },
+
+ /**
+ * Replaces all of the state. Always use this or `setState` to mutate state.
+ * You should treat `this.state` as immutable.
+ *
+ * There is no guarantee that `this.state` will be immediately updated, so
+ * accessing `this.state` after calling this method may return the old value.
+ *
+ * @param {ReactClass} publicInstance The instance that should rerender.
+ * @param {object} completeState Next state.
+ * @param {?function} callback Called after component is updated.
+ * @param {?string} callerName name of the calling function in the public API.
+ * @internal
+ */
+ enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
+ warnNoop(publicInstance, 'replaceState');
+ },
+
+ /**
+ * Sets a subset of the state. This only exists because _pendingState is
+ * internal. This provides a merging strategy that is not available to deep
+ * properties which is confusing. TODO: Expose pendingState or don't use it
+ * during the merge.
+ *
+ * @param {ReactClass} publicInstance The instance that should rerender.
+ * @param {object} partialState Next partial state to be merged with state.
+ * @param {?function} callback Called after component is updated.
+ * @param {?string} Name of the calling function in the public API.
+ * @internal
+ */
+ enqueueSetState: function (publicInstance, partialState, callback, callerName) {
+ warnNoop(publicInstance, 'setState');
+ }
+};
+
+var assign = Object.assign;
+
+var emptyObject = {};
+
+{
+ Object.freeze(emptyObject);
+}
+/**
+ * Base class helpers for the updating state of a component.
+ */
+
+
+function Component(props, context, updater) {
+ this.props = props;
+ this.context = context; // If a component has string refs, we will assign a different object later.
+
+ this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
+ // renderer.
+
+ this.updater = updater || ReactNoopUpdateQueue;
+}
+
+Component.prototype.isReactComponent = {};
+/**
+ * Sets a subset of the state. Always use this to mutate
+ * state. You should treat `this.state` as immutable.
+ *
+ * There is no guarantee that `this.state` will be immediately updated, so
+ * accessing `this.state` after calling this method may return the old value.
+ *
+ * There is no guarantee that calls to `setState` will run synchronously,
+ * as they may eventually be batched together. You can provide an optional
+ * callback that will be executed when the call to setState is actually
+ * completed.
+ *
+ * When a function is provided to setState, it will be called at some point in
+ * the future (not synchronously). It will be called with the up to date
+ * component arguments (state, props, context). These values can be different
+ * from this.* because your function may be called after receiveProps but before
+ * shouldComponentUpdate, and this new state, props, and context will not yet be
+ * assigned to this.
+ *
+ * @param {object|function} partialState Next partial state or function to
+ * produce next partial state to be merged with current state.
+ * @param {?function} callback Called after state is updated.
+ * @final
+ * @protected
+ */
+
+Component.prototype.setState = function (partialState, callback) {
+ if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {
+ throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');
+ }
+
+ this.updater.enqueueSetState(this, partialState, callback, 'setState');
+};
+/**
+ * Forces an update. This should only be invoked when it is known with
+ * certainty that we are **not** in a DOM transaction.
+ *
+ * You may want to call this when you know that some deeper aspect of the
+ * component's state has changed but `setState` was not called.
+ *
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
+ * `componentWillUpdate` and `componentDidUpdate`.
+ *
+ * @param {?function} callback Called after update is complete.
+ * @final
+ * @protected
+ */
+
+
+Component.prototype.forceUpdate = function (callback) {
+ this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
+};
+/**
+ * Deprecated APIs. These APIs used to exist on classic React classes but since
+ * we would like to deprecate them, we're not going to move them over to this
+ * modern base class. Instead, we define a getter that warns if it's accessed.
+ */
+
+
+{
+ var deprecatedAPIs = {
+ isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
+ replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
+ };
+
+ var defineDeprecationWarning = function (methodName, info) {
+ Object.defineProperty(Component.prototype, methodName, {
+ get: function () {
+ warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
+
+ return undefined;
+ }
+ });
+ };
+
+ for (var fnName in deprecatedAPIs) {
+ if (deprecatedAPIs.hasOwnProperty(fnName)) {
+ defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
+ }
+ }
+}
+
+function ComponentDummy() {}
+
+ComponentDummy.prototype = Component.prototype;
+/**
+ * Convenience component with default shallow equality check for sCU.
+ */
+
+function PureComponent(props, context, updater) {
+ this.props = props;
+ this.context = context; // If a component has string refs, we will assign a different object later.
+
+ this.refs = emptyObject;
+ this.updater = updater || ReactNoopUpdateQueue;
+}
+
+var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
+pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
+
+assign(pureComponentPrototype, Component.prototype);
+pureComponentPrototype.isPureReactComponent = true;
+
+// an immutable object with a single mutable value
+function createRef() {
+ var refObject = {
+ current: null
+ };
+
+ {
+ Object.seal(refObject);
+ }
+
+ return refObject;
+}
+
+var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
+
+function isArray(a) {
+ return isArrayImpl(a);
+}
+
+/*
+ * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
+ * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
+ *
+ * The functions in this module will throw an easier-to-understand,
+ * easier-to-debug exception with a clear errors message message explaining the
+ * problem. (Instead of a confusing exception thrown inside the implementation
+ * of the `value` object).
+ */
+// $FlowFixMe only called in DEV, so void return is not possible.
+function typeName(value) {
+ {
+ // toStringTag is needed for namespaced types like Temporal.Instant
+ var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
+ var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
+ return type;
+ }
+} // $FlowFixMe only called in DEV, so void return is not possible.
+
+
+function willCoercionThrow(value) {
+ {
+ try {
+ testStringCoercion(value);
+ return false;
+ } catch (e) {
+ return true;
+ }
+ }
+}
+
+function testStringCoercion(value) {
+ // If you ended up here by following an exception call stack, here's what's
+ // happened: you supplied an object or symbol value to React (as a prop, key,
+ // DOM attribute, CSS property, string ref, etc.) and when React tried to
+ // coerce it to a string using `'' + value`, an exception was thrown.
+ //
+ // The most common types that will cause this exception are `Symbol` instances
+ // and Temporal objects like `Temporal.Instant`. But any object that has a
+ // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
+ // exception. (Library authors do this to prevent users from using built-in
+ // numeric operators like `+` or comparison operators like `>=` because custom
+ // methods are needed to perform accurate arithmetic or comparison.)
+ //
+ // To fix the problem, coerce this object or symbol value to a string before
+ // passing it to React. The most reliable way is usually `String(value)`.
+ //
+ // To find which value is throwing, check the browser or debugger console.
+ // Before this exception was thrown, there should be `console.error` output
+ // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
+ // problem and how that type was used: key, atrribute, input value prop, etc.
+ // In most cases, this console output also shows the component and its
+ // ancestor components where the exception happened.
+ //
+ // eslint-disable-next-line react-internal/safe-string-coercion
+ return '' + value;
+}
+function checkKeyStringCoercion(value) {
+ {
+ if (willCoercionThrow(value)) {
+ error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
+
+ return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
+ }
+ }
+}
+
+function getWrappedName(outerType, innerType, wrapperName) {
+ var displayName = outerType.displayName;
+
+ if (displayName) {
+ return displayName;
+ }
+
+ var functionName = innerType.displayName || innerType.name || '';
+ return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
+} // Keep in sync with react-reconciler/getComponentNameFromFiber
+
+
+function getContextName(type) {
+ return type.displayName || 'Context';
+} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
+
+
+function getComponentNameFromType(type) {
+ if (type == null) {
+ // Host root, text node or just invalid type.
+ return null;
+ }
+
+ {
+ if (typeof type.tag === 'number') {
+ error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
+ }
+ }
+
+ if (typeof type === 'function') {
+ return type.displayName || type.name || null;
+ }
+
+ if (typeof type === 'string') {
+ return type;
+ }
+
+ switch (type) {
+ case REACT_FRAGMENT_TYPE:
+ return 'Fragment';
+
+ case REACT_PORTAL_TYPE:
+ return 'Portal';
+
+ case REACT_PROFILER_TYPE:
+ return 'Profiler';
+
+ case REACT_STRICT_MODE_TYPE:
+ return 'StrictMode';
+
+ case REACT_SUSPENSE_TYPE:
+ return 'Suspense';
+
+ case REACT_SUSPENSE_LIST_TYPE:
+ return 'SuspenseList';
+
+ }
+
+ if (typeof type === 'object') {
+ switch (type.$$typeof) {
+ case REACT_CONTEXT_TYPE:
+ var context = type;
+ return getContextName(context) + '.Consumer';
+
+ case REACT_PROVIDER_TYPE:
+ var provider = type;
+ return getContextName(provider._context) + '.Provider';
+
+ case REACT_FORWARD_REF_TYPE:
+ return getWrappedName(type, type.render, 'ForwardRef');
+
+ case REACT_MEMO_TYPE:
+ var outerName = type.displayName || null;
+
+ if (outerName !== null) {
+ return outerName;
+ }
+
+ return getComponentNameFromType(type.type) || 'Memo';
+
+ case REACT_LAZY_TYPE:
+ {
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+
+ try {
+ return getComponentNameFromType(init(payload));
+ } catch (x) {
+ return null;
+ }
+ }
+
+ // eslint-disable-next-line no-fallthrough
+ }
+ }
+
+ return null;
+}
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+var RESERVED_PROPS = {
+ key: true,
+ ref: true,
+ __self: true,
+ __source: true
+};
+var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
+
+{
+ didWarnAboutStringRefs = {};
+}
+
+function hasValidRef(config) {
+ {
+ if (hasOwnProperty.call(config, 'ref')) {
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
+
+ if (getter && getter.isReactWarning) {
+ return false;
+ }
+ }
+ }
+
+ return config.ref !== undefined;
+}
+
+function hasValidKey(config) {
+ {
+ if (hasOwnProperty.call(config, 'key')) {
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
+
+ if (getter && getter.isReactWarning) {
+ return false;
+ }
+ }
+ }
+
+ return config.key !== undefined;
+}
+
+function defineKeyPropWarningGetter(props, displayName) {
+ var warnAboutAccessingKey = function () {
+ {
+ if (!specialPropKeyWarningShown) {
+ specialPropKeyWarningShown = true;
+
+ error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
+ }
+ }
+ };
+
+ warnAboutAccessingKey.isReactWarning = true;
+ Object.defineProperty(props, 'key', {
+ get: warnAboutAccessingKey,
+ configurable: true
+ });
+}
+
+function defineRefPropWarningGetter(props, displayName) {
+ var warnAboutAccessingRef = function () {
+ {
+ if (!specialPropRefWarningShown) {
+ specialPropRefWarningShown = true;
+
+ error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
+ }
+ }
+ };
+
+ warnAboutAccessingRef.isReactWarning = true;
+ Object.defineProperty(props, 'ref', {
+ get: warnAboutAccessingRef,
+ configurable: true
+ });
+}
+
+function warnIfStringRefCannotBeAutoConverted(config) {
+ {
+ if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
+ var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
+
+ if (!didWarnAboutStringRefs[componentName]) {
+ error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
+
+ didWarnAboutStringRefs[componentName] = true;
+ }
+ }
+ }
+}
+/**
+ * Factory method to create a new React element. This no longer adheres to
+ * the class pattern, so do not use new to call it. Also, instanceof check
+ * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
+ * if something is a React Element.
+ *
+ * @param {*} type
+ * @param {*} props
+ * @param {*} key
+ * @param {string|object} ref
+ * @param {*} owner
+ * @param {*} self A *temporary* helper to detect places where `this` is
+ * different from the `owner` when React.createElement is called, so that we
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
+ * functions, and as long as `this` and owner are the same, there will be no
+ * change in behavior.
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
+ * indicating filename, line number, and/or other information.
+ * @internal
+ */
+
+
+var ReactElement = function (type, key, ref, self, source, owner, props) {
+ var element = {
+ // This tag allows us to uniquely identify this as a React Element
+ $$typeof: REACT_ELEMENT_TYPE,
+ // Built-in properties that belong on the element
+ type: type,
+ key: key,
+ ref: ref,
+ props: props,
+ // Record the component responsible for creating this element.
+ _owner: owner
+ };
+
+ {
+ // The validation flag is currently mutative. We put it on
+ // an external backing store so that we can freeze the whole object.
+ // This can be replaced with a WeakMap once they are implemented in
+ // commonly used development environments.
+ element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
+ // the validation flag non-enumerable (where possible, which should
+ // include every environment we run tests in), so the test framework
+ // ignores it.
+
+ Object.defineProperty(element._store, 'validated', {
+ configurable: false,
+ enumerable: false,
+ writable: true,
+ value: false
+ }); // self and source are DEV only properties.
+
+ Object.defineProperty(element, '_self', {
+ configurable: false,
+ enumerable: false,
+ writable: false,
+ value: self
+ }); // Two elements created in two different places should be considered
+ // equal for testing purposes and therefore we hide it from enumeration.
+
+ Object.defineProperty(element, '_source', {
+ configurable: false,
+ enumerable: false,
+ writable: false,
+ value: source
+ });
+
+ if (Object.freeze) {
+ Object.freeze(element.props);
+ Object.freeze(element);
+ }
+ }
+
+ return element;
+};
+/**
+ * Create and return a new ReactElement of the given type.
+ * See https://reactjs.org/docs/react-api.html#createelement
+ */
+
+function createElement(type, config, children) {
+ var propName; // Reserved names are extracted
+
+ var props = {};
+ var key = null;
+ var ref = null;
+ var self = null;
+ var source = null;
+
+ if (config != null) {
+ if (hasValidRef(config)) {
+ ref = config.ref;
+
+ {
+ warnIfStringRefCannotBeAutoConverted(config);
+ }
+ }
+
+ if (hasValidKey(config)) {
+ {
+ checkKeyStringCoercion(config.key);
+ }
+
+ key = '' + config.key;
+ }
+
+ self = config.__self === undefined ? null : config.__self;
+ source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
+
+ for (propName in config) {
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
+ props[propName] = config[propName];
+ }
+ }
+ } // Children can be more than one argument, and those are transferred onto
+ // the newly allocated props object.
+
+
+ var childrenLength = arguments.length - 2;
+
+ if (childrenLength === 1) {
+ props.children = children;
+ } else if (childrenLength > 1) {
+ var childArray = Array(childrenLength);
+
+ for (var i = 0; i < childrenLength; i++) {
+ childArray[i] = arguments[i + 2];
+ }
+
+ {
+ if (Object.freeze) {
+ Object.freeze(childArray);
+ }
+ }
+
+ props.children = childArray;
+ } // Resolve default props
+
+
+ if (type && type.defaultProps) {
+ var defaultProps = type.defaultProps;
+
+ for (propName in defaultProps) {
+ if (props[propName] === undefined) {
+ props[propName] = defaultProps[propName];
+ }
+ }
+ }
+
+ {
+ if (key || ref) {
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
+
+ if (key) {
+ defineKeyPropWarningGetter(props, displayName);
+ }
+
+ if (ref) {
+ defineRefPropWarningGetter(props, displayName);
+ }
+ }
+ }
+
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
+}
+function cloneAndReplaceKey(oldElement, newKey) {
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
+ return newElement;
+}
+/**
+ * Clone and return a new ReactElement using element as the starting point.
+ * See https://reactjs.org/docs/react-api.html#cloneelement
+ */
+
+function cloneElement(element, config, children) {
+ if (element === null || element === undefined) {
+ throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
+ }
+
+ var propName; // Original props are copied
+
+ var props = assign({}, element.props); // Reserved names are extracted
+
+ var key = element.key;
+ var ref = element.ref; // Self is preserved since the owner is preserved.
+
+ var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
+ // transpiler, and the original source is probably a better indicator of the
+ // true owner.
+
+ var source = element._source; // Owner will be preserved, unless ref is overridden
+
+ var owner = element._owner;
+
+ if (config != null) {
+ if (hasValidRef(config)) {
+ // Silently steal the ref from the parent.
+ ref = config.ref;
+ owner = ReactCurrentOwner.current;
+ }
+
+ if (hasValidKey(config)) {
+ {
+ checkKeyStringCoercion(config.key);
+ }
+
+ key = '' + config.key;
+ } // Remaining properties override existing props
+
+
+ var defaultProps;
+
+ if (element.type && element.type.defaultProps) {
+ defaultProps = element.type.defaultProps;
+ }
+
+ for (propName in config) {
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
+ if (config[propName] === undefined && defaultProps !== undefined) {
+ // Resolve default props
+ props[propName] = defaultProps[propName];
+ } else {
+ props[propName] = config[propName];
+ }
+ }
+ }
+ } // Children can be more than one argument, and those are transferred onto
+ // the newly allocated props object.
+
+
+ var childrenLength = arguments.length - 2;
+
+ if (childrenLength === 1) {
+ props.children = children;
+ } else if (childrenLength > 1) {
+ var childArray = Array(childrenLength);
+
+ for (var i = 0; i < childrenLength; i++) {
+ childArray[i] = arguments[i + 2];
+ }
+
+ props.children = childArray;
+ }
+
+ return ReactElement(element.type, key, ref, self, source, owner, props);
+}
+/**
+ * Verifies the object is a ReactElement.
+ * See https://reactjs.org/docs/react-api.html#isvalidelement
+ * @param {?object} object
+ * @return {boolean} True if `object` is a ReactElement.
+ * @final
+ */
+
+function isValidElement(object) {
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
+}
+
+var SEPARATOR = '.';
+var SUBSEPARATOR = ':';
+/**
+ * Escape and wrap key so it is safe to use as a reactid
+ *
+ * @param {string} key to be escaped.
+ * @return {string} the escaped key.
+ */
+
+function escape(key) {
+ var escapeRegex = /[=:]/g;
+ var escaperLookup = {
+ '=': '=0',
+ ':': '=2'
+ };
+ var escapedString = key.replace(escapeRegex, function (match) {
+ return escaperLookup[match];
+ });
+ return '$' + escapedString;
+}
+/**
+ * TODO: Test that a single child and an array with one item have the same key
+ * pattern.
+ */
+
+
+var didWarnAboutMaps = false;
+var userProvidedKeyEscapeRegex = /\/+/g;
+
+function escapeUserProvidedKey(text) {
+ return text.replace(userProvidedKeyEscapeRegex, '$&/');
+}
+/**
+ * Generate a key string that identifies a element within a set.
+ *
+ * @param {*} element A element that could contain a manual key.
+ * @param {number} index Index that is used if a manual key is not provided.
+ * @return {string}
+ */
+
+
+function getElementKey(element, index) {
+ // Do some typechecking here since we call this blindly. We want to ensure
+ // that we don't block potential future ES APIs.
+ if (typeof element === 'object' && element !== null && element.key != null) {
+ // Explicit key
+ {
+ checkKeyStringCoercion(element.key);
+ }
+
+ return escape('' + element.key);
+ } // Implicit key determined by the index in the set
+
+
+ return index.toString(36);
+}
+
+function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
+ var type = typeof children;
+
+ if (type === 'undefined' || type === 'boolean') {
+ // All of the above are perceived as null.
+ children = null;
+ }
+
+ var invokeCallback = false;
+
+ if (children === null) {
+ invokeCallback = true;
+ } else {
+ switch (type) {
+ case 'string':
+ case 'number':
+ invokeCallback = true;
+ break;
+
+ case 'object':
+ switch (children.$$typeof) {
+ case REACT_ELEMENT_TYPE:
+ case REACT_PORTAL_TYPE:
+ invokeCallback = true;
+ }
+
+ }
+ }
+
+ if (invokeCallback) {
+ var _child = children;
+ var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array
+ // so that it's consistent if the number of children grows:
+
+ var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
+
+ if (isArray(mappedChild)) {
+ var escapedChildKey = '';
+
+ if (childKey != null) {
+ escapedChildKey = escapeUserProvidedKey(childKey) + '/';
+ }
+
+ mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {
+ return c;
+ });
+ } else if (mappedChild != null) {
+ if (isValidElement(mappedChild)) {
+ {
+ // The `if` statement here prevents auto-disabling of the safe
+ // coercion ESLint rule, so we must manually disable it below.
+ // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
+ if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
+ checkKeyStringCoercion(mappedChild.key);
+ }
+ }
+
+ mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
+ // traverseAllChildren used to do for objects as children
+ escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
+ mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
+ // eslint-disable-next-line react-internal/safe-string-coercion
+ escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);
+ }
+
+ array.push(mappedChild);
+ }
+
+ return 1;
+ }
+
+ var child;
+ var nextName;
+ var subtreeCount = 0; // Count of children found in the current subtree.
+
+ var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
+
+ if (isArray(children)) {
+ for (var i = 0; i < children.length; i++) {
+ child = children[i];
+ nextName = nextNamePrefix + getElementKey(child, i);
+ subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
+ }
+ } else {
+ var iteratorFn = getIteratorFn(children);
+
+ if (typeof iteratorFn === 'function') {
+ var iterableChildren = children;
+
+ {
+ // Warn about using Maps as children
+ if (iteratorFn === iterableChildren.entries) {
+ if (!didWarnAboutMaps) {
+ warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
+ }
+
+ didWarnAboutMaps = true;
+ }
+ }
+
+ var iterator = iteratorFn.call(iterableChildren);
+ var step;
+ var ii = 0;
+
+ while (!(step = iterator.next()).done) {
+ child = step.value;
+ nextName = nextNamePrefix + getElementKey(child, ii++);
+ subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
+ }
+ } else if (type === 'object') {
+ // eslint-disable-next-line react-internal/safe-string-coercion
+ var childrenString = String(children);
+ throw new Error("Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.');
+ }
+ }
+
+ return subtreeCount;
+}
+
+/**
+ * Maps children that are typically specified as `props.children`.
+ *
+ * See https://reactjs.org/docs/react-api.html#reactchildrenmap
+ *
+ * The provided mapFunction(child, index) will be called for each
+ * leaf child.
+ *
+ * @param {?*} children Children tree container.
+ * @param {function(*, int)} func The map function.
+ * @param {*} context Context for mapFunction.
+ * @return {object} Object containing the ordered map of results.
+ */
+function mapChildren(children, func, context) {
+ if (children == null) {
+ return children;
+ }
+
+ var result = [];
+ var count = 0;
+ mapIntoArray(children, result, '', '', function (child) {
+ return func.call(context, child, count++);
+ });
+ return result;
+}
+/**
+ * Count the number of children that are typically specified as
+ * `props.children`.
+ *
+ * See https://reactjs.org/docs/react-api.html#reactchildrencount
+ *
+ * @param {?*} children Children tree container.
+ * @return {number} The number of children.
+ */
+
+
+function countChildren(children) {
+ var n = 0;
+ mapChildren(children, function () {
+ n++; // Don't return anything
+ });
+ return n;
+}
+
+/**
+ * Iterates through children that are typically specified as `props.children`.
+ *
+ * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
+ *
+ * The provided forEachFunc(child, index) will be called for each
+ * leaf child.
+ *
+ * @param {?*} children Children tree container.
+ * @param {function(*, int)} forEachFunc
+ * @param {*} forEachContext Context for forEachContext.
+ */
+function forEachChildren(children, forEachFunc, forEachContext) {
+ mapChildren(children, function () {
+ forEachFunc.apply(this, arguments); // Don't return anything.
+ }, forEachContext);
+}
+/**
+ * Flatten a children object (typically specified as `props.children`) and
+ * return an array with appropriately re-keyed children.
+ *
+ * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
+ */
+
+
+function toArray(children) {
+ return mapChildren(children, function (child) {
+ return child;
+ }) || [];
+}
+/**
+ * Returns the first child in a collection of children and verifies that there
+ * is only one child in the collection.
+ *
+ * See https://reactjs.org/docs/react-api.html#reactchildrenonly
+ *
+ * The current implementation of this function assumes that a single child gets
+ * passed without a wrapper, but the purpose of this helper function is to
+ * abstract away the particular structure of children.
+ *
+ * @param {?object} children Child collection structure.
+ * @return {ReactElement} The first and only `ReactElement` contained in the
+ * structure.
+ */
+
+
+function onlyChild(children) {
+ if (!isValidElement(children)) {
+ throw new Error('React.Children.only expected to receive a single React element child.');
+ }
+
+ return children;
+}
+
+function createContext(defaultValue) {
+ // TODO: Second argument used to be an optional `calculateChangedBits`
+ // function. Warn to reserve for future use?
+ var context = {
+ $$typeof: REACT_CONTEXT_TYPE,
+ // As a workaround to support multiple concurrent renderers, we categorize
+ // some renderers as primary and others as secondary. We only expect
+ // there to be two concurrent renderers at most: React Native (primary) and
+ // Fabric (secondary); React DOM (primary) and React ART (secondary).
+ // Secondary renderers store their context values on separate fields.
+ _currentValue: defaultValue,
+ _currentValue2: defaultValue,
+ // Used to track how many concurrent renderers this context currently
+ // supports within in a single renderer. Such as parallel server rendering.
+ _threadCount: 0,
+ // These are circular
+ Provider: null,
+ Consumer: null,
+ // Add these to use same hidden class in VM as ServerContext
+ _defaultValue: null,
+ _globalName: null
+ };
+ context.Provider = {
+ $$typeof: REACT_PROVIDER_TYPE,
+ _context: context
+ };
+ var hasWarnedAboutUsingNestedContextConsumers = false;
+ var hasWarnedAboutUsingConsumerProvider = false;
+ var hasWarnedAboutDisplayNameOnConsumer = false;
+
+ {
+ // A separate object, but proxies back to the original context object for
+ // backwards compatibility. It has a different $$typeof, so we can properly
+ // warn for the incorrect usage of Context as a Consumer.
+ var Consumer = {
+ $$typeof: REACT_CONTEXT_TYPE,
+ _context: context
+ }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
+
+ Object.defineProperties(Consumer, {
+ Provider: {
+ get: function () {
+ if (!hasWarnedAboutUsingConsumerProvider) {
+ hasWarnedAboutUsingConsumerProvider = true;
+
+ error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');
+ }
+
+ return context.Provider;
+ },
+ set: function (_Provider) {
+ context.Provider = _Provider;
+ }
+ },
+ _currentValue: {
+ get: function () {
+ return context._currentValue;
+ },
+ set: function (_currentValue) {
+ context._currentValue = _currentValue;
+ }
+ },
+ _currentValue2: {
+ get: function () {
+ return context._currentValue2;
+ },
+ set: function (_currentValue2) {
+ context._currentValue2 = _currentValue2;
+ }
+ },
+ _threadCount: {
+ get: function () {
+ return context._threadCount;
+ },
+ set: function (_threadCount) {
+ context._threadCount = _threadCount;
+ }
+ },
+ Consumer: {
+ get: function () {
+ if (!hasWarnedAboutUsingNestedContextConsumers) {
+ hasWarnedAboutUsingNestedContextConsumers = true;
+
+ error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');
+ }
+
+ return context.Consumer;
+ }
+ },
+ displayName: {
+ get: function () {
+ return context.displayName;
+ },
+ set: function (displayName) {
+ if (!hasWarnedAboutDisplayNameOnConsumer) {
+ warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName);
+
+ hasWarnedAboutDisplayNameOnConsumer = true;
+ }
+ }
+ }
+ }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
+
+ context.Consumer = Consumer;
+ }
+
+ {
+ context._currentRenderer = null;
+ context._currentRenderer2 = null;
+ }
+
+ return context;
+}
+
+var Uninitialized = -1;
+var Pending = 0;
+var Resolved = 1;
+var Rejected = 2;
+
+function lazyInitializer(payload) {
+ if (payload._status === Uninitialized) {
+ var ctor = payload._result;
+ var thenable = ctor(); // Transition to the next state.
+ // This might throw either because it's missing or throws. If so, we treat it
+ // as still uninitialized and try again next time. Which is the same as what
+ // happens if the ctor or any wrappers processing the ctor throws. This might
+ // end up fixing it if the resolution was a concurrency bug.
+
+ thenable.then(function (moduleObject) {
+ if (payload._status === Pending || payload._status === Uninitialized) {
+ // Transition to the next state.
+ var resolved = payload;
+ resolved._status = Resolved;
+ resolved._result = moduleObject;
+ }
+ }, function (error) {
+ if (payload._status === Pending || payload._status === Uninitialized) {
+ // Transition to the next state.
+ var rejected = payload;
+ rejected._status = Rejected;
+ rejected._result = error;
+ }
+ });
+
+ if (payload._status === Uninitialized) {
+ // In case, we're still uninitialized, then we're waiting for the thenable
+ // to resolve. Set it as pending in the meantime.
+ var pending = payload;
+ pending._status = Pending;
+ pending._result = thenable;
+ }
+ }
+
+ if (payload._status === Resolved) {
+ var moduleObject = payload._result;
+
+ {
+ if (moduleObject === undefined) {
+ error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
+ 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))\n\n" + 'Did you accidentally put curly braces around the import?', moduleObject);
+ }
+ }
+
+ {
+ if (!('default' in moduleObject)) {
+ error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
+ 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
+ }
+ }
+
+ return moduleObject.default;
+ } else {
+ throw payload._result;
+ }
+}
+
+function lazy(ctor) {
+ var payload = {
+ // We use these fields to store the result.
+ _status: Uninitialized,
+ _result: ctor
+ };
+ var lazyType = {
+ $$typeof: REACT_LAZY_TYPE,
+ _payload: payload,
+ _init: lazyInitializer
+ };
+
+ {
+ // In production, this would just set it on the object.
+ var defaultProps;
+ var propTypes; // $FlowFixMe
+
+ Object.defineProperties(lazyType, {
+ defaultProps: {
+ configurable: true,
+ get: function () {
+ return defaultProps;
+ },
+ set: function (newDefaultProps) {
+ error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
+
+ defaultProps = newDefaultProps; // Match production behavior more closely:
+ // $FlowFixMe
+
+ Object.defineProperty(lazyType, 'defaultProps', {
+ enumerable: true
+ });
+ }
+ },
+ propTypes: {
+ configurable: true,
+ get: function () {
+ return propTypes;
+ },
+ set: function (newPropTypes) {
+ error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
+
+ propTypes = newPropTypes; // Match production behavior more closely:
+ // $FlowFixMe
+
+ Object.defineProperty(lazyType, 'propTypes', {
+ enumerable: true
+ });
+ }
+ }
+ });
+ }
+
+ return lazyType;
+}
+
+function forwardRef(render) {
+ {
+ if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
+ error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
+ } else if (typeof render !== 'function') {
+ error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
+ } else {
+ if (render.length !== 0 && render.length !== 2) {
+ error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
+ }
+ }
+
+ if (render != null) {
+ if (render.defaultProps != null || render.propTypes != null) {
+ error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
+ }
+ }
+ }
+
+ var elementType = {
+ $$typeof: REACT_FORWARD_REF_TYPE,
+ render: render
+ };
+
+ {
+ var ownName;
+ Object.defineProperty(elementType, 'displayName', {
+ enumerable: false,
+ configurable: true,
+ get: function () {
+ return ownName;
+ },
+ set: function (name) {
+ ownName = name; // The inner component shouldn't inherit this display name in most cases,
+ // because the component may be used elsewhere.
+ // But it's nice for anonymous functions to inherit the name,
+ // so that our component-stack generation logic will display their frames.
+ // An anonymous function generally suggests a pattern like:
+ // React.forwardRef((props, ref) => {...});
+ // This kind of inner function is not used elsewhere so the side effect is okay.
+
+ if (!render.name && !render.displayName) {
+ render.displayName = name;
+ }
+ }
+ });
+ }
+
+ return elementType;
+}
+
+var REACT_MODULE_REFERENCE;
+
+{
+ REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
+}
+
+function isValidElementType(type) {
+ if (typeof type === 'string' || typeof type === 'function') {
+ return true;
+ } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
+
+
+ if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
+ return true;
+ }
+
+ if (typeof type === 'object' && type !== null) {
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
+ // types supported by any Flight configuration anywhere since
+ // we don't know which Flight build this will end up being used
+ // with.
+ type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function memo(type, compare) {
+ {
+ if (!isValidElementType(type)) {
+ error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
+ }
+ }
+
+ var elementType = {
+ $$typeof: REACT_MEMO_TYPE,
+ type: type,
+ compare: compare === undefined ? null : compare
+ };
+
+ {
+ var ownName;
+ Object.defineProperty(elementType, 'displayName', {
+ enumerable: false,
+ configurable: true,
+ get: function () {
+ return ownName;
+ },
+ set: function (name) {
+ ownName = name; // The inner component shouldn't inherit this display name in most cases,
+ // because the component may be used elsewhere.
+ // But it's nice for anonymous functions to inherit the name,
+ // so that our component-stack generation logic will display their frames.
+ // An anonymous function generally suggests a pattern like:
+ // React.memo((props) => {...});
+ // This kind of inner function is not used elsewhere so the side effect is okay.
+
+ if (!type.name && !type.displayName) {
+ type.displayName = name;
+ }
+ }
+ });
+ }
+
+ return elementType;
+}
+
+function resolveDispatcher() {
+ var dispatcher = ReactCurrentDispatcher.current;
+
+ {
+ if (dispatcher === null) {
+ error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');
+ }
+ } // Will result in a null access error if accessed outside render phase. We
+ // intentionally don't throw our own error because this is in a hot path.
+ // Also helps ensure this is inlined.
+
+
+ return dispatcher;
+}
+function useContext(Context) {
+ var dispatcher = resolveDispatcher();
+
+ {
+ // TODO: add a more generic warning for invalid values.
+ if (Context._context !== undefined) {
+ var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
+ // and nobody should be using this in existing code.
+
+ if (realContext.Consumer === Context) {
+ error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
+ } else if (realContext.Provider === Context) {
+ error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
+ }
+ }
+ }
+
+ return dispatcher.useContext(Context);
+}
+function useState(initialState) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useState(initialState);
+}
+function useReducer(reducer, initialArg, init) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useReducer(reducer, initialArg, init);
+}
+function useRef(initialValue) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useRef(initialValue);
+}
+function useEffect(create, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useEffect(create, deps);
+}
+function useInsertionEffect(create, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useInsertionEffect(create, deps);
+}
+function useLayoutEffect(create, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useLayoutEffect(create, deps);
+}
+function useCallback(callback, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useCallback(callback, deps);
+}
+function useMemo(create, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useMemo(create, deps);
+}
+function useImperativeHandle(ref, create, deps) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useImperativeHandle(ref, create, deps);
+}
+function useDebugValue(value, formatterFn) {
+ {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useDebugValue(value, formatterFn);
+ }
+}
+function useTransition() {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useTransition();
+}
+function useDeferredValue(value) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useDeferredValue(value);
+}
+function useId() {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useId();
+}
+function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
+ var dispatcher = resolveDispatcher();
+ return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
+}
+
+// Helpers to patch console.logs to avoid logging during side-effect free
+// replaying on render function. This currently only patches the object
+// lazily which won't cover if the log function was extracted eagerly.
+// We could also eagerly patch the method.
+var disabledDepth = 0;
+var prevLog;
+var prevInfo;
+var prevWarn;
+var prevError;
+var prevGroup;
+var prevGroupCollapsed;
+var prevGroupEnd;
+
+function disabledLog() {}
+
+disabledLog.__reactDisabledLog = true;
+function disableLogs() {
+ {
+ if (disabledDepth === 0) {
+ /* eslint-disable react-internal/no-production-logging */
+ prevLog = console.log;
+ prevInfo = console.info;
+ prevWarn = console.warn;
+ prevError = console.error;
+ prevGroup = console.group;
+ prevGroupCollapsed = console.groupCollapsed;
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
+
+ var props = {
+ configurable: true,
+ enumerable: true,
+ value: disabledLog,
+ writable: true
+ }; // $FlowFixMe Flow thinks console is immutable.
+
+ Object.defineProperties(console, {
+ info: props,
+ log: props,
+ warn: props,
+ error: props,
+ group: props,
+ groupCollapsed: props,
+ groupEnd: props
+ });
+ /* eslint-enable react-internal/no-production-logging */
+ }
+
+ disabledDepth++;
+ }
+}
+function reenableLogs() {
+ {
+ disabledDepth--;
+
+ if (disabledDepth === 0) {
+ /* eslint-disable react-internal/no-production-logging */
+ var props = {
+ configurable: true,
+ enumerable: true,
+ writable: true
+ }; // $FlowFixMe Flow thinks console is immutable.
+
+ Object.defineProperties(console, {
+ log: assign({}, props, {
+ value: prevLog
+ }),
+ info: assign({}, props, {
+ value: prevInfo
+ }),
+ warn: assign({}, props, {
+ value: prevWarn
+ }),
+ error: assign({}, props, {
+ value: prevError
+ }),
+ group: assign({}, props, {
+ value: prevGroup
+ }),
+ groupCollapsed: assign({}, props, {
+ value: prevGroupCollapsed
+ }),
+ groupEnd: assign({}, props, {
+ value: prevGroupEnd
+ })
+ });
+ /* eslint-enable react-internal/no-production-logging */
+ }
+
+ if (disabledDepth < 0) {
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
+ }
+ }
+}
+
+var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
+var prefix;
+function describeBuiltInComponentFrame(name, source, ownerFn) {
+ {
+ if (prefix === undefined) {
+ // Extract the VM specific prefix used by each line.
+ try {
+ throw Error();
+ } catch (x) {
+ var match = x.stack.trim().match(/\n( *(at )?)/);
+ prefix = match && match[1] || '';
+ }
+ } // We use the prefix to ensure our stacks line up with native stack frames.
+
+
+ return '\n' + prefix + name;
+ }
+}
+var reentry = false;
+var componentFrameCache;
+
+{
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
+ componentFrameCache = new PossiblyWeakMap();
+}
+
+function describeNativeComponentFrame(fn, construct) {
+ // If something asked for a stack inside a fake render, it should get ignored.
+ if ( !fn || reentry) {
+ return '';
+ }
+
+ {
+ var frame = componentFrameCache.get(fn);
+
+ if (frame !== undefined) {
+ return frame;
+ }
+ }
+
+ var control;
+ reentry = true;
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
+
+ Error.prepareStackTrace = undefined;
+ var previousDispatcher;
+
+ {
+ previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function
+ // for warnings.
+
+ ReactCurrentDispatcher$1.current = null;
+ disableLogs();
+ }
+
+ try {
+ // This should throw.
+ if (construct) {
+ // Something should be setting the props in the constructor.
+ var Fake = function () {
+ throw Error();
+ }; // $FlowFixMe
+
+
+ Object.defineProperty(Fake.prototype, 'props', {
+ set: function () {
+ // We use a throwing setter instead of frozen or non-writable props
+ // because that won't throw in a non-strict mode function.
+ throw Error();
+ }
+ });
+
+ if (typeof Reflect === 'object' && Reflect.construct) {
+ // We construct a different control for this case to include any extra
+ // frames added by the construct call.
+ try {
+ Reflect.construct(Fake, []);
+ } catch (x) {
+ control = x;
+ }
+
+ Reflect.construct(fn, [], Fake);
+ } else {
+ try {
+ Fake.call();
+ } catch (x) {
+ control = x;
+ }
+
+ fn.call(Fake.prototype);
+ }
+ } else {
+ try {
+ throw Error();
+ } catch (x) {
+ control = x;
+ }
+
+ fn();
+ }
+ } catch (sample) {
+ // This is inlined manually because closure doesn't do it for us.
+ if (sample && control && typeof sample.stack === 'string') {
+ // This extracts the first frame from the sample that isn't also in the control.
+ // Skipping one frame that we assume is the frame that calls the two.
+ var sampleLines = sample.stack.split('\n');
+ var controlLines = control.stack.split('\n');
+ var s = sampleLines.length - 1;
+ var c = controlLines.length - 1;
+
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
+ // We expect at least one stack frame to be shared.
+ // Typically this will be the root most one. However, stack frames may be
+ // cut off due to maximum stack limits. In this case, one maybe cut off
+ // earlier than the other. We assume that the sample is longer or the same
+ // and there for cut off earlier. So we should find the root most frame in
+ // the sample somewhere in the control.
+ c--;
+ }
+
+ for (; s >= 1 && c >= 0; s--, c--) {
+ // Next we find the first one that isn't the same which should be the
+ // frame that called our sample function and the control.
+ if (sampleLines[s] !== controlLines[c]) {
+ // In V8, the first line is describing the message but other VMs don't.
+ // If we're about to return the first line, and the control is also on the same
+ // line, that's a pretty good indicator that our sample threw at same line as
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
+ // This can happen if you passed a class to function component, or non-function.
+ if (s !== 1 || c !== 1) {
+ do {
+ s--;
+ c--; // We may still have similar intermediate frames from the construct call.
+ // The next one that isn't the same should be our match though.
+
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled ""
+ // but we have a user-provided "displayName"
+ // splice it in to make the stack more readable.
+
+
+ if (fn.displayName && _frame.includes('')) {
+ _frame = _frame.replace('', fn.displayName);
+ }
+
+ {
+ if (typeof fn === 'function') {
+ componentFrameCache.set(fn, _frame);
+ }
+ } // Return the line we found.
+
+
+ return _frame;
+ }
+ } while (s >= 1 && c >= 0);
+ }
+
+ break;
+ }
+ }
+ }
+ } finally {
+ reentry = false;
+
+ {
+ ReactCurrentDispatcher$1.current = previousDispatcher;
+ reenableLogs();
+ }
+
+ Error.prepareStackTrace = previousPrepareStackTrace;
+ } // Fallback to just using the name if we couldn't make it throw.
+
+
+ var name = fn ? fn.displayName || fn.name : '';
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
+
+ {
+ if (typeof fn === 'function') {
+ componentFrameCache.set(fn, syntheticFrame);
+ }
+ }
+
+ return syntheticFrame;
+}
+function describeFunctionComponentFrame(fn, source, ownerFn) {
+ {
+ return describeNativeComponentFrame(fn, false);
+ }
+}
+
+function shouldConstruct(Component) {
+ var prototype = Component.prototype;
+ return !!(prototype && prototype.isReactComponent);
+}
+
+function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
+
+ if (type == null) {
+ return '';
+ }
+
+ if (typeof type === 'function') {
+ {
+ return describeNativeComponentFrame(type, shouldConstruct(type));
+ }
+ }
+
+ if (typeof type === 'string') {
+ return describeBuiltInComponentFrame(type);
+ }
+
+ switch (type) {
+ case REACT_SUSPENSE_TYPE:
+ return describeBuiltInComponentFrame('Suspense');
+
+ case REACT_SUSPENSE_LIST_TYPE:
+ return describeBuiltInComponentFrame('SuspenseList');
+ }
+
+ if (typeof type === 'object') {
+ switch (type.$$typeof) {
+ case REACT_FORWARD_REF_TYPE:
+ return describeFunctionComponentFrame(type.render);
+
+ case REACT_MEMO_TYPE:
+ // Memo may contain any component type so we recursively resolve it.
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
+
+ case REACT_LAZY_TYPE:
+ {
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+
+ try {
+ // Lazy may contain any component type so we recursively resolve it.
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
+ } catch (x) {}
+ }
+ }
+ }
+
+ return '';
+}
+
+var loggedTypeFailures = {};
+var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
+
+function setCurrentlyValidatingElement(element) {
+ {
+ if (element) {
+ var owner = element._owner;
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
+ } else {
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
+ }
+ }
+}
+
+function checkPropTypes(typeSpecs, values, location, componentName, element) {
+ {
+ // $FlowFixMe This is okay but Flow doesn't know it.
+ var has = Function.call.bind(hasOwnProperty);
+
+ for (var typeSpecName in typeSpecs) {
+ if (has(typeSpecs, typeSpecName)) {
+ var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
+ // fail the render phase where it didn't fail before. So we log it.
+ // After these have been cleaned up, we'll let them throw.
+
+ try {
+ // This is intentionally an invariant that gets caught. It's the same
+ // behavior as without this statement except with a better message.
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
+ // eslint-disable-next-line react-internal/prod-error-codes
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
+ err.name = 'Invariant Violation';
+ throw err;
+ }
+
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
+ } catch (ex) {
+ error$1 = ex;
+ }
+
+ if (error$1 && !(error$1 instanceof Error)) {
+ setCurrentlyValidatingElement(element);
+
+ error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
+
+ setCurrentlyValidatingElement(null);
+ }
+
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
+ // Only monitor this failure once because there tends to be a lot of the
+ // same error.
+ loggedTypeFailures[error$1.message] = true;
+ setCurrentlyValidatingElement(element);
+
+ error('Failed %s type: %s', location, error$1.message);
+
+ setCurrentlyValidatingElement(null);
+ }
+ }
+ }
+ }
+}
+
+function setCurrentlyValidatingElement$1(element) {
+ {
+ if (element) {
+ var owner = element._owner;
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
+ setExtraStackFrame(stack);
+ } else {
+ setExtraStackFrame(null);
+ }
+ }
+}
+
+var propTypesMisspellWarningShown;
+
+{
+ propTypesMisspellWarningShown = false;
+}
+
+function getDeclarationErrorAddendum() {
+ if (ReactCurrentOwner.current) {
+ var name = getComponentNameFromType(ReactCurrentOwner.current.type);
+
+ if (name) {
+ return '\n\nCheck the render method of `' + name + '`.';
+ }
+ }
+
+ return '';
+}
+
+function getSourceInfoErrorAddendum(source) {
+ if (source !== undefined) {
+ var fileName = source.fileName.replace(/^.*[\\\/]/, '');
+ var lineNumber = source.lineNumber;
+ return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
+ }
+
+ return '';
+}
+
+function getSourceInfoErrorAddendumForProps(elementProps) {
+ if (elementProps !== null && elementProps !== undefined) {
+ return getSourceInfoErrorAddendum(elementProps.__source);
+ }
+
+ return '';
+}
+/**
+ * Warn if there's no key explicitly set on dynamic arrays of children or
+ * object keys are not valid. This allows us to keep track of children between
+ * updates.
+ */
+
+
+var ownerHasKeyUseWarning = {};
+
+function getCurrentComponentErrorInfo(parentType) {
+ var info = getDeclarationErrorAddendum();
+
+ if (!info) {
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
+
+ if (parentName) {
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
+ }
+ }
+
+ return info;
+}
+/**
+ * Warn if the element doesn't have an explicit key assigned to it.
+ * This element is in an array. The array could grow and shrink or be
+ * reordered. All children that haven't already been validated are required to
+ * have a "key" property assigned to it. Error statuses are cached so a warning
+ * will only be shown once.
+ *
+ * @internal
+ * @param {ReactElement} element Element that requires a key.
+ * @param {*} parentType element's parent's type.
+ */
+
+
+function validateExplicitKey(element, parentType) {
+ if (!element._store || element._store.validated || element.key != null) {
+ return;
+ }
+
+ element._store.validated = true;
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
+
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
+ return;
+ }
+
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
+ // property, it may be the creator of the child that's responsible for
+ // assigning it a key.
+
+ var childOwner = '';
+
+ if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
+ // Give the component that originally created this child.
+ childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
+ }
+
+ {
+ setCurrentlyValidatingElement$1(element);
+
+ error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
+
+ setCurrentlyValidatingElement$1(null);
+ }
+}
+/**
+ * Ensure that every element either is passed in a static location, in an
+ * array with an explicit keys property defined, or in an object literal
+ * with valid key property.
+ *
+ * @internal
+ * @param {ReactNode} node Statically passed child of any type.
+ * @param {*} parentType node's parent's type.
+ */
+
+
+function validateChildKeys(node, parentType) {
+ if (typeof node !== 'object') {
+ return;
+ }
+
+ if (isArray(node)) {
+ for (var i = 0; i < node.length; i++) {
+ var child = node[i];
+
+ if (isValidElement(child)) {
+ validateExplicitKey(child, parentType);
+ }
+ }
+ } else if (isValidElement(node)) {
+ // This element was passed in a valid location.
+ if (node._store) {
+ node._store.validated = true;
+ }
+ } else if (node) {
+ var iteratorFn = getIteratorFn(node);
+
+ if (typeof iteratorFn === 'function') {
+ // Entry iterators used to provide implicit keys,
+ // but now we print a separate warning for them later.
+ if (iteratorFn !== node.entries) {
+ var iterator = iteratorFn.call(node);
+ var step;
+
+ while (!(step = iterator.next()).done) {
+ if (isValidElement(step.value)) {
+ validateExplicitKey(step.value, parentType);
+ }
+ }
+ }
+ }
+ }
+}
+/**
+ * Given an element, validate that its props follow the propTypes definition,
+ * provided by the type.
+ *
+ * @param {ReactElement} element
+ */
+
+
+function validatePropTypes(element) {
+ {
+ var type = element.type;
+
+ if (type === null || type === undefined || typeof type === 'string') {
+ return;
+ }
+
+ var propTypes;
+
+ if (typeof type === 'function') {
+ propTypes = type.propTypes;
+ } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
+ // Inner props are checked in the reconciler.
+ type.$$typeof === REACT_MEMO_TYPE)) {
+ propTypes = type.propTypes;
+ } else {
+ return;
+ }
+
+ if (propTypes) {
+ // Intentionally inside to avoid triggering lazy initializers:
+ var name = getComponentNameFromType(type);
+ checkPropTypes(propTypes, element.props, 'prop', name, element);
+ } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
+ propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
+
+ var _name = getComponentNameFromType(type);
+
+ error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
+ }
+
+ if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
+ error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
+ }
+ }
+}
+/**
+ * Given a fragment, validate that it can only be provided with fragment props
+ * @param {ReactElement} fragment
+ */
+
+
+function validateFragmentProps(fragment) {
+ {
+ var keys = Object.keys(fragment.props);
+
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+
+ if (key !== 'children' && key !== 'key') {
+ setCurrentlyValidatingElement$1(fragment);
+
+ error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
+
+ setCurrentlyValidatingElement$1(null);
+ break;
+ }
+ }
+
+ if (fragment.ref !== null) {
+ setCurrentlyValidatingElement$1(fragment);
+
+ error('Invalid attribute `ref` supplied to `React.Fragment`.');
+
+ setCurrentlyValidatingElement$1(null);
+ }
+ }
+}
+function createElementWithValidation(type, props, children) {
+ var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
+ // succeed and there will likely be errors in render.
+
+ if (!validType) {
+ var info = '';
+
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
+ info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
+ }
+
+ var sourceInfo = getSourceInfoErrorAddendumForProps(props);
+
+ if (sourceInfo) {
+ info += sourceInfo;
+ } else {
+ info += getDeclarationErrorAddendum();
+ }
+
+ var typeString;
+
+ if (type === null) {
+ typeString = 'null';
+ } else if (isArray(type)) {
+ typeString = 'array';
+ } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
+ typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
+ info = ' Did you accidentally export a JSX literal instead of a component?';
+ } else {
+ typeString = typeof type;
+ }
+
+ {
+ error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
+ }
+ }
+
+ var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
+ // TODO: Drop this when these are no longer allowed as the type argument.
+
+ if (element == null) {
+ return element;
+ } // Skip key warning if the type isn't valid since our key validation logic
+ // doesn't expect a non-string/function type and can throw confusing errors.
+ // We don't want exception behavior to differ between dev and prod.
+ // (Rendering will throw with a helpful message and as soon as the type is
+ // fixed, the key warnings will appear.)
+
+
+ if (validType) {
+ for (var i = 2; i < arguments.length; i++) {
+ validateChildKeys(arguments[i], type);
+ }
+ }
+
+ if (type === REACT_FRAGMENT_TYPE) {
+ validateFragmentProps(element);
+ } else {
+ validatePropTypes(element);
+ }
+
+ return element;
+}
+var didWarnAboutDeprecatedCreateFactory = false;
+function createFactoryWithValidation(type) {
+ var validatedFactory = createElementWithValidation.bind(null, type);
+ validatedFactory.type = type;
+
+ {
+ if (!didWarnAboutDeprecatedCreateFactory) {
+ didWarnAboutDeprecatedCreateFactory = true;
+
+ warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
+ } // Legacy hook: remove it
+
+
+ Object.defineProperty(validatedFactory, 'type', {
+ enumerable: false,
+ get: function () {
+ warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
+
+ Object.defineProperty(this, 'type', {
+ value: type
+ });
+ return type;
+ }
+ });
+ }
+
+ return validatedFactory;
+}
+function cloneElementWithValidation(element, props, children) {
+ var newElement = cloneElement.apply(this, arguments);
+
+ for (var i = 2; i < arguments.length; i++) {
+ validateChildKeys(arguments[i], newElement.type);
+ }
+
+ validatePropTypes(newElement);
+ return newElement;
+}
+
+function startTransition(scope, options) {
+ var prevTransition = ReactCurrentBatchConfig.transition;
+ ReactCurrentBatchConfig.transition = {};
+ var currentTransition = ReactCurrentBatchConfig.transition;
+
+ {
+ ReactCurrentBatchConfig.transition._updatedFibers = new Set();
+ }
+
+ try {
+ scope();
+ } finally {
+ ReactCurrentBatchConfig.transition = prevTransition;
+
+ {
+ if (prevTransition === null && currentTransition._updatedFibers) {
+ var updatedFibersCount = currentTransition._updatedFibers.size;
+
+ if (updatedFibersCount > 10) {
+ warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');
+ }
+
+ currentTransition._updatedFibers.clear();
+ }
+ }
+ }
+}
+
+var didWarnAboutMessageChannel = false;
+var enqueueTaskImpl = null;
+function enqueueTask(task) {
+ if (enqueueTaskImpl === null) {
+ try {
+ // read require off the module object to get around the bundlers.
+ // we don't want them to detect a require and bundle a Node polyfill.
+ var requireString = ('require' + Math.random()).slice(0, 7);
+ var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's
+ // version of setImmediate, bypassing fake timers if any.
+
+ enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;
+ } catch (_err) {
+ // we're in a browser
+ // we can't use regular timers because they may still be faked
+ // so we try MessageChannel+postMessage instead
+ enqueueTaskImpl = function (callback) {
+ {
+ if (didWarnAboutMessageChannel === false) {
+ didWarnAboutMessageChannel = true;
+
+ if (typeof MessageChannel === 'undefined') {
+ error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');
+ }
+ }
+ }
+
+ var channel = new MessageChannel();
+ channel.port1.onmessage = callback;
+ channel.port2.postMessage(undefined);
+ };
+ }
+ }
+
+ return enqueueTaskImpl(task);
+}
+
+var actScopeDepth = 0;
+var didWarnNoAwaitAct = false;
+function act(callback) {
+ {
+ // `act` calls can be nested, so we track the depth. This represents the
+ // number of `act` scopes on the stack.
+ var prevActScopeDepth = actScopeDepth;
+ actScopeDepth++;
+
+ if (ReactCurrentActQueue.current === null) {
+ // This is the outermost `act` scope. Initialize the queue. The reconciler
+ // will detect the queue and use it instead of Scheduler.
+ ReactCurrentActQueue.current = [];
+ }
+
+ var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
+ var result;
+
+ try {
+ // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only
+ // set to `true` while the given callback is executed, not for updates
+ // triggered during an async event, because this is how the legacy
+ // implementation of `act` behaved.
+ ReactCurrentActQueue.isBatchingLegacy = true;
+ result = callback(); // Replicate behavior of original `act` implementation in legacy mode,
+ // which flushed updates immediately after the scope function exits, even
+ // if it's an async function.
+
+ if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
+ var queue = ReactCurrentActQueue.current;
+
+ if (queue !== null) {
+ ReactCurrentActQueue.didScheduleLegacyUpdate = false;
+ flushActQueue(queue);
+ }
+ }
+ } catch (error) {
+ popActScope(prevActScopeDepth);
+ throw error;
+ } finally {
+ ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
+ }
+
+ if (result !== null && typeof result === 'object' && typeof result.then === 'function') {
+ var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait
+ // for it to resolve before exiting the current scope.
+
+ var wasAwaited = false;
+ var thenable = {
+ then: function (resolve, reject) {
+ wasAwaited = true;
+ thenableResult.then(function (returnValue) {
+ popActScope(prevActScopeDepth);
+
+ if (actScopeDepth === 0) {
+ // We've exited the outermost act scope. Recursively flush the
+ // queue until there's no remaining work.
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
+ } else {
+ resolve(returnValue);
+ }
+ }, function (error) {
+ // The callback threw an error.
+ popActScope(prevActScopeDepth);
+ reject(error);
+ });
+ }
+ };
+
+ {
+ if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {
+ // eslint-disable-next-line no-undef
+ Promise.resolve().then(function () {}).then(function () {
+ if (!wasAwaited) {
+ didWarnNoAwaitAct = true;
+
+ error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');
+ }
+ });
+ }
+ }
+
+ return thenable;
+ } else {
+ var returnValue = result; // The callback is not an async function. Exit the current scope
+ // immediately, without awaiting.
+
+ popActScope(prevActScopeDepth);
+
+ if (actScopeDepth === 0) {
+ // Exiting the outermost act scope. Flush the queue.
+ var _queue = ReactCurrentActQueue.current;
+
+ if (_queue !== null) {
+ flushActQueue(_queue);
+ ReactCurrentActQueue.current = null;
+ } // Return a thenable. If the user awaits it, we'll flush again in
+ // case additional work was scheduled by a microtask.
+
+
+ var _thenable = {
+ then: function (resolve, reject) {
+ // Confirm we haven't re-entered another `act` scope, in case
+ // the user does something weird like await the thenable
+ // multiple times.
+ if (ReactCurrentActQueue.current === null) {
+ // Recursively flush the queue until there's no remaining work.
+ ReactCurrentActQueue.current = [];
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
+ } else {
+ resolve(returnValue);
+ }
+ }
+ };
+ return _thenable;
+ } else {
+ // Since we're inside a nested `act` scope, the returned thenable
+ // immediately resolves. The outer scope will flush the queue.
+ var _thenable2 = {
+ then: function (resolve, reject) {
+ resolve(returnValue);
+ }
+ };
+ return _thenable2;
+ }
+ }
+ }
+}
+
+function popActScope(prevActScopeDepth) {
+ {
+ if (prevActScopeDepth !== actScopeDepth - 1) {
+ error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
+ }
+
+ actScopeDepth = prevActScopeDepth;
+ }
+}
+
+function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
+ {
+ var queue = ReactCurrentActQueue.current;
+
+ if (queue !== null) {
+ try {
+ flushActQueue(queue);
+ enqueueTask(function () {
+ if (queue.length === 0) {
+ // No additional work was scheduled. Finish.
+ ReactCurrentActQueue.current = null;
+ resolve(returnValue);
+ } else {
+ // Keep flushing work until there's none left.
+ recursivelyFlushAsyncActWork(returnValue, resolve, reject);
+ }
+ });
+ } catch (error) {
+ reject(error);
+ }
+ } else {
+ resolve(returnValue);
+ }
+ }
+}
+
+var isFlushing = false;
+
+function flushActQueue(queue) {
+ {
+ if (!isFlushing) {
+ // Prevent re-entrance.
+ isFlushing = true;
+ var i = 0;
+
+ try {
+ for (; i < queue.length; i++) {
+ var callback = queue[i];
+
+ do {
+ callback = callback(true);
+ } while (callback !== null);
+ }
+
+ queue.length = 0;
+ } catch (error) {
+ // If something throws, leave the remaining callbacks on the queue.
+ queue = queue.slice(i + 1);
+ throw error;
+ } finally {
+ isFlushing = false;
+ }
+ }
+ }
+}
+
+var createElement$1 = createElementWithValidation ;
+var cloneElement$1 = cloneElementWithValidation ;
+var createFactory = createFactoryWithValidation ;
+var Children = {
+ map: mapChildren,
+ forEach: forEachChildren,
+ count: countChildren,
+ toArray: toArray,
+ only: onlyChild
+};
+
+exports.Children = Children;
+exports.Component = Component;
+exports.Fragment = REACT_FRAGMENT_TYPE;
+exports.Profiler = REACT_PROFILER_TYPE;
+exports.PureComponent = PureComponent;
+exports.StrictMode = REACT_STRICT_MODE_TYPE;
+exports.Suspense = REACT_SUSPENSE_TYPE;
+exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
+exports.cloneElement = cloneElement$1;
+exports.createContext = createContext;
+exports.createElement = createElement$1;
+exports.createFactory = createFactory;
+exports.createRef = createRef;
+exports.forwardRef = forwardRef;
+exports.isValidElement = isValidElement;
+exports.lazy = lazy;
+exports.memo = memo;
+exports.startTransition = startTransition;
+exports.unstable_act = act;
+exports.useCallback = useCallback;
+exports.useContext = useContext;
+exports.useDebugValue = useDebugValue;
+exports.useDeferredValue = useDeferredValue;
+exports.useEffect = useEffect;
+exports.useId = useId;
+exports.useImperativeHandle = useImperativeHandle;
+exports.useInsertionEffect = useInsertionEffect;
+exports.useLayoutEffect = useLayoutEffect;
+exports.useMemo = useMemo;
+exports.useReducer = useReducer;
+exports.useRef = useRef;
+exports.useState = useState;
+exports.useSyncExternalStore = useSyncExternalStore;
+exports.useTransition = useTransition;
+exports.version = ReactVersion;
+ /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
+if (
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
+ 'function'
+) {
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
+}
+
+ })();
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/react/index.js":
+/*!*************************************!*\
+ !*** ./node_modules/react/index.js ***!
+ \*************************************/
+/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
+
+"use strict";
+
+
+if (false) {} else {
+ module.exports = __webpack_require__(/*! ./cjs/react.development.js */ "./node_modules/react/cjs/react.development.js");
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js":
+/*!*******************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
+ \*******************************************************************/
+/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": function() { return /* binding */ _defineProperty; }
+/* harmony export */ });
+/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");
+
+function _defineProperty(obj, key, value) {
+ key = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key);
+ if (key in obj) {
+ Object.defineProperty(obj, key, {
+ value: value,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ } else {
+ obj[key] = value;
+ }
+ return obj;
+}
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/esm/toPrimitive.js":
+/*!****************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js ***!
+ \****************************************************************/
+/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": function() { return /* binding */ _toPrimitive; }
+/* harmony export */ });
+/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
+
+function _toPrimitive(input, hint) {
+ if ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(input) !== "object" || input === null) return input;
+ var prim = input[Symbol.toPrimitive];
+ if (prim !== undefined) {
+ var res = prim.call(input, hint || "default");
+ if ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(res) !== "object") return res;
+ throw new TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return (hint === "string" ? String : Number)(input);
+}
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js":
+/*!******************************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js ***!
+ \******************************************************************/
+/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": function() { return /* binding */ _toPropertyKey; }
+/* harmony export */ });
+/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
+/* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toPrimitive.js */ "./node_modules/@babel/runtime/helpers/esm/toPrimitive.js");
+
+
+function _toPropertyKey(arg) {
+ var key = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arg, "string");
+ return (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key) === "symbol" ? key : String(key);
+}
+
+/***/ }),
+
+/***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js":
+/*!***********************************************************!*\
+ !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***!
+ \***********************************************************/
+/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": function() { return /* binding */ _typeof; }
+/* harmony export */ });
+function _typeof(obj) {
+ "@babel/helpers - typeof";
+
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
+ return typeof obj;
+ } : function (obj) {
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+ }, _typeof(obj);
+}
+
+/***/ })
+
+/******/ });
+/************************************************************************/
+/******/ // The module cache
+/******/ var __webpack_module_cache__ = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/ // Check if module is in cache
+/******/ var cachedModule = __webpack_module_cache__[moduleId];
+/******/ if (cachedModule !== undefined) {
+/******/ return cachedModule.exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = __webpack_module_cache__[moduleId] = {
+/******/ id: moduleId,
+/******/ loaded: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/************************************************************************/
+/******/ /* webpack/runtime/compat get default export */
+/******/ !function() {
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function() { return module['default']; } :
+/******/ function() { return module; };
+/******/ __webpack_require__.d(getter, { a: getter });
+/******/ return getter;
+/******/ };
+/******/ }();
+/******/
+/******/ /* webpack/runtime/define property getters */
+/******/ !function() {
+/******/ // define getter functions for harmony exports
+/******/ __webpack_require__.d = function(exports, definition) {
+/******/ for(var key in definition) {
+/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
+/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
+/******/ }
+/******/ }
+/******/ };
+/******/ }();
+/******/
+/******/ /* webpack/runtime/hasOwnProperty shorthand */
+/******/ !function() {
+/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
+/******/ }();
+/******/
+/******/ /* webpack/runtime/make namespace object */
+/******/ !function() {
+/******/ // define __esModule on exports
+/******/ __webpack_require__.r = function(exports) {
+/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ }
+/******/ Object.defineProperty(exports, '__esModule', { value: true });
+/******/ };
+/******/ }();
+/******/
+/******/ /* webpack/runtime/node module decorator */
+/******/ !function() {
+/******/ __webpack_require__.nmd = function(module) {
+/******/ module.paths = [];
+/******/ if (!module.children) module.children = [];
+/******/ return module;
+/******/ };
+/******/ }();
+/******/
+/************************************************************************/
+var __webpack_exports__ = {};
+// This entry need to be wrapped in an IIFE because it need to be in strict mode.
+!function() {
+"use strict";
+/*!****************************************************************************!*\
+ !*** ./src/advanced-custom-fields-pro/assets/src/js/pro/acf-pro-blocks.js ***!
+ \****************************************************************************/
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _acf_jsx_names_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_acf-jsx-names.js */ "./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-jsx-names.js");
+/* harmony import */ var _acf_jsx_names_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_acf_jsx_names_js__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _acf_blocks_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_acf-blocks.js */ "./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-blocks.js");
+
+
+}();
+/******/ })()
+;
+//# sourceMappingURL=acf-pro-blocks.js.map
\ No newline at end of file
diff --git a/assets/build/js/pro/acf-pro-blocks.js.map b/assets/build/js/pro/acf-pro-blocks.js.map
new file mode 100644
index 0000000..8a0486a
--- /dev/null
+++ b/assets/build/js/pro/acf-pro-blocks.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"acf-pro-blocks.js","mappings":";;;;;;;;;;;;;;;;;;AAAA,MAAMA,GAAG,GAAGC,mBAAO,CAAE,sCAAK,CAAE;AAE5B,CAAE,CAAEC,CAAC,EAAEC,SAAS,KAAM;EACrB;EACA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ACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA,KAAK;;AAEL;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,cAAc;AACpC;AACA;AACA,KAAK;;AAEL;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA,KAAK;;AAEL;AACA;AACA,yCAAyC,kBAAkB;AAC3D;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,uBAAuB;AACzD;AACA;AACA,KAAK;;AAEL;AACA;AACA,gCAAgC,kBAAkB;AAClD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA,KAAK;;AAEL;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;;;;;;;;;;AC/FD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;ACpBA;AACA,cAAc,mBAAO,CAAC,4CAAO;AAC7B,aAAa,8EAAuB;AACpC,iBAAiB,mBAAO,CAAC,oDAAW;AACpC,YAAY,6EAAsB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;AC/JD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,IAAI,IAAqC;AACzC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;;AAGL;;AAEA;AACA,oBAAoB;;AAEpB;AACA;AACA,MAAM;;;AAGN;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,4BAA4B;AAC5B;AACA,qCAAqC;;AAErC,gCAAgC;AAChC;AACA;;AAEA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6FAA6F,aAAa;AAC1G;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG,eAAe;AAChH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA,KAAK,GAAG;;AAER,kDAAkD;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,8MAA8M;;AAE9M;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,aAAa,YAAY;AACzB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,WAAW;AACxB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,QAAQ;AACrB,aAAa,WAAW;AACxB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,QAAQ;AACrB,aAAa,WAAW;AACxB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,0BAA0B;;AAE1B,2BAA2B;AAC3B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA,WAAW,WAAW;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,0BAA0B;;AAE1B;AACA;AACA;;AAEA;AACA,oDAAoD;;AAEpD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,iCAAiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wCAAwC;AACxC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;;AAGF;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd,WAAW,GAAG;AACd,WAAW,eAAe;AAC1B,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;AACA;AACA;AACA;AACA,KAAK,GAAG;AACR;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,qEAAqE;;AAErE;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;;AAGA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA,oBAAoB,oBAAoB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAgB;;AAEhB,uBAAuB,kBAAkB;;AAEzC;AACA,yBAAyB;;AAEzB,4BAA4B;AAC5B;AACA;;AAEA,gCAAgC;;AAEhC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM;;;AAGN;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,IAAI;AACJ;;;AAGA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA,oBAAoB,oBAAoB;AACxC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,YAAY;AACZ;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wCAAwC;AACxC;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wBAAwB;;AAExB;;AAEA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,qIAAqI,yCAAyC;AAC9K;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,kBAAkB;AAC7B,WAAW,GAAG;AACd,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,YAAY,QAAQ;AACpB;;;AAGA;AACA;AACA;AACA,SAAS;AACT,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,kBAAkB;AAC7B,WAAW,GAAG;AACd;AACA;AACA;AACA,wCAAwC;AACxC,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,YAAY,cAAc;AAC1B;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK,GAAG;;AAER;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA,0CAA0C;AAC1C;;AAEA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA,oCAAoC;AACpC;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,+CAA+C,IAAI;AACnD;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;;AAGJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,oCAAoC,IAAI;AACxC;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,0CAA0C;AAC1C;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA,sBAAsB;AACtB;AACA,SAAS;AACT,uBAAuB;AACvB;AACA,SAAS;AACT,uBAAuB;AACvB;AACA,SAAS;AACT,wBAAwB;AACxB;AACA,SAAS;AACT,wBAAwB;AACxB;AACA,SAAS;AACT,iCAAiC;AACjC;AACA,SAAS;AACT,2BAA2B;AAC3B;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,2DAA2D;;AAE3D;AACA;;AAEA;AACA,2DAA2D;AAC3D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA,gFAAgF;AAChF;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;;;AAGlB;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA,IAAI;;;AAGJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2HAA2H;AAC3H;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;;AAEA;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,GAAG;AACd;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,2DAA2D;AAC3D;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,GAAG;AACd;;;AAGA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN,4CAA4C;;AAE5C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;;AAGA;AACA;AACA;;AAEA,oBAAoB,iBAAiB;AACrC;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA,sDAAsD;AACtD;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;;AAGA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB,sBAAsB;AACxC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA,mCAAmC;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;;AAEA,0OAA0O;AAC1O;AACA,WAAW;AACX;AACA;;AAEA;AACA,MAAM;AACN,gCAAgC;AAChC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;;AAEA;AACA;AACA,YAAY;AACZ;;AAEA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;A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A;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;WACA;WACA;WACA;WACA;;;;;;;;;;;;;;;ACJ6B","sources":["webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-blocks.js","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/pro/_acf-jsx-names.js","webpack://advanced-custom-fields-pro/./node_modules/charenc/charenc.js","webpack://advanced-custom-fields-pro/./node_modules/crypt/crypt.js","webpack://advanced-custom-fields-pro/./node_modules/is-buffer/index.js","webpack://advanced-custom-fields-pro/./node_modules/md5/md5.js","webpack://advanced-custom-fields-pro/./node_modules/react/cjs/react.development.js","webpack://advanced-custom-fields-pro/./node_modules/react/index.js","webpack://advanced-custom-fields-pro/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://advanced-custom-fields-pro/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://advanced-custom-fields-pro/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://advanced-custom-fields-pro/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://advanced-custom-fields-pro/webpack/bootstrap","webpack://advanced-custom-fields-pro/webpack/runtime/compat get default export","webpack://advanced-custom-fields-pro/webpack/runtime/define property getters","webpack://advanced-custom-fields-pro/webpack/runtime/hasOwnProperty shorthand","webpack://advanced-custom-fields-pro/webpack/runtime/make namespace object","webpack://advanced-custom-fields-pro/webpack/runtime/node module decorator","webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/pro/acf-pro-blocks.js"],"sourcesContent":["const md5 = require( 'md5' );\n\n( ( $, undefined ) => {\n\t// Dependencies.\n\tconst {\n\t\tBlockControls,\n\t\tInspectorControls,\n\t\tInnerBlocks,\n\t\tuseBlockProps,\n\t\tAlignmentToolbar,\n\t\tBlockVerticalAlignmentToolbar,\n\t} = wp.blockEditor;\n\n\tconst { ToolbarGroup, ToolbarButton, Placeholder, Spinner } = wp.components;\n\tconst { Fragment } = wp.element;\n\tconst { Component } = React;\n\tconst { withSelect } = wp.data;\n\tconst { createHigherOrderComponent } = wp.compose;\n\n\t// Potentially experimental dependencies.\n\tconst BlockAlignmentMatrixToolbar =\n\t\twp.blockEditor.__experimentalBlockAlignmentMatrixToolbar ||\n\t\twp.blockEditor.BlockAlignmentMatrixToolbar;\n\t// Gutenberg v10.x begins transition from Toolbar components to Control components.\n\tconst BlockAlignmentMatrixControl =\n\t\twp.blockEditor.__experimentalBlockAlignmentMatrixControl ||\n\t\twp.blockEditor.BlockAlignmentMatrixControl;\n\tconst BlockFullHeightAlignmentControl =\n\t\twp.blockEditor.__experimentalBlockFullHeightAligmentControl ||\n\t\twp.blockEditor.__experimentalBlockFullHeightAlignmentControl ||\n\t\twp.blockEditor.BlockFullHeightAlignmentControl;\n\tconst useInnerBlocksProps =\n\t\twp.blockEditor.__experimentalUseInnerBlocksProps ||\n\t\twp.blockEditor.useInnerBlocksProps;\n\n\t/**\n\t * Storage for registered block types.\n\t *\n\t * @since 5.8.0\n\t * @var object\n\t */\n\tconst blockTypes = {};\n\n\t/**\n\t * Returns a block type for the given name.\n\t *\n\t * @date\t20/2/19\n\t * @since\t5.8.0\n\t *\n\t * @param\tstring name The block name.\n\t * @return\t(object|false)\n\t */\n\tfunction getBlockType( name ) {\n\t\treturn blockTypes[ name ] || false;\n\t}\n\n\t/**\n\t * Returns a block version for a given block name\n\t *\n\t * @date 8/6/22\n\t * @since 6.0\n\t *\n\t * @param string name The block name\n\t * @return int\n\t */\n\tfunction getBlockVersion( name ) {\n\t\tconst blockType = getBlockType( name );\n\t\treturn blockType.acf_block_version || 1;\n\t}\n\n\t/**\n\t * Returns true if a block (identified by client ID) is nested in a query loop block.\n\t *\n\t * @date 17/1/22\n\t * @since 5.12\n\t *\n\t * @param {string} clientId A block client ID\n\t * @return boolean\n\t */\n\tfunction isBlockInQueryLoop( clientId ) {\n\t\tconst parents = wp.data\n\t\t\t.select( 'core/block-editor' )\n\t\t\t.getBlockParents( clientId );\n\t\tconst parentsData = wp.data\n\t\t\t.select( 'core/block-editor' )\n\t\t\t.getBlocksByClientId( parents );\n\t\treturn parentsData.filter( ( block ) => block.name === 'core/query' )\n\t\t\t.length;\n\t}\n\n\t/**\n\t * Returns true if we're currently inside the WP 5.9+ site editor.\n\t *\n\t * @date 08/02/22\n\t * @since 5.12\n\t *\n\t * @return boolean\n\t */\n\tfunction isSiteEditor() {\n\t\treturn typeof pagenow === 'string' && pagenow === 'site-editor';\n\t}\n\n\t/**\n\t * Returns true if the block editor is currently showing the desktop device type preview.\n\t *\n\t * This function will always return true in the site editor as it uses the\n\t * edit-post store rather than the edit-site store.\n\t *\n\t * @date 15/02/22\n\t * @since 5.12\n\t *\n\t * @return boolean\n\t */\n\tfunction isDesktopPreviewDeviceType() {\n\t\tconst editPostStore = select( 'core/edit-post' );\n\n\t\t// Return true if the edit post store isn't available (such as in the widget editor)\n\t\tif ( ! editPostStore ) return true;\n\n\t\t// Check if function exists (experimental or not) and return true if it's Desktop, or doesn't exist.\n\t\tif ( editPostStore.__experimentalGetPreviewDeviceType ) {\n\t\t\treturn (\n\t\t\t\t'Desktop' === editPostStore.__experimentalGetPreviewDeviceType()\n\t\t\t);\n\t\t} else if ( editPostStore.getPreviewDeviceType ) {\n\t\t\treturn 'Desktop' === editPostStore.getPreviewDeviceType();\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t/**\n\t * Returns true if the block editor is currently in template edit mode.\n\t *\n\t * @date 16/02/22\n\t * @since 5.12\n\t *\n\t * @return boolean\n\t */\n\tfunction isEditingTemplate() {\n\t\tconst editPostStore = select( 'core/edit-post' );\n\n\t\t// Return false if the edit post store isn't available (such as in the widget editor)\n\t\tif ( ! editPostStore ) return false;\n\n\t\t// Return false if the function doesn't exist\n\t\tif ( ! editPostStore.isEditingTemplate ) return false;\n\n\t\treturn editPostStore.isEditingTemplate();\n\t}\n\n\t/**\n\t * Returns true if we're currently inside an iFramed non-desktop device preview type (WP5.9+)\n\t *\n\t * @date 15/02/22\n\t * @since 5.12\n\t *\n\t * @return boolean\n\t */\n\tfunction isiFramedMobileDevicePreview() {\n\t\treturn (\n\t\t\t$( 'iframe[name=editor-canvas]' ).length &&\n\t\t\t! isDesktopPreviewDeviceType()\n\t\t);\n\t}\n\n\t/**\n\t * Registers a block type.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.8.0\n\t *\n\t * @param\tobject blockType The block type settings localized from PHP.\n\t * @return\tobject The result from wp.blocks.registerBlockType().\n\t */\n\tfunction registerBlockType( blockType ) {\n\t\t// Bail early if is excluded post_type.\n\t\tconst allowedTypes = blockType.post_types || [];\n\t\tif ( allowedTypes.length ) {\n\t\t\t// Always allow block to appear on \"Edit reusable Block\" screen.\n\t\t\tallowedTypes.push( 'wp_block' );\n\n\t\t\t// Check post type.\n\t\t\tconst postType = acf.get( 'postType' );\n\t\t\tif ( ! allowedTypes.includes( postType ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Handle svg HTML.\n\t\tif (\n\t\t\ttypeof blockType.icon === 'string' &&\n\t\t\tblockType.icon.substr( 0, 4 ) === '{ iconHTML };\n\t\t}\n\n\t\t// Remove icon if empty to allow for default \"block\".\n\t\t// Avoids JS error preventing block from being registered.\n\t\tif ( ! blockType.icon ) {\n\t\t\tdelete blockType.icon;\n\t\t}\n\n\t\t// Check category exists and fallback to \"common\".\n\t\tconst category = wp.blocks\n\t\t\t.getCategories()\n\t\t\t.filter( ( { slug } ) => slug === blockType.category )\n\t\t\t.pop();\n\t\tif ( ! category ) {\n\t\t\t//console.warn( `The block \"${blockType.name}\" is registered with an unknown category \"${blockType.category}\".` );\n\t\t\tblockType.category = 'common';\n\t\t}\n\n\t\t// Merge in block settings before local additions.\n\t\tblockType = acf.parseArgs( blockType, {\n\t\t\ttitle: '',\n\t\t\tname: '',\n\t\t\tcategory: '',\n\t\t\tapi_version: 2,\n\t\t\tacf_block_version: 1,\n\t\t} );\n\n\t\t// Remove all empty attribute defaults from PHP values to allow serialisation.\n\t\t// https://github.com/WordPress/gutenberg/issues/7342\n\t\tfor ( const key in blockType.attributes ) {\n\t\t\tif ( blockType.attributes[ key ].default.length === 0 ) {\n\t\t\t\tdelete blockType.attributes[ key ].default;\n\t\t\t}\n\t\t}\n\n\t\t// Apply anchor supports to avoid block editor default writing to ID.\n\t\tif ( blockType.supports.anchor ) {\n\t\t\tblockType.attributes.anchor = {\n\t\t\t\ttype: 'string',\n\t\t\t};\n\t\t}\n\n\t\t// Append edit and save functions.\n\t\tlet ThisBlockEdit = BlockEdit;\n\t\tlet ThisBlockSave = BlockSave;\n\n\t\t// Apply alignText functionality.\n\t\tif ( blockType.supports.alignText || blockType.supports.align_text ) {\n\t\t\tblockType.attributes = addBackCompatAttribute(\n\t\t\t\tblockType.attributes,\n\t\t\t\t'align_text',\n\t\t\t\t'string'\n\t\t\t);\n\t\t\tThisBlockEdit = withAlignTextComponent( ThisBlockEdit, blockType );\n\t\t}\n\n\t\t// Apply alignContent functionality.\n\t\tif (\n\t\t\tblockType.supports.alignContent ||\n\t\t\tblockType.supports.align_content\n\t\t) {\n\t\t\tblockType.attributes = addBackCompatAttribute(\n\t\t\t\tblockType.attributes,\n\t\t\t\t'align_content',\n\t\t\t\t'string'\n\t\t\t);\n\t\t\tThisBlockEdit = withAlignContentComponent(\n\t\t\t\tThisBlockEdit,\n\t\t\t\tblockType\n\t\t\t);\n\t\t}\n\n\t\t// Apply fullHeight functionality.\n\t\tif ( blockType.supports.fullHeight || blockType.supports.full_height ) {\n\t\t\tblockType.attributes = addBackCompatAttribute(\n\t\t\t\tblockType.attributes,\n\t\t\t\t'full_height',\n\t\t\t\t'boolean'\n\t\t\t);\n\t\t\tThisBlockEdit = withFullHeightComponent(\n\t\t\t\tThisBlockEdit,\n\t\t\t\tblockType.blockType\n\t\t\t);\n\t\t}\n\n\t\t// Set edit and save functions.\n\t\tblockType.edit = ( props ) => ;\n\t\tblockType.save = () => ;\n\n\t\t// Add to storage.\n\t\tblockTypes[ blockType.name ] = blockType;\n\n\t\t// Register with WP.\n\t\tconst result = wp.blocks.registerBlockType( blockType.name, blockType );\n\n\t\t// Fix bug in 'core/anchor/attribute' filter overwriting attribute.\n\t\t// Required for < WP5.9\n\t\t// See https://github.com/WordPress/gutenberg/issues/15240\n\t\tif ( result.attributes.anchor ) {\n\t\t\tresult.attributes.anchor = {\n\t\t\t\ttype: 'string',\n\t\t\t};\n\t\t}\n\n\t\t// Return result.\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns the wp.data.select() response with backwards compatibility.\n\t *\n\t * @date\t17/06/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring selector The selector name.\n\t * @return\tmixed\n\t */\n\tfunction select( selector ) {\n\t\tif ( selector === 'core/block-editor' ) {\n\t\t\treturn (\n\t\t\t\twp.data.select( 'core/block-editor' ) ||\n\t\t\t\twp.data.select( 'core/editor' )\n\t\t\t);\n\t\t}\n\t\treturn wp.data.select( selector );\n\t}\n\n\t/**\n\t * Returns the wp.data.dispatch() response with backwards compatibility.\n\t *\n\t * @date\t17/06/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring selector The selector name.\n\t * @return\tmixed\n\t */\n\tfunction dispatch( selector ) {\n\t\treturn wp.data.dispatch( selector );\n\t}\n\n\t/**\n\t * Returns an array of all blocks for the given args.\n\t *\n\t * @date\t27/2/19\n\t * @since\t5.7.13\n\t *\n\t * @param\t{object} args An object of key=>value pairs used to filter results.\n\t * @return\tarray.\n\t */\n\tfunction getBlocks( args ) {\n\t\tlet blocks = [];\n\n\t\t// Local function to recurse through all child blocks and add to the blocks array.\n\t\tconst recurseBlocks = ( block ) => {\n\t\t\tblocks.push( block );\n\t\t\tselect( 'core/block-editor' )\n\t\t\t\t.getBlocks( block.clientId )\n\t\t\t\t.forEach( recurseBlocks );\n\t\t};\n\n\t\t// Trigger initial recursion for parent level blocks.\n\t\tselect( 'core/block-editor' ).getBlocks().forEach( recurseBlocks );\n\n\t\t// Loop over args and filter.\n\t\tfor ( const k in args ) {\n\t\t\tblocks = blocks.filter(\n\t\t\t\t( { attributes } ) => attributes[ k ] === args[ k ]\n\t\t\t);\n\t\t}\n\n\t\t// Return results.\n\t\treturn blocks;\n\t}\n\n\t/**\n\t * Storage for the AJAX queue.\n\t *\n\t * @const {array}\n\t */\n\tconst ajaxQueue = {};\n\n\t/**\n\t * Storage for cached AJAX requests for block content.\n\t *\n\t * @since 5.12\n\t * @const {array}\n\t */\n\tconst fetchCache = {};\n\n\t/**\n\t * Fetches a JSON result from the AJAX API.\n\t *\n\t * @date\t28/2/19\n\t * @since\t5.7.13\n\t *\n\t * @param\tobject block The block props.\n\t * @query\tobject The query args used in AJAX callback.\n\t * @return\tobject The AJAX promise.\n\t */\n\tfunction fetchBlock( args ) {\n\t\tconst {\n\t\t\tattributes = {},\n\t\t\tcontext = {},\n\t\t\tquery = {},\n\t\t\tclientId = null,\n\t\t\tdelay = 0,\n\t\t} = args;\n\n\t\t// Build a unique queue ID from block data, including the clientId for edit forms.\n\t\tconst queueId = md5(\n\t\t\tJSON.stringify( { ...attributes, ...context, ...query } )\n\t\t);\n\n\t\tconst data = ajaxQueue[ queueId ] || {\n\t\t\tquery: {},\n\t\t\ttimeout: false,\n\t\t\tpromise: $.Deferred(),\n\t\t\tstarted: false,\n\t\t};\n\n\t\t// Append query args to storage.\n\t\tdata.query = { ...data.query, ...query };\n\n\t\tif ( data.started ) return data.promise;\n\n\t\t// Set fresh timeout.\n\t\tclearTimeout( data.timeout );\n\t\tdata.timeout = setTimeout( () => {\n\t\t\tdata.started = true;\n\t\t\tif ( fetchCache[ queueId ] ) {\n\t\t\t\tajaxQueue[ queueId ] = null;\n\t\t\t\tdata.promise.resolve.apply(\n\t\t\t\t\tfetchCache[ queueId ][ 0 ],\n\t\t\t\t\tfetchCache[ queueId ][ 1 ]\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$.ajax( {\n\t\t\t\t\turl: acf.get( 'ajaxurl' ),\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\ttype: 'post',\n\t\t\t\t\tcache: false,\n\t\t\t\t\tdata: acf.prepareForAjax( {\n\t\t\t\t\t\taction: 'acf/ajax/fetch-block',\n\t\t\t\t\t\tblock: JSON.stringify( attributes ),\n\t\t\t\t\t\tclientId: clientId,\n\t\t\t\t\t\tcontext: JSON.stringify( context ),\n\t\t\t\t\t\tquery: data.query,\n\t\t\t\t\t} ),\n\t\t\t\t} )\n\t\t\t\t\t.always( () => {\n\t\t\t\t\t\t// Clean up queue after AJAX request is complete.\n\t\t\t\t\t\tajaxQueue[ queueId ] = null;\n\t\t\t\t\t} )\n\t\t\t\t\t.done( function () {\n\t\t\t\t\t\tfetchCache[ queueId ] = [ this, arguments ];\n\t\t\t\t\t\tdata.promise.resolve.apply( this, arguments );\n\t\t\t\t\t} )\n\t\t\t\t\t.fail( function () {\n\t\t\t\t\t\tdata.promise.reject.apply( this, arguments );\n\t\t\t\t\t} );\n\t\t\t}\n\t\t}, delay );\n\n\t\t// Update storage.\n\t\tajaxQueue[ queueId ] = data;\n\n\t\t// Return promise.\n\t\treturn data.promise;\n\t}\n\n\t/**\n\t * Returns true if both object are the same.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tobject obj1\n\t * @param\tobject obj2\n\t * @return\tbool\n\t */\n\tfunction compareObjects( obj1, obj2 ) {\n\t\treturn JSON.stringify( obj1 ) === JSON.stringify( obj2 );\n\t}\n\n\t/**\n\t * Converts HTML into a React element.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring html The HTML to convert.\n\t * @param\tint acfBlockVersion The ACF block version number.\n\t * @return\tobject Result of React.createElement().\n\t */\n\tacf.parseJSX = ( html, acfBlockVersion ) => {\n\t\t// Apply a temporary wrapper for the jQuery parse to prevent text nodes triggering errors.\n\t\thtml = '' + html + '
';\n\t\t// Correctly balance InnerBlocks tags for jQuery's initial parse.\n\t\thtml = html.replace(\n\t\t\t/]+)?\\/>/,\n\t\t\t' '\n\t\t);\n\t\treturn parseNode( $( html )[ 0 ], acfBlockVersion, 0 ).props.children;\n\t};\n\n\t/**\n\t * Converts a DOM node into a React element.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tDOM node The DOM node.\n\t * @param\tint acfBlockVersion The ACF block version number.\n\t * @param\tint level The recursion level.\n\t * @return\tobject Result of React.createElement().\n\t */\n\tfunction parseNode( node, acfBlockVersion, level = 0 ) {\n\t\t// Get node name.\n\t\tconst nodeName = parseNodeName(\n\t\t\tnode.nodeName.toLowerCase(),\n\t\t\tacfBlockVersion\n\t\t);\n\t\tif ( ! nodeName ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Get node attributes in React friendly format.\n\t\tconst nodeAttrs = {};\n\n\t\tif ( level === 1 && nodeName !== 'ACFInnerBlocks' ) {\n\t\t\t// Top level (after stripping away the container div), create a ref for passing through to ACF's JS API.\n\t\t\tnodeAttrs.ref = React.createRef();\n\t\t}\n\n\t\tacf.arrayArgs( node.attributes )\n\t\t\t.map( parseNodeAttr )\n\t\t\t.forEach( ( { name, value } ) => {\n\t\t\t\tnodeAttrs[ name ] = value;\n\t\t\t} );\n\n\t\tif ( 'ACFInnerBlocks' === nodeName ) {\n\t\t\treturn ;\n\t\t}\n\n\t\t// Define args for React.createElement().\n\t\tconst args = [ nodeName, nodeAttrs ];\n\t\tacf.arrayArgs( node.childNodes ).forEach( ( child ) => {\n\t\t\tif ( child instanceof Text ) {\n\t\t\t\tconst text = child.textContent;\n\t\t\t\tif ( text ) {\n\t\t\t\t\targs.push( text );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\targs.push( parseNode( child, acfBlockVersion, level + 1 ) );\n\t\t\t}\n\t\t} );\n\n\t\t// Return element.\n\t\treturn React.createElement.apply( this, args );\n\t}\n\n\t/**\n\t * Converts a node or attribute name into it's JSX compliant name\n\t *\n\t * @date 05/07/2021\n\t * @since 5.9.8\n\t *\n\t * @param string name The node or attribute name.\n\t * @return string\n\t */\n\tfunction getJSXName( name ) {\n\t\tconst replacement = acf.isget( acf, 'jsxNameReplacements', name );\n\t\tif ( replacement ) return replacement;\n\t\treturn name;\n\t}\n\n\t/**\n\t * Converts the given name into a React friendly name or component.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring name The node name in lowercase.\n\t * @param\tint acfBlockVersion The ACF block version number.\n\t * @return\tmixed\n\t */\n\tfunction parseNodeName( name, acfBlockVersion ) {\n\t\tswitch ( name ) {\n\t\t\tcase 'innerblocks':\n\t\t\t\tif ( acfBlockVersion < 2 ) {\n\t\t\t\t\treturn InnerBlocks;\n\t\t\t\t}\n\t\t\t\treturn 'ACFInnerBlocks';\n\t\t\tcase 'script':\n\t\t\t\treturn Script;\n\t\t\tcase '#comment':\n\t\t\t\treturn null;\n\t\t\tdefault:\n\t\t\t\t// Replace names for JSX counterparts.\n\t\t\t\tname = getJSXName( name );\n\t\t}\n\t\treturn name;\n\t}\n\n\t/**\n\t * Functional component for ACFInnerBlocks.\n\t *\n\t * @since 6.0.0\n\t *\n\t * @param obj props element properties.\n\t * @return DOM element\n\t */\n\tfunction ACFInnerBlocks( props ) {\n\t\tconst { className = 'acf-innerblocks-container' } = props;\n\t\tconst innerBlockProps = useInnerBlocksProps(\n\t\t\t{ className: className },\n\t\t\tprops\n\t\t);\n\n\t\treturn { innerBlockProps.children }
;\n\t}\n\n\t/**\n\t * Converts the given attribute into a React friendly name and value object.\n\t *\n\t * @date\t19/05/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tobj nodeAttr The node attribute.\n\t * @return\tobj\n\t */\n\tfunction parseNodeAttr( nodeAttr ) {\n\t\tlet name = nodeAttr.name;\n\t\tlet value = nodeAttr.value;\n\t\tswitch ( name ) {\n\t\t\t// Class.\n\t\t\tcase 'class':\n\t\t\t\tname = 'className';\n\t\t\t\tbreak;\n\n\t\t\t// Style.\n\t\t\tcase 'style':\n\t\t\t\tconst css = {};\n\t\t\t\tvalue.split( ';' ).forEach( ( s ) => {\n\t\t\t\t\tconst pos = s.indexOf( ':' );\n\t\t\t\t\tif ( pos > 0 ) {\n\t\t\t\t\t\tlet ruleName = s.substr( 0, pos ).trim();\n\t\t\t\t\t\tconst ruleValue = s.substr( pos + 1 ).trim();\n\n\t\t\t\t\t\t// Rename core properties, but not CSS variables.\n\t\t\t\t\t\tif ( ruleName.charAt( 0 ) !== '-' ) {\n\t\t\t\t\t\t\truleName = acf.strCamelCase( ruleName );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcss[ ruleName ] = ruleValue;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\tvalue = css;\n\t\t\t\tbreak;\n\n\t\t\t// Default.\n\t\t\tdefault:\n\t\t\t\t// No formatting needed for \"data-x\" attributes.\n\t\t\t\tif ( name.indexOf( 'data-' ) === 0 ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Replace names for JSX counterparts.\n\t\t\t\tname = getJSXName( name );\n\n\t\t\t\t// Convert JSON values.\n\t\t\t\tconst c1 = value.charAt( 0 );\n\t\t\t\tif ( c1 === '[' || c1 === '{' ) {\n\t\t\t\t\tvalue = JSON.parse( value );\n\t\t\t\t}\n\n\t\t\t\t// Convert bool values.\n\t\t\t\tif ( value === 'true' || value === 'false' ) {\n\t\t\t\t\tvalue = value === 'true';\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\treturn {\n\t\t\tname,\n\t\t\tvalue,\n\t\t};\n\t}\n\n\t/**\n\t * Higher Order Component used to set default block attribute values.\n\t *\n\t * By modifying block attributes directly, instead of defining defaults in registerBlockType(),\n\t * WordPress will include them always within the saved block serialized JSON.\n\t *\n\t * @date\t31/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tComponent BlockListBlock The BlockListBlock Component.\n\t * @return\tComponent\n\t */\n\tconst withDefaultAttributes = createHigherOrderComponent(\n\t\t( BlockListBlock ) =>\n\t\t\tclass WrappedBlockEdit extends Component {\n\t\t\t\tconstructor( props ) {\n\t\t\t\t\tsuper( props );\n\n\t\t\t\t\t// Extract vars.\n\t\t\t\t\tconst { name, attributes } = this.props;\n\n\t\t\t\t\t// Only run on ACF Blocks.\n\t\t\t\t\tconst blockType = getBlockType( name );\n\t\t\t\t\tif ( ! blockType ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check and remove any empty string attributes to match PHP behaviour.\n\t\t\t\t\tObject.keys( attributes ).forEach( ( key ) => {\n\t\t\t\t\t\tif ( attributes[ key ] === '' ) {\n\t\t\t\t\t\t\tdelete attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Backward compatibility attribute replacement.\n\t\t\t\t\tconst upgrades = {\n\t\t\t\t\t\tfull_height: 'fullHeight',\n\t\t\t\t\t\talign_content: 'alignContent',\n\t\t\t\t\t\talign_text: 'alignText',\n\t\t\t\t\t};\n\n\t\t\t\t\tObject.keys( upgrades ).forEach( ( key ) => {\n\t\t\t\t\t\tif ( attributes[ key ] !== undefined ) {\n\t\t\t\t\t\t\tattributes[ upgrades[ key ] ] = attributes[ key ];\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\tattributes[ upgrades[ key ] ] === undefined\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t//Check for a default\n\t\t\t\t\t\t\tif ( blockType[ key ] !== undefined ) {\n\t\t\t\t\t\t\t\tattributes[ upgrades[ key ] ] =\n\t\t\t\t\t\t\t\t\tblockType[ key ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdelete blockType[ key ];\n\t\t\t\t\t\tdelete attributes[ key ];\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Set default attributes for those undefined.\n\t\t\t\t\tfor ( let attribute in blockType.attributes ) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tattributes[ attribute ] === undefined &&\n\t\t\t\t\t\t\tblockType[ attribute ] !== undefined\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tattributes[ attribute ] = blockType[ attribute ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trender() {\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t},\n\t\t'withDefaultAttributes'\n\t);\n\twp.hooks.addFilter(\n\t\t'editor.BlockListBlock',\n\t\t'acf/with-default-attributes',\n\t\twithDefaultAttributes\n\t);\n\n\t/**\n\t * The BlockSave functional component.\n\t *\n\t * @date\t08/07/2020\n\t * @since\t5.9.0\n\t */\n\tfunction BlockSave() {\n\t\treturn ;\n\t}\n\n\t/**\n\t * The BlockEdit component.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t */\n\tclass BlockEdit extends Component {\n\t\tconstructor( props ) {\n\t\t\tsuper( props );\n\t\t\tthis.setup();\n\t\t}\n\n\t\tsetup() {\n\t\t\tconst { name, attributes, clientId } = this.props;\n\t\t\tconst blockType = getBlockType( name );\n\n\t\t\t// Restrict current mode.\n\t\t\tfunction restrictMode( modes ) {\n\t\t\t\tif ( ! modes.includes( attributes.mode ) ) {\n\t\t\t\t\tattributes.mode = modes[ 0 ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tisBlockInQueryLoop( clientId ) ||\n\t\t\t\tisSiteEditor() ||\n\t\t\t\tisiFramedMobileDevicePreview() ||\n\t\t\t\tisEditingTemplate()\n\t\t\t) {\n\t\t\t\trestrictMode( [ 'preview' ] );\n\t\t\t} else {\n\t\t\t\tswitch ( blockType.mode ) {\n\t\t\t\t\tcase 'edit':\n\t\t\t\t\t\trestrictMode( [ 'edit', 'preview' ] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'preview':\n\t\t\t\t\t\trestrictMode( [ 'preview', 'edit' ] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\trestrictMode( [ 'auto' ] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\trender() {\n\t\t\tconst { name, attributes, setAttributes, clientId } = this.props;\n\t\t\tconst blockType = getBlockType( name );\n\t\t\tconst forcePreview =\n\t\t\t\tisBlockInQueryLoop( clientId ) ||\n\t\t\t\tisSiteEditor() ||\n\t\t\t\tisiFramedMobileDevicePreview() ||\n\t\t\t\tisEditingTemplate();\n\t\t\tlet { mode } = attributes;\n\n\t\t\tif ( forcePreview ) {\n\t\t\t\tmode = 'preview';\n\t\t\t}\n\n\t\t\t// Show toggle only for edit/preview modes and for blocks not in a query loop/FSE.\n\t\t\tlet showToggle = blockType.supports.mode;\n\t\t\tif ( mode === 'auto' || forcePreview ) {\n\t\t\t\tshowToggle = false;\n\t\t\t}\n\n\t\t\t// Configure toggle variables.\n\t\t\tconst toggleText =\n\t\t\t\tmode === 'preview'\n\t\t\t\t\t? acf.__( 'Switch to Edit' )\n\t\t\t\t\t: acf.__( 'Switch to Preview' );\n\t\t\tconst toggleIcon =\n\t\t\t\tmode === 'preview' ? 'edit' : 'welcome-view-site';\n\t\t\tfunction toggleMode() {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tmode: mode === 'preview' ? 'edit' : 'preview',\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Return template.\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ showToggle && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t) }\n\t\t\t\t\t \n\n\t\t\t\t\t\n\t\t\t\t\t\t{ mode === 'preview' && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t) }\n\t\t\t\t\t \n\n\t\t\t\t\t \n\t\t\t\t \n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * The BlockBody functional component.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t */\n\tfunction _BlockBody( props ) {\n\t\tconst { attributes, isSelected, name } = props;\n\t\tconst { mode } = attributes;\n\n\t\tlet showForm = true;\n\t\tlet additionalClasses = 'acf-block-component acf-block-body';\n\n\t\tif ( ( mode === 'auto' && ! isSelected ) || mode === 'preview' ) {\n\t\t\tadditionalClasses += ' acf-block-preview';\n\t\t\tshowForm = false;\n\t\t}\n\n\t\tif ( getBlockVersion( name ) > 1 ) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t{ showForm ? (\n\t\t\t\t\t\t \n\t\t\t\t\t) : (\n\t\t\t\t\t\t \n\t\t\t\t\t) }\n\t\t\t\t
\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t{ showForm ? (\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t) }\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\t}\n\n\t// Append blockIndex to component props.\n\tconst BlockBody = withSelect( ( select, ownProps ) => {\n\t\tconst { clientId } = ownProps;\n\t\t// Use optional rootClientId to allow discoverability of child blocks.\n\t\tconst rootClientId =\n\t\t\tselect( 'core/block-editor' ).getBlockRootClientId( clientId );\n\t\tconst index = select( 'core/block-editor' ).getBlockIndex(\n\t\t\tclientId,\n\t\t\trootClientId\n\t\t);\n\t\treturn {\n\t\t\tindex,\n\t\t};\n\t} )( _BlockBody );\n\n\t/**\n\t * A react component to append HTMl.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t *\n\t * @param\tstring children The html to insert.\n\t * @return\tvoid\n\t */\n\tclass Div extends Component {\n\t\trender() {\n\t\t\treturn (\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * A react Component for inline scripts.\n\t *\n\t * This Component uses a combination of React references and jQuery to append the\n\t * inline ` );\n\t\t}\n\t\tcomponentDidUpdate() {\n\t\t\tthis.setHTML( this.props.children );\n\t\t}\n\t\tcomponentDidMount() {\n\t\t\tthis.setHTML( this.props.children );\n\t\t}\n\t}\n\n\t// Data storage for DynamicHTML components.\n\tconst store = {};\n\n\t/**\n\t * DynamicHTML Class.\n\t *\n\t * A react componenet to load and insert dynamic HTML.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t *\n\t * @param\tvoid\n\t * @return\tvoid\n\t */\n\tclass DynamicHTML extends Component {\n\t\tconstructor( props ) {\n\t\t\tsuper( props );\n\n\t\t\t// Bind callbacks.\n\t\t\tthis.setRef = this.setRef.bind( this );\n\n\t\t\t// Define default props and call setup().\n\t\t\tthis.id = '';\n\t\t\tthis.el = false;\n\t\t\tthis.subscribed = true;\n\t\t\tthis.renderMethod = 'jQuery';\n\t\t\tthis.setup( props );\n\n\t\t\t// Load state.\n\t\t\tthis.loadState();\n\t\t}\n\n\t\tsetup( props ) {\n\t\t\t// Do nothing.\n\t\t}\n\n\t\tfetch() {\n\t\t\t// Do nothing.\n\t\t}\n\n\t\tmaybePreload( blockId, clientId, form ) {\n\t\t\tif (\n\t\t\t\tthis.state.html === undefined &&\n\t\t\t\t! isBlockInQueryLoop( this.props.clientId )\n\t\t\t) {\n\t\t\t\tconst preloadedBlocks = acf.get( 'preloadedBlocks' );\n\t\t\t\tconst modeText = form ? 'form' : 'preview';\n\n\t\t\t\tif ( preloadedBlocks && preloadedBlocks[ blockId ] ) {\n\t\t\t\t\t// Ensure we only preload the correct block state (form or preview).\n\t\t\t\t\tif (\n\t\t\t\t\t\t( form && ! preloadedBlocks[ blockId ].form ) ||\n\t\t\t\t\t\t( ! form && preloadedBlocks[ blockId ].form )\n\t\t\t\t\t)\n\t\t\t\t\t\treturn false;\n\n\t\t\t\t\t// Set HTML to the preloaded version.\n\t\t\t\t\treturn preloadedBlocks[ blockId ].html.replaceAll(\n\t\t\t\t\t\tblockId,\n\t\t\t\t\t\tclientId\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tloadState() {\n\t\t\tthis.state = store[ this.id ] || {};\n\t\t}\n\n\t\tsetState( state ) {\n\t\t\tstore[ this.id ] = { ...this.state, ...state };\n\n\t\t\t// Update component state if subscribed.\n\t\t\t// - Allows AJAX callback to update store without modifying state of an unmounted component.\n\t\t\tif ( this.subscribed ) {\n\t\t\t\tsuper.setState( state );\n\t\t\t}\n\t\t}\n\n\t\tsetHtml( html ) {\n\t\t\thtml = html ? html.trim() : '';\n\n\t\t\t// Bail early if html has not changed.\n\t\t\tif ( html === this.state.html ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Update state.\n\t\t\tconst state = {\n\t\t\t\thtml,\n\t\t\t};\n\n\t\t\tif ( this.renderMethod === 'jsx' ) {\n\t\t\t\tstate.jsx = acf.parseJSX(\n\t\t\t\t\thtml,\n\t\t\t\t\tgetBlockVersion( this.props.name )\n\t\t\t\t);\n\n\t\t\t\t// Handle templates which don't contain any valid JSX parsable elements.\n\t\t\t\tif ( ! state.jsx ) {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t'Your ACF block template contains no valid HTML elements. Appending a empty div to prevent React JS errors.'\n\t\t\t\t\t);\n\t\t\t\t\tstate.html += '
';\n\t\t\t\t\tstate.jsx = acf.parseJSX(\n\t\t\t\t\t\tstate.html,\n\t\t\t\t\t\tgetBlockVersion( this.props.name )\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// If we've got an object (as an array) find the first valid React ref.\n\t\t\t\tif ( Array.isArray( state.jsx ) ) {\n\t\t\t\t\tlet refElement = state.jsx.find( ( element ) =>\n\t\t\t\t\t\tReact.isValidElement( element )\n\t\t\t\t\t);\n\t\t\t\t\tstate.ref = refElement.ref;\n\t\t\t\t} else {\n\t\t\t\t\tstate.ref = state.jsx.ref;\n\t\t\t\t}\n\t\t\t\tstate.$el = $( this.el );\n\t\t\t} else {\n\t\t\t\tstate.$el = $( html );\n\t\t\t}\n\t\t\tthis.setState( state );\n\t\t}\n\n\t\tsetRef( el ) {\n\t\t\tthis.el = el;\n\t\t}\n\n\t\trender() {\n\t\t\t// Render JSX.\n\t\t\tif ( this.state.jsx ) {\n\t\t\t\t// If we're a v2+ block, use the jsx element itself as our ref.\n\t\t\t\tif ( getBlockVersion( this.props.name ) > 1 ) {\n\t\t\t\t\tthis.setRef( this.state.jsx );\n\t\t\t\t\treturn this.state.jsx;\n\t\t\t\t} else {\n\t\t\t\t\treturn { this.state.jsx }
;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Return HTML.\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\tshouldComponentUpdate( { index }, { html } ) {\n\t\t\tif ( index !== this.props.index ) {\n\t\t\t\tthis.componentWillMove();\n\t\t\t}\n\t\t\treturn html !== this.state.html;\n\t\t}\n\n\t\tdisplay( context ) {\n\t\t\t// This method is called after setting new HTML and the Component render.\n\t\t\t// The jQuery render method simply needs to move $el into place.\n\t\t\tif ( this.renderMethod === 'jQuery' ) {\n\t\t\t\tconst $el = this.state.$el;\n\t\t\t\tconst $prevParent = $el.parent();\n\t\t\t\tconst $thisParent = $( this.el );\n\n\t\t\t\t// Move $el into place.\n\t\t\t\t$thisParent.html( $el );\n\n\t\t\t\t// Special case for reusable blocks.\n\t\t\t\t// Multiple instances of the same reusable block share the same block id.\n\t\t\t\t// This causes all instances to share the same state (cool), which unfortunately\n\t\t\t\t// pulls $el back and forth between the last rendered reusable block.\n\t\t\t\t// This simple fix leaves a \"clone\" behind :)\n\t\t\t\tif (\n\t\t\t\t\t$prevParent.length &&\n\t\t\t\t\t$prevParent[ 0 ] !== $thisParent[ 0 ]\n\t\t\t\t) {\n\t\t\t\t\t$prevParent.html( $el.clone() );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Call context specific method.\n\t\t\tswitch ( context ) {\n\t\t\t\tcase 'append':\n\t\t\t\t\tthis.componentDidAppend();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'remount':\n\t\t\t\t\tthis.componentDidRemount();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tcomponentDidMount() {\n\t\t\t// Fetch on first load.\n\t\t\tif ( this.state.html === undefined ) {\n\t\t\t\tthis.fetch();\n\n\t\t\t\t// Or remount existing HTML.\n\t\t\t} else {\n\t\t\t\tthis.display( 'remount' );\n\t\t\t}\n\t\t}\n\n\t\tcomponentDidUpdate( prevProps, prevState ) {\n\t\t\t// HTML has changed.\n\t\t\tthis.display( 'append' );\n\t\t}\n\n\t\tcomponentDidAppend() {\n\t\t\tacf.doAction( 'append', this.state.$el );\n\t\t}\n\n\t\tcomponentWillUnmount() {\n\t\t\tacf.doAction( 'unmount', this.state.$el );\n\n\t\t\t// Unsubscribe this component from state.\n\t\t\tthis.subscribed = false;\n\t\t}\n\n\t\tcomponentDidRemount() {\n\t\t\tthis.subscribed = true;\n\n\t\t\t// Use setTimeout to avoid incorrect timing of events.\n\t\t\t// React will unmount and mount components in DOM order.\n\t\t\t// This means a new component can be mounted before an old one is unmounted.\n\t\t\t// ACF shares $el across new/old components which is un-React-like.\n\t\t\t// This timout ensures that unmounting occurs before remounting.\n\t\t\tsetTimeout( () => {\n\t\t\t\tacf.doAction( 'remount', this.state.$el );\n\t\t\t} );\n\t\t}\n\n\t\tcomponentWillMove() {\n\t\t\tacf.doAction( 'unmount', this.state.$el );\n\t\t\tsetTimeout( () => {\n\t\t\t\tacf.doAction( 'remount', this.state.$el );\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * BlockForm Class.\n\t *\n\t * A react componenet to handle the block form.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t *\n\t * @param\tstring id the block id.\n\t * @return\tvoid\n\t */\n\tclass BlockForm extends DynamicHTML {\n\t\tsetup( { clientId } ) {\n\t\t\tthis.id = `BlockForm-${ clientId }`;\n\t\t}\n\n\t\tfetch() {\n\t\t\t// Extract props.\n\t\t\tconst { attributes, context, clientId } = this.props;\n\n\t\t\tconst hash = createBlockAttributesHash( attributes, context );\n\n\t\t\t// Try preloaded data first.\n\t\t\tconst preloaded = this.maybePreload( hash, clientId, true );\n\n\t\t\tif ( preloaded ) {\n\t\t\t\tthis.setHtml( preloaded );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Request AJAX and update HTML on complete.\n\t\t\tfetchBlock( {\n\t\t\t\tattributes,\n\t\t\t\tcontext,\n\t\t\t\tclientId,\n\t\t\t\tquery: {\n\t\t\t\t\tform: true,\n\t\t\t\t},\n\t\t\t} ).done( ( { data } ) => {\n\t\t\t\tthis.setHtml( data.form.replaceAll( data.clientId, clientId ) );\n\t\t\t} );\n\t\t}\n\n\t\tcomponentDidRemount() {\n\t\t\tsuper.componentDidRemount();\n\n\t\t\tconst { $el } = this.state;\n\n\t\t\t// Make sure our on append events are registered.\n\t\t\tif ( $el.data( 'acf-events-added' ) !== true ) {\n\t\t\t\tthis.componentDidAppend();\n\t\t\t}\n\t\t}\n\n\t\tcomponentDidAppend() {\n\t\t\tsuper.componentDidAppend();\n\n\t\t\t// Extract props.\n\t\t\tconst { attributes, setAttributes, clientId } = this.props;\n\t\t\tconst props = this.props;\n\t\t\tconst { $el } = this.state;\n\n\t\t\t// Callback for updating block data.\n\t\t\tfunction serializeData( silent = false ) {\n\t\t\t\tconst data = acf.serialize( $el, `acf-${ clientId }` );\n\t\t\t\tif ( silent ) {\n\t\t\t\t\tattributes.data = data;\n\t\t\t\t} else {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tdata,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add events.\n\t\t\tlet timeout = false;\n\t\t\t$el.on( 'change keyup', () => {\n\t\t\t\tclearTimeout( timeout );\n\t\t\t\ttimeout = setTimeout( serializeData, 300 );\n\t\t\t} );\n\n\t\t\t// Log initialization for remount check on the persistent element.\n\t\t\t$el.data( 'acf-events-added', true );\n\n\t\t\t// Ensure newly added block is saved with data.\n\t\t\t// Do it silently to avoid triggering a preview render.\n\t\t\tif ( ! attributes.data ) {\n\t\t\t\tserializeData( true );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * BlockPreview Class.\n\t *\n\t * A react componenet to handle the block preview.\n\t *\n\t * @date\t19/2/19\n\t * @since\t5.7.12\n\t *\n\t * @param\tstring id the block id.\n\t * @return\tvoid\n\t */\n\tclass BlockPreview extends DynamicHTML {\n\t\tsetup( { clientId, name } ) {\n\t\t\tconst blockType = getBlockType( name );\n\t\t\tconst contextPostId = acf.isget( this.props, 'context', 'postId' );\n\n\t\t\tthis.id = `BlockPreview-${ clientId }`;\n\n\t\t\t// Apply the contextPostId to the ID if set to stop query loop ID duplication.\n\t\t\tif ( contextPostId ) {\n\t\t\t\tthis.id = `BlockPreview-${ clientId }-${ contextPostId }`;\n\t\t\t}\n\n\t\t\tif ( blockType.supports.jsx ) {\n\t\t\t\tthis.renderMethod = 'jsx';\n\t\t\t}\n\t\t}\n\n\t\tfetch( args = {} ) {\n\t\t\tconst {\n\t\t\t\tattributes = this.props.attributes,\n\t\t\t\tclientId = this.props.clientId,\n\t\t\t\tcontext = this.props.context,\n\t\t\t\tdelay = 0,\n\t\t\t} = args;\n\n\t\t\tconst { name } = this.props;\n\n\t\t\t// Remember attributes used to fetch HTML.\n\t\t\tthis.setState( {\n\t\t\t\tprevAttributes: attributes,\n\t\t\t\tprevContext: context,\n\t\t\t} );\n\n\t\t\tconst hash = createBlockAttributesHash( attributes, context );\n\n\t\t\t// Try preloaded data first.\n\t\t\tlet preloaded = this.maybePreload( hash, clientId, false );\n\n\t\t\tif ( preloaded ) {\n\t\t\t\tif ( getBlockVersion( name ) == 1 ) {\n\t\t\t\t\tpreloaded =\n\t\t\t\t\t\t'' +\n\t\t\t\t\t\tpreloaded +\n\t\t\t\t\t\t'
';\n\t\t\t\t}\n\t\t\t\tthis.setHtml( preloaded );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Request AJAX and update HTML on complete.\n\t\t\tfetchBlock( {\n\t\t\t\tattributes,\n\t\t\t\tcontext,\n\t\t\t\tclientId,\n\t\t\t\tquery: {\n\t\t\t\t\tpreview: true,\n\t\t\t\t},\n\t\t\t\tdelay,\n\t\t\t} ).done( ( { data } ) => {\n\t\t\t\tlet replaceHtml = data.preview.replaceAll(\n\t\t\t\t\tdata.clientId,\n\t\t\t\t\tclientId\n\t\t\t\t);\n\t\t\t\tif ( getBlockVersion( name ) == 1 ) {\n\t\t\t\t\treplaceHtml =\n\t\t\t\t\t\t'' +\n\t\t\t\t\t\treplaceHtml +\n\t\t\t\t\t\t'
';\n\t\t\t\t}\n\t\t\t\tthis.setHtml( replaceHtml );\n\t\t\t} );\n\t\t}\n\n\t\tcomponentDidAppend() {\n\t\t\tsuper.componentDidAppend();\n\t\t\tthis.renderBlockPreviewEvent();\n\t\t}\n\n\t\tshouldComponentUpdate( nextProps, nextState ) {\n\t\t\tconst nextAttributes = nextProps.attributes;\n\t\t\tconst thisAttributes = this.props.attributes;\n\n\t\t\t// Update preview if block data has changed.\n\t\t\tif (\n\t\t\t\t! compareObjects( nextAttributes, thisAttributes ) ||\n\t\t\t\t! compareObjects( nextProps.context, this.props.context )\n\t\t\t) {\n\t\t\t\tlet delay = 0;\n\n\t\t\t\t// Delay fetch when editing className or anchor to simulate consistent logic to custom fields.\n\t\t\t\tif ( nextAttributes.className !== thisAttributes.className ) {\n\t\t\t\t\tdelay = 300;\n\t\t\t\t}\n\t\t\t\tif ( nextAttributes.anchor !== thisAttributes.anchor ) {\n\t\t\t\t\tdelay = 300;\n\t\t\t\t}\n\n\t\t\t\tthis.fetch( {\n\t\t\t\t\tattributes: nextAttributes,\n\t\t\t\t\tcontext: nextProps.context,\n\t\t\t\t\tdelay,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn super.shouldComponentUpdate( nextProps, nextState );\n\t\t}\n\n\t\trenderBlockPreviewEvent() {\n\t\t\t// Extract props.\n\t\t\tconst { attributes, name } = this.props;\n\t\t\tconst { $el, ref } = this.state;\n\t\t\tvar blockElement;\n\n\t\t\t// Generate action friendly type.\n\t\t\tconst type = attributes.name.replace( 'acf/', '' );\n\n\t\t\tif ( ref && ref.current ) {\n\t\t\t\t// We've got a react ref from a JSX container. Use the parent as the blockElement\n\t\t\t\tblockElement = $( ref.current ).parent();\n\t\t\t} else if ( getBlockVersion( name ) == 1 ) {\n\t\t\t\tblockElement = $el;\n\t\t\t} else {\n\t\t\t\tblockElement = $el.parents( '.acf-block-preview' );\n\t\t\t}\n\n\t\t\t// Do action.\n\t\t\tacf.doAction( 'render_block_preview', blockElement, attributes );\n\t\t\tacf.doAction(\n\t\t\t\t`render_block_preview/type=${ type }`,\n\t\t\t\tblockElement,\n\t\t\t\tattributes\n\t\t\t);\n\t\t}\n\n\t\tcomponentDidRemount() {\n\t\t\tsuper.componentDidRemount();\n\n\t\t\t// Update preview if data has changed since last render (changing from \"edit\" to \"preview\").\n\t\t\tif (\n\t\t\t\t! compareObjects(\n\t\t\t\t\tthis.state.prevAttributes,\n\t\t\t\t\tthis.props.attributes\n\t\t\t\t) ||\n\t\t\t\t! compareObjects( this.state.prevContext, this.props.context )\n\t\t\t) {\n\t\t\t\tthis.fetch();\n\t\t\t}\n\n\t\t\t// Fire the block preview event so blocks can reinit JS elements.\n\t\t\t// React reusing DOM elements covers any potential race condition from the above fetch.\n\t\t\tthis.renderBlockPreviewEvent();\n\t\t}\n\t}\n\n\t/**\n\t * Initializes ACF Blocks logic and registration.\n\t *\n\t * @since 5.9.0\n\t */\n\tfunction initialize() {\n\t\t// Add support for WordPress versions before 5.2.\n\t\tif ( ! wp.blockEditor ) {\n\t\t\twp.blockEditor = wp.editor;\n\t\t}\n\n\t\t// Register block types.\n\t\tconst blockTypes = acf.get( 'blockTypes' );\n\t\tif ( blockTypes ) {\n\t\t\tblockTypes.map( registerBlockType );\n\t\t}\n\t}\n\n\t// Run the initialize callback during the \"prepare\" action.\n\t// This ensures that all localized data is available and that blocks are registered before the WP editor has been instantiated.\n\tacf.addAction( 'prepare', initialize );\n\n\t/**\n\t * Returns a valid vertical alignment.\n\t *\n\t * @date\t07/08/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring align A vertical alignment.\n\t * @return\tstring\n\t */\n\tfunction validateVerticalAlignment( align ) {\n\t\tconst ALIGNMENTS = [ 'top', 'center', 'bottom' ];\n\t\tconst DEFAULT = 'top';\n\t\treturn ALIGNMENTS.includes( align ) ? align : DEFAULT;\n\t}\n\n\t/**\n\t * Returns a valid horizontal alignment.\n\t *\n\t * @date\t07/08/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring align A horizontal alignment.\n\t * @return\tstring\n\t */\n\tfunction validateHorizontalAlignment( align ) {\n\t\tconst ALIGNMENTS = [ 'left', 'center', 'right' ];\n\t\tconst DEFAULT = acf.get( 'rtl' ) ? 'right' : 'left';\n\t\treturn ALIGNMENTS.includes( align ) ? align : DEFAULT;\n\t}\n\n\t/**\n\t * Returns a valid matrix alignment.\n\t *\n\t * Written for \"upgrade-path\" compatibility from vertical alignment to matrix alignment.\n\t *\n\t * @date\t07/08/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tstring align A matrix alignment.\n\t * @return\tstring\n\t */\n\tfunction validateMatrixAlignment( align ) {\n\t\tconst DEFAULT = 'center center';\n\t\tif ( align ) {\n\t\t\tconst [ y, x ] = align.split( ' ' );\n\t\t\treturn `${ validateVerticalAlignment(\n\t\t\t\ty\n\t\t\t) } ${ validateHorizontalAlignment( x ) }`;\n\t\t}\n\t\treturn DEFAULT;\n\t}\n\n\t/**\n\t * A higher order component adding alignContent editing functionality.\n\t *\n\t * @date\t08/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tcomponent OriginalBlockEdit The original BlockEdit component.\n\t * @param\tobject blockType The block type settings.\n\t * @return\tcomponent\n\t */\n\tfunction withAlignContentComponent( OriginalBlockEdit, blockType ) {\n\t\t// Determine alignment vars\n\t\tlet type =\n\t\t\tblockType.supports.align_content || blockType.supports.alignContent;\n\t\tlet AlignmentComponent;\n\t\tlet validateAlignment;\n\t\tswitch ( type ) {\n\t\t\tcase 'matrix':\n\t\t\t\tAlignmentComponent =\n\t\t\t\t\tBlockAlignmentMatrixControl || BlockAlignmentMatrixToolbar;\n\t\t\t\tvalidateAlignment = validateMatrixAlignment;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tAlignmentComponent = BlockVerticalAlignmentToolbar;\n\t\t\t\tvalidateAlignment = validateVerticalAlignment;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Ensure alignment component exists.\n\t\tif ( AlignmentComponent === undefined ) {\n\t\t\tconsole.warn(\n\t\t\t\t`The \"${ type }\" alignment component was not found.`\n\t\t\t);\n\t\t\treturn OriginalBlockEdit;\n\t\t}\n\n\t\t// Ensure correct block attribute data is sent in intial preview AJAX request.\n\t\tblockType.alignContent = validateAlignment( blockType.alignContent );\n\n\t\t// Return wrapped component.\n\t\treturn class WrappedBlockEdit extends Component {\n\t\t\trender() {\n\t\t\t\tconst { attributes, setAttributes } = this.props;\n\t\t\t\tconst { alignContent } = attributes;\n\t\t\t\tfunction onChangeAlignContent( alignContent ) {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\talignContent: validateAlignment( alignContent ),\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * A higher order component adding alignText editing functionality.\n\t *\n\t * @date\t08/07/2020\n\t * @since\t5.9.0\n\t *\n\t * @param\tcomponent OriginalBlockEdit The original BlockEdit component.\n\t * @param\tobject blockType The block type settings.\n\t * @return\tcomponent\n\t */\n\tfunction withAlignTextComponent( OriginalBlockEdit, blockType ) {\n\t\tconst validateAlignment = validateHorizontalAlignment;\n\n\t\t// Ensure correct block attribute data is sent in intial preview AJAX request.\n\t\tblockType.alignText = validateAlignment( blockType.alignText );\n\n\t\t// Return wrapped component.\n\t\treturn class WrappedBlockEdit extends Component {\n\t\t\trender() {\n\t\t\t\tconst { attributes, setAttributes } = this.props;\n\t\t\t\tconst { alignText } = attributes;\n\n\t\t\t\tfunction onChangeAlignText( alignText ) {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\talignText: validateAlignment( alignText ),\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * A higher order component adding full height support.\n\t *\n\t * @date\t19/07/2021\n\t * @since\t5.10.0\n\t *\n\t * @param\tcomponent OriginalBlockEdit The original BlockEdit component.\n\t * @param\tobject blockType The block type settings.\n\t * @return\tcomponent\n\t */\n\tfunction withFullHeightComponent( OriginalBlockEdit, blockType ) {\n\t\tif ( ! BlockFullHeightAlignmentControl ) return OriginalBlockEdit;\n\n\t\t// Return wrapped component.\n\t\treturn class WrappedBlockEdit extends Component {\n\t\t\trender() {\n\t\t\t\tconst { attributes, setAttributes } = this.props;\n\t\t\t\tconst { fullHeight } = attributes;\n\n\t\t\t\tfunction onToggleFullHeight( fullHeight ) {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tfullHeight,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Appends a backwards compatibility attribute for conversion.\n\t *\n\t * @since\t6.0\n\t *\n\t * @param\tobject attributes The block type attributes.\n\t * @return\tobject\n\t */\n\tfunction addBackCompatAttribute( attributes, new_attribute, type ) {\n\t\tattributes[ new_attribute ] = {\n\t\t\ttype: type,\n\t\t};\n\t\treturn attributes;\n\t}\n\n\t/**\n\t * Create a block hash from attributes\n\t *\n\t * @since 6.0\n\t *\n\t * @param object attributes The block type attributes.\n\t * @param object context The current block context object.\n\t * @return string\n\t */\n\tfunction createBlockAttributesHash( attributes, context ) {\n\t\tattributes[ '_acf_context' ] = context;\n\t\treturn md5(\n\t\t\tJSON.stringify(\n\t\t\t\tObject.keys( attributes )\n\t\t\t\t\t.sort()\n\t\t\t\t\t.reduce( ( acc, currValue ) => {\n\t\t\t\t\t\tacc[ currValue ] = attributes[ currValue ];\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} )\n\t\t\t)\n\t\t);\n\t}\n} )( jQuery );\n","( function ( $, undefined ) {\n\tacf.jsxNameReplacements = {\n\t\t'accent-height': 'accentHeight',\n\t\taccentheight: 'accentHeight',\n\t\t'accept-charset': 'acceptCharset',\n\t\tacceptcharset: 'acceptCharset',\n\t\taccesskey: 'accessKey',\n\t\t'alignment-baseline': 'alignmentBaseline',\n\t\talignmentbaseline: 'alignmentBaseline',\n\t\tallowedblocks: 'allowedBlocks',\n\t\tallowfullscreen: 'allowFullScreen',\n\t\tallowreorder: 'allowReorder',\n\t\t'arabic-form': 'arabicForm',\n\t\tarabicform: 'arabicForm',\n\t\tattributename: 'attributeName',\n\t\tattributetype: 'attributeType',\n\t\tautocapitalize: 'autoCapitalize',\n\t\tautocomplete: 'autoComplete',\n\t\tautocorrect: 'autoCorrect',\n\t\tautofocus: 'autoFocus',\n\t\tautoplay: 'autoPlay',\n\t\tautoreverse: 'autoReverse',\n\t\tautosave: 'autoSave',\n\t\tbasefrequency: 'baseFrequency',\n\t\t'baseline-shift': 'baselineShift',\n\t\tbaselineshift: 'baselineShift',\n\t\tbaseprofile: 'baseProfile',\n\t\tcalcmode: 'calcMode',\n\t\t'cap-height': 'capHeight',\n\t\tcapheight: 'capHeight',\n\t\tcellpadding: 'cellPadding',\n\t\tcellspacing: 'cellSpacing',\n\t\tcharset: 'charSet',\n\t\tclass: 'className',\n\t\tclassid: 'classID',\n\t\tclassname: 'className',\n\t\t'clip-path': 'clipPath',\n\t\t'clip-rule': 'clipRule',\n\t\tclippath: 'clipPath',\n\t\tclippathunits: 'clipPathUnits',\n\t\tcliprule: 'clipRule',\n\t\t'color-interpolation': 'colorInterpolation',\n\t\t'color-interpolation-filters': 'colorInterpolationFilters',\n\t\t'color-profile': 'colorProfile',\n\t\t'color-rendering': 'colorRendering',\n\t\tcolorinterpolation: 'colorInterpolation',\n\t\tcolorinterpolationfilters: 'colorInterpolationFilters',\n\t\tcolorprofile: 'colorProfile',\n\t\tcolorrendering: 'colorRendering',\n\t\tcolspan: 'colSpan',\n\t\tcontenteditable: 'contentEditable',\n\t\tcontentscripttype: 'contentScriptType',\n\t\tcontentstyletype: 'contentStyleType',\n\t\tcontextmenu: 'contextMenu',\n\t\tcontrolslist: 'controlsList',\n\t\tcrossorigin: 'crossOrigin',\n\t\tdangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n\t\tdatetime: 'dateTime',\n\t\tdefaultchecked: 'defaultChecked',\n\t\tdefaultvalue: 'defaultValue',\n\t\tdiffuseconstant: 'diffuseConstant',\n\t\tdisablepictureinpicture: 'disablePictureInPicture',\n\t\tdisableremoteplayback: 'disableRemotePlayback',\n\t\t'dominant-baseline': 'dominantBaseline',\n\t\tdominantbaseline: 'dominantBaseline',\n\t\tedgemode: 'edgeMode',\n\t\t'enable-background': 'enableBackground',\n\t\tenablebackground: 'enableBackground',\n\t\tenctype: 'encType',\n\t\tenterkeyhint: 'enterKeyHint',\n\t\texternalresourcesrequired: 'externalResourcesRequired',\n\t\t'fill-opacity': 'fillOpacity',\n\t\t'fill-rule': 'fillRule',\n\t\tfillopacity: 'fillOpacity',\n\t\tfillrule: 'fillRule',\n\t\tfilterres: 'filterRes',\n\t\tfilterunits: 'filterUnits',\n\t\t'flood-color': 'floodColor',\n\t\t'flood-opacity': 'floodOpacity',\n\t\tfloodcolor: 'floodColor',\n\t\tfloodopacity: 'floodOpacity',\n\t\t'font-family': 'fontFamily',\n\t\t'font-size': 'fontSize',\n\t\t'font-size-adjust': 'fontSizeAdjust',\n\t\t'font-stretch': 'fontStretch',\n\t\t'font-style': 'fontStyle',\n\t\t'font-variant': 'fontVariant',\n\t\t'font-weight': 'fontWeight',\n\t\tfontfamily: 'fontFamily',\n\t\tfontsize: 'fontSize',\n\t\tfontsizeadjust: 'fontSizeAdjust',\n\t\tfontstretch: 'fontStretch',\n\t\tfontstyle: 'fontStyle',\n\t\tfontvariant: 'fontVariant',\n\t\tfontweight: 'fontWeight',\n\t\tfor: 'htmlFor',\n\t\tforeignobject: 'foreignObject',\n\t\tformaction: 'formAction',\n\t\tformenctype: 'formEncType',\n\t\tformmethod: 'formMethod',\n\t\tformnovalidate: 'formNoValidate',\n\t\tformtarget: 'formTarget',\n\t\tframeborder: 'frameBorder',\n\t\t'glyph-name': 'glyphName',\n\t\t'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n\t\t'glyph-orientation-vertical': 'glyphOrientationVertical',\n\t\tglyphname: 'glyphName',\n\t\tglyphorientationhorizontal: 'glyphOrientationHorizontal',\n\t\tglyphorientationvertical: 'glyphOrientationVertical',\n\t\tglyphref: 'glyphRef',\n\t\tgradienttransform: 'gradientTransform',\n\t\tgradientunits: 'gradientUnits',\n\t\t'horiz-adv-x': 'horizAdvX',\n\t\t'horiz-origin-x': 'horizOriginX',\n\t\thorizadvx: 'horizAdvX',\n\t\thorizoriginx: 'horizOriginX',\n\t\threflang: 'hrefLang',\n\t\thtmlfor: 'htmlFor',\n\t\t'http-equiv': 'httpEquiv',\n\t\thttpequiv: 'httpEquiv',\n\t\t'image-rendering': 'imageRendering',\n\t\timagerendering: 'imageRendering',\n\t\tinnerhtml: 'innerHTML',\n\t\tinputmode: 'inputMode',\n\t\titemid: 'itemID',\n\t\titemprop: 'itemProp',\n\t\titemref: 'itemRef',\n\t\titemscope: 'itemScope',\n\t\titemtype: 'itemType',\n\t\tkernelmatrix: 'kernelMatrix',\n\t\tkernelunitlength: 'kernelUnitLength',\n\t\tkeyparams: 'keyParams',\n\t\tkeypoints: 'keyPoints',\n\t\tkeysplines: 'keySplines',\n\t\tkeytimes: 'keyTimes',\n\t\tkeytype: 'keyType',\n\t\tlengthadjust: 'lengthAdjust',\n\t\t'letter-spacing': 'letterSpacing',\n\t\tletterspacing: 'letterSpacing',\n\t\t'lighting-color': 'lightingColor',\n\t\tlightingcolor: 'lightingColor',\n\t\tlimitingconeangle: 'limitingConeAngle',\n\t\tmarginheight: 'marginHeight',\n\t\tmarginwidth: 'marginWidth',\n\t\t'marker-end': 'markerEnd',\n\t\t'marker-mid': 'markerMid',\n\t\t'marker-start': 'markerStart',\n\t\tmarkerend: 'markerEnd',\n\t\tmarkerheight: 'markerHeight',\n\t\tmarkermid: 'markerMid',\n\t\tmarkerstart: 'markerStart',\n\t\tmarkerunits: 'markerUnits',\n\t\tmarkerwidth: 'markerWidth',\n\t\tmaskcontentunits: 'maskContentUnits',\n\t\tmaskunits: 'maskUnits',\n\t\tmaxlength: 'maxLength',\n\t\tmediagroup: 'mediaGroup',\n\t\tminlength: 'minLength',\n\t\tnomodule: 'noModule',\n\t\tnovalidate: 'noValidate',\n\t\tnumoctaves: 'numOctaves',\n\t\t'overline-position': 'overlinePosition',\n\t\t'overline-thickness': 'overlineThickness',\n\t\toverlineposition: 'overlinePosition',\n\t\toverlinethickness: 'overlineThickness',\n\t\t'paint-order': 'paintOrder',\n\t\tpaintorder: 'paintOrder',\n\t\t'panose-1': 'panose1',\n\t\tpathlength: 'pathLength',\n\t\tpatterncontentunits: 'patternContentUnits',\n\t\tpatterntransform: 'patternTransform',\n\t\tpatternunits: 'patternUnits',\n\t\tplaysinline: 'playsInline',\n\t\t'pointer-events': 'pointerEvents',\n\t\tpointerevents: 'pointerEvents',\n\t\tpointsatx: 'pointsAtX',\n\t\tpointsaty: 'pointsAtY',\n\t\tpointsatz: 'pointsAtZ',\n\t\tpreservealpha: 'preserveAlpha',\n\t\tpreserveaspectratio: 'preserveAspectRatio',\n\t\tprimitiveunits: 'primitiveUnits',\n\t\tradiogroup: 'radioGroup',\n\t\treadonly: 'readOnly',\n\t\treferrerpolicy: 'referrerPolicy',\n\t\trefx: 'refX',\n\t\trefy: 'refY',\n\t\t'rendering-intent': 'renderingIntent',\n\t\trenderingintent: 'renderingIntent',\n\t\trepeatcount: 'repeatCount',\n\t\trepeatdur: 'repeatDur',\n\t\trequiredextensions: 'requiredExtensions',\n\t\trequiredfeatures: 'requiredFeatures',\n\t\trowspan: 'rowSpan',\n\t\t'shape-rendering': 'shapeRendering',\n\t\tshaperendering: 'shapeRendering',\n\t\tspecularconstant: 'specularConstant',\n\t\tspecularexponent: 'specularExponent',\n\t\tspellcheck: 'spellCheck',\n\t\tspreadmethod: 'spreadMethod',\n\t\tsrcdoc: 'srcDoc',\n\t\tsrclang: 'srcLang',\n\t\tsrcset: 'srcSet',\n\t\tstartoffset: 'startOffset',\n\t\tstddeviation: 'stdDeviation',\n\t\tstitchtiles: 'stitchTiles',\n\t\t'stop-color': 'stopColor',\n\t\t'stop-opacity': 'stopOpacity',\n\t\tstopcolor: 'stopColor',\n\t\tstopopacity: 'stopOpacity',\n\t\t'strikethrough-position': 'strikethroughPosition',\n\t\t'strikethrough-thickness': 'strikethroughThickness',\n\t\tstrikethroughposition: 'strikethroughPosition',\n\t\tstrikethroughthickness: 'strikethroughThickness',\n\t\t'stroke-dasharray': 'strokeDasharray',\n\t\t'stroke-dashoffset': 'strokeDashoffset',\n\t\t'stroke-linecap': 'strokeLinecap',\n\t\t'stroke-linejoin': 'strokeLinejoin',\n\t\t'stroke-miterlimit': 'strokeMiterlimit',\n\t\t'stroke-opacity': 'strokeOpacity',\n\t\t'stroke-width': 'strokeWidth',\n\t\tstrokedasharray: 'strokeDasharray',\n\t\tstrokedashoffset: 'strokeDashoffset',\n\t\tstrokelinecap: 'strokeLinecap',\n\t\tstrokelinejoin: 'strokeLinejoin',\n\t\tstrokemiterlimit: 'strokeMiterlimit',\n\t\tstrokeopacity: 'strokeOpacity',\n\t\tstrokewidth: 'strokeWidth',\n\t\tsuppresscontenteditablewarning: 'suppressContentEditableWarning',\n\t\tsuppresshydrationwarning: 'suppressHydrationWarning',\n\t\tsurfacescale: 'surfaceScale',\n\t\tsystemlanguage: 'systemLanguage',\n\t\ttabindex: 'tabIndex',\n\t\ttablevalues: 'tableValues',\n\t\ttargetx: 'targetX',\n\t\ttargety: 'targetY',\n\t\ttemplatelock: 'templateLock',\n\t\t'text-anchor': 'textAnchor',\n\t\t'text-decoration': 'textDecoration',\n\t\t'text-rendering': 'textRendering',\n\t\ttextanchor: 'textAnchor',\n\t\ttextdecoration: 'textDecoration',\n\t\ttextlength: 'textLength',\n\t\ttextrendering: 'textRendering',\n\t\t'underline-position': 'underlinePosition',\n\t\t'underline-thickness': 'underlineThickness',\n\t\tunderlineposition: 'underlinePosition',\n\t\tunderlinethickness: 'underlineThickness',\n\t\t'unicode-bidi': 'unicodeBidi',\n\t\t'unicode-range': 'unicodeRange',\n\t\tunicodebidi: 'unicodeBidi',\n\t\tunicoderange: 'unicodeRange',\n\t\t'units-per-em': 'unitsPerEm',\n\t\tunitsperem: 'unitsPerEm',\n\t\tusemap: 'useMap',\n\t\t'v-alphabetic': 'vAlphabetic',\n\t\t'v-hanging': 'vHanging',\n\t\t'v-ideographic': 'vIdeographic',\n\t\t'v-mathematical': 'vMathematical',\n\t\tvalphabetic: 'vAlphabetic',\n\t\t'vector-effect': 'vectorEffect',\n\t\tvectoreffect: 'vectorEffect',\n\t\t'vert-adv-y': 'vertAdvY',\n\t\t'vert-origin-x': 'vertOriginX',\n\t\t'vert-origin-y': 'vertOriginY',\n\t\tvertadvy: 'vertAdvY',\n\t\tvertoriginx: 'vertOriginX',\n\t\tvertoriginy: 'vertOriginY',\n\t\tvhanging: 'vHanging',\n\t\tvideographic: 'vIdeographic',\n\t\tviewbox: 'viewBox',\n\t\tviewtarget: 'viewTarget',\n\t\tvmathematical: 'vMathematical',\n\t\t'word-spacing': 'wordSpacing',\n\t\twordspacing: 'wordSpacing',\n\t\t'writing-mode': 'writingMode',\n\t\twritingmode: 'writingMode',\n\t\t'x-height': 'xHeight',\n\t\txchannelselector: 'xChannelSelector',\n\t\txheight: 'xHeight',\n\t\t'xlink:actuate': 'xlinkActuate',\n\t\t'xlink:arcrole': 'xlinkArcrole',\n\t\t'xlink:href': 'xlinkHref',\n\t\t'xlink:role': 'xlinkRole',\n\t\t'xlink:show': 'xlinkShow',\n\t\t'xlink:title': 'xlinkTitle',\n\t\t'xlink:type': 'xlinkType',\n\t\txlinkactuate: 'xlinkActuate',\n\t\txlinkarcrole: 'xlinkArcrole',\n\t\txlinkhref: 'xlinkHref',\n\t\txlinkrole: 'xlinkRole',\n\t\txlinkshow: 'xlinkShow',\n\t\txlinktitle: 'xlinkTitle',\n\t\txlinktype: 'xlinkType',\n\t\t'xml:base': 'xmlBase',\n\t\t'xml:lang': 'xmlLang',\n\t\t'xml:space': 'xmlSpace',\n\t\txmlbase: 'xmlBase',\n\t\txmllang: 'xmlLang',\n\t\t'xmlns:xlink': 'xmlnsXlink',\n\t\txmlnsxlink: 'xmlnsXlink',\n\t\txmlspace: 'xmlSpace',\n\t\tychannelselector: 'yChannelSelector',\n\t\tzoomandpan: 'zoomAndPan',\n\t};\n} )( jQuery );\n","var charenc = {\n // UTF-8 encoding\n utf8: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));\n }\n },\n\n // Binary encoding\n bin: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n for (var bytes = [], i = 0; i < str.length; i++)\n bytes.push(str.charCodeAt(i) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n for (var str = [], i = 0; i < bytes.length; i++)\n str.push(String.fromCharCode(bytes[i]));\n return str.join('');\n }\n }\n};\n\nmodule.exports = charenc;\n","(function() {\n var base64map\n = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',\n\n crypt = {\n // Bit-wise rotation left\n rotl: function(n, b) {\n return (n << b) | (n >>> (32 - b));\n },\n\n // Bit-wise rotation right\n rotr: function(n, b) {\n return (n << (32 - b)) | (n >>> b);\n },\n\n // Swap big-endian to little-endian and vice versa\n endian: function(n) {\n // If number given, swap endian\n if (n.constructor == Number) {\n return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;\n }\n\n // Else, assume array and swap all items\n for (var i = 0; i < n.length; i++)\n n[i] = crypt.endian(n[i]);\n return n;\n },\n\n // Generate an array of any length of random bytes\n randomBytes: function(n) {\n for (var bytes = []; n > 0; n--)\n bytes.push(Math.floor(Math.random() * 256));\n return bytes;\n },\n\n // Convert a byte array to big-endian 32-bit words\n bytesToWords: function(bytes) {\n for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)\n words[b >>> 5] |= bytes[i] << (24 - b % 32);\n return words;\n },\n\n // Convert big-endian 32-bit words to a byte array\n wordsToBytes: function(words) {\n for (var bytes = [], b = 0; b < words.length * 32; b += 8)\n bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a hex string\n bytesToHex: function(bytes) {\n for (var hex = [], i = 0; i < bytes.length; i++) {\n hex.push((bytes[i] >>> 4).toString(16));\n hex.push((bytes[i] & 0xF).toString(16));\n }\n return hex.join('');\n },\n\n // Convert a hex string to a byte array\n hexToBytes: function(hex) {\n for (var bytes = [], c = 0; c < hex.length; c += 2)\n bytes.push(parseInt(hex.substr(c, 2), 16));\n return bytes;\n },\n\n // Convert a byte array to a base-64 string\n bytesToBase64: function(bytes) {\n for (var base64 = [], i = 0; i < bytes.length; i += 3) {\n var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];\n for (var j = 0; j < 4; j++)\n if (i * 8 + j * 6 <= bytes.length * 8)\n base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));\n else\n base64.push('=');\n }\n return base64.join('');\n },\n\n // Convert a base-64 string to a byte array\n base64ToBytes: function(base64) {\n // Remove non-base-64 characters\n base64 = base64.replace(/[^A-Z0-9+\\/]/ig, '');\n\n for (var bytes = [], i = 0, imod4 = 0; i < base64.length;\n imod4 = ++i % 4) {\n if (imod4 == 0) continue;\n bytes.push(((base64map.indexOf(base64.charAt(i - 1))\n & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))\n | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));\n }\n return bytes;\n }\n };\n\n module.exports = crypt;\n})();\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n","(function(){\r\n var crypt = require('crypt'),\r\n utf8 = require('charenc').utf8,\r\n isBuffer = require('is-buffer'),\r\n bin = require('charenc').bin,\r\n\r\n // The core\r\n md5 = function (message, options) {\r\n // Convert to byte array\r\n if (message.constructor == String)\r\n if (options && options.encoding === 'binary')\r\n message = bin.stringToBytes(message);\r\n else\r\n message = utf8.stringToBytes(message);\r\n else if (isBuffer(message))\r\n message = Array.prototype.slice.call(message, 0);\r\n else if (!Array.isArray(message) && message.constructor !== Uint8Array)\r\n message = message.toString();\r\n // else, assume byte array already\r\n\r\n var m = crypt.bytesToWords(message),\r\n l = message.length * 8,\r\n a = 1732584193,\r\n b = -271733879,\r\n c = -1732584194,\r\n d = 271733878;\r\n\r\n // Swap endian\r\n for (var i = 0; i < m.length; i++) {\r\n m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |\r\n ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;\r\n }\r\n\r\n // Padding\r\n m[l >>> 5] |= 0x80 << (l % 32);\r\n m[(((l + 64) >>> 9) << 4) + 14] = l;\r\n\r\n // Method shortcuts\r\n var FF = md5._ff,\r\n GG = md5._gg,\r\n HH = md5._hh,\r\n II = md5._ii;\r\n\r\n for (var i = 0; i < m.length; i += 16) {\r\n\r\n var aa = a,\r\n bb = b,\r\n cc = c,\r\n dd = d;\r\n\r\n a = FF(a, b, c, d, m[i+ 0], 7, -680876936);\r\n d = FF(d, a, b, c, m[i+ 1], 12, -389564586);\r\n c = FF(c, d, a, b, m[i+ 2], 17, 606105819);\r\n b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);\r\n a = FF(a, b, c, d, m[i+ 4], 7, -176418897);\r\n d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);\r\n c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);\r\n b = FF(b, c, d, a, m[i+ 7], 22, -45705983);\r\n a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);\r\n d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);\r\n c = FF(c, d, a, b, m[i+10], 17, -42063);\r\n b = FF(b, c, d, a, m[i+11], 22, -1990404162);\r\n a = FF(a, b, c, d, m[i+12], 7, 1804603682);\r\n d = FF(d, a, b, c, m[i+13], 12, -40341101);\r\n c = FF(c, d, a, b, m[i+14], 17, -1502002290);\r\n b = FF(b, c, d, a, m[i+15], 22, 1236535329);\r\n\r\n a = GG(a, b, c, d, m[i+ 1], 5, -165796510);\r\n d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);\r\n c = GG(c, d, a, b, m[i+11], 14, 643717713);\r\n b = GG(b, c, d, a, m[i+ 0], 20, -373897302);\r\n a = GG(a, b, c, d, m[i+ 5], 5, -701558691);\r\n d = GG(d, a, b, c, m[i+10], 9, 38016083);\r\n c = GG(c, d, a, b, m[i+15], 14, -660478335);\r\n b = GG(b, c, d, a, m[i+ 4], 20, -405537848);\r\n a = GG(a, b, c, d, m[i+ 9], 5, 568446438);\r\n d = GG(d, a, b, c, m[i+14], 9, -1019803690);\r\n c = GG(c, d, a, b, m[i+ 3], 14, -187363961);\r\n b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);\r\n a = GG(a, b, c, d, m[i+13], 5, -1444681467);\r\n d = GG(d, a, b, c, m[i+ 2], 9, -51403784);\r\n c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);\r\n b = GG(b, c, d, a, m[i+12], 20, -1926607734);\r\n\r\n a = HH(a, b, c, d, m[i+ 5], 4, -378558);\r\n d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);\r\n c = HH(c, d, a, b, m[i+11], 16, 1839030562);\r\n b = HH(b, c, d, a, m[i+14], 23, -35309556);\r\n a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);\r\n d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);\r\n c = HH(c, d, a, b, m[i+ 7], 16, -155497632);\r\n b = HH(b, c, d, a, m[i+10], 23, -1094730640);\r\n a = HH(a, b, c, d, m[i+13], 4, 681279174);\r\n d = HH(d, a, b, c, m[i+ 0], 11, -358537222);\r\n c = HH(c, d, a, b, m[i+ 3], 16, -722521979);\r\n b = HH(b, c, d, a, m[i+ 6], 23, 76029189);\r\n a = HH(a, b, c, d, m[i+ 9], 4, -640364487);\r\n d = HH(d, a, b, c, m[i+12], 11, -421815835);\r\n c = HH(c, d, a, b, m[i+15], 16, 530742520);\r\n b = HH(b, c, d, a, m[i+ 2], 23, -995338651);\r\n\r\n a = II(a, b, c, d, m[i+ 0], 6, -198630844);\r\n d = II(d, a, b, c, m[i+ 7], 10, 1126891415);\r\n c = II(c, d, a, b, m[i+14], 15, -1416354905);\r\n b = II(b, c, d, a, m[i+ 5], 21, -57434055);\r\n a = II(a, b, c, d, m[i+12], 6, 1700485571);\r\n d = II(d, a, b, c, m[i+ 3], 10, -1894986606);\r\n c = II(c, d, a, b, m[i+10], 15, -1051523);\r\n b = II(b, c, d, a, m[i+ 1], 21, -2054922799);\r\n a = II(a, b, c, d, m[i+ 8], 6, 1873313359);\r\n d = II(d, a, b, c, m[i+15], 10, -30611744);\r\n c = II(c, d, a, b, m[i+ 6], 15, -1560198380);\r\n b = II(b, c, d, a, m[i+13], 21, 1309151649);\r\n a = II(a, b, c, d, m[i+ 4], 6, -145523070);\r\n d = II(d, a, b, c, m[i+11], 10, -1120210379);\r\n c = II(c, d, a, b, m[i+ 2], 15, 718787259);\r\n b = II(b, c, d, a, m[i+ 9], 21, -343485551);\r\n\r\n a = (a + aa) >>> 0;\r\n b = (b + bb) >>> 0;\r\n c = (c + cc) >>> 0;\r\n d = (d + dd) >>> 0;\r\n }\r\n\r\n return crypt.endian([a, b, c, d]);\r\n };\r\n\r\n // Auxiliary functions\r\n md5._ff = function (a, b, c, d, x, s, t) {\r\n var n = a + (b & c | ~b & d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._gg = function (a, b, c, d, x, s, t) {\r\n var n = a + (b & d | c & ~d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._hh = function (a, b, c, d, x, s, t) {\r\n var n = a + (b ^ c ^ d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._ii = function (a, b, c, d, x, s, t) {\r\n var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n\r\n // Package private blocksize\r\n md5._blocksize = 16;\r\n md5._digestsize = 16;\r\n\r\n module.exports = function (message, options) {\r\n if (message === undefined || message === null)\r\n throw new Error('Illegal argument ' + message);\r\n\r\n var digestbytes = crypt.wordsToBytes(md5(message, options));\r\n return options && options.asBytes ? digestbytes :\r\n options && options.asString ? bin.bytesToString(digestbytes) :\r\n crypt.bytesToHex(digestbytes);\r\n };\r\n\r\n})();\r\n","/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var ReactVersion = '18.2.0';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nvar ReactCurrentDispatcher = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nvar ReactCurrentBatchConfig = {\n transition: null\n};\n\nvar ReactCurrentActQueue = {\n current: null,\n // Used to reproduce behavior of `batchedUpdates` in legacy mode.\n isBatchingLegacy: false,\n didScheduleLegacyUpdate: false\n};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nvar ReactDebugCurrentFrame = {};\nvar currentExtraStackFrame = null;\nfunction setExtraStackFrame(stack) {\n {\n currentExtraStackFrame = stack;\n }\n}\n\n{\n ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {\n {\n currentExtraStackFrame = stack;\n }\n }; // Stack implementation injected by the current renderer.\n\n\n ReactDebugCurrentFrame.getCurrentStack = null;\n\n ReactDebugCurrentFrame.getStackAddendum = function () {\n var stack = ''; // Add an extra top frame while an element is being validated\n\n if (currentExtraStackFrame) {\n stack += currentExtraStackFrame;\n } // Delegate to the injected renderer-specific implementation\n\n\n var impl = ReactDebugCurrentFrame.getCurrentStack;\n\n if (impl) {\n stack += impl() || '';\n }\n\n return stack;\n };\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar ReactSharedInternals = {\n ReactCurrentDispatcher: ReactCurrentDispatcher,\n ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n ReactCurrentOwner: ReactCurrentOwner\n};\n\n{\n ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;\n ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n}\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + \".\" + callerName;\n\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n\n error(\"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n}\n/**\n * This is the abstract API for an update queue.\n */\n\n\nvar ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nvar assign = Object.assign;\n\nvar emptyObject = {};\n\n{\n Object.freeze(emptyObject);\n}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {\n throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n{\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n\n return undefined;\n }\n });\n };\n\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n var refObject = {\n current: null\n };\n\n {\n Object.seal(refObject);\n }\n\n return refObject;\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n if (element === null || element === undefined) {\n throw new Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n }\n\n var propName; // Original props are copied\n\n var props = assign({}, element.props); // Reserved names are extracted\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = key.replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\nvar didWarnAboutMaps = false;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof element === 'object' && element !== null && element.key != null) {\n // Explicit key\n {\n checkKeyStringCoercion(element.key);\n }\n\n return escape('' + element.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n var _child = children;\n var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;\n\n if (isArray(mappedChild)) {\n var escapedChildKey = '';\n\n if (childKey != null) {\n escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n }\n\n mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n {\n // The `if` statement here prevents auto-disabling of the safe\n // coercion ESLint rule, so we must manually disable it below.\n // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {\n checkKeyStringCoercion(mappedChild.key);\n }\n }\n\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n // eslint-disable-next-line react-internal/safe-string-coercion\n escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);\n }\n\n array.push(mappedChild);\n }\n\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getElementKey(child, i);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var iterableChildren = children;\n\n {\n // Warn about using Maps as children\n if (iteratorFn === iterableChildren.entries) {\n if (!didWarnAboutMaps) {\n warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n\n var iterator = iteratorFn.call(iterableChildren);\n var step;\n var ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getElementKey(child, ii++);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else if (type === 'object') {\n // eslint-disable-next-line react-internal/safe-string-coercion\n var childrenString = String(children);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n var result = [];\n var count = 0;\n mapIntoArray(children, result, '', '', function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n var n = 0;\n mapChildren(children, function () {\n n++; // Don't return anything\n });\n return n;\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n mapChildren(children, function () {\n forEachFunc.apply(this, arguments); // Don't return anything.\n }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n throw new Error('React.Children.only expected to receive a single React element child.');\n }\n\n return children;\n}\n\nfunction createContext(defaultValue) {\n // TODO: Second argument used to be an optional `calculateChangedBits`\n // function. Warn to reserve for future use?\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null,\n // Add these to use same hidden class in VM as ServerContext\n _defaultValue: null,\n _globalName: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n var hasWarnedAboutUsingNestedContextConsumers = false;\n var hasWarnedAboutUsingConsumerProvider = false;\n var hasWarnedAboutDisplayNameOnConsumer = false;\n\n {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context\n }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n if (!hasWarnedAboutUsingConsumerProvider) {\n hasWarnedAboutUsingConsumerProvider = true;\n\n error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n _threadCount: {\n get: function () {\n return context._threadCount;\n },\n set: function (_threadCount) {\n context._threadCount = _threadCount;\n }\n },\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingNestedContextConsumers) {\n hasWarnedAboutUsingNestedContextConsumers = true;\n\n error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?');\n }\n\n return context.Consumer;\n }\n },\n displayName: {\n get: function () {\n return context.displayName;\n },\n set: function (displayName) {\n if (!hasWarnedAboutDisplayNameOnConsumer) {\n warn('Setting `displayName` on Context.Consumer has no effect. ' + \"You should set it directly on the context with Context.displayName = '%s'.\", displayName);\n\n hasWarnedAboutDisplayNameOnConsumer = true;\n }\n }\n }\n }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n context.Consumer = Consumer;\n }\n\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n\n return context;\n}\n\nvar Uninitialized = -1;\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\n\nfunction lazyInitializer(payload) {\n if (payload._status === Uninitialized) {\n var ctor = payload._result;\n var thenable = ctor(); // Transition to the next state.\n // This might throw either because it's missing or throws. If so, we treat it\n // as still uninitialized and try again next time. Which is the same as what\n // happens if the ctor or any wrappers processing the ctor throws. This might\n // end up fixing it if the resolution was a concurrency bug.\n\n thenable.then(function (moduleObject) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var resolved = payload;\n resolved._status = Resolved;\n resolved._result = moduleObject;\n }\n }, function (error) {\n if (payload._status === Pending || payload._status === Uninitialized) {\n // Transition to the next state.\n var rejected = payload;\n rejected._status = Rejected;\n rejected._result = error;\n }\n });\n\n if (payload._status === Uninitialized) {\n // In case, we're still uninitialized, then we're waiting for the thenable\n // to resolve. Set it as pending in the meantime.\n var pending = payload;\n pending._status = Pending;\n pending._result = thenable;\n }\n }\n\n if (payload._status === Resolved) {\n var moduleObject = payload._result;\n\n {\n if (moduleObject === undefined) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\\n\\n\" + 'Did you accidentally put curly braces around the import?', moduleObject);\n }\n }\n\n {\n if (!('default' in moduleObject)) {\n error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\", moduleObject);\n }\n }\n\n return moduleObject.default;\n } else {\n throw payload._result;\n }\n}\n\nfunction lazy(ctor) {\n var payload = {\n // We use these fields to store the result.\n _status: Uninitialized,\n _result: ctor\n };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: payload,\n _init: lazyInitializer\n };\n\n {\n // In production, this would just set it on the object.\n var defaultProps;\n var propTypes; // $FlowFixMe\n\n Object.defineProperties(lazyType, {\n defaultProps: {\n configurable: true,\n get: function () {\n return defaultProps;\n },\n set: function (newDefaultProps) {\n error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n defaultProps = newDefaultProps; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'defaultProps', {\n enumerable: true\n });\n }\n },\n propTypes: {\n configurable: true,\n get: function () {\n return propTypes;\n },\n set: function (newPropTypes) {\n error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n propTypes = newPropTypes; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'propTypes', {\n enumerable: true\n });\n }\n }\n });\n }\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n {\n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n } else if (typeof render !== 'function') {\n error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n if (render.length !== 0 && render.length !== 2) {\n error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');\n }\n }\n\n if (render != null) {\n if (render.defaultProps != null || render.propTypes != null) {\n error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');\n }\n }\n }\n\n var elementType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.forwardRef((props, ref) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!render.name && !render.displayName) {\n render.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n\n var elementType = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name; // The inner component shouldn't inherit this display name in most cases,\n // because the component may be used elsewhere.\n // But it's nice for anonymous functions to inherit the name,\n // so that our component-stack generation logic will display their frames.\n // An anonymous function generally suggests a pattern like:\n // React.memo((props) => {...});\n // This kind of inner function is not used elsewhere so the side effect is okay.\n\n if (!type.name && !type.displayName) {\n type.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nfunction resolveDispatcher() {\n var dispatcher = ReactCurrentDispatcher.current;\n\n {\n if (dispatcher === null) {\n error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n }\n } // Will result in a null access error if accessed outside render phase. We\n // intentionally don't throw our own error because this is in a hot path.\n // Also helps ensure this is inlined.\n\n\n return dispatcher;\n}\nfunction useContext(Context) {\n var dispatcher = resolveDispatcher();\n\n {\n // TODO: add a more generic warning for invalid values.\n if (Context._context !== undefined) {\n var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n if (realContext.Consumer === Context) {\n error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');\n } else if (realContext.Provider === Context) {\n error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n }\n }\n }\n\n return dispatcher.useContext(Context);\n}\nfunction useState(initialState) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useInsertionEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useInsertionEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDebugValue(value, formatterFn);\n }\n}\nfunction useTransition() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useTransition();\n}\nfunction useDeferredValue(value) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDeferredValue(value);\n}\nfunction useId() {\n var dispatcher = resolveDispatcher();\n return dispatcher.useId();\n}\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher$1.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('')) {\n _frame = _frame.replace('', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher$1.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n setExtraStackFrame(stack);\n } else {\n setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendumForProps(elementProps) {\n if (elementProps !== null && elementProps !== undefined) {\n return getSourceInfoErrorAddendum(elementProps.__source);\n }\n\n return '';\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n {\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\nfunction createElementWithValidation(type, props, children) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n {\n error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n }\n\n var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n}\nvar didWarnAboutDeprecatedCreateFactory = false;\nfunction createFactoryWithValidation(type) {\n var validatedFactory = createElementWithValidation.bind(null, type);\n validatedFactory.type = type;\n\n {\n if (!didWarnAboutDeprecatedCreateFactory) {\n didWarnAboutDeprecatedCreateFactory = true;\n\n warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');\n } // Legacy hook: remove it\n\n\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n\n return validatedFactory;\n}\nfunction cloneElementWithValidation(element, props, children) {\n var newElement = cloneElement.apply(this, arguments);\n\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n\n validatePropTypes(newElement);\n return newElement;\n}\n\nfunction startTransition(scope, options) {\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = {};\n var currentTransition = ReactCurrentBatchConfig.transition;\n\n {\n ReactCurrentBatchConfig.transition._updatedFibers = new Set();\n }\n\n try {\n scope();\n } finally {\n ReactCurrentBatchConfig.transition = prevTransition;\n\n {\n if (prevTransition === null && currentTransition._updatedFibers) {\n var updatedFibersCount = currentTransition._updatedFibers.size;\n\n if (updatedFibersCount > 10) {\n warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n }\n\n currentTransition._updatedFibers.clear();\n }\n }\n }\n}\n\nvar didWarnAboutMessageChannel = false;\nvar enqueueTaskImpl = null;\nfunction enqueueTask(task) {\n if (enqueueTaskImpl === null) {\n try {\n // read require off the module object to get around the bundlers.\n // we don't want them to detect a require and bundle a Node polyfill.\n var requireString = ('require' + Math.random()).slice(0, 7);\n var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's\n // version of setImmediate, bypassing fake timers if any.\n\n enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;\n } catch (_err) {\n // we're in a browser\n // we can't use regular timers because they may still be faked\n // so we try MessageChannel+postMessage instead\n enqueueTaskImpl = function (callback) {\n {\n if (didWarnAboutMessageChannel === false) {\n didWarnAboutMessageChannel = true;\n\n if (typeof MessageChannel === 'undefined') {\n error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');\n }\n }\n }\n\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(undefined);\n };\n }\n }\n\n return enqueueTaskImpl(task);\n}\n\nvar actScopeDepth = 0;\nvar didWarnNoAwaitAct = false;\nfunction act(callback) {\n {\n // `act` calls can be nested, so we track the depth. This represents the\n // number of `act` scopes on the stack.\n var prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n\n if (ReactCurrentActQueue.current === null) {\n // This is the outermost `act` scope. Initialize the queue. The reconciler\n // will detect the queue and use it instead of Scheduler.\n ReactCurrentActQueue.current = [];\n }\n\n var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;\n var result;\n\n try {\n // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only\n // set to `true` while the given callback is executed, not for updates\n // triggered during an async event, because this is how the legacy\n // implementation of `act` behaved.\n ReactCurrentActQueue.isBatchingLegacy = true;\n result = callback(); // Replicate behavior of original `act` implementation in legacy mode,\n // which flushed updates immediately after the scope function exits, even\n // if it's an async function.\n\n if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n ReactCurrentActQueue.didScheduleLegacyUpdate = false;\n flushActQueue(queue);\n }\n }\n } catch (error) {\n popActScope(prevActScopeDepth);\n throw error;\n } finally {\n ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;\n }\n\n if (result !== null && typeof result === 'object' && typeof result.then === 'function') {\n var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait\n // for it to resolve before exiting the current scope.\n\n var wasAwaited = false;\n var thenable = {\n then: function (resolve, reject) {\n wasAwaited = true;\n thenableResult.then(function (returnValue) {\n popActScope(prevActScopeDepth);\n\n if (actScopeDepth === 0) {\n // We've exited the outermost act scope. Recursively flush the\n // queue until there's no remaining work.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n } else {\n resolve(returnValue);\n }\n }, function (error) {\n // The callback threw an error.\n popActScope(prevActScopeDepth);\n reject(error);\n });\n }\n };\n\n {\n if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {\n // eslint-disable-next-line no-undef\n Promise.resolve().then(function () {}).then(function () {\n if (!wasAwaited) {\n didWarnNoAwaitAct = true;\n\n error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');\n }\n });\n }\n }\n\n return thenable;\n } else {\n var returnValue = result; // The callback is not an async function. Exit the current scope\n // immediately, without awaiting.\n\n popActScope(prevActScopeDepth);\n\n if (actScopeDepth === 0) {\n // Exiting the outermost act scope. Flush the queue.\n var _queue = ReactCurrentActQueue.current;\n\n if (_queue !== null) {\n flushActQueue(_queue);\n ReactCurrentActQueue.current = null;\n } // Return a thenable. If the user awaits it, we'll flush again in\n // case additional work was scheduled by a microtask.\n\n\n var _thenable = {\n then: function (resolve, reject) {\n // Confirm we haven't re-entered another `act` scope, in case\n // the user does something weird like await the thenable\n // multiple times.\n if (ReactCurrentActQueue.current === null) {\n // Recursively flush the queue until there's no remaining work.\n ReactCurrentActQueue.current = [];\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n } else {\n resolve(returnValue);\n }\n }\n };\n return _thenable;\n } else {\n // Since we're inside a nested `act` scope, the returned thenable\n // immediately resolves. The outer scope will flush the queue.\n var _thenable2 = {\n then: function (resolve, reject) {\n resolve(returnValue);\n }\n };\n return _thenable2;\n }\n }\n }\n}\n\nfunction popActScope(prevActScopeDepth) {\n {\n if (prevActScopeDepth !== actScopeDepth - 1) {\n error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');\n }\n\n actScopeDepth = prevActScopeDepth;\n }\n}\n\nfunction recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n {\n var queue = ReactCurrentActQueue.current;\n\n if (queue !== null) {\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n if (queue.length === 0) {\n // No additional work was scheduled. Finish.\n ReactCurrentActQueue.current = null;\n resolve(returnValue);\n } else {\n // Keep flushing work until there's none left.\n recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n }\n });\n } catch (error) {\n reject(error);\n }\n } else {\n resolve(returnValue);\n }\n }\n}\n\nvar isFlushing = false;\n\nfunction flushActQueue(queue) {\n {\n if (!isFlushing) {\n // Prevent re-entrance.\n isFlushing = true;\n var i = 0;\n\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n\n do {\n callback = callback(true);\n } while (callback !== null);\n }\n\n queue.length = 0;\n } catch (error) {\n // If something throws, leave the remaining callbacks on the queue.\n queue = queue.slice(i + 1);\n throw error;\n } finally {\n isFlushing = false;\n }\n }\n }\n}\n\nvar createElement$1 = createElementWithValidation ;\nvar cloneElement$1 = cloneElementWithValidation ;\nvar createFactory = createFactoryWithValidation ;\nvar Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.cloneElement = cloneElement$1;\nexports.createContext = createContext;\nexports.createElement = createElement$1;\nexports.createFactory = createFactory;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.startTransition = startTransition;\nexports.unstable_act = act;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useDeferredValue = useDeferredValue;\nexports.useEffect = useEffect;\nexports.useId = useId;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useInsertionEffect = useInsertionEffect;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.useSyncExternalStore = useSyncExternalStore;\nexports.useTransition = useTransition;\nexports.version = ReactVersion;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import './_acf-jsx-names.js';\nimport './_acf-blocks.js';\n"],"names":["md5","require","$","undefined","BlockControls","InspectorControls","InnerBlocks","useBlockProps","AlignmentToolbar","BlockVerticalAlignmentToolbar","wp","blockEditor","ToolbarGroup","ToolbarButton","Placeholder","Spinner","components","Fragment","element","Component","React","withSelect","data","createHigherOrderComponent","compose","BlockAlignmentMatrixToolbar","__experimentalBlockAlignmentMatrixToolbar","BlockAlignmentMatrixControl","__experimentalBlockAlignmentMatrixControl","BlockFullHeightAlignmentControl","__experimentalBlockFullHeightAligmentControl","__experimentalBlockFullHeightAlignmentControl","useInnerBlocksProps","__experimentalUseInnerBlocksProps","blockTypes","getBlockType","name","getBlockVersion","blockType","acf_block_version","isBlockInQueryLoop","clientId","parents","select","getBlockParents","parentsData","getBlocksByClientId","filter","block","length","isSiteEditor","pagenow","isDesktopPreviewDeviceType","editPostStore","__experimentalGetPreviewDeviceType","getPreviewDeviceType","isEditingTemplate","isiFramedMobileDevicePreview","registerBlockType","allowedTypes","post_types","push","postType","acf","get","includes","icon","substr","iconHTML","createElement","Div","category","blocks","getCategories","_ref","slug","pop","parseArgs","title","api_version","key","attributes","default","supports","anchor","type","ThisBlockEdit","BlockEdit","ThisBlockSave","BlockSave","alignText","align_text","addBackCompatAttribute","withAlignTextComponent","alignContent","align_content","withAlignContentComponent","fullHeight","full_height","withFullHeightComponent","edit","props","save","result","selector","dispatch","getBlocks","args","recurseBlocks","forEach","k","_ref2","ajaxQueue","fetchCache","fetchBlock","context","query","delay","queueId","JSON","stringify","_objectSpread","timeout","promise","Deferred","started","clearTimeout","setTimeout","resolve","apply","ajax","url","dataType","cache","prepareForAjax","action","always","done","arguments","fail","reject","compareObjects","obj1","obj2","parseJSX","html","acfBlockVersion","replace","parseNode","children","node","level","nodeName","parseNodeName","toLowerCase","nodeAttrs","ref","createRef","arrayArgs","map","parseNodeAttr","_ref3","value","ACFInnerBlocks","childNodes","child","Text","text","textContent","getJSXName","replacement","isget","Script","className","innerBlockProps","nodeAttr","css","split","s","pos","indexOf","ruleName","trim","ruleValue","charAt","strCamelCase","c1","parse","withDefaultAttributes","BlockListBlock","WrappedBlockEdit","constructor","Object","keys","upgrades","attribute","render","hooks","addFilter","Content","setup","restrictMode","modes","mode","setAttributes","forcePreview","showToggle","toggleText","__","toggleIcon","toggleMode","label","onClick","BlockForm","BlockBody","_BlockBody","isSelected","showForm","additionalClasses","BlockPreview","ownProps","rootClientId","getBlockRootClientId","index","getBlockIndex","dangerouslySetInnerHTML","__html","el","setHTML","componentDidUpdate","componentDidMount","store","DynamicHTML","setRef","bind","id","subscribed","renderMethod","loadState","fetch","maybePreload","blockId","form","state","preloadedBlocks","modeText","replaceAll","setState","setHtml","jsx","console","warn","Array","isArray","refElement","find","isValidElement","$el","shouldComponentUpdate","_ref4","_ref5","componentWillMove","display","$prevParent","parent","$thisParent","clone","componentDidAppend","componentDidRemount","prevProps","prevState","doAction","componentWillUnmount","_ref6","hash","createBlockAttributesHash","preloaded","_ref7","serializeData","silent","serialize","on","_ref8","contextPostId","prevAttributes","prevContext","preview","_ref9","replaceHtml","renderBlockPreviewEvent","nextProps","nextState","nextAttributes","thisAttributes","blockElement","current","initialize","editor","addAction","validateVerticalAlignment","align","ALIGNMENTS","DEFAULT","validateHorizontalAlignment","validateMatrixAlignment","y","x","OriginalBlockEdit","AlignmentComponent","validateAlignment","onChangeAlignContent","group","onChange","onChangeAlignText","onToggleFullHeight","isActive","onToggle","new_attribute","sort","reduce","acc","currValue","jQuery","jsxNameReplacements","accentheight","acceptcharset","accesskey","alignmentbaseline","allowedblocks","allowfullscreen","allowreorder","arabicform","attributename","attributetype","autocapitalize","autocomplete","autocorrect","autofocus","autoplay","autoreverse","autosave","basefrequency","baselineshift","baseprofile","calcmode","capheight","cellpadding","cellspacing","charset","class","classid","classname","clippath","clippathunits","cliprule","colorinterpolation","colorinterpolationfilters","colorprofile","colorrendering","colspan","contenteditable","contentscripttype","contentstyletype","contextmenu","controlslist","crossorigin","dangerouslysetinnerhtml","datetime","defaultchecked","defaultvalue","diffuseconstant","disablepictureinpicture","disableremoteplayback","dominantbaseline","edgemode","enablebackground","enctype","enterkeyhint","externalresourcesrequired","fillopacity","fillrule","filterres","filterunits","floodcolor","floodopacity","fontfamily","fontsize","fontsizeadjust","fontstretch","fontstyle","fontvariant","fontweight","for","foreignobject","formaction","formenctype","formmethod","formnovalidate","formtarget","frameborder","glyphname","glyphorientationhorizontal","glyphorientationvertical","glyphref","gradienttransform","gradientunits","horizadvx","horizoriginx","hreflang","htmlfor","httpequiv","imagerendering","innerhtml","inputmode","itemid","itemprop","itemref","itemscope","itemtype","kernelmatrix","kernelunitlength","keyparams","keypoints","keysplines","keytimes","keytype","lengthadjust","letterspacing","lightingcolor","limitingconeangle","marginheight","marginwidth","markerend","markerheight","markermid","markerstart","markerunits","markerwidth","maskcontentunits","maskunits","maxlength","mediagroup","minlength","nomodule","novalidate","numoctaves","overlineposition","overlinethickness","paintorder","pathlength","patterncontentunits","patterntransform","patternunits","playsinline","pointerevents","pointsatx","pointsaty","pointsatz","preservealpha","preserveaspectratio","primitiveunits","radiogroup","readonly","referrerpolicy","refx","refy","renderingintent","repeatcount","repeatdur","requiredextensions","requiredfeatures","rowspan","shaperendering","specularconstant","specularexponent","spellcheck","spreadmethod","srcdoc","srclang","srcset","startoffset","stddeviation","stitchtiles","stopcolor","stopopacity","strikethroughposition","strikethroughthickness","strokedasharray","strokedashoffset","strokelinecap","strokelinejoin","strokemiterlimit","strokeopacity","strokewidth","suppresscontenteditablewarning","suppresshydrationwarning","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","templatelock","textanchor","textdecoration","textlength","textrendering","underlineposition","underlinethickness","unicodebidi","unicoderange","unitsperem","usemap","valphabetic","vectoreffect","vertadvy","vertoriginx","vertoriginy","vhanging","videographic","viewbox","viewtarget","vmathematical","wordspacing","writingmode","xchannelselector","xheight","xlinkactuate","xlinkarcrole","xlinkhref","xlinkrole","xlinkshow","xlinktitle","xlinktype","xmlbase","xmllang","xmlnsxlink","xmlspace","ychannelselector","zoomandpan"],"sourceRoot":""}
\ No newline at end of file
diff --git a/assets/build/js/pro/acf-pro-blocks.min.js b/assets/build/js/pro/acf-pro-blocks.min.js
new file mode 100644
index 0000000..eeb0d51
--- /dev/null
+++ b/assets/build/js/pro/acf-pro-blocks.min.js
@@ -0,0 +1 @@
+!function(){var e={905:function(){jQuery,acf.jsxNameReplacements={"accent-height":"accentHeight",accentheight:"accentHeight","accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey","alignment-baseline":"alignmentBaseline",alignmentbaseline:"alignmentBaseline",allowedblocks:"allowedBlocks",allowfullscreen:"allowFullScreen",allowreorder:"allowReorder","arabic-form":"arabicForm",arabicform:"arabicForm",attributename:"attributeName",attributetype:"attributeType",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autoreverse:"autoReverse",autosave:"autoSave",basefrequency:"baseFrequency","baseline-shift":"baselineShift",baselineshift:"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode","cap-height":"capHeight",capheight:"capHeight",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className","clip-path":"clipPath","clip-rule":"clipRule",clippath:"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","color-interpolation":"colorInterpolation","color-interpolation-filters":"colorInterpolationFilters","color-profile":"colorProfile","color-rendering":"colorRendering",colorinterpolation:"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters",colorprofile:"colorProfile",colorrendering:"colorRendering",colspan:"colSpan",contenteditable:"contentEditable",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",diffuseconstant:"diffuseConstant",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback","dominant-baseline":"dominantBaseline",dominantbaseline:"dominantBaseline",edgemode:"edgeMode","enable-background":"enableBackground",enablebackground:"enableBackground",enctype:"encType",enterkeyhint:"enterKeyHint",externalresourcesrequired:"externalResourcesRequired","fill-opacity":"fillOpacity","fill-rule":"fillRule",fillopacity:"fillOpacity",fillrule:"fillRule",filterres:"filterRes",filterunits:"filterUnits","flood-color":"floodColor","flood-opacity":"floodOpacity",floodcolor:"floodColor",floodopacity:"floodOpacity","font-family":"fontFamily","font-size":"fontSize","font-size-adjust":"fontSizeAdjust","font-stretch":"fontStretch","font-style":"fontStyle","font-variant":"fontVariant","font-weight":"fontWeight",fontfamily:"fontFamily",fontsize:"fontSize",fontsizeadjust:"fontSizeAdjust",fontstretch:"fontStretch",fontstyle:"fontStyle",fontvariant:"fontVariant",fontweight:"fontWeight",for:"htmlFor",foreignobject:"foreignObject",formaction:"formAction",formenctype:"formEncType",formmethod:"formMethod",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder","glyph-name":"glyphName","glyph-orientation-horizontal":"glyphOrientationHorizontal","glyph-orientation-vertical":"glyphOrientationVertical",glyphname:"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits","horiz-adv-x":"horizAdvX","horiz-origin-x":"horizOriginX",horizadvx:"horizAdvX",horizoriginx:"horizOriginX",hreflang:"hrefLang",htmlfor:"htmlFor","http-equiv":"httpEquiv",httpequiv:"httpEquiv","image-rendering":"imageRendering",imagerendering:"imageRendering",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keyparams:"keyParams",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",keytype:"keyType",lengthadjust:"lengthAdjust","letter-spacing":"letterSpacing",letterspacing:"letterSpacing","lighting-color":"lightingColor",lightingcolor:"lightingColor",limitingconeangle:"limitingConeAngle",marginheight:"marginHeight",marginwidth:"marginWidth","marker-end":"markerEnd","marker-mid":"markerMid","marker-start":"markerStart",markerend:"markerEnd",markerheight:"markerHeight",markermid:"markerMid",markerstart:"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",numoctaves:"numOctaves","overline-position":"overlinePosition","overline-thickness":"overlineThickness",overlineposition:"overlinePosition",overlinethickness:"overlineThickness","paint-order":"paintOrder",paintorder:"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",playsinline:"playsInline","pointer-events":"pointerEvents",pointerevents:"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",refx:"refX",refy:"refY","rendering-intent":"renderingIntent",renderingintent:"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",rowspan:"rowSpan","shape-rendering":"shapeRendering",shaperendering:"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spellcheck:"spellCheck",spreadmethod:"spreadMethod",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles","stop-color":"stopColor","stop-opacity":"stopOpacity",stopcolor:"stopColor",stopopacity:"stopOpacity","strikethrough-position":"strikethroughPosition","strikethrough-thickness":"strikethroughThickness",strikethroughposition:"strikethroughPosition",strikethroughthickness:"strikethroughThickness","stroke-dasharray":"strokeDasharray","stroke-dashoffset":"strokeDashoffset","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","stroke-miterlimit":"strokeMiterlimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth",strokedasharray:"strokeDasharray",strokedashoffset:"strokeDashoffset",strokelinecap:"strokeLinecap",strokelinejoin:"strokeLinejoin",strokemiterlimit:"strokeMiterlimit",strokeopacity:"strokeOpacity",strokewidth:"strokeWidth",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tabindex:"tabIndex",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",templatelock:"templateLock","text-anchor":"textAnchor","text-decoration":"textDecoration","text-rendering":"textRendering",textanchor:"textAnchor",textdecoration:"textDecoration",textlength:"textLength",textrendering:"textRendering","underline-position":"underlinePosition","underline-thickness":"underlineThickness",underlineposition:"underlinePosition",underlinethickness:"underlineThickness","unicode-bidi":"unicodeBidi","unicode-range":"unicodeRange",unicodebidi:"unicodeBidi",unicoderange:"unicodeRange","units-per-em":"unitsPerEm",unitsperem:"unitsPerEm",usemap:"useMap","v-alphabetic":"vAlphabetic","v-hanging":"vHanging","v-ideographic":"vIdeographic","v-mathematical":"vMathematical",valphabetic:"vAlphabetic","vector-effect":"vectorEffect",vectoreffect:"vectorEffect","vert-adv-y":"vertAdvY","vert-origin-x":"vertOriginX","vert-origin-y":"vertOriginY",vertadvy:"vertAdvY",vertoriginx:"vertOriginX",vertoriginy:"vertOriginY",vhanging:"vHanging",videographic:"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","word-spacing":"wordSpacing",wordspacing:"wordSpacing","writing-mode":"writingMode",writingmode:"writingMode","x-height":"xHeight",xchannelselector:"xChannelSelector",xheight:"xHeight","xlink:actuate":"xlinkActuate","xlink:arcrole":"xlinkArcrole","xlink:href":"xlinkHref","xlink:role":"xlinkRole","xlink:show":"xlinkShow","xlink:title":"xlinkTitle","xlink:type":"xlinkType",xlinkactuate:"xlinkActuate",xlinkarcrole:"xlinkArcrole",xlinkhref:"xlinkHref",xlinkrole:"xlinkRole",xlinkshow:"xlinkShow",xlinktitle:"xlinkTitle",xlinktype:"xlinkType","xml:base":"xmlBase","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlbase:"xmlBase",xmllang:"xmlLang","xmlns:xlink":"xmlnsXlink",xmlnsxlink:"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"}},487:function(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-i)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,o=0;r>>6-2*o);return n}},e.exports=n},738:function(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},568:function(e,t,n){var r,o,i,a,s;r=n(12),o=n(487).utf8,i=n(738),a=n(487).bin,(s=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):o.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=r.bytesToWords(e),l=8*e.length,c=1732584193,p=-271733879,u=-1732584194,d=271733878,f=0;f>>24)|4278255360&(n[f]<<24|n[f]>>>8);n[l>>>5]|=128<>>9<<4)]=l;var h=s._ff,m=s._gg,g=s._hh,y=s._ii;for(f=0;f>>0,p=p+k>>>0,u=u+v>>>0,d=d+x>>>0}return r.endian([c,p,u,d])})._ff=function(e,t,n,r,o,i,a){var s=e+(t&n|~t&r)+(o>>>0)+a;return(s<>>32-i)+t},s._gg=function(e,t,n,r,o,i,a){var s=e+(t&r|n&~r)+(o>>>0)+a;return(s<>>32-i)+t},s._hh=function(e,t,n,r,o,i,a){var s=e+(t^n^r)+(o>>>0)+a;return(s<>>32-i)+t},s._ii=function(e,t,n,r,o,i,a){var s=e+(n^(t|~r))+(o>>>0)+a;return(s<>>32-i)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(s(e,t));return t&&t.asBytes?n:t&&t.asString?a.bytesToString(n):r.bytesToHex(n)}},408:function(e,t){"use strict";var n=Symbol.for("react.element"),r=(Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.iterator,{isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}}),o=Object.assign,i={};function a(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||r}function s(){}function l(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||r}a.prototype.isReactComponent={},a.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},s.prototype=a.prototype;var c=l.prototype=new s;c.constructor=l,o(c,a.prototype),c.isPureReactComponent=!0;Array.isArray;var p=Object.prototype.hasOwnProperty,u=null,d={key:!0,ref:!0,__self:!0,__source:!0};t.createElement=function(e,t,r){var o,i={},a=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)p.call(t,o)&&!d.hasOwnProperty(o)&&(i[o]=t[o]);var l=arguments.length-2;if(1===l)i.children=r;else if(1{const{BlockControls:n,InspectorControls:o,InnerBlocks:s,useBlockProps:l,AlignmentToolbar:c,BlockVerticalAlignmentToolbar:p}=wp.blockEditor,{ToolbarGroup:u,ToolbarButton:d,Placeholder:f,Spinner:h}=wp.components,{Fragment:m}=wp.element,{Component:g}=React,{withSelect:y}=wp.data,{createHigherOrderComponent:b}=wp.compose,k=wp.blockEditor.__experimentalBlockAlignmentMatrixToolbar||wp.blockEditor.BlockAlignmentMatrixToolbar,v=wp.blockEditor.__experimentalBlockAlignmentMatrixControl||wp.blockEditor.BlockAlignmentMatrixControl,x=wp.blockEditor.__experimentalBlockFullHeightAligmentControl||wp.blockEditor.__experimentalBlockFullHeightAlignmentControl||wp.blockEditor.BlockFullHeightAlignmentControl,w=wp.blockEditor.__experimentalUseInnerBlocksProps||wp.blockEditor.useInnerBlocksProps,S={};function E(e){return S[e]||!1}function A(e){return E(e).acf_block_version||1}function T(e){const t=wp.data.select("core/block-editor").getBlockParents(e);return wp.data.select("core/block-editor").getBlocksByClientId(t).filter((e=>"core/query"===e.name)).length}function C(){return"string"==typeof pagenow&&"site-editor"===pagenow}function _(){const e=O("core/edit-post");return!!e&&!!e.isEditingTemplate&&e.isEditingTemplate()}function B(){return e("iframe[name=editor-canvas]").length&&!function(){const e=O("core/edit-post");return!e||(e.__experimentalGetPreviewDeviceType?"Desktop"===e.__experimentalGetPreviewDeviceType():!e.getPreviewDeviceType||"Desktop"===e.getPreviewDeviceType())}()}function j(e){const o=e.post_types||[];if(o.length){o.push("wp_block");const e=acf.get("postType");if(!o.includes(e))return!1}if("string"==typeof e.icon&&"{let{slug:n}=t;return n===e.category})).pop()||(e.category="common"),e=acf.parseArgs(e,{title:"",name:"",category:"",api_version:2,acf_block_version:1});for(const t in e.attributes)0===e.attributes[t].default.length&&delete e.attributes[t].default;e.supports.anchor&&(e.attributes.anchor={type:"string"});let i=L,a=F;var s;(e.supports.alignText||e.supports.align_text)&&(e.attributes=Z(e.attributes,"align_text","string"),i=function(e,t){const o=Q;return t.alignText=o(t.alignText),class extends g{render(){const{attributes:t,setAttributes:i}=this.props,{alignText:a}=t;return(0,r.createElement)(m,null,(0,r.createElement)(n,{group:"block"},(0,r.createElement)(c,{value:o(a),onChange:function(e){i({alignText:o(e)})}})),(0,r.createElement)(e,this.props))}}}(i,e)),(e.supports.alignContent||e.supports.align_content)&&(e.attributes=Z(e.attributes,"align_content","string"),i=function(e,o){let i,a,s=o.supports.align_content||o.supports.alignContent;return"matrix"===s?(i=v||k,a=K):(i=p,a=G),i===t?(console.warn(`The "${s}" alignment component was not found.`),e):(o.alignContent=a(o.alignContent),class extends g{render(){const{attributes:t,setAttributes:o}=this.props,{alignContent:s}=t;return(0,r.createElement)(m,null,(0,r.createElement)(n,{group:"block"},(0,r.createElement)(i,{label:acf.__("Change content alignment"),value:a(s),onChange:function(e){o({alignContent:a(e)})}})),(0,r.createElement)(e,this.props))}})}(i,e)),(e.supports.fullHeight||e.supports.full_height)&&(e.attributes=Z(e.attributes,"full_height","boolean"),s=i,e.blockType,i=x?class extends g{render(){const{attributes:e,setAttributes:t}=this.props,{fullHeight:o}=e;return(0,r.createElement)(m,null,(0,r.createElement)(n,{group:"block"},(0,r.createElement)(x,{isActive:o,onToggle:function(e){t({fullHeight:e})}})),(0,r.createElement)(s,this.props))}}:s),e.edit=e=>(0,r.createElement)(i,e),e.save=()=>(0,r.createElement)(a,null),S[e.name]=e;const l=wp.blocks.registerBlockType(e.name,e);return l.attributes.anchor&&(l.attributes.anchor={type:"string"}),l}function O(e){return"core/block-editor"===e?wp.data.select("core/block-editor")||wp.data.select("core/editor"):wp.data.select(e)}const P={},R={};function I(t){const{attributes:n={},context:r={},query:o={},clientId:s=null,delay:l=0}=t,c=a(JSON.stringify(i(i(i({},n),r),o))),p=P[c]||{query:{},timeout:!1,promise:e.Deferred(),started:!1};return p.query=i(i({},p.query),o),p.started||(clearTimeout(p.timeout),p.timeout=setTimeout((()=>{p.started=!0,R[c]?(P[c]=null,p.promise.resolve.apply(R[c][0],R[c][1])):e.ajax({url:acf.get("ajaxurl"),dataType:"json",type:"post",cache:!1,data:acf.prepareForAjax({action:"acf/ajax/fetch-block",block:JSON.stringify(n),clientId:s,context:JSON.stringify(r),query:p.query})}).always((()=>{P[c]=null})).done((function(){R[c]=[this,arguments],p.promise.resolve.apply(this,arguments)})).fail((function(){p.promise.reject.apply(this,arguments)}))}),l),P[c]=p),p.promise}function D(e,t){return JSON.stringify(e)===JSON.stringify(t)}function M(e,n){let o=arguments.length>2&&arguments[2]!==t?arguments[2]:0;const i=function(e,t){switch(e){case"innerblocks":return t<2?s:"ACFInnerBlocks";case"script":return X;case"#comment":return null;default:e=H(e)}return e}(e.nodeName.toLowerCase(),n);if(!i)return null;const a={};if(1===o&&"ACFInnerBlocks"!==i&&(a.ref=React.createRef()),acf.arrayArgs(e.attributes).map(N).forEach((e=>{let{name:t,value:n}=e;a[t]=n})),"ACFInnerBlocks"===i)return(0,r.createElement)(z,a);const l=[i,a];return acf.arrayArgs(e.childNodes).forEach((e=>{if(e instanceof Text){const t=e.textContent;t&&l.push(t)}else l.push(M(e,n,o+1))})),React.createElement.apply(this,l)}function H(e){return acf.isget(acf,"jsxNameReplacements",e)||e}function z(e){const{className:t="acf-innerblocks-container"}=e,n=w({className:t},e);return(0,r.createElement)("div",n,n.children)}function N(e){let t=e.name,n=e.value;switch(t){case"class":t="className";break;case"style":const e={};n.split(";").forEach((t=>{const n=t.indexOf(":");if(n>0){let r=t.substr(0,n).trim();const o=t.substr(n+1).trim();"-"!==r.charAt(0)&&(r=acf.strCamelCase(r)),e[r]=o}})),n=e;break;default:if(0===t.indexOf("data-"))break;t=H(t);const r=n.charAt(0);"["!==r&&"{"!==r||(n=JSON.parse(n)),"true"!==n&&"false"!==n||(n="true"===n)}return{name:t,value:n}}acf.parseJSX=(t,n)=>(t=(t=""+t+"
").replace(/]+)?\/>/," "),M(e(t)[0],n,0).props.children);const q=b((e=>class extends g{constructor(e){super(e);const{name:n,attributes:r}=this.props,o=E(n);if(!o)return;Object.keys(r).forEach((e=>{""===r[e]&&delete r[e]}));const i={full_height:"fullHeight",align_content:"alignContent",align_text:"alignText"};Object.keys(i).forEach((e=>{r[e]!==t?r[i[e]]=r[e]:r[i[e]]===t&&o[e]!==t&&(r[i[e]]=o[e]),delete o[e],delete r[e]}));for(let e in o.attributes)r[e]===t&&o[e]!==t&&(r[e]=o[e])}render(){return(0,r.createElement)(e,this.props)}}),"withDefaultAttributes");function F(){return(0,r.createElement)(s.Content,null)}wp.hooks.addFilter("editor.BlockListBlock","acf/with-default-attributes",q);class L extends g{constructor(e){super(e),this.setup()}setup(){const{name:e,attributes:t,clientId:n}=this.props,r=E(e);function o(e){e.includes(t.mode)||(t.mode=e[0])}if(T(n)||C()||B()||_())o(["preview"]);else switch(r.mode){case"edit":o(["edit","preview"]);break;case"preview":o(["preview","edit"]);break;default:o(["auto"])}}render(){const{name:e,attributes:t,setAttributes:i,clientId:a}=this.props,s=E(e),l=T(a)||C()||B()||_();let{mode:c}=t;l&&(c="preview");let p=s.supports.mode;("auto"===c||l)&&(p=!1);const f="preview"===c?acf.__("Switch to Edit"):acf.__("Switch to Preview"),h="preview"===c?"edit":"welcome-view-site";return(0,r.createElement)(m,null,(0,r.createElement)(n,null,p&&(0,r.createElement)(u,null,(0,r.createElement)(d,{className:"components-icon-button components-toolbar__control",label:f,icon:h,onClick:function(){i({mode:"preview"===c?"edit":"preview"})}}))),(0,r.createElement)(o,null,"preview"===c&&(0,r.createElement)("div",{className:"acf-block-component acf-block-panel"},(0,r.createElement)(V,this.props))),(0,r.createElement)(U,this.props))}}const U=y(((e,t)=>{const{clientId:n}=t,r=e("core/block-editor").getBlockRootClientId(n);return{index:e("core/block-editor").getBlockIndex(n,r)}}))((function(e){const{attributes:t,isSelected:n,name:o}=e,{mode:i}=t;let a=!0,s="acf-block-component acf-block-body";return("auto"===i&&!n||"preview"===i)&&(s+=" acf-block-preview",a=!1),A(o)>1?(0,r.createElement)("div",l({className:s}),a?(0,r.createElement)(V,e):(0,r.createElement)(Y,e)):(0,r.createElement)("div",l(),(0,r.createElement)("div",{className:"acf-block-component acf-block-body"},a?(0,r.createElement)(V,e):(0,r.createElement)(Y,e)))}));class $ extends g{render(){return(0,r.createElement)("div",{dangerouslySetInnerHTML:{__html:this.props.children}})}}class X extends g{render(){return(0,r.createElement)("div",{ref:e=>this.el=e})}setHTML(t){e(this.el).html(`') );
-
- /**
- * Unescapes HTML entities from a string.
- *
- * @date 08/06/2020
- * @since 5.9.0
- *
- * @param string string The input string.
- * @return string
- */
- acf.strUnescape = function( string ){
- var htmlUnescapes = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- ''': "'"
- };
- return ('' + string).replace(/&|<|>|"|'/g, function( entity ) {
- return htmlUnescapes[ entity ];
- });
- };
-
- // Tests.
- //console.log( acf.strUnescape( acf.strEscape('Test 1') ) );
- //console.log( acf.strUnescape( acf.strEscape('Test & 1') ) );
- //console.log( acf.strUnescape( acf.strEscape('Test\'s & 1') ) );
- //console.log( acf.strUnescape( acf.strEscape('') ) );
-
- /**
- * Escapes HTML entities from a string.
- *
- * @date 08/06/2020
- * @since 5.9.0
- *
- * @param string string The input string.
- * @return string
- */
- acf.escAttr = acf.strEscape;
-
- /**
- * Encodes ') );
- //console.log( acf.escHtml( acf.strEscape('') ) );
- //console.log( acf.escHtml( '' ) );
-
- /**
- * acf.decode
- *
- * description
- *
- * @date 13/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.decode = function( string ){
- return $('').html( string ).text();
- };
-
-
-
- /**
- * parseArgs
- *
- * Merges together defaults and args much like the WP wp_parse_args function
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object args
- * @param object defaults
- * @return object
- */
-
- acf.parseArgs = function( args, defaults ){
- if( typeof args !== 'object' ) args = {};
- if( typeof defaults !== 'object' ) defaults = {};
- return $.extend({}, defaults, args);
- }
-
- /**
- * __
- *
- * Retrieve the translation of $text.
- *
- * @date 16/4/18
- * @since 5.6.9
- *
- * @param string text Text to translate.
- * @return string Translated text.
- */
-
- if( window.acfL10n == undefined ) {
- acfL10n = {};
- }
-
- acf.__ = function( text ){
- return acfL10n[ text ] || text;
- };
-
- /**
- * _x
- *
- * Retrieve translated string with gettext context.
- *
- * @date 16/4/18
- * @since 5.6.9
- *
- * @param string text Text to translate.
- * @param string context Context information for the translators.
- * @return string Translated text.
- */
-
- acf._x = function( text, context ){
- return acfL10n[ text + '.' + context ] || acfL10n[ text ] || text;
- };
-
- /**
- * _n
- *
- * Retrieve the plural or single form based on the amount.
- *
- * @date 16/4/18
- * @since 5.6.9
- *
- * @param string single Single text to translate.
- * @param string plural Plural text to translate.
- * @param int number The number to compare against.
- * @return string Translated text.
- */
-
- acf._n = function( single, plural, number ){
- if( number == 1 ) {
- return acf.__(single);
- } else {
- return acf.__(plural);
- }
- };
-
- acf.isArray = function( a ){
- return Array.isArray(a);
- };
-
- acf.isObject = function( a ){
- return ( typeof a === 'object' );
- }
-
- /**
- * serialize
- *
- * description
- *
- * @date 24/12/17
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- var buildObject = function( obj, name, value ){
-
- // replace [] with placeholder
- name = name.replace('[]', '[%%index%%]');
-
- // vars
- var keys = name.match(/([^\[\]])+/g);
- if( !keys ) return;
- var length = keys.length;
- var ref = obj;
-
- // loop
- for( var i = 0; i < length; i++ ) {
-
- // vars
- var key = String( keys[i] );
-
- // value
- if( i == length - 1 ) {
-
- // %%index%%
- if( key === '%%index%%' ) {
- ref.push( value );
-
- // default
- } else {
- ref[ key ] = value;
- }
-
- // path
- } else {
-
- // array
- if( keys[i+1] === '%%index%%' ) {
- if( !acf.isArray(ref[ key ]) ) {
- ref[ key ] = [];
- }
-
- // object
- } else {
- if( !acf.isObject(ref[ key ]) ) {
- ref[ key ] = {};
- }
- }
-
- // crawl
- ref = ref[ key ];
- }
- }
- };
-
- acf.serialize = function( $el, prefix ){
-
- // vars
- var obj = {};
- var inputs = acf.serializeArray( $el );
-
- // prefix
- if( prefix !== undefined ) {
-
- // filter and modify
- inputs = inputs.filter(function( item ){
- return item.name.indexOf(prefix) === 0;
- }).map(function( item ){
- item.name = item.name.slice(prefix.length);
- return item;
- });
- }
-
- // loop
- for( var i = 0; i < inputs.length; i++ ) {
- buildObject( obj, inputs[i].name, inputs[i].value );
- }
-
- // return
- return obj;
- };
-
- /**
- * acf.serializeArray
- *
- * Similar to $.serializeArray() but works with a parent wrapping element.
- *
- * @date 19/8/18
- * @since 5.7.3
- *
- * @param jQuery $el The element or form to serialize.
- * @return array
- */
-
- acf.serializeArray = function( $el ){
- return $el.find('select, textarea, input').serializeArray();
- }
-
- /**
- * acf.serializeForAjax
- *
- * Returns an object containing name => value data ready to be encoded for Ajax.
- *
- * @date 17/12/18
- * @since 5.8.0
- *
- * @param jQUery $el The element or form to serialize.
- * @return object
- */
- acf.serializeForAjax = function( $el ){
-
- // vars
- var data = {};
- var index = {};
-
- // Serialize inputs.
- var inputs = acf.serializeArray( $el );
-
- // Loop over inputs and build data.
- inputs.map(function( item ){
-
- // Append to array.
- if( item.name.slice(-2) === '[]' ) {
- data[ item.name ] = data[ item.name ] || [];
- data[ item.name ].push( item.value );
- // Append
- } else {
- data[ item.name ] = item.value;
- }
- });
-
- // return
- return data;
- };
-
- /**
- * addAction
- *
- * Wrapper for acf.hooks.addAction
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
-/*
- var prefixAction = function( action ){
- return 'acf_' + action;
- }
-*/
-
- acf.addAction = function( action, callback, priority, context ){
- //action = prefixAction(action);
- acf.hooks.addAction.apply(this, arguments);
- return this;
- };
-
-
- /**
- * removeAction
- *
- * Wrapper for acf.hooks.removeAction
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
- acf.removeAction = function( action, callback ){
- //action = prefixAction(action);
- acf.hooks.removeAction.apply(this, arguments);
- return this;
- };
-
-
- /**
- * doAction
- *
- * Wrapper for acf.hooks.doAction
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
- var actionHistory = {};
- //var currentAction = false;
- acf.doAction = function( action ){
- //action = prefixAction(action);
- //currentAction = action;
- actionHistory[ action ] = 1;
- acf.hooks.doAction.apply(this, arguments);
- actionHistory[ action ] = 0;
- return this;
- };
-
-
- /**
- * doingAction
- *
- * Return true if doing action
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
- acf.doingAction = function( action ){
- //action = prefixAction(action);
- return (actionHistory[ action ] === 1);
- };
-
-
- /**
- * didAction
- *
- * Wrapper for acf.hooks.doAction
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
- acf.didAction = function( action ){
- //action = prefixAction(action);
- return (actionHistory[ action ] !== undefined);
- };
-
- /**
- * currentAction
- *
- * Wrapper for acf.hooks.doAction
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
- acf.currentAction = function(){
- for( var k in actionHistory ) {
- if( actionHistory[k] ) {
- return k;
- }
- }
- return false;
- };
-
- /**
- * addFilter
- *
- * Wrapper for acf.hooks.addFilter
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
- acf.addFilter = function( action ){
- //action = prefixAction(action);
- acf.hooks.addFilter.apply(this, arguments);
- return this;
- };
-
-
- /**
- * removeFilter
- *
- * Wrapper for acf.hooks.removeFilter
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
- acf.removeFilter = function( action ){
- //action = prefixAction(action);
- acf.hooks.removeFilter.apply(this, arguments);
- return this;
- };
-
-
- /**
- * applyFilters
- *
- * Wrapper for acf.hooks.applyFilters
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
- acf.applyFilters = function( action ){
- //action = prefixAction(action);
- return acf.hooks.applyFilters.apply(this, arguments);
- };
-
-
- /**
- * getArgs
- *
- * description
- *
- * @date 15/12/17
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.arrayArgs = function( args ){
- return Array.prototype.slice.call( args );
- };
-
-
- /**
- * extendArgs
- *
- * description
- *
- * @date 15/12/17
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
-/*
- acf.extendArgs = function( ){
- var args = Array.prototype.slice.call( arguments );
- var realArgs = args.shift();
-
- Array.prototype.push.call(arguments, 'bar')
- return Array.prototype.push.apply( args, arguments );
- };
-*/
-
- // Preferences
- // - use try/catch to avoid JS error if cookies are disabled on front-end form
- try {
- var preferences = JSON.parse(localStorage.getItem('acf')) || {};
- } catch(e) {
- var preferences = {};
- }
-
-
- /**
- * getPreferenceName
- *
- * Gets the true preference name.
- * Converts "this.thing" to "thing-123" if editing post 123.
- *
- * @date 11/11/17
- * @since 5.6.5
- *
- * @param string name
- * @return string
- */
-
- var getPreferenceName = function( name ){
- if( name.substr(0, 5) === 'this.' ) {
- name = name.substr(5) + '-' + acf.get('post_id');
- }
- return name;
- };
-
-
- /**
- * acf.getPreference
- *
- * Gets a preference setting or null if not set.
- *
- * @date 11/11/17
- * @since 5.6.5
- *
- * @param string name
- * @return mixed
- */
-
- acf.getPreference = function( name ){
- name = getPreferenceName( name );
- return preferences[ name ] || null;
- }
-
-
- /**
- * acf.setPreference
- *
- * Sets a preference setting.
- *
- * @date 11/11/17
- * @since 5.6.5
- *
- * @param string name
- * @param mixed value
- * @return n/a
- */
-
- acf.setPreference = function( name, value ){
- name = getPreferenceName( name );
- if( value === null ) {
- delete preferences[ name ];
- } else {
- preferences[ name ] = value;
- }
- localStorage.setItem('acf', JSON.stringify(preferences));
- }
-
-
- /**
- * acf.removePreference
- *
- * Removes a preference setting.
- *
- * @date 11/11/17
- * @since 5.6.5
- *
- * @param string name
- * @return n/a
- */
-
- acf.removePreference = function( name ){
- acf.setPreference(name, null);
- };
-
-
- /**
- * remove
- *
- * Removes an element with fade effect
- *
- * @date 1/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.remove = function( props ){
-
- // allow jQuery
- if( props instanceof jQuery ) {
- props = {
- target: props
- };
- }
-
- // defaults
- props = acf.parseArgs(props, {
- target: false,
- endHeight: 0,
- complete: function(){}
- });
-
- // action
- acf.doAction('remove', props.target);
-
- // tr
- if( props.target.is('tr') ) {
- removeTr( props );
-
- // div
- } else {
- removeDiv( props );
- }
-
- };
-
- /**
- * removeDiv
- *
- * description
- *
- * @date 16/2/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- var removeDiv = function( props ){
-
- // vars
- var $el = props.target;
- var height = $el.height();
- var width = $el.width();
- var margin = $el.css('margin');
- var outerHeight = $el.outerHeight(true);
- var style = $el.attr('style') + ''; // needed to copy
-
- // wrap
- $el.wrap('
');
- var $wrap = $el.parent();
-
- // set pos
- $el.css({
- height: height,
- width: width,
- margin: margin,
- position: 'absolute'
- });
-
- // fade wrap
- setTimeout(function(){
-
- $wrap.css({
- opacity: 0,
- height: props.endHeight
- });
-
- }, 50);
-
- // remove
- setTimeout(function(){
-
- $el.attr('style', style);
- $wrap.remove();
- props.complete();
-
- }, 301);
- };
-
- /**
- * removeTr
- *
- * description
- *
- * @date 16/2/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- var removeTr = function( props ){
-
- // vars
- var $tr = props.target;
- var height = $tr.height();
- var children = $tr.children().length;
-
- // create dummy td
- var $td = $(' ');
-
- // fade away tr
- $tr.addClass('acf-remove-element');
-
- // update HTML after fade animation
- setTimeout(function(){
- $tr.html( $td );
- }, 251);
-
- // allow .acf-temp-remove to exist before changing CSS
- setTimeout(function(){
-
- // remove class
- $tr.removeClass('acf-remove-element');
-
- // collapse
- $td.css({
- height: props.endHeight
- });
-
- }, 300);
-
- // remove
- setTimeout(function(){
-
- $tr.remove();
- props.complete();
-
- }, 451);
- };
-
- /**
- * duplicate
- *
- * description
- *
- * @date 3/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.duplicate = function( args ){
-
- // allow jQuery
- if( args instanceof jQuery ) {
- args = {
- target: args
- };
- }
-
- // defaults
- args = acf.parseArgs(args, {
- target: false,
- search: '',
- replace: '',
- rename: true,
- before: function( $el ){},
- after: function( $el, $el2 ){},
- append: function( $el, $el2 ){
- $el.after( $el2 );
- }
- });
-
- // compatibility
- args.target = args.target || args.$el;
-
- // vars
- var $el = args.target;
-
- // search
- args.search = args.search || $el.attr('data-id');
- args.replace = args.replace || acf.uniqid();
-
- // before
- // - allow acf to modify DOM
- // - fixes bug where select field option is not selected
- args.before( $el );
- acf.doAction('before_duplicate', $el);
-
- // clone
- var $el2 = $el.clone();
-
- // rename
- if( args.rename ) {
- acf.rename({
- target: $el2,
- search: args.search,
- replace: args.replace,
- replacer: ( typeof args.rename === 'function' ? args.rename : null )
- });
- }
-
- // remove classes
- $el2.removeClass('acf-clone');
- $el2.find('.ui-sortable').removeClass('ui-sortable');
-
- // after
- // - allow acf to modify DOM
- args.after( $el, $el2 );
- acf.doAction('after_duplicate', $el, $el2 );
-
- // append
- args.append( $el, $el2 );
-
- /**
- * Fires after an element has been duplicated and appended to the DOM.
- *
- * @date 30/10/19
- * @since 5.8.7
- *
- * @param jQuery $el The original element.
- * @param jQuery $el2 The duplicated element.
- */
- acf.doAction('duplicate', $el, $el2 );
-
- // append
- acf.doAction('append', $el2);
-
- // return
- return $el2;
- };
-
- /**
- * rename
- *
- * description
- *
- * @date 7/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.rename = function( args ){
-
- // Allow jQuery param.
- if( args instanceof jQuery ) {
- args = {
- target: args
- };
- }
-
- // Apply default args.
- args = acf.parseArgs(args, {
- target: false,
- destructive: false,
- search: '',
- replace: '',
- replacer: null
- });
-
- // Extract args.
- var $el = args.target;
-
- // Provide backup for empty args.
- if( !args.search ) {
- args.search = $el.attr('data-id');
- }
- if( !args.replace ) {
- args.replace = acf.uniqid('acf');
- }
- if( !args.replacer ) {
- args.replacer = function( name, value, search, replace ){
- return value.replace( search, replace );
- };
- }
-
- // Callback function for jQuery replacing.
- var withReplacer = function( name ){
- return function( i, value ){
- return args.replacer( name, value, args.search, args.replace );
- }
- };
-
- // Destructive Replace.
- if( args.destructive ) {
- var html = acf.strReplace( args.search, args.replace, $el.outerHTML() );
- $el.replaceWith( html );
-
- // Standard Replace.
- } else {
- $el.attr('data-id', args.replace);
- $el.find('[id*="' + args.search + '"]').attr('id', withReplacer('id'));
- $el.find('[for*="' + args.search + '"]').attr('for', withReplacer('for'));
- $el.find('[name*="' + args.search + '"]').attr('name', withReplacer('name'));
- }
-
- // return
- return $el;
- };
-
-
- /**
- * acf.prepareForAjax
- *
- * description
- *
- * @date 4/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.prepareForAjax = function( data ){
-
- // required
- data.nonce = acf.get('nonce');
- data.post_id = acf.get('post_id');
-
- // language
- if( acf.has('language') ) {
- data.lang = acf.get('language');
- }
-
- // filter for 3rd party customization
- data = acf.applyFilters('prepare_for_ajax', data);
-
- // return
- return data;
- };
-
-
- /**
- * acf.startButtonLoading
- *
- * description
- *
- * @date 5/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.startButtonLoading = function( $el ){
- $el.prop('disabled', true);
- $el.after(' ');
- }
-
- acf.stopButtonLoading = function( $el ){
- $el.prop('disabled', false);
- $el.next('.acf-loading').remove();
- }
-
-
- /**
- * acf.showLoading
- *
- * description
- *
- * @date 12/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.showLoading = function( $el ){
- $el.append('
');
- };
-
- acf.hideLoading = function( $el ){
- $el.children('.acf-loading-overlay').remove();
- };
-
-
- /**
- * acf.updateUserSetting
- *
- * description
- *
- * @date 5/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.updateUserSetting = function( name, value ){
-
- var ajaxData = {
- action: 'acf/ajax/user_setting',
- name: name,
- value: value
- };
-
- $.ajax({
- url: acf.get('ajaxurl'),
- data: acf.prepareForAjax(ajaxData),
- type: 'post',
- dataType: 'html'
- });
-
- };
-
-
- /**
- * acf.val
- *
- * description
- *
- * @date 8/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.val = function( $input, value, silent ){
-
- // vars
- var prevValue = $input.val();
-
- // bail if no change
- if( value === prevValue ) {
- return false
- }
-
- // update value
- $input.val( value );
-
- // prevent select elements displaying blank value if option doesn't exist
- if( $input.is('select') && $input.val() === null ) {
- $input.val( prevValue );
- return false;
- }
-
- // update with trigger
- if( silent !== true ) {
- $input.trigger('change');
- }
-
- // return
- return true;
- };
-
- /**
- * acf.show
- *
- * description
- *
- * @date 9/2/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.show = function( $el, lockKey ){
-
- // unlock
- if( lockKey ) {
- acf.unlock($el, 'hidden', lockKey);
- }
-
- // bail early if $el is still locked
- if( acf.isLocked($el, 'hidden') ) {
- //console.log( 'still locked', getLocks( $el, 'hidden' ));
- return false;
- }
-
- // $el is hidden, remove class and return true due to change in visibility
- if( $el.hasClass('acf-hidden') ) {
- $el.removeClass('acf-hidden');
- return true;
-
- // $el is visible, return false due to no change in visibility
- } else {
- return false;
- }
- };
-
-
- /**
- * acf.hide
- *
- * description
- *
- * @date 9/2/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.hide = function( $el, lockKey ){
-
- // lock
- if( lockKey ) {
- acf.lock($el, 'hidden', lockKey);
- }
-
- // $el is hidden, return false due to no change in visibility
- if( $el.hasClass('acf-hidden') ) {
- return false;
-
- // $el is visible, add class and return true due to change in visibility
- } else {
- $el.addClass('acf-hidden');
- return true;
- }
- };
-
-
- /**
- * acf.isHidden
- *
- * description
- *
- * @date 9/2/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.isHidden = function( $el ){
- return $el.hasClass('acf-hidden');
- };
-
-
- /**
- * acf.isVisible
- *
- * description
- *
- * @date 9/2/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.isVisible = function( $el ){
- return !acf.isHidden( $el );
- };
-
-
- /**
- * enable
- *
- * description
- *
- * @date 12/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- var enable = function( $el, lockKey ){
-
- // check class. Allow .acf-disabled to overrule all JS
- if( $el.hasClass('acf-disabled') ) {
- return false;
- }
-
- // unlock
- if( lockKey ) {
- acf.unlock($el, 'disabled', lockKey);
- }
-
- // bail early if $el is still locked
- if( acf.isLocked($el, 'disabled') ) {
- return false;
- }
-
- // $el is disabled, remove prop and return true due to change
- if( $el.prop('disabled') ) {
- $el.prop('disabled', false);
- return true;
-
- // $el is enabled, return false due to no change
- } else {
- return false;
- }
- };
-
- /**
- * acf.enable
- *
- * description
- *
- * @date 9/2/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.enable = function( $el, lockKey ){
-
- // enable single input
- if( $el.attr('name') ) {
- return enable( $el, lockKey );
- }
-
- // find and enable child inputs
- // return true if any inputs have changed
- var results = false;
- $el.find('[name]').each(function(){
- var result = enable( $(this), lockKey );
- if( result ) {
- results = true;
- }
- });
- return results;
- };
-
-
- /**
- * disable
- *
- * description
- *
- * @date 12/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- var disable = function( $el, lockKey ){
-
- // lock
- if( lockKey ) {
- acf.lock($el, 'disabled', lockKey);
- }
-
- // $el is disabled, return false due to no change
- if( $el.prop('disabled') ) {
- return false;
-
- // $el is enabled, add prop and return true due to change
- } else {
- $el.prop('disabled', true);
- return true;
- }
- };
-
-
- /**
- * acf.disable
- *
- * description
- *
- * @date 9/2/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.disable = function( $el, lockKey ){
-
- // disable single input
- if( $el.attr('name') ) {
- return disable( $el, lockKey );
- }
-
- // find and enable child inputs
- // return true if any inputs have changed
- var results = false;
- $el.find('[name]').each(function(){
- var result = disable( $(this), lockKey );
- if( result ) {
- results = true;
- }
- });
- return results;
- };
-
-
- /**
- * acf.isset
- *
- * description
- *
- * @date 10/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.isset = function( obj /*, level1, level2, ... */ ) {
- for( var i = 1; i < arguments.length; i++ ) {
- if( !obj || !obj.hasOwnProperty(arguments[i]) ) {
- return false;
- }
- obj = obj[ arguments[i] ];
- }
- return true;
- };
-
- /**
- * acf.isget
- *
- * description
- *
- * @date 10/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.isget = function( obj /*, level1, level2, ... */ ) {
- for( var i = 1; i < arguments.length; i++ ) {
- if( !obj || !obj.hasOwnProperty(arguments[i]) ) {
- return null;
- }
- obj = obj[ arguments[i] ];
- }
- return obj;
- };
-
- /**
- * acf.getFileInputData
- *
- * description
- *
- * @date 10/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.getFileInputData = function( $input, callback ){
-
- // vars
- var value = $input.val();
-
- // bail early if no value
- if( !value ) {
- return false;
- }
-
- // data
- var data = {
- url: value
- };
-
- // modern browsers
- var file = acf.isget( $input[0], 'files', 0);
- if( file ){
-
- // update data
- data.size = file.size;
- data.type = file.type;
-
- // image
- if( file.type.indexOf('image') > -1 ) {
-
- // vars
- var windowURL = window.URL || window.webkitURL;
- var img = new Image();
-
- img.onload = function() {
-
- // update
- data.width = this.width;
- data.height = this.height;
-
- callback( data );
- };
- img.src = windowURL.createObjectURL( file );
- } else {
- callback( data );
- }
- } else {
- callback( data );
- }
- };
-
- /**
- * acf.isAjaxSuccess
- *
- * description
- *
- * @date 18/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.isAjaxSuccess = function( json ){
- return ( json && json.success );
- };
-
- /**
- * acf.getAjaxMessage
- *
- * description
- *
- * @date 18/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.getAjaxMessage = function( json ){
- return acf.isget( json, 'data', 'message' );
- };
-
- /**
- * acf.getAjaxError
- *
- * description
- *
- * @date 18/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.getAjaxError = function( json ){
- return acf.isget( json, 'data', 'error' );
- };
-
- /**
- * Returns the error message from an XHR object.
- *
- * @date 17/3/20
- * @since 5.8.9
- *
- * @param object xhr The XHR object.
- * @return (string)
- */
- acf.getXhrError = function( xhr ){
- if( xhr.responseJSON && xhr.responseJSON.message ) {
- return xhr.responseJSON.message;
- } else if( xhr.statusText ) {
- return xhr.statusText;
- }
- return "";
- };
-
- /**
- * acf.renderSelect
- *
- * Renders the innter html for a select field.
- *
- * @date 19/2/18
- * @since 5.6.9
- *
- * @param jQuery $select The select element.
- * @param array choices An array of choices.
- * @return void
- */
-
- acf.renderSelect = function( $select, choices ){
-
- // vars
- var value = $select.val();
- var values = [];
-
- // callback
- var crawl = function( items ){
-
- // vars
- var itemsHtml = '';
-
- // loop
- items.map(function( item ){
-
- // vars
- var text = item.text || item.label || '';
- var id = item.id || item.value || '';
-
- // append
- values.push(id);
-
- // optgroup
- if( item.children ) {
- itemsHtml += '' + crawl( item.children ) + ' ';
-
- // option
- } else {
- itemsHtml += '' + acf.strEscape(text) + ' ';
- }
- });
-
- // return
- return itemsHtml;
- };
-
- // update HTML
- $select.html( crawl(choices) );
-
- // update value
- if( values.indexOf(value) > -1 ){
- $select.val( value );
- }
-
- // return selected value
- return $select.val();
- };
-
- /**
- * acf.lock
- *
- * Creates a "lock" on an element for a given type and key
- *
- * @date 22/2/18
- * @since 5.6.9
- *
- * @param jQuery $el The element to lock.
- * @param string type The type of lock such as "condition" or "visibility".
- * @param string key The key that will be used to unlock.
- * @return void
- */
-
- var getLocks = function( $el, type ){
- return $el.data('acf-lock-'+type) || [];
- };
-
- var setLocks = function( $el, type, locks ){
- $el.data('acf-lock-'+type, locks);
- }
-
- acf.lock = function( $el, type, key ){
- var locks = getLocks( $el, type );
- var i = locks.indexOf(key);
- if( i < 0 ) {
- locks.push( key );
- setLocks( $el, type, locks );
- }
- };
-
- /**
- * acf.unlock
- *
- * Unlocks a "lock" on an element for a given type and key
- *
- * @date 22/2/18
- * @since 5.6.9
- *
- * @param jQuery $el The element to lock.
- * @param string type The type of lock such as "condition" or "visibility".
- * @param string key The key that will be used to unlock.
- * @return void
- */
-
- acf.unlock = function( $el, type, key ){
- var locks = getLocks( $el, type );
- var i = locks.indexOf(key);
- if( i > -1 ) {
- locks.splice(i, 1);
- setLocks( $el, type, locks );
- }
-
- // return true if is unlocked (no locks)
- return (locks.length === 0);
- };
-
- /**
- * acf.isLocked
- *
- * Returns true if a lock exists for a given type
- *
- * @date 22/2/18
- * @since 5.6.9
- *
- * @param jQuery $el The element to lock.
- * @param string type The type of lock such as "condition" or "visibility".
- * @return void
- */
-
- acf.isLocked = function( $el, type ){
- return ( getLocks( $el, type ).length > 0 );
- };
-
- /**
- * acf.isGutenberg
- *
- * Returns true if the Gutenberg editor is being used.
- *
- * @date 14/11/18
- * @since 5.8.0
- *
- * @param vois
- * @return bool
- */
- acf.isGutenberg = function(){
- return !!( window.wp && wp.data && wp.data.select && wp.data.select( 'core/editor' ) );
- };
-
- /**
- * acf.objectToArray
- *
- * Returns an array of items from the given object.
- *
- * @date 20/11/18
- * @since 5.8.0
- *
- * @param object obj The object of items.
- * @return array
- */
- acf.objectToArray = function( obj ){
- return Object.keys( obj ).map(function( key ){
- return obj[key];
- });
- };
-
- /**
- * acf.debounce
- *
- * Returns a debounced version of the passed function which will postpone its execution until after `wait` milliseconds have elapsed since the last time it was invoked.
- *
- * @date 28/8/19
- * @since 5.8.1
- *
- * @param function callback The callback function.
- * @return int wait The number of milliseconds to wait.
- */
- acf.debounce = function( callback, wait ){
- var timeout;
- return function(){
- var context = this;
- var args = arguments;
- var later = function(){
- callback.apply( context, args );
- };
- clearTimeout( timeout );
- timeout = setTimeout( later, wait );
- };
- };
-
- /**
- * acf.throttle
- *
- * Returns a throttled version of the passed function which will allow only one execution per `limit` time period.
- *
- * @date 28/8/19
- * @since 5.8.1
- *
- * @param function callback The callback function.
- * @return int wait The number of milliseconds to wait.
- */
- acf.throttle = function( callback, limit ){
- var busy = false;
- return function(){
- if( busy ) return;
- busy = true;
- setTimeout(function(){
- busy = false;
- }, limit);
- callback.apply( this, arguments );
- };
- };
-
- /**
- * acf.isInView
- *
- * Returns true if the given element is in view.
- *
- * @date 29/8/19
- * @since 5.8.1
- *
- * @param elem el The dom element to inspect.
- * @return bool
- */
- acf.isInView = function( el ){
- if( el instanceof jQuery ) {
- el = el[0];
- }
- var rect = el.getBoundingClientRect();
- return (
- rect.top !== rect.bottom &&
- rect.top >= 0 &&
- rect.left >= 0 &&
- rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
- rect.right <= (window.innerWidth || document.documentElement.clientWidth)
- );
- };
-
- /**
- * acf.onceInView
- *
- * Watches for a dom element to become visible in the browser and then excecutes the passed callback.
- *
- * @date 28/8/19
- * @since 5.8.1
- *
- * @param dom el The dom element to inspect.
- * @param function callback The callback function.
- */
- acf.onceInView = (function() {
-
- // Define list.
- var items = [];
- var id = 0;
-
- // Define check function.
- var check = function() {
- items.forEach(function( item ){
- if( acf.isInView(item.el) ) {
- item.callback.apply( this );
- pop( item.id );
- }
- });
- };
-
- // And create a debounced version.
- var debounced = acf.debounce( check, 300 );
-
- // Define add function.
- var push = function( el, callback ) {
-
- // Add event listener.
- if( !items.length ) {
- $(window).on( 'scroll resize', debounced ).on( 'acfrefresh orientationchange', check );
- }
-
- // Append to list.
- items.push({ id: id++, el: el, callback: callback });
- }
-
- // Define remove function.
- var pop = function( id ) {
-
- // Remove from list.
- items = items.filter(function(item) {
- return (item.id !== id);
- });
-
- // Clean up listener.
- if( !items.length ) {
- $(window).off( 'scroll resize', debounced ).off( 'acfrefresh orientationchange', check );
- }
- }
-
- // Define returned function.
- return function( el, callback ){
-
- // Allow jQuery object.
- if( el instanceof jQuery )
- el = el[0];
-
- // Execute callback if already in view or add to watch list.
- if( acf.isInView(el) ) {
- callback.apply( this );
- } else {
- push( el, callback );
- }
- }
- })();
-
- /**
- * acf.once
- *
- * Creates a function that is restricted to invoking `func` once.
- *
- * @date 2/9/19
- * @since 5.8.1
- *
- * @param function func The function to restrict.
- * @return function
- */
- acf.once = function( func ){
- var i = 0;
- return function(){
- if( i++ > 0 ) {
- return (func = undefined);
- }
- return func.apply(this, arguments);
- }
- }
-
- /**
- * Focuses attention to a specific element.
- *
- * @date 05/05/2020
- * @since 5.9.0
- *
- * @param jQuery $el The jQuery element to focus.
- * @return void
- */
- acf.focusAttention = function( $el ){
- var wait = 1000;
-
- // Apply class to focus attention.
- $el.addClass( 'acf-attention -focused' );
-
- // Scroll to element if needed.
- var scrollTime = 500;
- if( !acf.isInView( $el ) ) {
- $( 'body, html' ).animate({
- scrollTop: $el.offset().top - ( $(window).height() / 2 )
- }, scrollTime);
- wait += scrollTime;
- }
-
- // Remove class after $wait amount of time.
- var fadeTime = 250;
- setTimeout(function(){
- $el.removeClass( '-focused' );
- setTimeout(function(){
- $el.removeClass( 'acf-attention' );
- }, fadeTime);
- }, wait);
- };
-
- /**
- * Description
- *
- * @date 05/05/2020
- * @since 5.9.0
- *
- * @param type Var Description.
- * @return type Description.
- */
- acf.onFocus = function( $el, callback ){
-
- // Only run once per element.
- // if( $el.data('acf.onFocus') ) {
- // return false;
- // }
-
- // Vars.
- var ignoreBlur = false;
- var focus = false;
-
- // Functions.
- var onFocus = function(){
- ignoreBlur = true;
- setTimeout(function(){
- ignoreBlur = false;
- }, 1);
- setFocus( true );
- };
- var onBlur = function(){
- if( !ignoreBlur ) {
- setFocus( false );
- }
- };
- var addEvents = function(){
- $(document).on('click', onBlur);
- //$el.on('acfBlur', onBlur);
- $el.on('blur', 'input, select, textarea', onBlur);
- };
- var removeEvents = function(){
- $(document).off('click', onBlur);
- //$el.off('acfBlur', onBlur);
- $el.off('blur', 'input, select, textarea', onBlur);
- };
- var setFocus = function( value ){
- if( focus === value ) {
- return;
- }
- if( value ) {
- addEvents();
- } else {
- removeEvents();
- }
- focus = value;
- callback( value );
- };
-
- // Add events and set data.
- $el.on('click', onFocus);
- //$el.on('acfFocus', onFocus);
- $el.on('focus', 'input, select, textarea', onFocus);
- //$el.data('acf.onFocus', true);
- };
-
- /*
- * exists
- *
- * This function will return true if a jQuery selection exists
- *
- * @type function
- * @date 8/09/2014
- * @since 5.0.0
- *
- * @param n/a
- * @return (boolean)
- */
-
- $.fn.exists = function() {
- return $(this).length>0;
- };
-
-
- /*
- * outerHTML
- *
- * This function will return a string containing the HTML of the selected element
- *
- * @type function
- * @date 19/11/2013
- * @since 5.0.0
- *
- * @param $.fn
- * @return (string)
- */
-
- $.fn.outerHTML = function() {
- return $(this).get(0).outerHTML;
- };
-
- /*
- * indexOf
- *
- * This function will provide compatibility for ie8
- *
- * @type function
- * @date 5/3/17
- * @since 5.5.10
- *
- * @param n/a
- * @return n/a
- */
-
- if( !Array.prototype.indexOf ) {
-
- Array.prototype.indexOf = function(val) {
- return $.inArray(val, this);
- };
-
- }
-
- /**
- * Triggers a "refresh" action used by various Components to redraw the DOM.
- *
- * @date 26/05/2020
- * @since 5.9.0
- *
- * @param void
- * @return void
- */
- acf.refresh = acf.debounce(function(){
- $( window ).trigger('acfrefresh');
- acf.doAction('refresh');
- }, 0);
-
- // Set up actions from events
- $(document).ready(function(){
- acf.doAction('ready');
- });
-
- $(window).on('load', function(){
- acf.doAction('load');
- });
-
- $(window).on('beforeunload', function(){
- acf.doAction('unload');
- });
-
- $(window).on('resize', function(){
- acf.doAction('resize');
- });
-
- $(document).on('sortstart', function( event, ui ) {
- acf.doAction('sortstart', ui.item, ui.placeholder);
- });
-
- $(document).on('sortstop', function( event, ui ) {
- acf.doAction('sortstop', ui.item, ui.placeholder);
- });
-
-})(jQuery);
-
-( function( window, undefined ) {
- "use strict";
-
- /**
- * Handles managing all events for whatever you plug it into. Priorities for hooks are based on lowest to highest in
- * that, lowest priority hooks are fired first.
- */
- var EventManager = function() {
- /**
- * Maintain a reference to the object scope so our public methods never get confusing.
- */
- var MethodsAvailable = {
- removeFilter : removeFilter,
- applyFilters : applyFilters,
- addFilter : addFilter,
- removeAction : removeAction,
- doAction : doAction,
- addAction : addAction,
- storage : getStorage
- };
-
- /**
- * Contains the hooks that get registered with this EventManager. The array for storage utilizes a "flat"
- * object literal such that looking up the hook utilizes the native object literal hash.
- */
- var STORAGE = {
- actions : {},
- filters : {}
- };
-
- function getStorage() {
-
- return STORAGE;
-
- };
-
- /**
- * Adds an action to the event manager.
- *
- * @param action Must contain namespace.identifier
- * @param callback Must be a valid callback function before this action is added
- * @param [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook
- * @param [context] Supply a value to be used for this
- */
- function addAction( action, callback, priority, context ) {
- if( typeof action === 'string' && typeof callback === 'function' ) {
- priority = parseInt( ( priority || 10 ), 10 );
- _addHook( 'actions', action, callback, priority, context );
- }
-
- return MethodsAvailable;
- }
-
- /**
- * Performs an action if it exists. You can pass as many arguments as you want to this function; the only rule is
- * that the first argument must always be the action.
- */
- function doAction( /* action, arg1, arg2, ... */ ) {
- var args = Array.prototype.slice.call( arguments );
- var action = args.shift();
-
- if( typeof action === 'string' ) {
- _runHook( 'actions', action, args );
- }
-
- return MethodsAvailable;
- }
-
- /**
- * Removes the specified action if it contains a namespace.identifier & exists.
- *
- * @param action The action to remove
- * @param [callback] Callback function to remove
- */
- function removeAction( action, callback ) {
- if( typeof action === 'string' ) {
- _removeHook( 'actions', action, callback );
- }
-
- return MethodsAvailable;
- }
-
- /**
- * Adds a filter to the event manager.
- *
- * @param filter Must contain namespace.identifier
- * @param callback Must be a valid callback function before this action is added
- * @param [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook
- * @param [context] Supply a value to be used for this
- */
- function addFilter( filter, callback, priority, context ) {
- if( typeof filter === 'string' && typeof callback === 'function' ) {
- priority = parseInt( ( priority || 10 ), 10 );
- _addHook( 'filters', filter, callback, priority, context );
- }
-
- return MethodsAvailable;
- }
-
- /**
- * Performs a filter if it exists. You should only ever pass 1 argument to be filtered. The only rule is that
- * the first argument must always be the filter.
- */
- function applyFilters( /* filter, filtered arg, arg2, ... */ ) {
- var args = Array.prototype.slice.call( arguments );
- var filter = args.shift();
-
- if( typeof filter === 'string' ) {
- return _runHook( 'filters', filter, args );
- }
-
- return MethodsAvailable;
- }
-
- /**
- * Removes the specified filter if it contains a namespace.identifier & exists.
- *
- * @param filter The action to remove
- * @param [callback] Callback function to remove
- */
- function removeFilter( filter, callback ) {
- if( typeof filter === 'string') {
- _removeHook( 'filters', filter, callback );
- }
-
- return MethodsAvailable;
- }
-
- /**
- * Removes the specified hook by resetting the value of it.
- *
- * @param type Type of hook, either 'actions' or 'filters'
- * @param hook The hook (namespace.identifier) to remove
- * @private
- */
- function _removeHook( type, hook, callback, context ) {
- if ( !STORAGE[ type ][ hook ] ) {
- return;
- }
- if ( !callback ) {
- STORAGE[ type ][ hook ] = [];
- } else {
- var handlers = STORAGE[ type ][ hook ];
- var i;
- if ( !context ) {
- for ( i = handlers.length; i--; ) {
- if ( handlers[i].callback === callback ) {
- handlers.splice( i, 1 );
- }
- }
- }
- else {
- for ( i = handlers.length; i--; ) {
- var handler = handlers[i];
- if ( handler.callback === callback && handler.context === context) {
- handlers.splice( i, 1 );
- }
- }
- }
- }
- }
-
- /**
- * Adds the hook to the appropriate storage container
- *
- * @param type 'actions' or 'filters'
- * @param hook The hook (namespace.identifier) to add to our event manager
- * @param callback The function that will be called when the hook is executed.
- * @param priority The priority of this hook. Must be an integer.
- * @param [context] A value to be used for this
- * @private
- */
- function _addHook( type, hook, callback, priority, context ) {
- var hookObject = {
- callback : callback,
- priority : priority,
- context : context
- };
-
- // Utilize 'prop itself' : http://jsperf.com/hasownproperty-vs-in-vs-undefined/19
- var hooks = STORAGE[ type ][ hook ];
- if( hooks ) {
- hooks.push( hookObject );
- hooks = _hookInsertSort( hooks );
- }
- else {
- hooks = [ hookObject ];
- }
-
- STORAGE[ type ][ hook ] = hooks;
- }
-
- /**
- * Use an insert sort for keeping our hooks organized based on priority. This function is ridiculously faster
- * than bubble sort, etc: http://jsperf.com/javascript-sort
- *
- * @param hooks The custom array containing all of the appropriate hooks to perform an insert sort on.
- * @private
- */
- function _hookInsertSort( hooks ) {
- var tmpHook, j, prevHook;
- for( var i = 1, len = hooks.length; i < len; i++ ) {
- tmpHook = hooks[ i ];
- j = i;
- while( ( prevHook = hooks[ j - 1 ] ) && prevHook.priority > tmpHook.priority ) {
- hooks[ j ] = hooks[ j - 1 ];
- --j;
- }
- hooks[ j ] = tmpHook;
- }
-
- return hooks;
- }
-
- /**
- * Runs the specified hook. If it is an action, the value is not modified but if it is a filter, it is.
- *
- * @param type 'actions' or 'filters'
- * @param hook The hook ( namespace.identifier ) to be ran.
- * @param args Arguments to pass to the action/filter. If it's a filter, args is actually a single parameter.
- * @private
- */
- function _runHook( type, hook, args ) {
- var handlers = STORAGE[ type ][ hook ];
-
- if ( !handlers ) {
- return (type === 'filters') ? args[0] : false;
- }
-
- var i = 0, len = handlers.length;
- if ( type === 'filters' ) {
- for ( ; i < len; i++ ) {
- args[ 0 ] = handlers[ i ].callback.apply( handlers[ i ].context, args );
- }
- } else {
- for ( ; i < len; i++ ) {
- handlers[ i ].callback.apply( handlers[ i ].context, args );
- }
- }
-
- return ( type === 'filters' ) ? args[ 0 ] : true;
- }
-
- // return all of the publicly available methods
- return MethodsAvailable;
-
- };
-
- // instantiate
- acf.hooks = new EventManager();
-
-} )( window );
-
-(function($, undefined){
-
- // Cached regex to split keys for `addEvent`.
- var delegateEventSplitter = /^(\S+)\s*(.*)$/;
-
- /**
- * extend
- *
- * Helper function to correctly set up the prototype chain for subclasses
- * Heavily inspired by backbone.js
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object protoProps New properties for this object.
- * @return function.
- */
-
- var extend = function( protoProps ) {
-
- // vars
- var Parent = this;
- var Child;
-
- // The constructor function for the new subclass is either defined by you
- // (the "constructor" property in your `extend` definition), or defaulted
- // by us to simply call the parent constructor.
- if( protoProps && protoProps.hasOwnProperty('constructor') ) {
- Child = protoProps.constructor;
- } else {
- Child = function(){ return Parent.apply(this, arguments); };
- }
-
- // Add static properties to the constructor function, if supplied.
- $.extend(Child, Parent);
-
- // Set the prototype chain to inherit from `parent`, without calling
- // `parent`'s constructor function and add the prototype properties.
- Child.prototype = Object.create(Parent.prototype);
- $.extend(Child.prototype, protoProps);
- Child.prototype.constructor = Child;
-
- // Set a convenience property in case the parent's prototype is needed later.
- //Child.prototype.__parent__ = Parent.prototype;
-
- // return
- return Child;
-
- };
-
-
- /**
- * Model
- *
- * Base class for all inheritence
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object props
- * @return function.
- */
-
- var Model = acf.Model = function(){
-
- // generate uique client id
- this.cid = acf.uniqueId('acf');
-
- // set vars to avoid modifying prototype
- this.data = $.extend(true, {}, this.data);
-
- // pass props to setup function
- this.setup.apply(this, arguments);
-
- // store on element (allow this.setup to create this.$el)
- if( this.$el && !this.$el.data('acf') ) {
- this.$el.data('acf', this);
- }
-
- // initialize
- var initialize = function(){
- this.initialize();
- this.addEvents();
- this.addActions();
- this.addFilters();
- };
-
- // initialize on action
- if( this.wait && !acf.didAction(this.wait) ) {
- this.addAction(this.wait, initialize);
-
- // initialize now
- } else {
- initialize.apply(this);
- }
- };
-
- // Attach all inheritable methods to the Model prototype.
- $.extend(Model.prototype, {
-
- // Unique model id
- id: '',
-
- // Unique client id
- cid: '',
-
- // jQuery element
- $el: null,
-
- // Data specific to this instance
- data: {},
-
- // toggle used when changing data
- busy: false,
- changed: false,
-
- // Setup events hooks
- events: {},
- actions: {},
- filters: {},
-
- // class used to avoid nested event triggers
- eventScope: '',
-
- // action to wait until initialize
- wait: false,
-
- // action priority default
- priority: 10,
-
- /**
- * get
- *
- * Gets a specific data value
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @return mixed
- */
-
- get: function( name ) {
- return this.data[name];
- },
-
- /**
- * has
- *
- * Returns `true` if the data exists and is not null
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @return boolean
- */
-
- has: function( name ) {
- return this.get(name) != null;
- },
-
- /**
- * set
- *
- * Sets a specific data value
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param mixed value
- * @return this
- */
-
- set: function( name, value, silent ) {
-
- // bail if unchanged
- var prevValue = this.get(name);
- if( prevValue == value ) {
- return this;
- }
-
- // set data
- this.data[ name ] = value;
-
- // trigger events
- if( !silent ) {
- this.changed = true;
- this.trigger('changed:' + name, [value, prevValue]);
- this.trigger('changed', [name, value, prevValue]);
- }
-
- // return
- return this;
- },
-
- /**
- * inherit
- *
- * Inherits the data from a jQuery element
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param jQuery $el
- * @return this
- */
-
- inherit: function( data ){
-
- // allow jQuery
- if( data instanceof jQuery ) {
- data = data.data();
- }
-
- // extend
- $.extend(this.data, data);
-
- // return
- return this;
- },
-
- /**
- * prop
- *
- * mimics the jQuery prop function
- *
- * @date 4/6/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- prop: function(){
- return this.$el.prop.apply(this.$el, arguments);
- },
-
- /**
- * setup
- *
- * Run during constructor function
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return n/a
- */
-
- setup: function( props ){
- $.extend(this, props);
- },
-
- /**
- * initialize
- *
- * Also run during constructor function
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return n/a
- */
-
- initialize: function(){},
-
- /**
- * addElements
- *
- * Adds multiple jQuery elements to this object
- *
- * @date 9/5/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- addElements: function( elements ){
- elements = elements || this.elements || null;
- if( !elements || !Object.keys(elements).length ) return false;
- for( var i in elements ) {
- this.addElement( i, elements[i] );
- }
- },
-
- /**
- * addElement
- *
- * description
- *
- * @date 9/5/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- addElement: function( name, selector){
- this[ '$' + name ] = this.$( selector );
- },
-
- /**
- * addEvents
- *
- * Adds multiple event handlers
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object events {event1 : callback, event2 : callback, etc }
- * @return n/a
- */
-
- addEvents: function( events ){
- events = events || this.events || null;
- if( !events ) return false;
- for( var key in events ) {
- var match = key.match(delegateEventSplitter);
- this.on(match[1], match[2], events[key]);
- }
- },
-
- /**
- * removeEvents
- *
- * Removes multiple event handlers
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object events {event1 : callback, event2 : callback, etc }
- * @return n/a
- */
-
- removeEvents: function( events ){
- events = events || this.events || null;
- if( !events ) return false;
- for( var key in events ) {
- var match = key.match(delegateEventSplitter);
- this.off(match[1], match[2], events[key]);
- }
- },
-
- /**
- * getEventTarget
- *
- * Returns a jQUery element to tigger an event on
- *
- * @date 5/6/18
- * @since 5.6.9
- *
- * @param jQuery $el The default jQuery element. Optional.
- * @param string event The event name. Optional.
- * @return jQuery
- */
-
- getEventTarget: function( $el, event ){
- return $el || this.$el || $(document);
- },
-
- /**
- * validateEvent
- *
- * Returns true if the event target's closest $el is the same as this.$el
- * Requires both this.el and this.$el to be defined
- *
- * @date 5/6/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- validateEvent: function( e ){
- if( this.eventScope ) {
- return $( e.target ).closest( this.eventScope ).is( this.$el );
- } else {
- return true;
- }
- },
-
- /**
- * proxyEvent
- *
- * Returns a new event callback function scoped to this model
- *
- * @date 29/3/18
- * @since 5.6.9
- *
- * @param function callback
- * @return function
- */
-
- proxyEvent: function( callback ){
- return this.proxy(function(e){
-
- // validate
- if( !this.validateEvent(e) ) {
- return;
- }
-
- // construct args
- var args = acf.arrayArgs( arguments );
- var extraArgs = args.slice(1);
- var eventArgs = [ e, $(e.currentTarget) ].concat( extraArgs );
-
- // callback
- callback.apply(this, eventArgs);
- });
- },
-
- /**
- * on
- *
- * Adds an event handler similar to jQuery
- * Uses the instance 'cid' to namespace event
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param string callback
- * @return n/a
- */
-
- on: function( a1, a2, a3, a4 ){
-
- // vars
- var $el, event, selector, callback, args;
-
- // find args
- if( a1 instanceof jQuery ) {
-
- // 1. args( $el, event, selector, callback )
- if( a4 ) {
- $el = a1; event = a2; selector = a3; callback = a4;
-
- // 2. args( $el, event, callback )
- } else {
- $el = a1; event = a2; callback = a3;
- }
- } else {
-
- // 3. args( event, selector, callback )
- if( a3 ) {
- event = a1; selector = a2; callback = a3;
-
- // 4. args( event, callback )
- } else {
- event = a1; callback = a2;
- }
- }
-
- // element
- $el = this.getEventTarget( $el );
-
- // modify callback
- if( typeof callback === 'string' ) {
- callback = this.proxyEvent( this[callback] );
- }
-
- // modify event
- event = event + '.' + this.cid;
-
- // args
- if( selector ) {
- args = [ event, selector, callback ];
- } else {
- args = [ event, callback ];
- }
-
- // on()
- $el.on.apply($el, args);
- },
-
- /**
- * off
- *
- * Removes an event handler similar to jQuery
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param string callback
- * @return n/a
- */
-
- off: function( a1, a2 ,a3 ){
-
- // vars
- var $el, event, selector, args;
-
- // find args
- if( a1 instanceof jQuery ) {
-
- // 1. args( $el, event, selector )
- if( a3 ) {
- $el = a1; event = a2; selector = a3;
-
- // 2. args( $el, event )
- } else {
- $el = a1; event = a2;
- }
- } else {
-
- // 3. args( event, selector )
- if( a2 ) {
- event = a1; selector = a2;
-
- // 4. args( event )
- } else {
- event = a1;
- }
- }
-
- // element
- $el = this.getEventTarget( $el );
-
- // modify event
- event = event + '.' + this.cid;
-
- // args
- if( selector ) {
- args = [ event, selector ];
- } else {
- args = [ event ];
- }
-
- // off()
- $el.off.apply($el, args);
- },
-
- /**
- * trigger
- *
- * Triggers an event similar to jQuery
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param string callback
- * @return n/a
- */
-
- trigger: function( name, args, bubbles ){
- var $el = this.getEventTarget();
- if( bubbles ) {
- $el.trigger.apply( $el, arguments );
- } else {
- $el.triggerHandler.apply( $el, arguments );
- }
- return this;
- },
-
- /**
- * addActions
- *
- * Adds multiple action handlers
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object actions {action1 : callback, action2 : callback, etc }
- * @return n/a
- */
-
- addActions: function( actions ){
- actions = actions || this.actions || null;
- if( !actions ) return false;
- for( var i in actions ) {
- this.addAction( i, actions[i] );
- }
- },
-
- /**
- * removeActions
- *
- * Removes multiple action handlers
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object actions {action1 : callback, action2 : callback, etc }
- * @return n/a
- */
-
- removeActions: function( actions ){
- actions = actions || this.actions || null;
- if( !actions ) return false;
- for( var i in actions ) {
- this.removeAction( i, actions[i] );
- }
- },
-
- /**
- * addAction
- *
- * Adds an action using the wp.hooks library
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param string callback
- * @return n/a
- */
-
- addAction: function( name, callback, priority ){
- //console.log('addAction', name, priority);
- // defaults
- priority = priority || this.priority;
-
- // modify callback
- if( typeof callback === 'string' ) {
- callback = this[ callback ];
- }
-
- // add
- acf.addAction(name, callback, priority, this);
-
- },
-
- /**
- * removeAction
- *
- * Remove an action using the wp.hooks library
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param string callback
- * @return n/a
- */
-
- removeAction: function( name, callback ){
- acf.removeAction(name, this[ callback ]);
- },
-
- /**
- * addFilters
- *
- * Adds multiple filter handlers
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object filters {filter1 : callback, filter2 : callback, etc }
- * @return n/a
- */
-
- addFilters: function( filters ){
- filters = filters || this.filters || null;
- if( !filters ) return false;
- for( var i in filters ) {
- this.addFilter( i, filters[i] );
- }
- },
-
- /**
- * addFilter
- *
- * Adds a filter using the wp.hooks library
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param string callback
- * @return n/a
- */
-
- addFilter: function( name, callback, priority ){
-
- // defaults
- priority = priority || this.priority;
-
- // modify callback
- if( typeof callback === 'string' ) {
- callback = this[ callback ];
- }
-
- // add
- acf.addFilter(name, callback, priority, this);
-
- },
-
- /**
- * removeFilters
- *
- * Removes multiple filter handlers
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object filters {filter1 : callback, filter2 : callback, etc }
- * @return n/a
- */
-
- removeFilters: function( filters ){
- filters = filters || this.filters || null;
- if( !filters ) return false;
- for( var i in filters ) {
- this.removeFilter( i, filters[i] );
- }
- },
-
- /**
- * removeFilter
- *
- * Remove a filter using the wp.hooks library
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param string callback
- * @return n/a
- */
-
- removeFilter: function( name, callback ){
- acf.removeFilter(name, this[ callback ]);
- },
-
- /**
- * $
- *
- * description
- *
- * @date 16/12/17
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- $: function( selector ){
- return this.$el.find( selector );
- },
-
- /**
- * remove
- *
- * Removes the element and listenters
- *
- * @date 19/12/17
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- remove: function(){
- this.removeEvents();
- this.removeActions();
- this.removeFilters();
- this.$el.remove();
- },
-
- /**
- * setTimeout
- *
- * description
- *
- * @date 16/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- setTimeout: function( callback, milliseconds ){
- return setTimeout( this.proxy(callback), milliseconds );
- },
-
- /**
- * time
- *
- * used for debugging
- *
- * @date 7/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- time: function(){
- console.time( this.id || this.cid );
- },
-
- /**
- * timeEnd
- *
- * used for debugging
- *
- * @date 7/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- timeEnd: function(){
- console.timeEnd( this.id || this.cid );
- },
-
- /**
- * show
- *
- * description
- *
- * @date 15/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- show: function(){
- acf.show( this.$el );
- },
-
-
- /**
- * hide
- *
- * description
- *
- * @date 15/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- hide: function(){
- acf.hide( this.$el );
- },
-
- /**
- * proxy
- *
- * Returns a new function scoped to this model
- *
- * @date 29/3/18
- * @since 5.6.9
- *
- * @param function callback
- * @return function
- */
-
- proxy: function( callback ){
- return $.proxy( callback, this );
- }
-
-
- });
-
- // Set up inheritance for the model
- Model.extend = extend;
-
- // Global model storage
- acf.models = {};
-
- /**
- * acf.getInstance
- *
- * This function will get an instance from an element
- *
- * @date 5/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.getInstance = function( $el ){
- return $el.data('acf');
- };
-
- /**
- * acf.getInstances
- *
- * This function will get an array of instances from multiple elements
- *
- * @date 5/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.getInstances = function( $el ){
- var instances = [];
- $el.each(function(){
- instances.push( acf.getInstance( $(this) ) );
- });
- return instances;
- };
-
-})(jQuery);
-
-(function($, undefined){
-
- acf.models.Popup = acf.Model.extend({
-
- data: {
- title: '',
- content: '',
- width: 0,
- height: 0,
- loading: false
- },
-
- events: {
- 'click [data-event="close"]': 'onClickClose',
- 'click .acf-close-popup': 'onClickClose',
- },
-
- setup: function( props ){
- $.extend(this.data, props);
- this.$el = $(this.tmpl());
- },
-
- initialize: function(){
- this.render();
- this.open();
- },
-
- tmpl: function(){
- return [
- ''
- ].join('');
- },
-
- render: function(){
-
- // Extract Vars.
- var title = this.get('title');
- var content = this.get('content');
- var loading = this.get('loading');
- var width = this.get('width');
- var height = this.get('height');
-
- // Update.
- this.title( title );
- this.content( content );
- if( width ) {
- this.$('.acf-popup-box').css('width', width);
- }
- if( height ) {
- this.$('.acf-popup-box').css('min-height', height);
- }
- this.loading( loading );
-
- // Trigger action.
- acf.doAction('append', this.$el);
- },
-
- update: function( props ){
- this.data = acf.parseArgs(props, this.data);
- this.render();
- },
-
- title: function( title ){
- this.$('.title:first h3').html( title );
- },
-
- content: function( content ){
- this.$('.inner:first').html( content );
- },
-
- loading: function( show ){
- var $loading = this.$('.loading:first');
- show ? $loading.show() : $loading.hide();
- },
-
- open: function(){
- $('body').append( this.$el );
- },
-
- close: function(){
- this.remove();
- },
-
- onClickClose: function( e, $el ){
- e.preventDefault();
- this.close();
- }
-
- });
-
- /**
- * newPopup
- *
- * Creates a new Popup with the supplied props
- *
- * @date 17/12/17
- * @since 5.6.5
- *
- * @param object props
- * @return object
- */
-
- acf.newPopup = function( props ){
- return new acf.models.Popup( props );
- };
-
-})(jQuery);
-
-(function($, undefined){
-
- acf.models.Modal = acf.Model.extend({
- data: {
- title: '',
- content: '',
- toolbar: '',
- },
- events: {
- 'click .acf-modal-close': 'onClickClose',
- },
- setup: function( props ){
- $.extend(this.data, props);
- this.$el = $();
- this.render();
- },
- initialize: function(){
- this.open();
- },
- render: function(){
-
- // Extract vars.
- var title = this.get('title');
- var content = this.get('content');
- var toolbar = this.get('toolbar');
-
- // Create element.
- var $el = $([
- '',
- '
',
- '
',
- '
' + title + ' ',
- ' ',
- '',
- '
' + content + '
',
- '
' + toolbar + '
',
- '
',
- '
',
- '
'
- ].join('') );
-
- // Update DOM.
- if( this.$el ) {
- this.$el.replaceWith( $el );
- }
- this.$el = $el;
-
- // Trigger action.
- acf.doAction('append', $el);
- },
- update: function( props ){
- this.data = acf.parseArgs(props, this.data);
- this.render();
- },
- title: function( title ){
- this.$('.acf-modal-title h2').html( title );
- },
- content: function( content ){
- this.$('.acf-modal-content').html( content );
- },
- toolbar: function( toolbar ){
- this.$('.acf-modal-toolbar').html( toolbar );
- },
- open: function(){
- $('body').append( this.$el );
- },
- close: function(){
- this.remove();
- },
- onClickClose: function( e, $el ){
- e.preventDefault();
- this.close();
- }
- });
-
- /**
- * Returns a new modal.
- *
- * @date 21/4/20
- * @since 5.9.0
- *
- * @param object props The modal props.
- * @return object
- */
- acf.newModal = function( props ){
- return new acf.models.Modal( props );
- };
-
-})(jQuery);
-
-(function($, undefined){
-
- var panel = new acf.Model({
-
- events: {
- 'click .acf-panel-title': 'onClick',
- },
-
- onClick: function( e, $el ){
- e.preventDefault();
- this.toggle( $el.parent() );
- },
-
- isOpen: function( $el ) {
- return $el.hasClass('-open');
- },
-
- toggle: function( $el ){
- this.isOpen($el) ? this.close( $el ) : this.open( $el );
- },
-
- open: function( $el ){
- $el.addClass('-open');
- $el.find('.acf-panel-title i').attr('class', 'dashicons dashicons-arrow-down');
- },
-
- close: function( $el ){
- $el.removeClass('-open');
- $el.find('.acf-panel-title i').attr('class', 'dashicons dashicons-arrow-right');
- }
-
- });
-
-})(jQuery);
-
-(function($, undefined){
-
- var Notice = acf.Model.extend({
-
- data: {
- text: '',
- type: '',
- timeout: 0,
- dismiss: true,
- target: false,
- close: function(){}
- },
-
- events: {
- 'click .acf-notice-dismiss': 'onClickClose',
- },
-
- tmpl: function(){
- return '
';
- },
-
- setup: function( props ){
- $.extend(this.data, props);
- this.$el = $(this.tmpl());
- },
-
- initialize: function(){
-
- // render
- this.render();
-
- // show
- this.show();
- },
-
- render: function(){
-
- // class
- this.type( this.get('type') );
-
- // text
- this.html( '' + this.get('text') + '
' );
-
- // close
- if( this.get('dismiss') ) {
- this.$el.append(' ');
- this.$el.addClass('-dismiss');
- }
-
- // timeout
- var timeout = this.get('timeout');
- if( timeout ) {
- this.away( timeout );
- }
- },
-
- update: function( props ){
-
- // update
- $.extend(this.data, props);
-
- // re-initialize
- this.initialize();
-
- // refresh events
- this.removeEvents();
- this.addEvents();
- },
-
- show: function(){
- var $target = this.get('target');
- if( $target ) {
- $target.prepend( this.$el );
- }
- },
-
- hide: function(){
- this.$el.remove();
- },
-
- away: function( timeout ){
- this.setTimeout(function(){
- acf.remove( this.$el );
- }, timeout );
- },
-
- type: function( type ){
-
- // remove prev type
- var prevType = this.get('type');
- if( prevType ) {
- this.$el.removeClass('-' + prevType);
- }
-
- // add new type
- this.$el.addClass('-' + type);
-
- // backwards compatibility
- if( type == 'error' ) {
- this.$el.addClass('acf-error-message');
- }
- },
-
- html: function( html ){
- this.$el.html( acf.escHtml( html ) );
- },
-
- text: function( text ){
- this.$('p').html( acf.escHtml( text ) );
- },
-
- onClickClose: function( e, $el ){
- e.preventDefault();
- this.get('close').apply(this, arguments);
- this.remove();
- }
- });
-
- acf.newNotice = function( props ){
-
- // ensure object
- if( typeof props !== 'object' ) {
- props = { text: props };
- }
-
- // instantiate
- return new Notice( props );
- };
-
- var noticeManager = new acf.Model({
- wait: 'prepare',
- priority: 1,
- initialize: function(){
-
- // vars
- var $notice = $('.acf-admin-notice');
-
- // move to avoid WP flicker
- if( $notice.length ) {
- $('h1:first').after( $notice );
- }
- }
- });
-
-
-})(jQuery);
-
-(function($, undefined){
-
- acf.newTooltip = function( props ){
-
- // ensure object
- if( typeof props !== 'object' ) {
- props = { text: props };
- }
-
- // confirmRemove
- if( props.confirmRemove !== undefined ) {
-
- props.textConfirm = acf.__('Remove');
- props.textCancel = acf.__('Cancel');
- return new TooltipConfirm( props );
-
- // confirm
- } else if( props.confirm !== undefined ) {
-
- return new TooltipConfirm( props );
-
- // default
- } else {
- return new Tooltip( props );
- }
-
- };
-
- var Tooltip = acf.Model.extend({
-
- data: {
- text: '',
- timeout: 0,
- target: null
- },
-
- tmpl: function(){
- return '
';
- },
-
- setup: function( props ){
- $.extend(this.data, props);
- this.$el = $(this.tmpl());
- },
-
- initialize: function(){
-
- // render
- this.render();
-
- // append
- this.show();
-
- // position
- this.position();
-
- // timeout
- var timeout = this.get('timeout');
- if( timeout ) {
- setTimeout( $.proxy(this.fade, this), timeout );
- }
- },
-
- update: function( props ){
- $.extend(this.data, props);
- this.initialize();
- },
-
- render: function(){
- this.html( this.get('text') );
- },
-
- show: function(){
- $('body').append( this.$el );
- },
-
- hide: function(){
- this.$el.remove();
- },
-
- fade: function(){
-
- // add class
- this.$el.addClass('acf-fade-up');
-
- // remove
- this.setTimeout(function(){
- this.remove();
- }, 250);
- },
-
- html: function( html ){
- this.$el.html( html );
- },
-
- position: function(){
-
- // vars
- var $tooltip = this.$el;
- var $target = this.get('target');
- if( !$target ) return;
-
- // Reset position.
- $tooltip.removeClass('right left bottom top').css({ top: 0, left: 0 });
-
- // Declare tollerance to edge of screen.
- var tolerance = 10;
-
- // Find target position.
- var targetWidth = $target.outerWidth();
- var targetHeight = $target.outerHeight();
- var targetTop = $target.offset().top;
- var targetLeft = $target.offset().left;
-
- // Find tooltip position.
- var tooltipWidth = $tooltip.outerWidth();
- var tooltipHeight = $tooltip.outerHeight();
- var tooltipTop = $tooltip.offset().top; // Should be 0, but WP media grid causes this to be 32 (toolbar padding).
-
- // Assume default top alignment.
- var top = targetTop - tooltipHeight - tooltipTop;
- var left = targetLeft + (targetWidth / 2) - (tooltipWidth / 2);
-
- // Check if too far left.
- if( left < tolerance ) {
- $tooltip.addClass('right');
- left = targetLeft + targetWidth;
- top = targetTop + (targetHeight / 2) - (tooltipHeight / 2) - tooltipTop;
-
- // Check if too far right.
- } else if( (left + tooltipWidth + tolerance) > $(window).width() ) {
- $tooltip.addClass('left');
- left = targetLeft - tooltipWidth;
- top = targetTop + (targetHeight / 2) - (tooltipHeight / 2) - tooltipTop;
-
- // Check if too far up.
- } else if( top - $(window).scrollTop() < tolerance ) {
- $tooltip.addClass('bottom');
- top = targetTop + targetHeight - tooltipTop;
-
- // No colision with edges.
- } else {
- $tooltip.addClass('top');
- }
-
- // update css
- $tooltip.css({ 'top': top, 'left': left });
- }
- });
-
- var TooltipConfirm = Tooltip.extend({
-
- data: {
- text: '',
- textConfirm: '',
- textCancel: '',
- target: null,
- targetConfirm: true,
- confirm: function(){},
- cancel: function(){},
- context: false
- },
-
- events: {
- 'click [data-event="cancel"]': 'onCancel',
- 'click [data-event="confirm"]': 'onConfirm',
- },
-
- addEvents: function(){
-
- // add events
- acf.Model.prototype.addEvents.apply(this);
-
- // vars
- var $document = $(document);
- var $target = this.get('target');
-
- // add global 'cancel' click event
- // - use timeout to avoid the current 'click' event triggering the onCancel function
- this.setTimeout(function(){
- this.on( $document, 'click', 'onCancel' );
- });
-
- // add target 'confirm' click event
- // - allow setting to control this feature
- if( this.get('targetConfirm') ) {
- this.on( $target, 'click', 'onConfirm' );
- }
- },
-
- removeEvents: function(){
-
- // remove events
- acf.Model.prototype.removeEvents.apply(this);
-
- // vars
- var $document = $(document);
- var $target = this.get('target');
-
- // remove custom events
- this.off( $document, 'click' );
- this.off( $target, 'click' );
- },
-
- render: function(){
-
- // defaults
- var text = this.get('text') || acf.__('Are you sure?');
- var textConfirm = this.get('textConfirm') || acf.__('Yes');
- var textCancel = this.get('textCancel') || acf.__('No');
-
- // html
- var html = [
- text,
- '' + textConfirm + ' ',
- '' + textCancel + ' '
- ].join(' ');
-
- // html
- this.html( html );
-
- // class
- this.$el.addClass('-confirm');
- },
-
- onCancel: function( e, $el ){
-
- // prevent default
- e.preventDefault();
- e.stopImmediatePropagation();
-
- // callback
- var callback = this.get('cancel');
- var context = this.get('context') || this;
- callback.apply( context, arguments );
-
- //remove
- this.remove();
- },
-
- onConfirm: function( e, $el ){
-
- // Prevent event from propagating completely to allow "targetConfirm" to be clicked.
- e.preventDefault();
- e.stopImmediatePropagation();
-
- // callback
- var callback = this.get('confirm');
- var context = this.get('context') || this;
- callback.apply( context, arguments );
-
- //remove
- this.remove();
- }
- });
-
- // storage
- acf.models.Tooltip = Tooltip;
- acf.models.TooltipConfirm = TooltipConfirm;
-
-
- /**
- * tooltipManager
- *
- * description
- *
- * @date 17/4/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- var tooltipHoverHelper = new acf.Model({
-
- tooltip: false,
-
- events: {
- 'mouseenter .acf-js-tooltip': 'showTitle',
- 'mouseup .acf-js-tooltip': 'hideTitle',
- 'mouseleave .acf-js-tooltip': 'hideTitle'
- },
-
- showTitle: function( e, $el ){
-
- // vars
- var title = $el.attr('title');
-
- // bail ealry if no title
- if( !title ) {
- return;
- }
-
- // clear title to avoid default browser tooltip
- $el.attr('title', '');
-
- // create
- if( !this.tooltip ) {
- this.tooltip = acf.newTooltip({
- text: title,
- target: $el
- });
-
- // update
- } else {
- this.tooltip.update({
- text: title,
- target: $el
- });
- }
-
- },
-
- hideTitle: function( e, $el ){
-
- // hide tooltip
- this.tooltip.hide();
-
- // restore title
- $el.attr('title', this.tooltip.get('text'));
- }
- });
-
-})(jQuery);
-
-// @codekit-prepend "_acf.js";
-// @codekit-prepend "_acf-hooks.js";
-// @codekit-prepend "_acf-model.js";
-// @codekit-prepend "_acf-popup.js";
-// @codekit-prepend "_acf-modal.js";
-// @codekit-prepend "_acf-panel.js";
-// @codekit-prepend "_acf-notice.js";
-// @codekit-prepend "_acf-tooltip.js";
\ No newline at end of file
diff --git a/assets/js/acf.min.js b/assets/js/acf.min.js
deleted file mode 100644
index 40e8e5b..0000000
--- a/assets/js/acf.min.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(t,e){var n={};window.acf=n,n.data={},n.get=function(t){return this.data[t]||null},n.has=function(t){return null!==this.get(t)},n.set=function(t,e){return this.data[t]=e,this};var i=0;n.uniqueId=function(t){var e=++i+"";return t?t+e:e},n.uniqueArray=function(t){function e(t,e,n){return n.indexOf(t)===e}return t.filter(e)};var o="";n.uniqid=function(t,e){var n;void 0===t&&(t="");var i=function(t,e){return e<(t=parseInt(t,10).toString(16)).length?t.slice(t.length-e):e>t.length?Array(e-t.length+1).join("0")+t:t};return o||(o=Math.floor(123456789*Math.random())),o++,n=t,n+=i(parseInt((new Date).getTime()/1e3,10),8),n+=i(o,5),e&&(n+=(10*Math.random()).toFixed(8).toString()),n},n.strReplace=function(t,e,n){return n.split(t).join(e)},n.strCamelCase=function(t){var e=t.match(/([a-zA-Z0-9]+)/g);return e?e.map((function(t,e){var n=t.charAt(0);return(0===e?n.toLowerCase():n.toUpperCase())+t.slice(1)})).join(""):""},n.strPascalCase=function(t){var e=n.strCamelCase(t);return e.charAt(0).toUpperCase()+e.slice(1)},n.strSlugify=function(t){return n.strReplace("_","-",t.toLowerCase())},n.strSanitize=function(t){var e={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","ß":"s","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","Ċ":"C","ċ":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"D","đ":"d","Ē":"E","ē":"e","Ĕ":"E","ĕ":"e","Ė":"E","ė":"e","Ę":"E","ę":"e","Ě":"E","ě":"e","Ĝ":"G","ĝ":"g","Ğ":"G","ğ":"g","Ġ":"G","ġ":"g","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"l","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ſ":"s","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Ǎ":"A","ǎ":"a","Ǐ":"I","ǐ":"i","Ǒ":"O","ǒ":"o","Ǔ":"U","ǔ":"u","Ǖ":"U","ǖ":"u","Ǘ":"U","ǘ":"u","Ǚ":"U","ǚ":"u","Ǜ":"U","ǜ":"u","Ǻ":"A","ǻ":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","ǿ":"o"," ":"_","'":"","?":"","/":"","\\":"",".":"",",":"","`":"",">":"","<":"",'"':"","[":"","]":"","|":"","{":"","}":"","(":"",")":""},n=/\W/g,i=function(t){return void 0!==e[t]?e[t]:t};return t=(t=t.replace(n,i)).toLowerCase()},n.strMatch=function(t,e){for(var n=0,i=Math.min(t.length,e.length),o=0;o":">",'"':""","'":"'"};return(""+t).replace(/[&<>"']/g,(function(t){return e[t]}))},n.strUnescape=function(t){var e={"&":"&","<":"<",">":">",""":'"',"'":"'"};return(""+t).replace(/&|<|>|"|'/g,(function(t){return e[t]}))},n.escAttr=n.strEscape,n.escHtml=function(t){return(""+t).replace(/").html(e).text()},n.parseArgs=function(e,n){return"object"!=typeof e&&(e={}),"object"!=typeof n&&(n={}),t.extend({},n,e)},null==window.acfL10n&&(acfL10n={}),n.__=function(t){return acfL10n[t]||t},n._x=function(t,e){return acfL10n[t+"."+e]||acfL10n[t]||t},n._n=function(t,e,i){return 1==i?n.__(t):n.__(e)},n.isArray=function(t){return Array.isArray(t)},n.isObject=function(t){return"object"==typeof t};var r=function(t,e,i){var o=(e=e.replace("[]","[%%index%%]")).match(/([^\[\]])+/g);if(o)for(var r=o.length,a=t,s=0;s');var s=e.parent();e.css({height:n,width:i,margin:o,position:"absolute"}),setTimeout((function(){s.css({opacity:0,height:t.endHeight})}),50),setTimeout((function(){e.attr("style",a),s.remove(),t.complete()}),301)},u=function(e){var n=e.target,i=n.height(),o=n.children().length,r=t(' ');n.addClass("acf-remove-element"),setTimeout((function(){n.html(r)}),251),setTimeout((function(){n.removeClass("acf-remove-element"),r.css({height:e.endHeight})}),300),setTimeout((function(){n.remove(),e.complete()}),451)};n.duplicate=function(t){t instanceof jQuery&&(t={target:t}),(t=n.parseArgs(t,{target:!1,search:"",replace:"",rename:!0,before:function(t){},after:function(t,e){},append:function(t,e){t.after(e)}})).target=t.target||t.$el;var e=t.target;t.search=t.search||e.attr("data-id"),t.replace=t.replace||n.uniqid(),t.before(e),n.doAction("before_duplicate",e);var i=e.clone();return t.rename&&n.rename({target:i,search:t.search,replace:t.replace,replacer:"function"==typeof t.rename?t.rename:null}),i.removeClass("acf-clone"),i.find(".ui-sortable").removeClass("ui-sortable"),t.after(e,i),n.doAction("after_duplicate",e,i),t.append(e,i),n.doAction("duplicate",e,i),n.doAction("append",i),i},n.rename=function(t){t instanceof jQuery&&(t={target:t});var e=(t=n.parseArgs(t,{target:!1,destructive:!1,search:"",replace:"",replacer:null})).target;t.search||(t.search=e.attr("data-id")),t.replace||(t.replace=n.uniqid("acf")),t.replacer||(t.replacer=function(t,e,n,i){return e.replace(n,i)});var i=function(e){return function(n,i){return t.replacer(e,i,t.search,t.replace)}};if(t.destructive){var o=n.strReplace(t.search,t.replace,e.outerHTML());e.replaceWith(o)}else e.attr("data-id",t.replace),e.find('[id*="'+t.search+'"]').attr("id",i("id")),e.find('[for*="'+t.search+'"]').attr("for",i("for")),e.find('[name*="'+t.search+'"]').attr("name",i("name"));return e},n.prepareForAjax=function(t){return t.nonce=n.get("nonce"),t.post_id=n.get("post_id"),n.has("language")&&(t.lang=n.get("language")),t=n.applyFilters("prepare_for_ajax",t)},n.startButtonLoading=function(t){t.prop("disabled",!0),t.after(' ')},n.stopButtonLoading=function(t){t.prop("disabled",!1),t.next(".acf-loading").remove()},n.showLoading=function(t){t.append('
')},n.hideLoading=function(t){t.children(".acf-loading-overlay").remove()},n.updateUserSetting=function(e,i){var o={action:"acf/ajax/user_setting",name:e,value:i};t.ajax({url:n.get("ajaxurl"),data:n.prepareForAjax(o),type:"post",dataType:"html"})},n.val=function(t,e,n){var i=t.val();return e!==i&&(t.val(e),t.is("select")&&null===t.val()?(t.val(i),!1):(!0!==n&&t.trigger("change"),!0))},n.show=function(t,e){return e&&n.unlock(t,"hidden",e),!n.isLocked(t,"hidden")&&(!!t.hasClass("acf-hidden")&&(t.removeClass("acf-hidden"),!0))},n.hide=function(t,e){return e&&n.lock(t,"hidden",e),!t.hasClass("acf-hidden")&&(t.addClass("acf-hidden"),!0)},n.isHidden=function(t){return t.hasClass("acf-hidden")},n.isVisible=function(t){return!n.isHidden(t)};var f=function(t,e){return!t.hasClass("acf-disabled")&&(e&&n.unlock(t,"disabled",e),!n.isLocked(t,"disabled")&&(!!t.prop("disabled")&&(t.prop("disabled",!1),!0)))};n.enable=function(e,n){if(e.attr("name"))return f(e,n);var i=!1;return e.find("[name]").each((function(){var e;f(t(this),n)&&(i=!0)})),i};var d=function(t,e){return e&&n.lock(t,"disabled",e),!t.prop("disabled")&&(t.prop("disabled",!0),!0)};n.disable=function(e,n){if(e.attr("name"))return d(e,n);var i=!1;return e.find("[name]").each((function(){var e;d(t(this),n)&&(i=!0)})),i},n.isset=function(t){for(var e=1;e-1){var a=window.URL||window.webkitURL,s=new Image;s.onload=function(){o.width=this.width,o.height=this.height,e(o)},s.src=a.createObjectURL(r)}else e(o);else e(o)},n.isAjaxSuccess=function(t){return t&&t.success},n.getAjaxMessage=function(t){return n.isget(t,"data","message")},n.getAjaxError=function(t){return n.isget(t,"data","error")},n.getXhrError=function(t){return t.responseJSON&&t.responseJSON.message?t.responseJSON.message:t.statusText?t.statusText:""},n.renderSelect=function(t,e){var i=t.val(),o=[],r=function(t){var e="";return t.map((function(t){var i=t.text||t.label||"",a=t.id||t.value||"";o.push(a),t.children?e+=''+r(t.children)+" ":e+='"+n.strEscape(i)+" "})),e};return t.html(r(e)),o.indexOf(i)>-1&&t.val(i),t.val()};var h=function(t,e){return t.data("acf-lock-"+e)||[]},p=function(t,e,n){t.data("acf-lock-"+e,n)},v,g,m,y,w,x;n.lock=function(t,e,n){var i=h(t,e),o;i.indexOf(n)<0&&(i.push(n),p(t,e,i))},n.unlock=function(t,e,n){var i=h(t,e),o=i.indexOf(n);return o>-1&&(i.splice(o,1),p(t,e,i)),0===i.length},n.isLocked=function(t,e){return h(t,e).length>0},n.isGutenberg=function(){return!!(window.wp&&wp.data&&wp.data.select&&wp.data.select("core/editor"))},n.objectToArray=function(t){return Object.keys(t).map((function(e){return t[e]}))},n.debounce=function(t,e){var n;return function(){var i=this,o=arguments,r=function(){t.apply(i,o)};clearTimeout(n),n=setTimeout(r,e)}},n.throttle=function(t,e){var n=!1;return function(){n||(n=!0,setTimeout((function(){n=!1}),e),t.apply(this,arguments))}},n.isInView=function(t){t instanceof jQuery&&(t=t[0]);var e=t.getBoundingClientRect();return e.top!==e.bottom&&e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)},n.onceInView=(v=[],g=0,m=function(){v.forEach((function(t){n.isInView(t.el)&&(t.callback.apply(this),x(t.id))}))},y=n.debounce(m,300),w=function(e,n){v.length||t(window).on("scroll resize",y).on("acfrefresh orientationchange",m),v.push({id:g++,el:e,callback:n})},x=function(e){(v=v.filter((function(t){return t.id!==e}))).length||t(window).off("scroll resize",y).off("acfrefresh orientationchange",m)},function(t,e){t instanceof jQuery&&(t=t[0]),n.isInView(t)?e.apply(this):w(t,e)}),n.once=function(t){var e=0;return function(){return e++>0?t=void 0:t.apply(this,arguments)}},n.focusAttention=function(e){var i=1e3;e.addClass("acf-attention -focused");var o=500;n.isInView(e)||(t("body, html").animate({scrollTop:e.offset().top-t(window).height()/2},500),i+=500);var r=250;setTimeout((function(){e.removeClass("-focused"),setTimeout((function(){e.removeClass("acf-attention")}),250)}),i)},n.onFocus=function(e,n){var i=!1,o=!1,r=function(){i=!0,setTimeout((function(){i=!1}),1),l(!0)},a=function(){i||l(!1)},s=function(){t(document).on("click",a),e.on("blur","input, select, textarea",a)},c=function(){t(document).off("click",a),e.off("blur","input, select, textarea",a)},l=function(t){o!==t&&(t?s():c(),o=t,n(t))};e.on("click",r),e.on("focus","input, select, textarea",r)},t.fn.exists=function(){return t(this).length>0},t.fn.outerHTML=function(){return t(this).get(0).outerHTML},Array.prototype.indexOf||(Array.prototype.indexOf=function(e){return t.inArray(e,this)}),n.refresh=n.debounce((function(){t(window).trigger("acfrefresh"),n.doAction("refresh")}),0),t(document).ready((function(){n.doAction("ready")})),t(window).on("load",(function(){n.doAction("load")})),t(window).on("beforeunload",(function(){n.doAction("unload")})),t(window).on("resize",(function(){n.doAction("resize")})),t(document).on("sortstart",(function(t,e){n.doAction("sortstart",e.item,e.placeholder)})),t(document).on("sortstop",(function(t,e){n.doAction("sortstop",e.item,e.placeholder)}))}(jQuery),function(t,e){"use strict";var n=function(){function t(){return d}function e(t,e,n,i){return"string"==typeof t&&"function"==typeof e&&c("actions",t,e,n=parseInt(n||10,10),i),f}function n(){var t=Array.prototype.slice.call(arguments),e=t.shift();return"string"==typeof e&&u("actions",e,t),f}function i(t,e){return"string"==typeof t&&s("actions",t,e),f}function o(t,e,n,i){return"string"==typeof t&&"function"==typeof e&&c("filters",t,e,n=parseInt(n||10,10),i),f}function r(){var t=Array.prototype.slice.call(arguments),e=t.shift();return"string"==typeof e?u("filters",e,t):f}function a(t,e){return"string"==typeof t&&s("filters",t,e),f}function s(t,e,n,i){if(d[t][e])if(n){var o=d[t][e],r;if(i)for(r=o.length;r--;){var a=o[r];a.callback===n&&a.context===i&&o.splice(r,1)}else for(r=o.length;r--;)o[r].callback===n&&o.splice(r,1)}else d[t][e]=[]}function c(t,e,n,i,o){var r={callback:n,priority:i,context:o},a=d[t][e];a?(a.push(r),a=l(a)):a=[r],d[t][e]=a}function l(t){for(var e,n,i,o=1,r=t.length;oe.priority;)t[n]=t[n-1],--n;t[n]=e}return t}function u(t,e,n){var i=d[t][e];if(!i)return"filters"===t&&n[0];var o=0,r=i.length;if("filters"===t)for(;o
';
- $message .= '' . __( 'All fields following this accordion (or until another accordion is defined) will be grouped together.','acf') . '
';
-
-
- // default_value
- acf_render_field_setting( $field, array(
- 'label' => __('Instructions','acf'),
- 'instructions' => '',
- 'name' => 'notes',
- 'type' => 'message',
- 'message' => $message,
- ));
-*/
-
- // active
- acf_render_field_setting( $field, array(
- 'label' => __('Open','acf'),
- 'instructions' => __('Display this accordion as open on page load.','acf'),
- 'name' => 'open',
- 'type' => 'true_false',
- 'ui' => 1,
- ));
-
-
- // multi_expand
- acf_render_field_setting( $field, array(
- 'label' => __('Multi-expand','acf'),
- 'instructions' => __('Allow this accordion to open without closing others.','acf'),
- 'name' => 'multi_expand',
- 'type' => 'true_false',
- 'ui' => 1,
- ));
-
-
- // endpoint
- acf_render_field_setting( $field, array(
- 'label' => __('Endpoint','acf'),
- 'instructions' => __('Define an endpoint for the previous accordion to stop. This accordion will not be visible.','acf'),
- 'name' => 'endpoint',
- 'type' => 'true_false',
- 'ui' => 1,
- ));
-
- }
-
-
- /*
- * load_field()
- *
- * This filter is appied to the $field after it is loaded from the database
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $field - the field array holding all the field options
- *
- * @return $field - the field array holding all the field options
- */
-
- function load_field( $field ) {
-
- // remove name to avoid caching issue
- $field['name'] = '';
-
- // remove required to avoid JS issues
- $field['required'] = 0;
-
- // set value other than 'null' to avoid ACF loading / caching issue
- $field['value'] = false;
-
- // return
- return $field;
-
- }
-
-}
+ class acf_field__accordion extends acf_field {
+
+ public $show_in_rest = false;
+
+ /**
+ * initialize
+ *
+ * This function will setup the field type data
+ *
+ * @date 30/10/17
+ * @since 5.6.3
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ function initialize() {
+
+ // vars
+ $this->name = 'accordion';
+ $this->label = __( 'Accordion', 'acf' );
+ $this->category = 'layout';
+ $this->description = __( 'Allows you to group and organize custom fields into collapsable panels that are shown while editing content. Useful for keeping large datasets tidy.', 'acf' );
+ $this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-accordion.png';
+ $this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/accordion/', 'docs', 'field-type-selection' );
+ $this->defaults = array(
+ 'open' => 0,
+ 'multi_expand' => 0,
+ 'endpoint' => 0,
+ );
+ }
-// initialize
-acf_register_field_type( 'acf_field__accordion' );
+ /**
+ * render_field
+ *
+ * Create the HTML interface for your field
+ *
+ * @date 30/10/17
+ * @since 5.6.3
+ *
+ * @param array $field
+ * @return n/a
+ */
+ function render_field( $field ) {
+
+ // vars
+ $atts = array(
+ 'class' => 'acf-fields',
+ 'data-open' => $field['open'],
+ 'data-multi_expand' => $field['multi_expand'],
+ 'data-endpoint' => $field['endpoint'],
+ );
+
+ ?>
+ >
+ __( 'Open', 'acf' ),
+ 'instructions' => __( 'Display this accordion as open on page load.', 'acf' ),
+ 'name' => 'open',
+ 'type' => 'true_false',
+ 'ui' => 1,
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Multi-Expand', 'acf' ),
+ 'instructions' => __( 'Allow this accordion to open without closing others.', 'acf' ),
+ 'name' => 'multi_expand',
+ 'type' => 'true_false',
+ 'ui' => 1,
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Endpoint', 'acf' ),
+ 'instructions' => __( 'Define an endpoint for the previous accordion to stop. This accordion will not be visible.', 'acf' ),
+ 'name' => 'endpoint',
+ 'type' => 'true_false',
+ 'ui' => 1,
+ )
+ );
+ }
+
+
+ /*
+ * load_field()
+ *
+ * This filter is appied to the $field after it is loaded from the database
+ *
+ * @type filter
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $field - the field array holding all the field options
+ *
+ * @return $field - the field array holding all the field options
+ */
+
+ function load_field( $field ) {
+
+ // remove name to avoid caching issue
+ $field['name'] = '';
+
+ // remove required to avoid JS issues
+ $field['required'] = 0;
+
+ // set value other than 'null' to avoid ACF loading / caching issue
+ $field['value'] = false;
+
+ // return
+ return $field;
+ }
+
+ }
+
+
+ // initialize
+ acf_register_field_type( 'acf_field__accordion' );
endif; // class_exists check
-?>
\ No newline at end of file
+?>
diff --git a/includes/fields/class-acf-field-button-group.php b/includes/fields/class-acf-field-button-group.php
index db1dd95..3e33142 100644
--- a/includes/fields/class-acf-field-button-group.php
+++ b/includes/fields/class-acf-field-button-group.php
@@ -1,292 +1,348 @@
name = 'button_group';
- $this->label = __("Button Group",'acf');
- $this->category = 'choice';
- $this->defaults = array(
- 'choices' => array(),
- 'default_value' => '',
- 'allow_null' => 0,
- 'return_format' => 'value',
- 'layout' => 'horizontal',
- );
-
- }
-
-
- /**
- * render_field()
- *
- * Creates the field's input HTML
- *
- * @date 18/9/17
- * @since 5.6.3
- *
- * @param array $field The field settings array
- * @return n/a
- */
-
- function render_field( $field ) {
-
- // vars
- $html = '';
- $selected = null;
- $buttons = array();
- $value = esc_attr( $field['value'] );
-
-
- // bail ealrly if no choices
- if( empty($field['choices']) ) return;
-
-
- // buttons
- foreach( $field['choices'] as $_value => $_label ) {
-
- // checked
- $checked = ( $value === esc_attr($_value) );
- if( $checked ) $selected = true;
-
-
- // append
- $buttons[] = array(
- 'name' => $field['name'],
- 'value' => $_value,
- 'label' => $_label,
- 'checked' => $checked
+ class acf_field_button_group extends acf_field {
+
+
+ /**
+ * initialize()
+ *
+ * This function will setup the field type data
+ *
+ * @date 18/9/17
+ * @since 5.6.3
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ function initialize() {
+
+ // vars
+ $this->name = 'button_group';
+ $this->label = __( 'Button Group', 'acf' );
+ $this->category = 'choice';
+ $this->description = __( 'A group of buttons with values that you specify, users can choose one option from the values provided.', 'acf' );
+ $this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-button-group.png';
+ $this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/button-group/', 'docs', 'field-type-selection' );
+ $this->defaults = array(
+ 'choices' => array(),
+ 'default_value' => '',
+ 'allow_null' => 0,
+ 'return_format' => 'value',
+ 'layout' => 'horizontal',
);
-
+
}
-
-
- // maybe select initial value
- if( !$field['allow_null'] && $selected === null ) {
- $buttons[0]['checked'] = true;
- }
-
-
- // div
- $div = array( 'class' => 'acf-button-group' );
-
- if( $field['layout'] == 'vertical' ) { $div['class'] .= ' -vertical'; }
- if( $field['class'] ) { $div['class'] .= ' ' . $field['class']; }
- if( $field['allow_null'] ) { $div['data-allow_null'] = 1; }
-
-
- // hdden input
- $html .= acf_get_hidden_input( array('name' => $field['name']) );
-
-
- // open
- $html .= '';
-
- // loop
- foreach( $buttons as $button ) {
-
+
+
+ /**
+ * render_field()
+ *
+ * Creates the field's input HTML
+ *
+ * @date 18/9/17
+ * @since 5.6.3
+ *
+ * @param array $field The field settings array
+ * @return n/a
+ */
+
+ function render_field( $field ) {
+
+ // vars
+ $html = '';
+ $selected = null;
+ $buttons = array();
+ $value = esc_attr( $field['value'] );
+
+ // bail ealrly if no choices
+ if ( empty( $field['choices'] ) ) {
+ return;
+ }
+
+ // buttons
+ foreach ( $field['choices'] as $_value => $_label ) {
+
// checked
- if( $button['checked'] ) {
+ $checked = ( $value === esc_attr( $_value ) );
+ if ( $checked ) {
+ $selected = true;
+ }
+
+ // append
+ $buttons[] = array(
+ 'name' => $field['name'],
+ 'value' => $_value,
+ 'label' => $_label,
+ 'checked' => $checked,
+ );
+
+ }
+
+ // maybe select initial value
+ if ( ! $field['allow_null'] && $selected === null ) {
+ $buttons[0]['checked'] = true;
+ }
+
+ // div
+ $div = array( 'class' => 'acf-button-group' );
+
+ if ( $field['layout'] == 'vertical' ) {
+ $div['class'] .= ' -vertical'; }
+ if ( $field['class'] ) {
+ $div['class'] .= ' ' . $field['class']; }
+ if ( $field['allow_null'] ) {
+ $div['data-allow_null'] = 1; }
+
+ // hdden input
+ $html .= acf_get_hidden_input( array( 'name' => $field['name'] ) );
+
+ // open
+ $html .= '
';
+
+ // loop
+ foreach ( $buttons as $button ) {
+
+ // checked
+ if ( $button['checked'] ) {
$button['checked'] = 'checked';
} else {
- unset($button['checked']);
+ unset( $button['checked'] );
}
-
-
+
// append
$html .= acf_get_radio_input( $button );
-
+
}
-
-
- // close
- $html .= '
';
-
-
- // return
- echo $html;
-
- }
-
-
- /**
- * render_field_settings()
- *
- * Creates the field's settings HTML
- *
- * @date 18/9/17
- * @since 5.6.3
- *
- * @param array $field The field settings array
- * @return n/a
- */
-
- function render_field_settings( $field ) {
-
- // encode choices (convert from array)
- $field['choices'] = acf_encode_choices($field['choices']);
-
-
- // choices
- acf_render_field_setting( $field, array(
- 'label' => __('Choices','acf'),
- 'instructions' => __('Enter each choice on a new line.','acf') . '
' . __('For more control, you may specify both a value and label like this:','acf'). '
' . __('red : Red','acf'),
- 'type' => 'textarea',
- 'name' => 'choices',
- ));
-
-
- // allow_null
- acf_render_field_setting( $field, array(
- 'label' => __('Allow Null?','acf'),
- 'instructions' => '',
- 'name' => 'allow_null',
- 'type' => 'true_false',
- 'ui' => 1,
- ));
-
-
- // default_value
- acf_render_field_setting( $field, array(
- 'label' => __('Default Value','acf'),
- 'instructions' => __('Appears when creating a new post','acf'),
- 'type' => 'text',
- 'name' => 'default_value',
- ));
-
-
- // layout
- acf_render_field_setting( $field, array(
- 'label' => __('Layout','acf'),
- 'instructions' => '',
- 'type' => 'radio',
- 'name' => 'layout',
- 'layout' => 'horizontal',
- 'choices' => array(
- 'horizontal' => __("Horizontal",'acf'),
- 'vertical' => __("Vertical",'acf'),
- )
- ));
-
-
- // return_format
- acf_render_field_setting( $field, array(
- 'label' => __('Return Value','acf'),
- 'instructions' => __('Specify the returned value on front end','acf'),
- 'type' => 'radio',
- 'name' => 'return_format',
- 'layout' => 'horizontal',
- 'choices' => array(
- 'value' => __('Value','acf'),
- 'label' => __('Label','acf'),
- 'array' => __('Both (Array)','acf')
- )
- ));
-
- }
-
-
- /*
- * update_field()
- *
- * This filter is appied to the $field before it is saved to the database
- *
- * @date 18/9/17
- * @since 5.6.3
- *
- * @param array $field The field array holding all the field options
- * @return $field
- */
- function update_field( $field ) {
-
- return acf_get_field_type('radio')->update_field( $field );
- }
-
-
- /*
- * load_value()
- *
- * This filter is appied to the $value after it is loaded from the db
- *
- * @date 18/9/17
- * @since 5.6.3
- *
- * @param mixed $value The value found in the database
- * @param mixed $post_id The post ID from which the value was loaded from
- * @param array $field The field array holding all the field options
- * @return $value
- */
-
- function load_value( $value, $post_id, $field ) {
-
- return acf_get_field_type('radio')->load_value( $value, $post_id, $field );
-
- }
-
-
- /*
- * translate_field
- *
- * This function will translate field settings
- *
- * @date 18/9/17
- * @since 5.6.3
- *
- * @param array $field The field array holding all the field options
- * @return $field
- */
-
- function translate_field( $field ) {
-
- return acf_get_field_type('radio')->translate_field( $field );
-
- }
-
-
- /*
- * format_value()
- *
- * This filter is appied to the $value after it is loaded from the db and before it is returned to the template
- *
- * @date 18/9/17
- * @since 5.6.3
- *
- * @param mixed $value The value found in the database
- * @param mixed $post_id The post ID from which the value was loaded from
- * @param array $field The field array holding all the field options
- * @return $value
- */
-
- function format_value( $value, $post_id, $field ) {
-
- return acf_get_field_type('radio')->format_value( $value, $post_id, $field );
-
- }
-
-}
+ // close
+ $html .= '
';
+
+ // return
+ echo $html;
+
+ }
-// initialize
-acf_register_field_type( 'acf_field_button_group' );
+ /**
+ * render_field_settings()
+ *
+ * Creates the field's settings HTML
+ *
+ * @date 18/9/17
+ * @since 5.6.3
+ *
+ * @param array $field The field settings array
+ * @return n/a
+ */
+ function render_field_settings( $field ) {
+ // Encode choices (convert from array).
+ $field['choices'] = acf_encode_choices( $field['choices'] );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Choices', 'acf' ),
+ 'instructions' => __( 'Enter each choice on a new line.', 'acf' ) . ' ' . __( 'For more control, you may specify both a value and label like this:', 'acf' ) . '' . __( 'red : Red', 'acf' ) . ' ',
+ 'type' => 'textarea',
+ 'name' => 'choices',
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Default Value', 'acf' ),
+ 'instructions' => __( 'Appears when creating a new post', 'acf' ),
+ 'type' => 'text',
+ 'name' => 'default_value',
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Return Value', 'acf' ),
+ 'instructions' => __( 'Specify the returned value on front end', 'acf' ),
+ 'type' => 'radio',
+ 'name' => 'return_format',
+ 'layout' => 'horizontal',
+ 'choices' => array(
+ 'value' => __( 'Value', 'acf' ),
+ 'label' => __( 'Label', 'acf' ),
+ 'array' => __( 'Both (Array)', 'acf' ),
+ ),
+ )
+ );
+
+ }
+
+ /**
+ * Renders the field settings used in the "Validation" tab.
+ *
+ * @since 6.0
+ *
+ * @param array $field The field settings array.
+ * @return void
+ */
+ function render_field_validation_settings( $field ) {
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Allow Null', 'acf' ),
+ 'instructions' => '',
+ 'name' => 'allow_null',
+ 'type' => 'true_false',
+ 'ui' => 1,
+ )
+ );
+ }
+
+ /**
+ * Renders the field settings used in the "Presentation" tab.
+ *
+ * @since 6.0
+ *
+ * @param array $field The field settings array.
+ * @return void
+ */
+ function render_field_presentation_settings( $field ) {
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Layout', 'acf' ),
+ 'instructions' => '',
+ 'type' => 'radio',
+ 'name' => 'layout',
+ 'layout' => 'horizontal',
+ 'choices' => array(
+ 'horizontal' => __( 'Horizontal', 'acf' ),
+ 'vertical' => __( 'Vertical', 'acf' ),
+ ),
+ )
+ );
+ }
+
+ /*
+ * update_field()
+ *
+ * This filter is appied to the $field before it is saved to the database
+ *
+ * @date 18/9/17
+ * @since 5.6.3
+ *
+ * @param array $field The field array holding all the field options
+ * @return $field
+ */
+
+ function update_field( $field ) {
+
+ return acf_get_field_type( 'radio' )->update_field( $field );
+ }
+
+
+ /*
+ * load_value()
+ *
+ * This filter is appied to the $value after it is loaded from the db
+ *
+ * @date 18/9/17
+ * @since 5.6.3
+ *
+ * @param mixed $value The value found in the database
+ * @param mixed $post_id The post ID from which the value was loaded from
+ * @param array $field The field array holding all the field options
+ * @return $value
+ */
+
+ function load_value( $value, $post_id, $field ) {
+
+ return acf_get_field_type( 'radio' )->load_value( $value, $post_id, $field );
+
+ }
+
+
+ /*
+ * translate_field
+ *
+ * This function will translate field settings
+ *
+ * @date 18/9/17
+ * @since 5.6.3
+ *
+ * @param array $field The field array holding all the field options
+ * @return $field
+ */
+
+ function translate_field( $field ) {
+
+ return acf_get_field_type( 'radio' )->translate_field( $field );
+
+ }
+
+
+ /*
+ * format_value()
+ *
+ * This filter is appied to the $value after it is loaded from the db and before it is returned to the template
+ *
+ * @date 18/9/17
+ * @since 5.6.3
+ *
+ * @param mixed $value The value found in the database
+ * @param mixed $post_id The post ID from which the value was loaded from
+ * @param array $field The field array holding all the field options
+ * @return $value
+ */
+
+ function format_value( $value, $post_id, $field ) {
+
+ return acf_get_field_type( 'radio' )->format_value( $value, $post_id, $field );
+
+ }
+
+ /**
+ * Return the schema array for the REST API.
+ *
+ * @param array $field
+ * @return array
+ */
+ function get_rest_schema( array $field ) {
+ $schema = parent::get_rest_schema( $field );
+
+ if ( isset( $field['default_value'] ) && '' !== $field['default_value'] ) {
+ $schema['default'] = $field['default_value'];
+ }
+
+ /**
+ * If a user has defined keys for the buttons,
+ * we should use the keys for the available options to POST to,
+ * since they are what is displayed in GET requests.
+ */
+ $button_keys = array_diff(
+ array_keys( $field['choices'] ),
+ array_values( $field['choices'] )
+ );
+
+ $schema['enum'] = empty( $button_keys ) ? $field['choices'] : $button_keys;
+ $schema['enum'][] = null;
+
+ // Allow null via UI will value to empty string.
+ if ( ! empty( $field['allow_null'] ) ) {
+ $schema['enum'][] = '';
+ }
+
+ return $schema;
+ }
+
+ }
+
+
+ // initialize
+ acf_register_field_type( 'acf_field_button_group' );
endif; // class_exists check
-?>
\ No newline at end of file
+
diff --git a/includes/fields/class-acf-field-checkbox.php b/includes/fields/class-acf-field-checkbox.php
index b47b889..63f9af5 100644
--- a/includes/fields/class-acf-field-checkbox.php
+++ b/includes/fields/class-acf-field-checkbox.php
@@ -1,585 +1,658 @@
name = 'checkbox';
- $this->label = __("Checkbox",'acf');
- $this->category = 'choice';
- $this->defaults = array(
- 'layout' => 'vertical',
- 'choices' => array(),
- 'default_value' => '',
- 'allow_custom' => 0,
- 'save_custom' => 0,
- 'toggle' => 0,
- 'return_format' => 'value'
- );
-
- }
-
-
- /*
- * render_field()
- *
- * Create the HTML interface for your field
- *
- * @param $field (array) the $field being rendered
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- *
- * @param $field (array) the $field being edited
- * @return n/a
- */
-
- function render_field( $field ) {
-
- // reset vars
- $this->_values = array();
- $this->_all_checked = true;
-
-
- // ensure array
- $field['value'] = acf_get_array($field['value']);
- $field['choices'] = acf_get_array($field['choices']);
-
-
- // hiden input
- acf_hidden_input( array('name' => $field['name']) );
-
-
- // vars
- $li = '';
- $ul = array(
- 'class' => 'acf-checkbox-list',
- );
-
-
- // append to class
- $ul['class'] .= ' ' . ($field['layout'] == 'horizontal' ? 'acf-hl' : 'acf-bl');
- $ul['class'] .= ' ' . $field['class'];
-
-
- // checkbox saves an array
- $field['name'] .= '[]';
-
-
- // choices
- if( !empty($field['choices']) ) {
-
- // choices
- $li .= $this->render_field_choices( $field );
-
-
- // toggle
- if( $field['toggle'] ) {
- $li = $this->render_field_toggle( $field ) . $li;
- }
-
- }
-
-
- // custom
- if( $field['allow_custom'] ) {
- $li .= $this->render_field_custom( $field );
- }
-
-
- // return
- echo '' . "\n";
-
- }
-
-
- /*
- * render_field_choices
- *
- * description
- *
- * @type function
- * @date 15/7/17
- * @since 5.6.0
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
- function render_field_choices( $field ) {
-
- // walk
- return $this->walk( $field['choices'], $field );
-
- }
-
-
- /*
- * render_field_toggle
- *
- * description
- *
- * @type function
- * @date 15/7/17
- * @since 5.6.0
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
- function render_field_toggle( $field ) {
-
- // vars
- $atts = array(
- 'type' => 'checkbox',
- 'class' => 'acf-checkbox-toggle',
- 'label' => __("Toggle All", 'acf')
- );
-
-
- // custom label
- if( is_string($field['toggle']) ) {
- $atts['label'] = $field['toggle'];
- }
-
-
- // checked
- if( $this->_all_checked ) {
- $atts['checked'] = 'checked';
- }
-
-
- // return
- return '' . acf_get_checkbox_input($atts) . ' ' . "\n";
-
- }
-
-
- /*
- * render_field_custom
- *
- * description
- *
- * @type function
- * @date 15/7/17
- * @since 5.6.0
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
- function render_field_custom( $field ) {
-
- // vars
- $html = '';
-
-
- // loop
- foreach( $field['value'] as $value ) {
-
- // ignore if already eixsts
- if( isset($field['choices'][ $value ]) ) continue;
-
-
// vars
- $esc_value = esc_attr($value);
- $text_input = array(
- 'name' => $field['name'],
- 'value' => $value,
+ $this->name = 'checkbox';
+ $this->label = __( 'Checkbox', 'acf' );
+ $this->category = 'choice';
+ $this->description = __( 'A group of checkbox inputs that allow the user to select one, or multiple values that you specify.', 'acf' );
+ $this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-checkbox.png';
+ $this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/checkbox/', 'docs', 'field-type-selection' );
+ $this->defaults = array(
+ 'layout' => 'vertical',
+ 'choices' => array(),
+ 'default_value' => '',
+ 'allow_custom' => 0,
+ 'save_custom' => 0,
+ 'toggle' => 0,
+ 'return_format' => 'value',
+ 'custom_choice_button_text' => __( 'Add new choice', 'acf' ),
);
-
-
- // bail ealry if choice already exists
- if( in_array( $esc_value, $this->_values ) ) continue;
-
-
- // append
- $html .= ' ' . acf_get_text_input($text_input) . ' ' . "\n";
-
- }
-
-
- // append button
- $html .= '' . esc_attr__('Add new choice', 'acf') . ' ' . "\n";
-
-
- // return
- return $html;
-
- }
-
-
- function walk( $choices = array(), $args = array(), $depth = 0 ) {
-
- // bail ealry if no choices
- if( empty($choices) ) return '';
-
-
- // defaults
- $args = wp_parse_args($args, array(
- 'id' => '',
- 'type' => 'checkbox',
- 'name' => '',
- 'value' => array(),
- 'disabled' => array(),
- ));
-
-
- // vars
- $html = '';
-
-
- // sanitize values for 'selected' matching
- if( $depth == 0 ) {
- $args['value'] = array_map('esc_attr', $args['value']);
- $args['disabled'] = array_map('esc_attr', $args['disabled']);
- }
-
-
- // loop
- foreach( $choices as $value => $label ) {
-
- // open
- $html .= '';
-
-
- // optgroup
- if( is_array($label) ){
-
- $html .= '' . "\n";
- $html .= $this->walk( $label, $args, $depth+1 );
- $html .= ' ';
-
- // option
- } else {
-
- // vars
- $esc_value = esc_attr($value);
- $atts = array(
- 'id' => $args['id'] . '-' . str_replace(' ', '-', $value),
- 'type' => $args['type'],
- 'name' => $args['name'],
- 'value' => $value,
- 'label' => $label,
- );
-
-
- // selected
- if( in_array( $esc_value, $args['value'] ) ) {
- $atts['checked'] = 'checked';
- } else {
- $this->_all_checked = false;
- }
-
-
- // disabled
- if( in_array( $esc_value, $args['disabled'] ) ) {
- $atts['disabled'] = 'disabled';
- }
-
-
- // store value added
- $this->_values[] = $esc_value;
-
-
- // append
- $html .= acf_get_checkbox_input($atts);
-
- }
-
-
- // close
- $html .= ' ' . "\n";
-
- }
-
-
- // return
- return $html;
-
- }
-
-
-
- /*
- * render_field_settings()
- *
- * Create extra options for your field. This is rendered when editing a field.
- * The value of $field['name'] can be used (like bellow) to save extra data to the $field
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- *
- * @param $field - an array holding all the field's data
- */
-
- function render_field_settings( $field ) {
-
- // encode choices (convert from array)
- $field['choices'] = acf_encode_choices($field['choices']);
- $field['default_value'] = acf_encode_choices($field['default_value'], false);
-
-
- // choices
- acf_render_field_setting( $field, array(
- 'label' => __('Choices','acf'),
- 'instructions' => __('Enter each choice on a new line.','acf') . ' ' . __('For more control, you may specify both a value and label like this:','acf'). ' ' . __('red : Red','acf'),
- 'type' => 'textarea',
- 'name' => 'choices',
- ));
-
-
- // other_choice
- acf_render_field_setting( $field, array(
- 'label' => __('Allow Custom','acf'),
- 'instructions' => '',
- 'name' => 'allow_custom',
- 'type' => 'true_false',
- 'ui' => 1,
- 'message' => __("Allow 'custom' values to be added", 'acf'),
- ));
-
-
- // save_other_choice
- acf_render_field_setting( $field, array(
- 'label' => __('Save Custom','acf'),
- 'instructions' => '',
- 'name' => 'save_custom',
- 'type' => 'true_false',
- 'ui' => 1,
- 'message' => __("Save 'custom' values to the field's choices", 'acf'),
- 'conditions' => array(
- 'field' => 'allow_custom',
- 'operator' => '==',
- 'value' => 1
- )
- ));
-
-
- // default_value
- acf_render_field_setting( $field, array(
- 'label' => __('Default Value','acf'),
- 'instructions' => __('Enter each default value on a new line','acf'),
- 'type' => 'textarea',
- 'name' => 'default_value',
- ));
-
-
- // layout
- acf_render_field_setting( $field, array(
- 'label' => __('Layout','acf'),
- 'instructions' => '',
- 'type' => 'radio',
- 'name' => 'layout',
- 'layout' => 'horizontal',
- 'choices' => array(
- 'vertical' => __("Vertical",'acf'),
- 'horizontal' => __("Horizontal",'acf')
- )
- ));
-
-
- // layout
- acf_render_field_setting( $field, array(
- 'label' => __('Toggle','acf'),
- 'instructions' => __('Prepend an extra checkbox to toggle all choices','acf'),
- 'name' => 'toggle',
- 'type' => 'true_false',
- 'ui' => 1,
- ));
-
-
- // return_format
- acf_render_field_setting( $field, array(
- 'label' => __('Return Value','acf'),
- 'instructions' => __('Specify the returned value on front end','acf'),
- 'type' => 'radio',
- 'name' => 'return_format',
- 'layout' => 'horizontal',
- 'choices' => array(
- 'value' => __('Value','acf'),
- 'label' => __('Label','acf'),
- 'array' => __('Both (Array)','acf')
- )
- ));
-
- }
-
-
- /*
- * update_field()
- *
- * This filter is appied to the $field before it is saved to the database
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $field - the field array holding all the field options
- * @param $post_id - the field group ID (post_type = acf)
- *
- * @return $field - the modified field
- */
- function update_field( $field ) {
-
- // Decode choices (convert to array).
- $field['choices'] = acf_decode_choices( $field['choices'] );
- $field['default_value'] = acf_decode_choices( $field['default_value'], true );
- return $field;
- }
-
-
- /*
- * update_value()
- *
- * This filter is appied to the $value before it is updated in the db
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value - the value which will be saved in the database
- * @param $post_id - the $post_id of which the value will be saved
- * @param $field - the field array holding all the field options
- *
- * @return $value - the modified value
- */
-
- function update_value( $value, $post_id, $field ) {
-
- // bail early if is empty
- if( empty($value) ) return $value;
-
-
- // select -> update_value()
- $value = acf_get_field_type('select')->update_value( $value, $post_id, $field );
-
-
- // save_other_choice
- if( $field['save_custom'] ) {
-
- // get raw $field (may have been changed via repeater field)
- // if field is local, it won't have an ID
- $selector = $field['ID'] ? $field['ID'] : $field['key'];
- $field = acf_get_field( $selector );
- if( !$field ) {
- return false;
+ }
+
+
+ /*
+ * render_field()
+ *
+ * Create the HTML interface for your field
+ *
+ * @param $field (array) the $field being rendered
+ *
+ * @type action
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $field (array) the $field being edited
+ * @return n/a
+ */
+
+ function render_field( $field ) {
+
+ // reset vars
+ $this->_values = array();
+ $this->_all_checked = true;
+
+ // ensure array
+ $field['value'] = acf_get_array( $field['value'] );
+ $field['choices'] = acf_get_array( $field['choices'] );
+
+ // hiden input
+ acf_hidden_input( array( 'name' => $field['name'] ) );
+
+ // vars
+ $li = '';
+ $ul = array(
+ 'class' => 'acf-checkbox-list',
+ );
+
+ // append to class
+ $ul['class'] .= ' ' . ( $field['layout'] == 'horizontal' ? 'acf-hl' : 'acf-bl' );
+ $ul['class'] .= ' ' . $field['class'];
+
+ // checkbox saves an array
+ $field['name'] .= '[]';
+
+ // choices
+ if ( ! empty( $field['choices'] ) ) {
+
+ // choices
+ $li .= $this->render_field_choices( $field );
+
+ // toggle
+ if ( $field['toggle'] ) {
+ $li = $this->render_field_toggle( $field ) . $li;
+ }
}
-
-
- // bail early if no ID (JSON only)
- if( !$field['ID'] ) return $value;
-
-
+
+ // custom
+ if ( $field['allow_custom'] ) {
+ $li .= $this->render_field_custom( $field );
+ }
+
+ // return
+ echo '' . "\n";
+
+ }
+
+
+ /*
+ * render_field_choices
+ *
+ * description
+ *
+ * @type function
+ * @date 15/7/17
+ * @since 5.6.0
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+
+ function render_field_choices( $field ) {
+
+ // walk
+ return $this->walk( $field['choices'], $field );
+
+ }
+
+ /**
+ * Validates values for the checkbox field
+ *
+ * @date 09/12/2022
+ * @since 6.0.0
+ *
+ * @param bool $valid If the field is valid.
+ * @param mixed $value The value to validate.
+ * @param array $field The main field array.
+ * @param string $input The input element's name attribute.
+ *
+ * @return bool
+ */
+ function validate_value( $valid, $value, $field, $input ) {
+ if ( ! is_array( $value ) || empty( $field['allow_custom'] ) ) {
+ return $valid;
+ }
+
+ foreach ( $value as $value ) {
+ if ( empty( $value ) && $value !== '0' ) {
+ return __( 'Checkbox custom values cannot be empty. Uncheck any empty values.', 'acf' );
+ }
+ }
+
+ return $valid;
+ }
+
+ /*
+ * render_field_toggle
+ *
+ * description
+ *
+ * @type function
+ * @date 15/7/17
+ * @since 5.6.0
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+
+ function render_field_toggle( $field ) {
+
+ // vars
+ $atts = array(
+ 'type' => 'checkbox',
+ 'class' => 'acf-checkbox-toggle',
+ 'label' => __( 'Toggle All', 'acf' ),
+ );
+
+ // custom label
+ if ( is_string( $field['toggle'] ) ) {
+ $atts['label'] = $field['toggle'];
+ }
+
+ // checked
+ if ( $this->_all_checked ) {
+ $atts['checked'] = 'checked';
+ }
+
+ // return
+ return '' . acf_get_checkbox_input( $atts ) . ' ' . "\n";
+
+ }
+
+
+ /*
+ * render_field_custom
+ *
+ * description
+ *
+ * @type function
+ * @date 15/7/17
+ * @since 5.6.0
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+
+ function render_field_custom( $field ) {
+
+ // vars
+ $html = '';
+
// loop
- foreach( $value as $v ) {
-
+ foreach ( $field['value'] as $value ) {
+
// ignore if already eixsts
- if( isset($field['choices'][ $v ]) ) continue;
-
-
- // unslash (fixes serialize single quote issue)
- $v = wp_unslash($v);
-
-
- // sanitize (remove tags)
- $v = sanitize_text_field($v);
-
-
+ if ( isset( $field['choices'][ $value ] ) ) {
+ continue;
+ }
+
+ // vars
+ $esc_value = esc_attr( $value );
+ $text_input = array(
+ 'name' => $field['name'],
+ 'value' => $value,
+ );
+
+ // bail early if choice already exists
+ if ( in_array( $esc_value, $this->_values ) ) {
+ continue;
+ }
+
// append
- $field['choices'][ $v ] = $v;
-
+ $html .= ' ' . acf_get_text_input( $text_input ) . ' ' . "\n";
+
}
-
-
- // save
- acf_update_field( $field );
-
- }
-
-
- // return
- return $value;
-
- }
-
-
- /*
- * translate_field
- *
- * This function will translate field settings
- *
- * @type function
- * @date 8/03/2016
- * @since 5.3.2
- *
- * @param $field (array)
- * @return $field
- */
-
- function translate_field( $field ) {
-
- return acf_get_field_type('select')->translate_field( $field );
-
- }
-
-
- /*
- * format_value()
- *
- * This filter is appied to the $value after it is loaded from the db and before it is returned to the template
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value (mixed) the value which was loaded from the database
- * @param $post_id (mixed) the $post_id from which the value was loaded
- * @param $field (array) the field array holding all the field options
- *
- * @return $value (mixed) the modified value
- */
-
- function format_value( $value, $post_id, $field ) {
-
- // Bail early if is empty.
- if( acf_is_empty($value) ) {
- return array();
+
+ // append button
+ $html .= '' . esc_attr( $field['custom_choice_button_text'] ) . ' ' . "\n";
+
+ // return
+ return $html;
+
}
-
- // Always convert to array of items.
- $value = acf_array($value);
-
- // Return.
- return acf_get_field_type('select')->format_value( $value, $post_id, $field );
+
+
+ function walk( $choices = array(), $args = array(), $depth = 0 ) {
+
+ // bail early if no choices
+ if ( empty( $choices ) ) {
+ return '';
+ }
+
+ // defaults
+ $args = wp_parse_args(
+ $args,
+ array(
+ 'id' => '',
+ 'type' => 'checkbox',
+ 'name' => '',
+ 'value' => array(),
+ 'disabled' => array(),
+ )
+ );
+
+ // vars
+ $html = '';
+
+ // sanitize values for 'selected' matching
+ if ( $depth == 0 ) {
+ $args['value'] = array_map( 'esc_attr', $args['value'] );
+ $args['disabled'] = array_map( 'esc_attr', $args['disabled'] );
+ }
+
+ // loop
+ foreach ( $choices as $value => $label ) {
+
+ // open
+ $html .= '';
+
+ // optgroup
+ if ( is_array( $label ) ) {
+
+ $html .= '' . "\n";
+ $html .= $this->walk( $label, $args, $depth + 1 );
+ $html .= ' ';
+
+ // option
+ } else {
+
+ // vars
+ $esc_value = esc_attr( $value );
+ $atts = array(
+ 'id' => $args['id'] . '-' . str_replace( ' ', '-', $value ),
+ 'type' => $args['type'],
+ 'name' => $args['name'],
+ 'value' => $value,
+ 'label' => $label,
+ );
+
+ // selected
+ if ( in_array( $esc_value, $args['value'] ) ) {
+ $atts['checked'] = 'checked';
+ } else {
+ $this->_all_checked = false;
+ }
+
+ // disabled
+ if ( in_array( $esc_value, $args['disabled'] ) ) {
+ $atts['disabled'] = 'disabled';
+ }
+
+ // store value added
+ $this->_values[] = $esc_value;
+
+ // append
+ $html .= acf_get_checkbox_input( $atts );
+
+ }
+
+ // close
+ $html .= ' ' . "\n";
+
+ }
+
+ // return
+ return $html;
+
+ }
+
+
+
+ /*
+ * render_field_settings()
+ *
+ * Create extra options for your field. This is rendered when editing a field.
+ * The value of $field['name'] can be used (like bellow) to save extra data to the $field
+ *
+ * @type action
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $field - an array holding all the field's data
+ */
+ function render_field_settings( $field ) {
+ // Encode choices (convert from array).
+ $field['choices'] = acf_encode_choices( $field['choices'] );
+ $field['default_value'] = acf_encode_choices( $field['default_value'], false );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Choices', 'acf' ),
+ 'instructions' => __( 'Enter each choice on a new line.', 'acf' ) . ' ' . __( 'For more control, you may specify both a value and label like this:', 'acf' ) . '' . __( 'red : Red', 'acf' ) . ' ',
+ 'type' => 'textarea',
+ 'name' => 'choices',
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Default Value', 'acf' ),
+ 'instructions' => __( 'Enter each default value on a new line', 'acf' ),
+ 'type' => 'textarea',
+ 'name' => 'default_value',
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Return Value', 'acf' ),
+ 'instructions' => __( 'Specify the returned value on front end', 'acf' ),
+ 'type' => 'radio',
+ 'name' => 'return_format',
+ 'layout' => 'horizontal',
+ 'choices' => array(
+ 'value' => __( 'Value', 'acf' ),
+ 'label' => __( 'Label', 'acf' ),
+ 'array' => __( 'Both (Array)', 'acf' ),
+ ),
+ )
+ );
+
+ }
+
+ /**
+ * Renders the field settings used in the "Validation" tab.
+ *
+ * @since 6.0
+ *
+ * @param array $field The field settings array.
+ * @return void
+ */
+ function render_field_validation_settings( $field ) {
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Allow Custom Values', 'acf' ),
+ 'name' => 'allow_custom',
+ 'type' => 'true_false',
+ 'ui' => 1,
+ 'instructions' => __( "Allow 'custom' values to be added", 'acf' ),
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Save Custom Values', 'acf' ),
+ 'name' => 'save_custom',
+ 'type' => 'true_false',
+ 'ui' => 1,
+ 'instructions' => __( "Save 'custom' values to the field's choices", 'acf' ),
+ 'conditions' => array(
+ 'field' => 'allow_custom',
+ 'operator' => '==',
+ 'value' => 1,
+ ),
+ )
+ );
+ }
+
+ /**
+ * Renders the field settings used in the "Presentation" tab.
+ *
+ * @since 6.0
+ *
+ * @param array $field The field settings array.
+ * @return void
+ */
+ function render_field_presentation_settings( $field ) {
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Layout', 'acf' ),
+ 'instructions' => '',
+ 'type' => 'radio',
+ 'name' => 'layout',
+ 'layout' => 'horizontal',
+ 'choices' => array(
+ 'vertical' => __( 'Vertical', 'acf' ),
+ 'horizontal' => __( 'Horizontal', 'acf' ),
+ ),
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Add Toggle All', 'acf' ),
+ 'instructions' => __( 'Prepend an extra checkbox to toggle all choices', 'acf' ),
+ 'name' => 'toggle',
+ 'type' => 'true_false',
+ 'ui' => 1,
+ )
+ );
+ }
+
+ /*
+ * update_field()
+ *
+ * This filter is appied to the $field before it is saved to the database
+ *
+ * @type filter
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $field - the field array holding all the field options
+ * @param $post_id - the field group ID (post_type = acf)
+ *
+ * @return $field - the modified field
+ */
+
+ function update_field( $field ) {
+
+ // Decode choices (convert to array).
+ $field['choices'] = acf_decode_choices( $field['choices'] );
+ $field['default_value'] = acf_decode_choices( $field['default_value'], true );
+ return $field;
+ }
+
+
+ /*
+ * update_value()
+ *
+ * This filter is appied to the $value before it is updated in the db
+ *
+ * @type filter
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $value - the value which will be saved in the database
+ * @param $post_id - the $post_id of which the value will be saved
+ * @param $field - the field array holding all the field options
+ *
+ * @return $value - the modified value
+ */
+
+ function update_value( $value, $post_id, $field ) {
+
+ // bail early if is empty
+ if ( empty( $value ) ) {
+ return $value;
+ }
+
+ // select -> update_value()
+ $value = acf_get_field_type( 'select' )->update_value( $value, $post_id, $field );
+
+ // save_other_choice
+ if ( $field['save_custom'] ) {
+
+ // get raw $field (may have been changed via repeater field)
+ // if field is local, it won't have an ID
+ $selector = $field['ID'] ? $field['ID'] : $field['key'];
+ $field = acf_get_field( $selector );
+ if ( ! $field ) {
+ return false;
+ }
+
+ // bail early if no ID (JSON only)
+ if ( ! $field['ID'] ) {
+ return $value;
+ }
+
+ // loop
+ foreach ( $value as $v ) {
+
+ // ignore if already eixsts
+ if ( isset( $field['choices'][ $v ] ) ) {
+ continue;
+ }
+
+ // unslash (fixes serialize single quote issue)
+ $v = wp_unslash( $v );
+
+ // sanitize (remove tags)
+ $v = sanitize_text_field( $v );
+
+ // append
+ $field['choices'][ $v ] = $v;
+
+ }
+
+ // save
+ acf_update_field( $field );
+
+ }
+
+ // return
+ return $value;
+
+ }
+
+
+ /*
+ * translate_field
+ *
+ * This function will translate field settings
+ *
+ * @type function
+ * @date 8/03/2016
+ * @since 5.3.2
+ *
+ * @param $field (array)
+ * @return $field
+ */
+
+ function translate_field( $field ) {
+
+ return acf_get_field_type( 'select' )->translate_field( $field );
+
+ }
+
+
+ /*
+ * format_value()
+ *
+ * This filter is appied to the $value after it is loaded from the db and before it is returned to the template
+ *
+ * @type filter
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $value (mixed) the value which was loaded from the database
+ * @param $post_id (mixed) the $post_id from which the value was loaded
+ * @param $field (array) the field array holding all the field options
+ *
+ * @return $value (mixed) the modified value
+ */
+
+ function format_value( $value, $post_id, $field ) {
+
+ // Bail early if is empty.
+ if ( acf_is_empty( $value ) ) {
+ return array();
+ }
+
+ // Always convert to array of items.
+ $value = acf_array( $value );
+
+ // Return.
+ return acf_get_field_type( 'select' )->format_value( $value, $post_id, $field );
+ }
+
+ /**
+ * Return the schema array for the REST API.
+ *
+ * @param array $field
+ * @return array
+ */
+ public function get_rest_schema( array $field ) {
+ $schema = array(
+ 'type' => array( 'integer', 'string', 'array', 'null' ),
+ 'required' => isset( $field['required'] ) && $field['required'],
+ 'items' => array(
+ 'type' => array( 'string', 'integer' ),
+ ),
+ );
+
+ if ( isset( $field['default_value'] ) && '' !== $field['default_value'] ) {
+ $schema['default'] = $field['default_value'];
+ }
+
+ // If we allow custom values, nothing else to do here.
+ if ( ! empty( $field['allow_custom'] ) ) {
+ return $schema;
+ }
+
+ /**
+ * If a user has defined keys for the checkboxes,
+ * we should use the keys for the available options to POST to,
+ * since they are what is displayed in GET requests.
+ */
+ $checkbox_keys = array_map(
+ 'strval',
+ array_diff(
+ array_keys( $field['choices'] ),
+ array_values( $field['choices'] )
+ )
+ );
+
+ // Support users passing integers for the keys as well.
+ $checkbox_keys = array_merge( $checkbox_keys, array_map( 'intval', array_keys( $field['choices'] ) ) );
+
+ $schema['items']['enum'] = empty( $checkbox_keys ) ? $field['choices'] : $checkbox_keys;
+
+ return $schema;
+ }
+
}
-
-}
-// initialize
-acf_register_field_type( 'acf_field_checkbox' );
+ // initialize
+ acf_register_field_type( 'acf_field_checkbox' );
endif; // class_exists check
-?>
\ No newline at end of file
+
diff --git a/includes/fields/class-acf-field-color_picker.php b/includes/fields/class-acf-field-color_picker.php
index e5a7aa8..e2c9b2f 100644
--- a/includes/fields/class-acf-field-color_picker.php
+++ b/includes/fields/class-acf-field-color_picker.php
@@ -1,128 +1,298 @@
name = 'color_picker';
- $this->label = __("Color Picker",'acf');
- $this->category = 'jquery';
- $this->defaults = array(
- 'default_value' => '',
- );
-
- }
-
-
- /*
- * input_admin_enqueue_scripts
- *
- * description
- *
- * @type function
- * @date 16/12/2015
- * @since 5.3.2
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
- function input_admin_enqueue_scripts() {
+ class acf_field_color_picker extends acf_field {
+
+
+ /*
+ * __construct
+ *
+ * This function will setup the field type data
+ *
+ * @type function
+ * @date 5/03/2014
+ * @since 5.0.0
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ function initialize() {
+
+ // vars
+ $this->name = 'color_picker';
+ $this->label = __( 'Color Picker', 'acf' );
+ $this->category = 'advanced';
+ $this->description = __( 'An interactive UI for selecting a color, or specifying a Hex value.', 'acf' );
+ $this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-color-picker.png';
+ $this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/color-picker/', 'docs', 'field-type-selection' );
+ $this->defaults = array(
+ 'default_value' => '',
+ 'enable_opacity' => false,
+ 'return_format' => 'string', // 'string'|'array'
+ );
- // Register scripts for non-admin.
- // Applies logic from wp_default_scripts() function.
- if( !is_admin() ) {
- $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
- $scripts = wp_scripts();
- $scripts->add( 'iris', '/wp-admin/js/iris.min.js', array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), '1.0.7', 1 );
- $scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array( 'iris' ), false, 1 );
- $scripts->set_translations( 'wp-color-picker' );
}
-
- // Enqueue.
- wp_enqueue_style( 'wp-color-picker' );
- wp_enqueue_script( 'wp-color-picker' );
- }
-
-
- /*
- * render_field()
- *
- * Create the HTML interface for your field
- *
- * @param $field - an array holding all the field's data
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- */
-
- function render_field( $field ) {
-
- // vars
- $text_input = acf_get_sub_array( $field, array('id', 'class', 'name', 'value') );
- $hidden_input = acf_get_sub_array( $field, array('name', 'value') );
-
-
- // html
- ?>
+
+
+ /*
+ * input_admin_enqueue_scripts
+ *
+ * description
+ *
+ * @type function
+ * @date 16/12/2015
+ * @since 5.3.2
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+
+ function input_admin_enqueue_scripts() {
+
+ // Register scripts for non-admin.
+ // Applies logic from wp_default_scripts() function defined in "wp-includes/script-loader.php".
+ if ( ! is_admin() ) {
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
+ $scripts = wp_scripts();
+ $scripts->add( 'iris', '/wp-admin/js/iris.min.js', array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), '1.0.7', 1 );
+ $scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array( 'iris' ), false, 1 );
+
+ // Handle localisation across multiple WP versions.
+ // WP 5.0+
+ if ( method_exists( $scripts, 'set_translations' ) ) {
+ $scripts->set_translations( 'wp-color-picker' );
+ // WP 4.9
+ } else {
+ $scripts->localize(
+ 'wp-color-picker',
+ 'wpColorPickerL10n',
+ array(
+ 'clear' => __( 'Clear', 'acf' ),
+ 'clearAriaLabel' => __( 'Clear color', 'acf' ),
+ 'defaultString' => __( 'Default', 'acf' ),
+ 'defaultAriaLabel' => __( 'Select default color', 'acf' ),
+ 'pick' => __( 'Select Color', 'acf' ),
+ 'defaultLabel' => __( 'Color value', 'acf' ),
+ )
+ );
+ }
+ }
+
+ // Enqueue alpha color picker assets.
+ wp_enqueue_script(
+ 'acf-color-picker-alpha',
+ acf_get_url( 'assets/inc/color-picker-alpha/wp-color-picker-alpha.js' ),
+ array( 'jquery', 'wp-color-picker' ),
+ '3.0.0'
+ );
+
+ // Enqueue.
+ wp_enqueue_style( 'wp-color-picker' );
+ wp_enqueue_script( 'wp-color-picker' );
+
+ acf_localize_data(
+ array(
+ 'colorPickerL10n' => array(
+ 'hex_string' => __( 'Hex String', 'acf' ),
+ 'rgba_string' => __( 'RGBA String', 'acf' ),
+ ),
+ )
+ );
+ }
+
+
+ /*
+ * render_field()
+ *
+ * Create the HTML interface for your field
+ *
+ * @param $field - an array holding all the field's data
+ *
+ * @type action
+ * @since 3.6
+ * @date 23/01/13
+ */
+
+ function render_field( $field ) {
+
+ // vars
+ $text_input = acf_get_sub_array( $field, array( 'id', 'class', 'name', 'value' ) );
+ $hidden_input = acf_get_sub_array( $field, array( 'name', 'value' ) );
+
+ // Color picker alpha library requires a specific data attribute to exist.
+ if ( $field['enable_opacity'] ) {
+ $text_input['data-alpha-enabled'] = true;
+ }
+
+ // html
+ ?>
- __('Default Value','acf'),
- 'instructions' => '',
- 'type' => 'text',
- 'name' => 'default_value',
- 'placeholder' => '#FFFFFF'
- ));
-
- }
-
-}
+ __( 'Default Value', 'acf' ),
+ 'instructions' => '',
+ 'type' => 'text',
+ 'name' => 'default_value',
+ 'placeholder' => '#FFFFFF',
+ )
+ );
+
+ // Toggle opacity control.
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Enable Transparency', 'acf' ),
+ 'instructions' => '',
+ 'type' => 'true_false',
+ 'name' => 'enable_opacity',
+ 'ui' => 1,
+ )
+ );
+
+ // Return format control.
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Return Format', 'acf' ),
+ 'instructions' => '',
+ 'type' => 'radio',
+ 'name' => 'return_format',
+ 'layout' => 'horizontal',
+ 'choices' => array(
+ 'string' => __( 'Hex String', 'acf' ),
+ 'array' => __( 'RGBA Array', 'acf' ),
+ ),
+ )
+ );
+
+ }
+
+ /**
+ * Format the value for use in templates. At this stage, the value has been loaded from the
+ * database and is being returned by an API function such as get_field(), the_field(), etc.
+ *
+ * @since 5.10
+ * @date 15/12/20
+ *
+ * @param mixed $value
+ * @param int $post_id
+ * @param array $field
+ *
+ * @return string|array
+ */
+ public function format_value( $value, $post_id, $field ) {
+ if ( isset( $field['return_format'] ) && $field['return_format'] === 'array' ) {
+ $value = $this->string_to_array( $value );
+ }
+
+ return $value;
+ }
+
+ /**
+ * Convert either a Hexadecimal or RGBA string to an RGBA array.
+ *
+ * @since 5.10
+ * @date 15/12/20
+ *
+ * @param string $value
+ * @return array
+ */
+ private function string_to_array( $value ) {
+ $value = is_string( $value ) ? trim( $value ) : '';
+
+ // Match and collect r,g,b values from 6 digit hex code. If there are 4
+ // match-results, we have the values we need to build an r,g,b,a array.
+ preg_match( '/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i', $value, $matches );
+ if ( count( $matches ) === 4 ) {
+ return array(
+ 'red' => hexdec( $matches[1] ),
+ 'green' => hexdec( $matches[2] ),
+ 'blue' => hexdec( $matches[3] ),
+ 'alpha' => (float) 1,
+ );
+ }
+
+ // Match and collect r,g,b values from 3 digit hex code. If there are 4
+ // match-results, we have the values we need to build an r,g,b,a array.
+ // We have to duplicate the matched hex digit for 3 digit hex codes.
+ preg_match( '/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i', $value, $matches );
+ if ( count( $matches ) === 4 ) {
+ return array(
+ 'red' => hexdec( $matches[1] . $matches[1] ),
+ 'green' => hexdec( $matches[2] . $matches[2] ),
+ 'blue' => hexdec( $matches[3] . $matches[3] ),
+ 'alpha' => (float) 1,
+ );
+ }
+
+ // Attempt to match an rgba(…) or rgb(…) string (case-insensitive), capturing the decimals
+ // as a string. If there are two match results, we have the RGBA decimal values as a
+ // comma-separated string. Break it apart and, depending on the number of values, return
+ // our formatted r,g,b,a array.
+ preg_match( '/^rgba?\(([0-9,.]+)\)/i', $value, $matches );
+ if ( count( $matches ) === 2 ) {
+ $decimals = explode( ',', $matches[1] );
+
+ // Handle rgba() format.
+ if ( count( $decimals ) === 4 ) {
+ return array(
+ 'red' => (int) $decimals[0],
+ 'green' => (int) $decimals[1],
+ 'blue' => (int) $decimals[2],
+ 'alpha' => (float) $decimals[3],
+ );
+ }
+
+ // Handle rgb() format.
+ if ( count( $decimals ) === 3 ) {
+ return array(
+ 'red' => (int) $decimals[0],
+ 'green' => (int) $decimals[1],
+ 'blue' => (int) $decimals[2],
+ 'alpha' => (float) 1,
+ );
+ }
+ }
+
+ return array(
+ 'red' => 0,
+ 'green' => 0,
+ 'blue' => 0,
+ 'alpha' => (float) 0,
+ );
+ }
+
+ }
+
+ // initialize
+ acf_register_field_type( 'acf_field_color_picker' );
endif; // class_exists check
-?>
\ No newline at end of file
+?>
diff --git a/includes/fields/class-acf-field-date_picker.php b/includes/fields/class-acf-field-date_picker.php
index 7f2e43c..551a2a7 100644
--- a/includes/fields/class-acf-field-date_picker.php
+++ b/includes/fields/class-acf-field-date_picker.php
@@ -1,276 +1,334 @@
name = 'date_picker';
- $this->label = __("Date Picker",'acf');
- $this->category = 'jquery';
- $this->defaults = array(
- 'display_format' => 'd/m/Y',
- 'return_format' => 'd/m/Y',
- 'first_day' => 1
- );
- }
-
-
- /*
- * input_admin_enqueue_scripts
- *
- * description
- *
- * @type function
- * @date 16/12/2015
- * @since 5.3.2
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
- function input_admin_enqueue_scripts() {
-
- // bail ealry if no enqueue
- if( !acf_get_setting('enqueue_datepicker') ) {
- return;
- }
-
- // localize
- global $wp_locale;
- acf_localize_data(array(
- 'datePickerL10n' => array(
- 'closeText' => _x('Done', 'Date Picker JS closeText', 'acf'),
- 'currentText' => _x('Today', 'Date Picker JS currentText', 'acf'),
- 'nextText' => _x('Next', 'Date Picker JS nextText', 'acf'),
- 'prevText' => _x('Prev', 'Date Picker JS prevText', 'acf'),
- 'weekHeader' => _x('Wk', 'Date Picker JS weekHeader', 'acf'),
- 'monthNames' => array_values( $wp_locale->month ),
- 'monthNamesShort' => array_values( $wp_locale->month_abbrev ),
- 'dayNames' => array_values( $wp_locale->weekday ),
- 'dayNamesMin' => array_values( $wp_locale->weekday_initial ),
- 'dayNamesShort' => array_values( $wp_locale->weekday_abbrev )
- )
- ));
-
- // script
- wp_enqueue_script('jquery-ui-datepicker');
-
- // style
- wp_enqueue_style('acf-datepicker', acf_get_url('assets/inc/datepicker/jquery-ui.min.css'), array(), '1.11.4' );
- }
-
-
- /*
- * render_field()
- *
- * Create the HTML interface for your field
- *
- * @param $field - an array holding all the field's data
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- */
-
- function render_field( $field ) {
-
- // vars
- $hidden_value = '';
- $display_value = '';
-
- // format value
- if( $field['value'] ) {
- $hidden_value = acf_format_date( $field['value'], 'Ymd' );
- $display_value = acf_format_date( $field['value'], $field['display_format'] );
+ class acf_field_date_picker extends acf_field {
+
+
+ /*
+ * __construct
+ *
+ * This function will setup the field type data
+ *
+ * @type function
+ * @date 5/03/2014
+ * @since 5.0.0
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ function initialize() {
+
+ // vars
+ $this->name = 'date_picker';
+ $this->label = __( 'Date Picker', 'acf' );
+ $this->category = 'advanced';
+ $this->description = __( 'An interactive UI for picking a date. The date return format can be customized using the field settings.', 'acf' );
+ $this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-date-picker.png';
+ $this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/date-picker/', 'docs', 'field-type-selection' );
+ $this->defaults = array(
+ 'display_format' => 'd/m/Y',
+ 'return_format' => 'd/m/Y',
+ 'first_day' => 1,
+ );
}
-
- // elements
- $div = array(
- 'class' => 'acf-date-picker acf-input-wrap',
- 'data-date_format' => acf_convert_date_to_js($field['display_format']),
- 'data-first_day' => $field['first_day'],
- );
- $hidden_input = array(
- 'id' => $field['id'],
- 'name' => $field['name'],
- 'value' => $hidden_value,
- );
- $text_input = array(
- 'class' => 'input',
- 'value' => $display_value,
- );
-
- // special attributes
- foreach( array( 'readonly', 'disabled' ) as $k ) {
- if( !empty($field[ $k ]) ) {
- $text_input[ $k ] = $k;
+
+
+ /*
+ * input_admin_enqueue_scripts
+ *
+ * description
+ *
+ * @type function
+ * @date 16/12/2015
+ * @since 5.3.2
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+
+ function input_admin_enqueue_scripts() {
+
+ // bail early if no enqueue
+ if ( ! acf_get_setting( 'enqueue_datepicker' ) ) {
+ return;
}
+
+ // localize
+ global $wp_locale;
+ acf_localize_data(
+ array(
+ 'datePickerL10n' => array(
+ 'closeText' => _x( 'Done', 'Date Picker JS closeText', 'acf' ),
+ 'currentText' => _x( 'Today', 'Date Picker JS currentText', 'acf' ),
+ 'nextText' => _x( 'Next', 'Date Picker JS nextText', 'acf' ),
+ 'prevText' => _x( 'Prev', 'Date Picker JS prevText', 'acf' ),
+ 'weekHeader' => _x( 'Wk', 'Date Picker JS weekHeader', 'acf' ),
+ 'monthNames' => array_values( $wp_locale->month ),
+ 'monthNamesShort' => array_values( $wp_locale->month_abbrev ),
+ 'dayNames' => array_values( $wp_locale->weekday ),
+ 'dayNamesMin' => array_values( $wp_locale->weekday_initial ),
+ 'dayNamesShort' => array_values( $wp_locale->weekday_abbrev ),
+ ),
+ )
+ );
+
+ // script
+ wp_enqueue_script( 'jquery-ui-datepicker' );
+
+ // style
+ wp_enqueue_style( 'acf-datepicker', acf_get_url( 'assets/inc/datepicker/jquery-ui.min.css' ), array(), '1.11.4' );
}
-
- // save_format - compatibility with ACF < 5.0.0
- if( !empty($field['save_format']) ) {
-
- // add custom JS save format
- $div['data-save_format'] = $field['save_format'];
-
- // revert hidden input value to raw DB value
- $hidden_input['value'] = $field['value'];
-
- // remove formatted value (will do this via JS)
- $text_input['value'] = '';
- }
-
- // html
- ?>
- >
+
+
+ /*
+ * render_field()
+ *
+ * Create the HTML interface for your field
+ *
+ * @param $field - an array holding all the field's data
+ *
+ * @type action
+ * @since 3.6
+ * @date 23/01/13
+ */
+
+ function render_field( $field ) {
+
+ // vars
+ $hidden_value = '';
+ $display_value = '';
+
+ // format value
+ if ( $field['value'] ) {
+ $hidden_value = acf_format_date( $field['value'], 'Ymd' );
+ $display_value = acf_format_date( $field['value'], $field['display_format'] );
+ }
+
+ // elements
+ $div = array(
+ 'class' => 'acf-date-picker acf-input-wrap',
+ 'data-date_format' => acf_convert_date_to_js( $field['display_format'] ),
+ 'data-first_day' => $field['first_day'],
+ );
+ $hidden_input = array(
+ 'id' => $field['id'],
+ 'name' => $field['name'],
+ 'value' => $hidden_value,
+ );
+ $text_input = array(
+ 'class' => $field['class'] . ' input',
+ 'value' => $display_value,
+ );
+
+ // special attributes
+ foreach ( array( 'readonly', 'disabled' ) as $k ) {
+ if ( ! empty( $field[ $k ] ) ) {
+ $hidden_input[ $k ] = $k;
+ $text_input[ $k ] = $k;
+ }
+ }
+
+ // save_format - compatibility with ACF < 5.0.0
+ if ( ! empty( $field['save_format'] ) ) {
+
+ // add custom JS save format
+ $div['data-save_format'] = $field['save_format'];
+
+ // revert hidden input value to raw DB value
+ $hidden_input['value'] = $field['value'];
+
+ // remove formatted value (will do this via JS)
+ $text_input['value'] = '';
+ }
+
+ // html
+ ?>
+
>
- __('Display Format','acf'),
- 'instructions' => __('The format displayed when editing a post','acf'),
- 'type' => 'radio',
- 'name' => 'display_format',
- 'other_choice' => 1,
- 'choices' => array(
- 'd/m/Y' => '
' . $d_m_Y . ' d/m/Y',
- 'm/d/Y' => '
' . $m_d_Y . ' m/d/Y',
- 'F j, Y' => '
' . $F_j_Y . ' F j, Y',
- 'other' => '
' . __('Custom:','acf') . ' '
- )
- ));
-
-
- // save_format - compatibility with ACF < 5.0.0
- if( !empty($field['save_format']) ) {
-
- // save_format
- acf_render_field_setting( $field, array(
- 'label' => __('Save Format','acf'),
- 'instructions' => __('The format used when saving a value','acf'),
- 'type' => 'text',
- 'name' => 'save_format',
- //'readonly' => 1 // this setting was not readonly in v4
- ));
-
- } else {
-
- // return_format
- acf_render_field_setting( $field, array(
- 'label' => __('Return Format','acf'),
- 'instructions' => __('The format returned via template functions','acf'),
- 'type' => 'radio',
- 'name' => 'return_format',
- 'other_choice' => 1,
- 'choices' => array(
- 'd/m/Y' => '
' . $d_m_Y . ' d/m/Y',
- 'm/d/Y' => '
' . $m_d_Y . ' m/d/Y',
- 'F j, Y' => '
' . $F_j_Y . ' F j, Y',
- 'Ymd' => '
' . $Ymd . ' Ymd',
- 'other' => '
' . __('Custom:','acf') . ' '
+ ';
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Display Format', 'acf' ),
+ 'hint' => __( 'The format displayed when editing a post', 'acf' ),
+ 'type' => 'radio',
+ 'name' => 'display_format',
+ 'other_choice' => 1,
+ 'choices' => array(
+ 'd/m/Y' => '
' . $d_m_Y . ' d/m/Y',
+ 'm/d/Y' => '
' . $m_d_Y . ' m/d/Y',
+ 'F j, Y' => '
' . $F_j_Y . ' F j, Y',
+ 'other' => '
' . __( 'Custom:', 'acf' ) . ' ',
+ ),
)
- ));
-
+ );
+
+ // save_format - compatibility with ACF < 5.0.0
+ if ( ! empty( $field['save_format'] ) ) {
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Save Format', 'acf' ),
+ 'hint' => __( 'The format used when saving a value', 'acf' ),
+ 'type' => 'text',
+ 'name' => 'save_format',
+ // 'readonly' => 1 // this setting was not readonly in v4
+ )
+ );
+ } else {
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Return Format', 'acf' ),
+ 'hint' => __( 'The format returned via template functions', 'acf' ),
+ 'type' => 'radio',
+ 'name' => 'return_format',
+ 'other_choice' => 1,
+ 'choices' => array(
+ 'd/m/Y' => '
' . $d_m_Y . ' d/m/Y',
+ 'm/d/Y' => '
' . $m_d_Y . ' m/d/Y',
+ 'F j, Y' => '
' . $F_j_Y . ' F j, Y',
+ 'Ymd' => '
' . $Ymd . ' Ymd',
+ 'other' => '
' . __( 'Custom:', 'acf' ) . ' ',
+ ),
+ )
+ );
+ }
+
+ echo '
';
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Week Starts On', 'acf' ),
+ 'instructions' => '',
+ 'type' => 'select',
+ 'name' => 'first_day',
+ 'choices' => array_values( $wp_locale->weekday ),
+ )
+ );
}
-
-
- // first_day
- acf_render_field_setting( $field, array(
- 'label' => __('Week Starts On','acf'),
- 'instructions' => '',
- 'type' => 'select',
- 'name' => 'first_day',
- 'choices' => array_values( $wp_locale->weekday )
- ));
-
- }
-
-
- /*
- * format_value()
- *
- * This filter is appied to the $value after it is loaded from the db and before it is returned to the template
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value (mixed) the value which was loaded from the database
- * @param $post_id (mixed) the $post_id from which the value was loaded
- * @param $field (array) the field array holding all the field options
- *
- * @return $value (mixed) the modified value
- */
-
- function format_value( $value, $post_id, $field ) {
-
- // save_format - compatibility with ACF < 5.0.0
- if( !empty($field['save_format']) ) {
-
- return $value;
-
+
+ /*
+ * format_value()
+ *
+ * This filter is appied to the $value after it is loaded from the db and before it is returned to the template
+ *
+ * @type filter
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $value (mixed) the value which was loaded from the database
+ * @param $post_id (mixed) the $post_id from which the value was loaded
+ * @param $field (array) the field array holding all the field options
+ *
+ * @return $value (mixed) the modified value
+ */
+
+ function format_value( $value, $post_id, $field ) {
+
+ // save_format - compatibility with ACF < 5.0.0
+ if ( ! empty( $field['save_format'] ) ) {
+
+ return $value;
+
+ }
+
+ // return
+ return acf_format_date( $value, $field['return_format'] );
+
}
-
-
- // return
- return acf_format_date( $value, $field['return_format'] );
-
- }
-
-}
-// initialize
-acf_register_field_type( 'acf_field_date_picker' );
+ /**
+ * This filter is applied to the $field after it is loaded from the database
+ * and ensures the return and display values are set.
+ *
+ * @type filter
+ * @since 5.11.0
+ * @date 28/09/21
+ *
+ * @param array $field The field array holding all the field options.
+ *
+ * @return array
+ */
+ function load_field( $field ) {
+ if ( empty( $field['display_format'] ) ) {
+ $field['display_format'] = $this->defaults['display_format'];
+ }
+
+ if ( empty( $field['return_format'] ) ) {
+ $field['return_format'] = $this->defaults['return_format'];
+ }
+
+ return $field;
+ }
+
+ /**
+ * Return the schema array for the REST API.
+ *
+ * @param array $field
+ * @return array
+ */
+ public function get_rest_schema( array $field ) {
+ return array(
+ 'type' => array( 'string', 'null' ),
+ 'description' => 'A `Ymd` formatted date string.',
+ 'required' => ! empty( $field['required'] ),
+ );
+ }
+
+ /**
+ * Apply basic formatting to prepare the value for default REST output.
+ *
+ * @param mixed $value
+ * @param string|int $post_id
+ * @param array $field
+ * @return mixed
+ */
+ public function format_value_for_rest( $value, $post_id, array $field ) {
+ if ( ! $value ) {
+ return null;
+ }
+
+ return (string) $value;
+ }
+
+ }
+
+
+ // initialize
+ acf_register_field_type( 'acf_field_date_picker' );
endif; // class_exists check
-?>
\ No newline at end of file
+?>
diff --git a/includes/fields/class-acf-field-date_time_picker.php b/includes/fields/class-acf-field-date_time_picker.php
index 06b4415..8c7338e 100644
--- a/includes/fields/class-acf-field-date_time_picker.php
+++ b/includes/fields/class-acf-field-date_time_picker.php
@@ -1,257 +1,298 @@
name = 'date_time_picker';
- $this->label = __("Date Time Picker",'acf');
- $this->category = 'jquery';
- $this->defaults = array(
- 'display_format' => 'd/m/Y g:i a',
- 'return_format' => 'd/m/Y g:i a',
- 'first_day' => 1
- );
- }
-
-
- /*
- * input_admin_enqueue_scripts
- *
- * description
- *
- * @type function
- * @date 16/12/2015
- * @since 5.3.2
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
- function input_admin_enqueue_scripts() {
-
- // bail ealry if no enqueue
- if( !acf_get_setting('enqueue_datetimepicker') ) return;
-
-
- // vars
- $version = '1.6.1';
-
-
- // script
- wp_enqueue_script('acf-timepicker', acf_get_url('assets/inc/timepicker/jquery-ui-timepicker-addon.min.js'), array('jquery-ui-datepicker'), $version);
-
-
- // style
- wp_enqueue_style('acf-timepicker', acf_get_url('assets/inc/timepicker/jquery-ui-timepicker-addon.min.css'), '', $version);
-
- // localize
- acf_localize_data(array(
- 'dateTimePickerL10n' => array(
- 'timeOnlyTitle' => _x('Choose Time', 'Date Time Picker JS timeOnlyTitle', 'acf'),
- 'timeText' => _x('Time', 'Date Time Picker JS timeText', 'acf'),
- 'hourText' => _x('Hour', 'Date Time Picker JS hourText', 'acf'),
- 'minuteText' => _x('Minute', 'Date Time Picker JS minuteText', 'acf'),
- 'secondText' => _x('Second', 'Date Time Picker JS secondText', 'acf'),
- 'millisecText' => _x('Millisecond', 'Date Time Picker JS millisecText', 'acf'),
- 'microsecText' => _x('Microsecond', 'Date Time Picker JS microsecText', 'acf'),
- 'timezoneText' => _x('Time Zone', 'Date Time Picker JS timezoneText', 'acf'),
- 'currentText' => _x('Now', 'Date Time Picker JS currentText', 'acf'),
- 'closeText' => _x('Done', 'Date Time Picker JS closeText', 'acf'),
- 'selectText' => _x('Select', 'Date Time Picker JS selectText', 'acf'),
- 'amNames' => array(
- _x('AM', 'Date Time Picker JS amText', 'acf'),
- _x('A', 'Date Time Picker JS amTextShort', 'acf'),
- ),
- 'pmNames' => array(
- _x('PM', 'Date Time Picker JS pmText', 'acf'),
- _x('P', 'Date Time Picker JS pmTextShort', 'acf'),
- )
- )
- ));
- }
-
-
- /*
- * render_field()
- *
- * Create the HTML interface for your field
- *
- * @param $field - an array holding all the field's data
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- */
-
- function render_field( $field ) {
-
- // format value
- $hidden_value = '';
- $display_value = '';
-
- if( $field['value'] ) {
-
- $hidden_value = acf_format_date( $field['value'], 'Y-m-d H:i:s' );
- $display_value = acf_format_date( $field['value'], $field['display_format'] );
-
+ class acf_field_date_and_time_picker extends acf_field {
+
+
+ /*
+ * __construct
+ *
+ * This function will setup the field type data
+ *
+ * @type function
+ * @date 5/03/2014
+ * @since 5.0.0
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ function initialize() {
+
+ // vars
+ $this->name = 'date_time_picker';
+ $this->label = __( 'Date Time Picker', 'acf' );
+ $this->category = 'advanced';
+ $this->description = __( 'An interactive UI for picking a date and time. The date return format can be customized using the field settings.', 'acf' );
+ $this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-date-time.png';
+ $this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/date-time-picker/', 'docs', 'field-type-selection' );
+ $this->defaults = array(
+ 'display_format' => 'd/m/Y g:i a',
+ 'return_format' => 'd/m/Y g:i a',
+ 'first_day' => 1,
+ );
}
-
-
- // convert display_format to date and time
- // the letter 'm' is used for date and minute in JS, so this must be done here in PHP
- $formats = acf_split_date_time($field['display_format']);
-
-
- // vars
- $div = array(
- 'class' => 'acf-date-time-picker acf-input-wrap',
- 'data-date_format' => acf_convert_date_to_js($formats['date']),
- 'data-time_format' => acf_convert_time_to_js($formats['time']),
- 'data-first_day' => $field['first_day'],
- );
-
- $hidden_input = array(
- 'id' => $field['id'],
- 'class' => 'input-alt',
- 'name' => $field['name'],
- 'value' => $hidden_value,
- );
-
- $text_input = array(
- 'class' => 'input',
- 'value' => $display_value,
- );
-
-
- // html
- ?>
- >
+
+
+ /*
+ * input_admin_enqueue_scripts
+ *
+ * description
+ *
+ * @type function
+ * @date 16/12/2015
+ * @since 5.3.2
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+
+ function input_admin_enqueue_scripts() {
+
+ // bail early if no enqueue
+ if ( ! acf_get_setting( 'enqueue_datetimepicker' ) ) {
+ return;
+ }
+
+ // vars
+ $version = '1.6.1';
+
+ // script
+ wp_enqueue_script( 'acf-timepicker', acf_get_url( 'assets/inc/timepicker/jquery-ui-timepicker-addon.min.js' ), array( 'jquery-ui-datepicker' ), $version );
+
+ // style
+ wp_enqueue_style( 'acf-timepicker', acf_get_url( 'assets/inc/timepicker/jquery-ui-timepicker-addon.min.css' ), '', $version );
+
+ // localize
+ acf_localize_data(
+ array(
+ 'dateTimePickerL10n' => array(
+ 'timeOnlyTitle' => _x( 'Choose Time', 'Date Time Picker JS timeOnlyTitle', 'acf' ),
+ 'timeText' => _x( 'Time', 'Date Time Picker JS timeText', 'acf' ),
+ 'hourText' => _x( 'Hour', 'Date Time Picker JS hourText', 'acf' ),
+ 'minuteText' => _x( 'Minute', 'Date Time Picker JS minuteText', 'acf' ),
+ 'secondText' => _x( 'Second', 'Date Time Picker JS secondText', 'acf' ),
+ 'millisecText' => _x( 'Millisecond', 'Date Time Picker JS millisecText', 'acf' ),
+ 'microsecText' => _x( 'Microsecond', 'Date Time Picker JS microsecText', 'acf' ),
+ 'timezoneText' => _x( 'Time Zone', 'Date Time Picker JS timezoneText', 'acf' ),
+ 'currentText' => _x( 'Now', 'Date Time Picker JS currentText', 'acf' ),
+ 'closeText' => _x( 'Done', 'Date Time Picker JS closeText', 'acf' ),
+ 'selectText' => _x( 'Select', 'Date Time Picker JS selectText', 'acf' ),
+ 'amNames' => array(
+ _x( 'AM', 'Date Time Picker JS amText', 'acf' ),
+ _x( 'A', 'Date Time Picker JS amTextShort', 'acf' ),
+ ),
+ 'pmNames' => array(
+ _x( 'PM', 'Date Time Picker JS pmText', 'acf' ),
+ _x( 'P', 'Date Time Picker JS pmTextShort', 'acf' ),
+ ),
+ ),
+ )
+ );
+ }
+
+
+ /*
+ * render_field()
+ *
+ * Create the HTML interface for your field
+ *
+ * @param $field - an array holding all the field's data
+ *
+ * @type action
+ * @since 3.6
+ * @date 23/01/13
+ */
+
+ function render_field( $field ) {
+
+ // Set value.
+ $hidden_value = '';
+ $display_value = '';
+
+ if ( $field['value'] ) {
+ $hidden_value = acf_format_date( $field['value'], 'Y-m-d H:i:s' );
+ $display_value = acf_format_date( $field['value'], $field['display_format'] );
+ }
+
+ // Convert "display_format" setting to individual date and time formats.
+ $formats = acf_split_date_time( $field['display_format'] );
+
+ // Elements.
+ $div = array(
+ 'class' => 'acf-date-time-picker acf-input-wrap',
+ 'data-date_format' => acf_convert_date_to_js( $formats['date'] ),
+ 'data-time_format' => acf_convert_time_to_js( $formats['time'] ),
+ 'data-first_day' => $field['first_day'],
+ );
+ $hidden_input = array(
+ 'id' => $field['id'],
+ 'class' => 'input-alt',
+ 'name' => $field['name'],
+ 'value' => $hidden_value,
+ );
+ $text_input = array(
+ 'class' => $field['class'] . ' input',
+ 'value' => $display_value,
+ );
+ foreach ( array( 'readonly', 'disabled' ) as $k ) {
+ if ( ! empty( $field[ $k ] ) ) {
+ $hidden_input[ $k ] = $k;
+ $text_input[ $k ] = $k;
+ }
+ }
+
+ // Output.
+ ?>
+
>
- __('Display Format','acf'),
- 'instructions' => __('The format displayed when editing a post','acf'),
- 'type' => 'radio',
- 'name' => 'display_format',
- 'other_choice' => 1,
- 'choices' => array(
- 'd/m/Y g:i a' => '
' . $d_m_Y . ' d/m/Y g:i a',
- 'm/d/Y g:i a' => '
' . $m_d_Y . ' m/d/Y g:i a',
- 'F j, Y g:i a' => '
' . $F_j_Y . ' F j, Y g:i a',
- 'Y-m-d H:i:s' => '
' . $Ymd . ' Y-m-d H:i:s',
- 'other' => '
' . __('Custom:','acf') . ' '
- )
- ));
-
-
- // return_format
- acf_render_field_setting( $field, array(
- 'label' => __('Return Format','acf'),
- 'instructions' => __('The format returned via template functions','acf'),
- 'type' => 'radio',
- 'name' => 'return_format',
- 'other_choice' => 1,
- 'choices' => array(
- 'd/m/Y g:i a' => '
' . $d_m_Y . ' d/m/Y g:i a',
- 'm/d/Y g:i a' => '
' . $m_d_Y . ' m/d/Y g:i a',
- 'F j, Y g:i a' => '
' . $F_j_Y . ' F j, Y g:i a',
- 'Y-m-d H:i:s' => '
' . $Ymd . ' Y-m-d H:i:s',
- 'other' => '
' . __('Custom:','acf') . ' '
- )
- ));
-
-
- // first_day
- acf_render_field_setting( $field, array(
- 'label' => __('Week Starts On','acf'),
- 'instructions' => '',
- 'type' => 'select',
- 'name' => 'first_day',
- 'choices' => array_values( $wp_locale->weekday )
- ));
-
- }
-
-
- /*
- * format_value()
- *
- * This filter is appied to the $value after it is loaded from the db and before it is returned to the template
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value (mixed) the value which was loaded from the database
- * @param $post_id (mixed) the $post_id from which the value was loaded
- * @param $field (array) the field array holding all the field options
- *
- * @return $value (mixed) the modified value
- */
-
- function format_value( $value, $post_id, $field ) {
-
- return acf_format_date( $value, $field['return_format'] );
-
- }
-
-}
+ ';
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Display Format', 'acf' ),
+ 'hint' => __( 'The format displayed when editing a post', 'acf' ),
+ 'type' => 'radio',
+ 'name' => 'display_format',
+ 'other_choice' => 1,
+ 'choices' => array(
+ 'd/m/Y g:i a' => '
' . $d_m_Y . ' d/m/Y g:i a',
+ 'm/d/Y g:i a' => '
' . $m_d_Y . ' m/d/Y g:i a',
+ 'F j, Y g:i a' => '
' . $F_j_Y . ' F j, Y g:i a',
+ 'Y-m-d H:i:s' => '
' . $Ymd . ' Y-m-d H:i:s',
+ 'other' => '
' . __( 'Custom:', 'acf' ) . ' ',
+ ),
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Return Format', 'acf' ),
+ 'hint' => __( 'The format returned via template functions', 'acf' ),
+ 'type' => 'radio',
+ 'name' => 'return_format',
+ 'other_choice' => 1,
+ 'choices' => array(
+ 'd/m/Y g:i a' => '
' . $d_m_Y . ' d/m/Y g:i a',
+ 'm/d/Y g:i a' => '
' . $m_d_Y . ' m/d/Y g:i a',
+ 'F j, Y g:i a' => '
' . $F_j_Y . ' F j, Y g:i a',
+ 'Y-m-d H:i:s' => '
' . $Ymd . ' Y-m-d H:i:s',
+ 'other' => '
' . __( 'Custom:', 'acf' ) . ' ',
+ ),
+ )
+ );
+
+ echo '
';
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Week Starts On', 'acf' ),
+ 'instructions' => '',
+ 'type' => 'select',
+ 'name' => 'first_day',
+ 'choices' => array_values( $wp_locale->weekday ),
+ )
+ );
+ }
+
+ /*
+ * format_value()
+ *
+ * This filter is appied to the $value after it is loaded from the db and before it is returned to the template
+ *
+ * @type filter
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $value (mixed) the value which was loaded from the database
+ * @param $post_id (mixed) the $post_id from which the value was loaded
+ * @param $field (array) the field array holding all the field options
+ *
+ * @return $value (mixed) the modified value
+ */
+
+ function format_value( $value, $post_id, $field ) {
+
+ return acf_format_date( $value, $field['return_format'] );
+
+ }
+
+
+ /**
+ * This filter is applied to the $field after it is loaded from the database
+ * and ensures the return and display values are set.
+ *
+ * @type filter
+ * @since 5.11.0
+ * @date 28/09/21
+ *
+ * @param array $field The field array holding all the field options.
+ *
+ * @return array
+ */
+ function load_field( $field ) {
+ if ( empty( $field['display_format'] ) ) {
+ $field['display_format'] = $this->defaults['display_format'];
+ }
+
+ if ( empty( $field['return_format'] ) ) {
+ $field['return_format'] = $this->defaults['return_format'];
+ }
+
+ return $field;
+ }
+
+ /**
+ * Return the schema array for the REST API.
+ *
+ * @param array $field
+ * @return array
+ */
+ public function get_rest_schema( array $field ) {
+ return array(
+ 'type' => array( 'string', 'null' ),
+ 'description' => 'A `Y-m-d H:i:s` formatted date string.',
+ 'required' => ! empty( $field['required'] ),
+ );
+ }
+
+ }
+
+
+ // initialize
+ acf_register_field_type( 'acf_field_date_and_time_picker' );
endif; // class_exists check
-?>
\ No newline at end of file
+?>
diff --git a/includes/fields/class-acf-field-email.php b/includes/fields/class-acf-field-email.php
index ee3c264..d639e83 100644
--- a/includes/fields/class-acf-field-email.php
+++ b/includes/fields/class-acf-field-email.php
@@ -1,161 +1,208 @@
name = 'email';
+ $this->label = __( 'Email', 'acf' );
+ $this->description = __( 'A text input specifically designed for storing email addresses.', 'acf' );
+ $this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-email.png';
+ $this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/email/', 'docs', 'field-type-selection' );
+ $this->defaults = array(
+ 'default_value' => '',
+ 'placeholder' => '',
+ 'prepend' => '',
+ 'append' => '',
+ );
+
+ }
+
+
+ /*
+ * render_field()
+ *
+ * Create the HTML interface for your field
+ *
+ * @param $field - an array holding all the field's data
+ *
+ * @type action
+ * @since 3.6
+ * @date 23/01/13
+ */
+
+ function render_field( $field ) {
+
+ // vars
+ $atts = array();
+ $keys = array( 'type', 'id', 'class', 'name', 'value', 'placeholder', 'pattern' );
+ $keys2 = array( 'readonly', 'disabled', 'required', 'multiple' );
+ $html = '';
+
+ // prepend
+ if ( $field['prepend'] !== '' ) {
+
+ $field['class'] .= ' acf-is-prepended';
+ $html .= '' . acf_esc_html( $field['prepend'] ) . '
';
+
+ }
+
+ // append
+ if ( $field['append'] !== '' ) {
+
+ $field['class'] .= ' acf-is-appended';
+ $html .= '' . acf_esc_html( $field['append'] ) . '
';
+
+ }
+
+ // atts (value="123")
+ foreach ( $keys as $k ) {
+ if ( isset( $field[ $k ] ) ) {
+ $atts[ $k ] = $field[ $k ];
+ }
+ }
+
+ // atts2 (disabled="disabled")
+ foreach ( $keys2 as $k ) {
+ if ( ! empty( $field[ $k ] ) ) {
+ $atts[ $k ] = $k;
+ }
+ }
+
+ // remove empty atts
+ $atts = acf_clean_atts( $atts );
+
+ // render
+ $html .= '' . acf_get_text_input( $atts ) . '
';
+
+ // return
+ echo $html;
+
+ }
+
+
+ /*
+ * render_field_settings()
+ *
+ * Create extra options for your field. This is rendered when editing a field.
+ * The value of $field['name'] can be used (like bellow) to save extra data to the $field
+ *
+ * @type action
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $field - an array holding all the field's data
+ */
+ function render_field_settings( $field ) {
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Default Value', 'acf' ),
+ 'instructions' => __( 'Appears when creating a new post', 'acf' ),
+ 'type' => 'text',
+ 'name' => 'default_value',
+ )
+ );
+ }
+
+ /**
+ * Renders the field settings used in the "Presentation" tab.
+ *
+ * @since 6.0
+ *
+ * @param array $field The field settings array.
+ * @return void
+ */
+ function render_field_presentation_settings( $field ) {
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Placeholder Text', 'acf' ),
+ 'instructions' => __( 'Appears within the input', 'acf' ),
+ 'type' => 'text',
+ 'name' => 'placeholder',
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Prepend', 'acf' ),
+ 'instructions' => __( 'Appears before the input', 'acf' ),
+ 'type' => 'text',
+ 'name' => 'prepend',
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Append', 'acf' ),
+ 'instructions' => __( 'Appears after the input', 'acf' ),
+ 'type' => 'text',
+ 'name' => 'append',
+ )
+ );
+ }
+
+ /**
+ * Validate the email value. If this method returns TRUE, the input value is valid. If
+ * FALSE or a string is returned, the input value is invalid and the user is shown a
+ * notice. If a string is returned, the string is show as the message text.
+ *
+ * @param bool $valid Whether the value is valid.
+ * @param mixed $value The field value.
+ * @param array $field The field array.
+ * @param string $input The request variable name for the inbound field.
+ *
+ * @return bool|string
+ */
+ public function validate_value( $valid, $value, $field, $input ) {
+ $flags = defined( 'FILTER_FLAG_EMAIL_UNICODE' ) ? FILTER_FLAG_EMAIL_UNICODE : 0;
+
+ if ( $value && filter_var( wp_unslash( $value ), FILTER_VALIDATE_EMAIL, $flags ) === false ) {
+ return sprintf( __( "'%s' is not a valid email address", 'acf' ), esc_html( $value ) );
+ }
+
+ return $valid;
+ }
+
+ /**
+ * Return the schema array for the REST API.
+ *
+ * @param array $field
+ * @return array
+ */
+ public function get_rest_schema( array $field ) {
+ $schema = parent::get_rest_schema( $field );
+ $schema['format'] = 'email';
+
+ return $schema;
+ }
-class acf_field_email extends acf_field {
-
-
- /*
- * initialize
- *
- * This function will setup the field type data
- *
- * @type function
- * @date 5/03/2014
- * @since 5.0.0
- *
- * @param n/a
- * @return n/a
- */
-
- function initialize() {
-
- // vars
- $this->name = 'email';
- $this->label = __("Email",'acf');
- $this->defaults = array(
- 'default_value' => '',
- 'placeholder' => '',
- 'prepend' => '',
- 'append' => ''
- );
-
}
-
-
- /*
- * render_field()
- *
- * Create the HTML interface for your field
- *
- * @param $field - an array holding all the field's data
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- */
-
- function render_field( $field ) {
-
- // vars
- $atts = array();
- $keys = array( 'type', 'id', 'class', 'name', 'value', 'placeholder', 'pattern' );
- $keys2 = array( 'readonly', 'disabled', 'required', 'multiple' );
- $html = '';
-
-
- // prepend
- if( $field['prepend'] !== '' ) {
-
- $field['class'] .= ' acf-is-prepended';
- $html .= '' . acf_esc_html($field['prepend']) . '
';
-
- }
-
-
- // append
- if( $field['append'] !== '' ) {
-
- $field['class'] .= ' acf-is-appended';
- $html .= '' . acf_esc_html($field['append']) . '
';
-
- }
-
-
- // atts (value="123")
- foreach( $keys as $k ) {
- if( isset($field[ $k ]) ) $atts[ $k ] = $field[ $k ];
- }
-
-
- // atts2 (disabled="disabled")
- foreach( $keys2 as $k ) {
- if( !empty($field[ $k ]) ) $atts[ $k ] = $k;
- }
-
-
- // remove empty atts
- $atts = acf_clean_atts( $atts );
-
-
- // render
- $html .= '' . acf_get_text_input( $atts ) . '
';
-
-
- // return
- echo $html;
-
- }
-
-
- /*
- * render_field_settings()
- *
- * Create extra options for your field. This is rendered when editing a field.
- * The value of $field['name'] can be used (like bellow) to save extra data to the $field
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- *
- * @param $field - an array holding all the field's data
- */
-
- function render_field_settings( $field ) {
-
- // default_value
- acf_render_field_setting( $field, array(
- 'label' => __('Default Value','acf'),
- 'instructions' => __('Appears when creating a new post','acf'),
- 'type' => 'text',
- 'name' => 'default_value',
- ));
-
-
- // placeholder
- acf_render_field_setting( $field, array(
- 'label' => __('Placeholder Text','acf'),
- 'instructions' => __('Appears within the input','acf'),
- 'type' => 'text',
- 'name' => 'placeholder',
- ));
-
-
- // prepend
- acf_render_field_setting( $field, array(
- 'label' => __('Prepend','acf'),
- 'instructions' => __('Appears before the input','acf'),
- 'type' => 'text',
- 'name' => 'prepend',
- ));
-
-
- // append
- acf_render_field_setting( $field, array(
- 'label' => __('Append','acf'),
- 'instructions' => __('Appears after the input','acf'),
- 'type' => 'text',
- 'name' => 'append',
- ));
-
- }
-
-}
-// initialize
-acf_register_field_type( 'acf_field_email' );
+ // initialize
+ acf_register_field_type( 'acf_field_email' );
endif; // class_exists check
-?>
\ No newline at end of file
+
diff --git a/includes/fields/class-acf-field-file.php b/includes/fields/class-acf-field-file.php
index bee1a06..dabced1 100644
--- a/includes/fields/class-acf-field-file.php
+++ b/includes/fields/class-acf-field-file.php
@@ -1,437 +1,552 @@
name = 'file';
- $this->label = __("File",'acf');
- $this->category = 'content';
- $this->defaults = array(
- 'return_format' => 'array',
- 'library' => 'all',
- 'min_size' => 0,
- 'max_size' => 0,
- 'mime_types' => ''
- );
-
- // filters
- add_filter('get_media_item_args', array($this, 'get_media_item_args'));
- }
-
-
- /*
- * input_admin_enqueue_scripts
- *
- * description
- *
- * @type function
- * @date 16/12/2015
- * @since 5.3.2
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
- function input_admin_enqueue_scripts() {
-
- // localize
- acf_localize_text(array(
- 'Select File' => __('Select File', 'acf'),
- 'Edit File' => __('Edit File', 'acf'),
- 'Update File' => __('Update File', 'acf'),
- ));
- }
-
-
- /*
- * render_field()
- *
- * Create the HTML interface for your field
- *
- * @param $field - an array holding all the field's data
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- */
-
- function render_field( $field ) {
-
- // vars
- $uploader = acf_get_setting('uploader');
-
-
- // allow custom uploader
- $uploader = acf_maybe_get($field, 'uploader', $uploader);
-
-
- // enqueue
- if( $uploader == 'wp' ) {
- acf_enqueue_uploader();
+ class acf_field_file extends acf_field {
+
+
+ /*
+ * __construct
+ *
+ * This function will setup the field type data
+ *
+ * @type function
+ * @date 5/03/2014
+ * @since 5.0.0
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ function initialize() {
+
+ // vars
+ $this->name = 'file';
+ $this->label = __( 'File', 'acf' );
+ $this->category = 'content';
+ $this->description = __( 'Uses the native WordPress media picker to upload, or choose files.', 'acf' );
+ $this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-file.png';
+ $this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/file/', 'docs', 'field-type-selection' );
+ $this->defaults = array(
+ 'return_format' => 'array',
+ 'library' => 'all',
+ 'min_size' => 0,
+ 'max_size' => 0,
+ 'mime_types' => '',
+ );
+
+ // filters
+ add_filter( 'get_media_item_args', array( $this, 'get_media_item_args' ) );
}
-
-
- // vars
- $o = array(
- 'icon' => '',
- 'title' => '',
- 'url' => '',
- 'filename' => '',
- 'filesize' => ''
- );
-
- $div = array(
- 'class' => 'acf-file-uploader',
- 'data-library' => $field['library'],
- 'data-mime_types' => $field['mime_types'],
- 'data-uploader' => $uploader
- );
-
-
- // has value?
- if( $field['value'] ) {
-
- $attachment = acf_get_attachment($field['value']);
- if( $attachment ) {
-
- // has value
- $div['class'] .= ' has-value';
-
- // update
- $o['icon'] = $attachment['icon'];
- $o['title'] = $attachment['title'];
- $o['url'] = $attachment['url'];
- $o['filename'] = $attachment['filename'];
- if( $attachment['filesize'] ) {
- $o['filesize'] = size_format($attachment['filesize']);
+
+
+ /*
+ * input_admin_enqueue_scripts
+ *
+ * description
+ *
+ * @type function
+ * @date 16/12/2015
+ * @since 5.3.2
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+
+ function input_admin_enqueue_scripts() {
+
+ // localize
+ acf_localize_text(
+ array(
+ 'Select File' => __( 'Select File', 'acf' ),
+ 'Edit File' => __( 'Edit File', 'acf' ),
+ 'Update File' => __( 'Update File', 'acf' ),
+ )
+ );
+ }
+
+
+ /*
+ * render_field()
+ *
+ * Create the HTML interface for your field
+ *
+ * @param $field - an array holding all the field's data
+ *
+ * @type action
+ * @since 3.6
+ * @date 23/01/13
+ */
+
+ function render_field( $field ) {
+
+ // vars
+ $uploader = acf_get_setting( 'uploader' );
+
+ // allow custom uploader
+ $uploader = acf_maybe_get( $field, 'uploader', $uploader );
+
+ // enqueue
+ if ( $uploader == 'wp' ) {
+ acf_enqueue_uploader();
+ }
+
+ // vars
+ $o = array(
+ 'icon' => '',
+ 'title' => '',
+ 'url' => '',
+ 'filename' => '',
+ 'filesize' => '',
+ );
+
+ $div = array(
+ 'class' => 'acf-file-uploader',
+ 'data-library' => $field['library'],
+ 'data-mime_types' => $field['mime_types'],
+ 'data-uploader' => $uploader,
+ );
+
+ // has value?
+ if ( $field['value'] ) {
+
+ $attachment = acf_get_attachment( $field['value'] );
+ if ( $attachment ) {
+
+ // has value
+ $div['class'] .= ' has-value';
+
+ // update
+ $o['icon'] = $attachment['icon'];
+ $o['title'] = $attachment['title'];
+ $o['url'] = $attachment['url'];
+ $o['filename'] = $attachment['filename'];
+ if ( $attachment['filesize'] ) {
+ $o['filesize'] = size_format( $attachment['filesize'] );
+ }
}
- }
- }
-
-?>
->
- $field['name'], 'value' => $field['value'], 'data-name' => 'id' )); ?>
+ }
+
+ ?>
+
>
+ $field['name'],
+ 'value' => $field['value'],
+ 'data-name' => 'id',
+ )
+ );
+ ?>
-
+
-
+
- :
-
+ :
+
- :
-
+ :
+
-
+
-
-
+
+
- $field['name'], 'id' => $field['id'] )); ?>
+ $field['name'],
+ 'id' => $field['id'],
+ 'key' => $field['key'],
+ )
+ );
+ ?>
-
+
-
+
- __( 'Return Value', 'acf' ),
+ 'instructions' => __( 'Specify the returned value on front end', 'acf' ),
+ 'type' => 'radio',
+ 'name' => 'return_format',
+ 'layout' => 'horizontal',
+ 'choices' => array(
+ 'array' => __( 'File Array', 'acf' ),
+ 'url' => __( 'File URL', 'acf' ),
+ 'id' => __( 'File ID', 'acf' ),
+ ),
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Library', 'acf' ),
+ 'instructions' => __( 'Limit the media library choice', 'acf' ),
+ 'type' => 'radio',
+ 'name' => 'library',
+ 'layout' => 'horizontal',
+ 'choices' => array(
+ 'all' => __( 'All', 'acf' ),
+ 'uploadedTo' => __( 'Uploaded to post', 'acf' ),
+ ),
+ )
+ );
+ }
+
+ /**
+ * Renders the field settings used in the "Validation" tab.
+ *
+ * @since 6.0
+ *
+ * @param array $field The field settings array.
+ * @return void
+ */
+ function render_field_validation_settings( $field ) {
+ // Clear numeric settings.
+ $clear = array(
+ 'min_size',
+ 'max_size',
+ );
+
+ foreach ( $clear as $k ) {
+
+ if ( empty( $field[ $k ] ) ) {
+ $field[ $k ] = '';
+ }
}
-
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Minimum', 'acf' ),
+ 'instructions' => __( 'Restrict which files can be uploaded', 'acf' ),
+ 'type' => 'text',
+ 'name' => 'min_size',
+ 'prepend' => __( 'File size', 'acf' ),
+ 'append' => 'MB',
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Maximum', 'acf' ),
+ 'instructions' => __( 'Restrict which files can be uploaded', 'acf' ),
+ 'type' => 'text',
+ 'name' => 'max_size',
+ 'prepend' => __( 'File size', 'acf' ),
+ 'append' => 'MB',
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Allowed File Types', 'acf' ),
+ 'hint' => __( 'Comma separated list. Leave blank for all types', 'acf' ),
+ 'type' => 'text',
+ 'name' => 'mime_types',
+ )
+ );
}
-
-
- // return_format
- acf_render_field_setting( $field, array(
- 'label' => __('Return Value','acf'),
- 'instructions' => __('Specify the returned value on front end','acf'),
- 'type' => 'radio',
- 'name' => 'return_format',
- 'layout' => 'horizontal',
- 'choices' => array(
- 'array' => __("File Array",'acf'),
- 'url' => __("File URL",'acf'),
- 'id' => __("File ID",'acf')
- )
- ));
-
-
- // library
- acf_render_field_setting( $field, array(
- 'label' => __('Library','acf'),
- 'instructions' => __('Limit the media library choice','acf'),
- 'type' => 'radio',
- 'name' => 'library',
- 'layout' => 'horizontal',
- 'choices' => array(
- 'all' => __('All', 'acf'),
- 'uploadedTo' => __('Uploaded to post', 'acf')
- )
- ));
-
-
- // min
- acf_render_field_setting( $field, array(
- 'label' => __('Minimum','acf'),
- 'instructions' => __('Restrict which files can be uploaded','acf'),
- 'type' => 'text',
- 'name' => 'min_size',
- 'prepend' => __('File size', 'acf'),
- 'append' => 'MB',
- ));
-
-
- // max
- acf_render_field_setting( $field, array(
- 'label' => __('Maximum','acf'),
- 'instructions' => __('Restrict which files can be uploaded','acf'),
- 'type' => 'text',
- 'name' => 'max_size',
- 'prepend' => __('File size', 'acf'),
- 'append' => 'MB',
- ));
-
-
- // allowed type
- acf_render_field_setting( $field, array(
- 'label' => __('Allowed file types','acf'),
- 'instructions' => __('Comma separated list. Leave blank for all types','acf'),
- 'type' => 'text',
- 'name' => 'mime_types',
- ));
-
- }
-
-
- /*
- * format_value()
- *
- * This filter is appied to the $value after it is loaded from the db and before it is returned to the template
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value (mixed) the value which was loaded from the database
- * @param $post_id (mixed) the $post_id from which the value was loaded
- * @param $field (array) the field array holding all the field options
- *
- * @return $value (mixed) the modified value
- */
-
- function format_value( $value, $post_id, $field ) {
-
- // bail early if no value
- if( empty($value) ) return false;
-
-
- // bail early if not numeric (error message)
- if( !is_numeric($value) ) return false;
-
-
- // convert to int
- $value = intval($value);
-
-
- // format
- if( $field['return_format'] == 'url' ) {
-
- return wp_get_attachment_url($value);
-
- } elseif( $field['return_format'] == 'array' ) {
-
- return acf_get_attachment( $value );
- }
-
-
- // return
- return $value;
- }
-
-
- /*
- * get_media_item_args
- *
- * description
- *
- * @type function
- * @date 27/01/13
- * @since 3.6.0
- *
- * @param $vars (array)
- * @return $vars
- */
-
- function get_media_item_args( $vars ) {
-
- $vars['send'] = true;
- return($vars);
-
- }
-
-
- /*
- * update_value()
- *
- * This filter is appied to the $value before it is updated in the db
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value - the value which will be saved in the database
- * @param $post_id - the $post_id of which the value will be saved
- * @param $field - the field array holding all the field options
- *
- * @return $value - the modified value
- */
-
- function update_value( $value, $post_id, $field ) {
-
- // Bail early if no value.
- if( empty($value) ) {
+
+ /*
+ * format_value()
+ *
+ * This filter is appied to the $value after it is loaded from the db and before it is returned to the template
+ *
+ * @type filter
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $value (mixed) the value which was loaded from the database
+ * @param $post_id (mixed) the $post_id from which the value was loaded
+ * @param $field (array) the field array holding all the field options
+ *
+ * @return $value (mixed) the modified value
+ */
+
+ function format_value( $value, $post_id, $field ) {
+
+ // bail early if no value
+ if ( empty( $value ) ) {
+ return false;
+ }
+
+ // bail early if not numeric (error message)
+ if ( ! is_numeric( $value ) ) {
+ return false;
+ }
+
+ // convert to int
+ $value = intval( $value );
+
+ // format
+ if ( $field['return_format'] == 'url' ) {
+
+ return wp_get_attachment_url( $value );
+
+ } elseif ( $field['return_format'] == 'array' ) {
+
+ return acf_get_attachment( $value );
+ }
+
+ // return
return $value;
}
-
- // Parse value for id.
- $attachment_id = acf_idval( $value );
-
- // Connect attacment to post.
- acf_connect_attachment_to_post( $attachment_id, $post_id );
-
- // Return id.
- return $attachment_id;
- }
-
-
-
- /*
- * validate_value
- *
- * This function will validate a basic file input
- *
- * @type function
- * @date 11/02/2014
- * @since 5.0.0
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
- function validate_value( $valid, $value, $field, $input ){
-
- // bail early if empty
- if( empty($value) ) return $valid;
-
-
- // bail ealry if is numeric
- if( is_numeric($value) ) return $valid;
-
-
- // bail ealry if not basic string
- if( !is_string($value) ) return $valid;
-
-
- // decode value
- $file = null;
- parse_str($value, $file);
-
-
- // bail early if no attachment
- if( empty($file) ) return $valid;
-
-
- // get errors
- $errors = acf_validate_attachment( $file, $field, 'basic_upload' );
-
-
- // append error
- if( !empty($errors) ) {
-
- $valid = implode("\n", $errors);
-
+
+
+ /*
+ * get_media_item_args
+ *
+ * description
+ *
+ * @type function
+ * @date 27/01/13
+ * @since 3.6.0
+ *
+ * @param $vars (array)
+ * @return $vars
+ */
+
+ function get_media_item_args( $vars ) {
+
+ $vars['send'] = true;
+ return( $vars );
+
}
-
-
- // return
- return $valid;
-
+
+
+ /*
+ * update_value()
+ *
+ * This filter is appied to the $value before it is updated in the db
+ *
+ * @type filter
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $value - the value which will be saved in the database
+ * @param $post_id - the $post_id of which the value will be saved
+ * @param $field - the field array holding all the field options
+ *
+ * @return $value - the modified value
+ */
+
+ function update_value( $value, $post_id, $field ) {
+
+ // Bail early if no value.
+ if ( empty( $value ) ) {
+ return $value;
+ }
+
+ // Parse value for id.
+ $attachment_id = acf_idval( $value );
+
+ // Connect attacment to post.
+ acf_connect_attachment_to_post( $attachment_id, $post_id );
+
+ // Return id.
+ return $attachment_id;
+ }
+
+ /**
+ * validate_value
+ *
+ * This function will validate a basic file input
+ *
+ * @type function
+ * @date 11/02/2014
+ * @since 5.0.0
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+ function validate_value( $valid, $value, $field, $input ) {
+
+ // bail early if empty
+ if ( empty( $value ) ) {
+ return $valid;
+ }
+
+ // bail early if is numeric
+ if ( is_numeric( $value ) ) {
+ return $valid;
+ }
+
+ // bail early if not basic string
+ if ( ! is_string( $value ) ) {
+ return $valid;
+ }
+
+ // decode value
+ $file = null;
+ parse_str( $value, $file );
+
+ // bail early if no attachment
+ if ( empty( $file ) ) {
+ return $valid;
+ }
+
+ // get errors
+ $errors = acf_validate_attachment( $file, $field, 'basic_upload' );
+
+ // append error
+ if ( ! empty( $errors ) ) {
+ $valid = implode( "\n", $errors );
+ }
+
+ // return
+ return $valid;
+ }
+
+ /**
+ * Validates file fields updated via the REST API.
+ *
+ * @param bool $valid
+ * @param int $value
+ * @param array $field
+ *
+ * @return bool|WP_Error
+ */
+ public function validate_rest_value( $valid, $value, $field ) {
+ if ( is_null( $value ) && empty( $field['required'] ) ) {
+ return $valid;
+ }
+
+ /**
+ * A bit of a hack, but we use `wp_prepare_attachment_for_js()` here
+ * since it returns all the data we need to validate the file, and we use this anyways
+ * to validate fields updated via UI.
+ */
+ $attachment = wp_prepare_attachment_for_js( $value );
+ $param = sprintf( '%s[%s]', $field['prefix'], $field['name'] );
+ $data = array(
+ 'param' => $param,
+ 'value' => (int) $value,
+ );
+
+ if ( ! $attachment ) {
+ $error = sprintf( __( '%s requires a valid attachment ID.', 'acf' ), $param );
+ return new WP_Error( 'rest_invalid_param', $error, $data );
+ }
+
+ $errors = acf_validate_attachment( $attachment, $field, 'prepare' );
+
+ if ( ! empty( $errors ) ) {
+ $error = $param . ' - ' . implode( ' ', $errors );
+ return new WP_Error( 'rest_invalid_param', $error, $data );
+ }
+
+ return $valid;
+ }
+
+ /**
+ * Return the schema array for the REST API.
+ *
+ * @param array $field
+ * @return array
+ */
+ public function get_rest_schema( array $field ) {
+ $schema = array(
+ 'type' => array( 'integer', 'null' ),
+ 'required' => isset( $field['required'] ) && $field['required'],
+ );
+
+ if ( ! empty( $field['min_width'] ) ) {
+ $schema['minWidth'] = (int) $field['min_width'];
+ }
+
+ if ( ! empty( $field['min_height'] ) ) {
+ $schema['minHeight'] = (int) $field['min_height'];
+ }
+
+ if ( ! empty( $field['min_size'] ) ) {
+ $schema['minSize'] = $field['min_size'];
+ }
+
+ if ( ! empty( $field['max_width'] ) ) {
+ $schema['maxWidth'] = (int) $field['max_width'];
+ }
+
+ if ( ! empty( $field['max_height'] ) ) {
+ $schema['maxHeight'] = (int) $field['max_height'];
+ }
+
+ if ( ! empty( $field['max_size'] ) ) {
+ $schema['maxSize'] = $field['max_size'];
+ }
+
+ if ( ! empty( $field['mime_types'] ) ) {
+ $schema['mimeTypes'] = $field['mime_types'];
+ }
+
+ return $schema;
+ }
+
+ /**
+ * Apply basic formatting to prepare the value for default REST output.
+ *
+ * @param mixed $value
+ * @param string|int $post_id
+ * @param array $field
+ * @return mixed
+ */
+ public function format_value_for_rest( $value, $post_id, array $field ) {
+ return acf_format_numerics( $value );
+ }
+
}
-
-}
-// initialize
-acf_register_field_type( 'acf_field_file' );
+ // initialize
+ acf_register_field_type( 'acf_field_file' );
endif; // class_exists check
-?>
\ No newline at end of file
+?>
diff --git a/includes/fields/class-acf-field-google-map.php b/includes/fields/class-acf-field-google-map.php
index 3cb2599..31fdc66 100644
--- a/includes/fields/class-acf-field-google-map.php
+++ b/includes/fields/class-acf-field-google-map.php
@@ -1,291 +1,391 @@
name = 'google_map';
- $this->label = __("Google Map",'acf');
- $this->category = 'jquery';
- $this->defaults = array(
- 'height' => '',
- 'center_lat' => '',
- 'center_lng' => '',
- 'zoom' => ''
- );
- $this->default_values = array(
- 'height' => '400',
- 'center_lat' => '-37.81411',
- 'center_lng' => '144.96328',
- 'zoom' => '14'
- );
- }
-
-
- /*
- * input_admin_enqueue_scripts
- *
- * description
- *
- * @type function
- * @date 16/12/2015
- * @since 5.3.2
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
- function input_admin_enqueue_scripts() {
-
- // localize
- acf_localize_text(array(
- 'Sorry, this browser does not support geolocation' => __('Sorry, this browser does not support geolocation', 'acf'),
- ));
-
-
- // bail ealry if no enqueue
- if( !acf_get_setting('enqueue_google_maps') ) {
- return;
- }
-
-
- // vars
- $api = array(
- 'key' => acf_get_setting('google_api_key'),
- 'client' => acf_get_setting('google_api_client'),
- 'libraries' => 'places',
- 'ver' => 3,
- 'callback' => '',
- 'language' => acf_get_locale()
- );
-
-
- // filter
- $api = apply_filters('acf/fields/google_map/api', $api);
-
-
- // remove empty
- if( empty($api['key']) ) unset($api['key']);
- if( empty($api['client']) ) unset($api['client']);
-
-
- // construct url
- $url = add_query_arg($api, 'https://maps.googleapis.com/maps/api/js');
-
-
- // localize
- acf_localize_data(array(
- 'google_map_api' => $url
- ));
- }
-
-
- /*
- * render_field()
- *
- * Create the HTML interface for your field
- *
- * @param $field - an array holding all the field's data
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- */
-
- function render_field( $field ) {
-
- // Apply defaults.
- foreach( $this->default_values as $k => $v ) {
- if( !$field[ $k ] ) {
- $field[ $k ] = $v;
- }
+
+ /*
+ * __construct
+ *
+ * This function will setup the field type data
+ *
+ * @type function
+ * @date 5/03/2014
+ * @since 5.0.0
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ function initialize() {
+
+ // vars
+ $this->name = 'google_map';
+ $this->label = __( 'Google Map', 'acf' );
+ $this->category = 'advanced';
+ $this->description = __( 'An interactive UI for selecting a location using Google Maps. Requires a Google Maps API key and additional configuration to display correctly.', 'acf' );
+ $this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-google-map.png';
+ $this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/google-map/', 'docs', 'field-type-selection' );
+ $this->defaults = array(
+ 'height' => '',
+ 'center_lat' => '',
+ 'center_lng' => '',
+ 'zoom' => '',
+ );
+ $this->default_values = array(
+ 'height' => '400',
+ 'center_lat' => '-37.81411',
+ 'center_lng' => '144.96328',
+ 'zoom' => '14',
+ );
}
-
- // Attrs.
- $attrs = array(
- 'id' => $field['id'],
- 'class' => "acf-google-map {$field['class']}",
- 'data-lat' => $field['center_lat'],
- 'data-lng' => $field['center_lng'],
- 'data-zoom' => $field['zoom'],
- );
-
- $search = '';
- if( $field['value'] ) {
- $attrs['class'] .= ' -value';
- $search = $field['value']['address'];
- } else {
- $field['value'] = '';
+
+
+ /*
+ * input_admin_enqueue_scripts
+ *
+ * description
+ *
+ * @type function
+ * @date 16/12/2015
+ * @since 5.3.2
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+
+ function input_admin_enqueue_scripts() {
+
+ // localize
+ acf_localize_text(
+ array(
+ 'Sorry, this browser does not support geolocation' => __( 'Sorry, this browser does not support geolocation', 'acf' ),
+ )
+ );
+
+ // bail early if no enqueue
+ if ( ! acf_get_setting( 'enqueue_google_maps' ) ) {
+ return;
+ }
+
+ // vars
+ $api = array(
+ 'key' => acf_get_setting( 'google_api_key' ),
+ 'client' => acf_get_setting( 'google_api_client' ),
+ 'libraries' => 'places',
+ 'ver' => 3,
+ 'callback' => 'Function.prototype',
+ 'language' => acf_get_locale(),
+ );
+
+ // filter
+ $api = apply_filters( 'acf/fields/google_map/api', $api );
+
+ // remove empty
+ if ( empty( $api['key'] ) ) {
+ unset( $api['key'] );
+ }
+ if ( empty( $api['client'] ) ) {
+ unset( $api['client'] );
+ }
+
+ // construct url
+ $url = add_query_arg( $api, 'https://maps.googleapis.com/maps/api/js' );
+
+ // localize
+ acf_localize_data(
+ array(
+ 'google_map_api' => $url,
+ )
+ );
}
-
-?>
-
>
+
+
+ /*
+ * render_field()
+ *
+ * Create the HTML interface for your field
+ *
+ * @param $field - an array holding all the field's data
+ *
+ * @type action
+ * @since 3.6
+ * @date 23/01/13
+ */
+
+ function render_field( $field ) {
+
+ // Apply defaults.
+ foreach ( $this->default_values as $k => $v ) {
+ if ( ! $field[ $k ] ) {
+ $field[ $k ] = $v;
+ }
+ }
+
+ // Attrs.
+ $attrs = array(
+ 'id' => $field['id'],
+ 'class' => "acf-google-map {$field['class']}",
+ 'data-lat' => $field['center_lat'],
+ 'data-lng' => $field['center_lng'],
+ 'data-zoom' => $field['zoom'],
+ );
+
+ $search = '';
+ if ( $field['value'] ) {
+ $attrs['class'] .= ' -value';
+ $search = $field['value']['address'];
+ } else {
+ $field['value'] = '';
+ }
+
+ ?>
+
>
- $field['name'], 'value' => $field['value']) ); ?>
+ $field['name'],
+ 'value' => $field['value'],
+ )
+ );
+ ?>
-
+
- __('Center','acf'),
- 'instructions' => __('Center the initial map','acf'),
- 'type' => 'text',
- 'name' => 'center_lat',
- 'prepend' => 'lat',
- 'placeholder' => $this->default_values['center_lat']
- ));
-
-
- // center_lng
- acf_render_field_setting( $field, array(
- 'label' => __('Center','acf'),
- 'instructions' => __('Center the initial map','acf'),
- 'type' => 'text',
- 'name' => 'center_lng',
- 'prepend' => 'lng',
- 'placeholder' => $this->default_values['center_lng'],
- '_append' => 'center_lat'
- ));
-
-
- // zoom
- acf_render_field_setting( $field, array(
- 'label' => __('Zoom','acf'),
- 'instructions' => __('Set the initial zoom level','acf'),
- 'type' => 'text',
- 'name' => 'zoom',
- 'placeholder' => $this->default_values['zoom']
- ));
-
-
- // allow_null
- acf_render_field_setting( $field, array(
- 'label' => __('Height','acf'),
- 'instructions' => __('Customize the map height','acf'),
- 'type' => 'text',
- 'name' => 'height',
- 'append' => 'px',
- 'placeholder' => $this->default_values['height']
- ));
-
- }
-
- /**
- * load_value
- *
- * Filters the value loaded from the database.
- *
- * @date 16/10/19
- * @since 5.8.1
- *
- * @param mixed $value The value loaded from the database.
- * @param mixed $post_id The post ID where the value is saved.
- * @param array $field The field settings array.
- * @return (array|false)
- */
- function load_value( $value, $post_id, $field ) {
-
- // Ensure value is an array.
- if( $value ) {
- return wp_parse_args($value, array(
- 'address' => '',
- 'lat' => 0,
- 'lng' => 0
- ));
+ __( 'Center', 'acf' ),
+ 'hint' => __( 'Center the initial map', 'acf' ),
+ 'type' => 'text',
+ 'name' => 'center_lat',
+ 'prepend' => 'lat',
+ 'placeholder' => $this->default_values['center_lat'],
+ )
+ );
+
+ // center_lng
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Center', 'acf' ),
+ 'hint' => __( 'Center the initial map', 'acf' ),
+ 'type' => 'text',
+ 'name' => 'center_lng',
+ 'prepend' => 'lng',
+ 'placeholder' => $this->default_values['center_lng'],
+ '_append' => 'center_lat',
+ )
+ );
+
+ // zoom
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Zoom', 'acf' ),
+ 'instructions' => __( 'Set the initial zoom level', 'acf' ),
+ 'type' => 'text',
+ 'name' => 'zoom',
+ 'placeholder' => $this->default_values['zoom'],
+ )
+ );
+
+ // allow_null
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Height', 'acf' ),
+ 'instructions' => __( 'Customize the map height', 'acf' ),
+ 'type' => 'text',
+ 'name' => 'height',
+ 'append' => 'px',
+ 'placeholder' => $this->default_values['height'],
+ )
+ );
+
+ }
+
+ /**
+ * load_value
+ *
+ * Filters the value loaded from the database.
+ *
+ * @date 16/10/19
+ * @since 5.8.1
+ *
+ * @param mixed $value The value loaded from the database.
+ * @param mixed $post_id The post ID where the value is saved.
+ * @param array $field The field settings array.
+ * @return (array|false)
+ */
+ function load_value( $value, $post_id, $field ) {
+
+ // Ensure value is an array.
+ if ( $value ) {
+ return wp_parse_args(
+ $value,
+ array(
+ 'address' => '',
+ 'lat' => 0,
+ 'lng' => 0,
+ )
+ );
+ }
+
+ // Return default.
+ return false;
+ }
+
+
+ /*
+ * update_value()
+ *
+ * This filter is appied to the $value before it is updated in the db
+ *
+ * @type filter
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $value - the value which will be saved in the database
+ * @param $post_id - the $post_id of which the value will be saved
+ * @param $field - the field array holding all the field options
+ *
+ * @return $value - the modified value
+ */
+ function update_value( $value, $post_id, $field ) {
+
+ // decode JSON string.
+ if ( is_string( $value ) ) {
+ $value = json_decode( wp_unslash( $value ), true );
+ }
+
+ // Ensure value is an array.
+ if ( $value ) {
+ return (array) $value;
+ }
+
+ // Return default.
+ return false;
+ }
+
+ /**
+ * Return the schema array for the REST API.
+ *
+ * @param array $field
+ * @return array
+ */
+ public function get_rest_schema( array $field ) {
+ return array(
+ 'type' => array( 'object', 'null' ),
+ 'required' => ! empty( $field['required'] ),
+ 'properties' => array(
+ 'address' => array(
+ 'type' => 'string',
+ ),
+ 'lat' => array(
+ 'type' => array( 'string', 'float' ),
+ ),
+ 'lng' => array(
+ 'type' => array( 'string', 'float' ),
+ ),
+ 'zoom' => array(
+ 'type' => array( 'string', 'int' ),
+ ),
+ 'place_id' => array(
+ 'type' => 'string',
+ ),
+ 'name' => array(
+ 'type' => 'string',
+ ),
+ 'street_number' => array(
+ 'type' => array( 'string', 'int' ),
+ ),
+ 'street_name' => array(
+ 'type' => 'string',
+ ),
+ 'street_name_short' => array(
+ 'type' => 'string',
+ ),
+ 'city' => array(
+ 'type' => 'string',
+ ),
+ 'state' => array(
+ 'type' => 'string',
+ ),
+ 'state_short' => array(
+ 'type' => 'string',
+ ),
+ 'post_code' => array(
+ 'type' => array( 'string', 'int' ),
+ ),
+ 'country' => array(
+ 'type' => 'string',
+ ),
+ 'country_short' => array(
+ 'type' => 'string',
+ ),
+ ),
+ );
+ }
+
+ /**
+ * Apply basic formatting to prepare the value for default REST output.
+ *
+ * @param mixed $value
+ * @param string|int $post_id
+ * @param array $field
+ * @return mixed
+ */
+ public function format_value_for_rest( $value, $post_id, array $field ) {
+ if ( ! $value ) {
+ return null;
+ }
+
+ return acf_format_numerics( $value );
+ }
+ }
+
+
+ // initialize
+ acf_register_field_type( 'acf_field_google_map' );
endif; // class_exists check
-?>
\ No newline at end of file
+?>
diff --git a/includes/fields/class-acf-field-group.php b/includes/fields/class-acf-field-group.php
index 13c7f04..d7d6290 100644
--- a/includes/fields/class-acf-field-group.php
+++ b/includes/fields/class-acf-field-group.php
@@ -1,682 +1,724 @@
name = 'group';
- $this->label = __("Group",'acf');
- $this->category = 'layout';
- $this->defaults = array(
- 'sub_fields' => array(),
- 'layout' => 'block'
- );
- $this->have_rows = 'single';
-
-
- // field filters
- $this->add_field_filter('acf/prepare_field_for_export', array($this, 'prepare_field_for_export'));
- $this->add_field_filter('acf/prepare_field_for_import', array($this, 'prepare_field_for_import'));
-
- }
-
-
- /*
- * load_field()
- *
- * This filter is appied to the $field after it is loaded from the database
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $field - the field array holding all the field options
- *
- * @return $field - the field array holding all the field options
- */
-
- function load_field( $field ) {
-
- // vars
- $sub_fields = acf_get_fields( $field );
-
-
- // append
- if( $sub_fields ) {
-
- $field['sub_fields'] = $sub_fields;
-
- }
-
-
- // return
- return $field;
-
- }
-
-
- /*
- * load_value()
- *
- * This filter is applied to the $value after it is loaded from the db
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value (mixed) the value found in the database
- * @param $post_id (mixed) the $post_id from which the value was loaded
- * @param $field (array) the field array holding all the field options
- * @return $value
- */
-
- function load_value( $value, $post_id, $field ) {
-
- // bail early if no sub fields
- if( empty($field['sub_fields']) ) return $value;
-
-
- // modify names
- $field = $this->prepare_field_for_db( $field );
-
-
- // load sub fields
- $value = array();
-
-
- // loop
- foreach( $field['sub_fields'] as $sub_field ) {
-
- // load
- $value[ $sub_field['key'] ] = acf_get_value( $post_id, $sub_field );
-
- }
-
-
- // return
- return $value;
-
- }
-
-
- /*
- * format_value()
- *
- * This filter is appied to the $value after it is loaded from the db and before it is returned to the template
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value (mixed) the value which was loaded from the database
- * @param $post_id (mixed) the $post_id from which the value was loaded
- * @param $field (array) the field array holding all the field options
- *
- * @return $value (mixed) the modified value
- */
-
- function format_value( $value, $post_id, $field ) {
-
- // bail early if no value
- if( empty($value) ) return false;
-
-
- // modify names
- $field = $this->prepare_field_for_db( $field );
-
-
- // loop
- foreach( $field['sub_fields'] as $sub_field ) {
-
- // extract value
- $sub_value = acf_extract_var( $value, $sub_field['key'] );
-
-
- // format value
- $sub_value = acf_format_value( $sub_value, $post_id, $sub_field );
-
-
- // append to $row
- $value[ $sub_field['_name'] ] = $sub_value;
-
- }
-
-
- // return
- return $value;
-
- }
-
-
- /*
- * update_value()
- *
- * This filter is appied to the $value before it is updated in the db
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value - the value which will be saved in the database
- * @param $field - the field array holding all the field options
- * @param $post_id - the $post_id of which the value will be saved
- *
- * @return $value - the modified value
- */
-
- function update_value( $value, $post_id, $field ) {
-
- // bail early if no value
- if( !acf_is_array($value) ) return null;
-
-
- // bail ealry if no sub fields
- if( empty($field['sub_fields']) ) return null;
-
-
- // modify names
- $field = $this->prepare_field_for_db( $field );
-
-
- // loop
- foreach( $field['sub_fields'] as $sub_field ) {
-
// vars
- $v = false;
-
-
- // key (backend)
- if( isset($value[ $sub_field['key'] ]) ) {
-
- $v = $value[ $sub_field['key'] ];
-
- // name (frontend)
- } elseif( isset($value[ $sub_field['_name'] ]) ) {
-
- $v = $value[ $sub_field['_name'] ];
-
- // empty
- } else {
-
- // input is not set (hidden by conditioanl logic)
- continue;
-
- }
-
-
- // update value
- acf_update_value( $v, $post_id, $sub_field );
-
- }
-
-
- // return
- return '';
-
- }
-
-
- /*
- * prepare_field_for_db
- *
- * This function will modify sub fields ready for update / load
- *
- * @type function
- * @date 4/11/16
- * @since 5.5.0
- *
- * @param $field (array)
- * @return $field
- */
-
- function prepare_field_for_db( $field ) {
-
- // bail early if no sub fields
- if( empty($field['sub_fields']) ) return $field;
-
-
- // loop
- foreach( $field['sub_fields'] as &$sub_field ) {
-
- // prefix name
- $sub_field['name'] = $field['name'] . '_' . $sub_field['_name'];
-
- }
-
-
- // return
- return $field;
+ $this->name = 'group';
+ $this->label = __( 'Group', 'acf' );
+ $this->category = 'layout';
+ $this->description = __( 'Provides a way to structure fields into groups to better organize the data and the edit screen.', 'acf' );
+ $this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-group.png';
+ $this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/group/', 'docs', 'field-type-selection' );
+ $this->defaults = array(
+ 'sub_fields' => array(),
+ 'layout' => 'block',
+ );
+ $this->have_rows = 'single';
+
+ // field filters
+ $this->add_field_filter( 'acf/prepare_field_for_export', array( $this, 'prepare_field_for_export' ) );
+ $this->add_field_filter( 'acf/prepare_field_for_import', array( $this, 'prepare_field_for_import' ) );
+
+ }
+
+
+ /*
+ * load_field()
+ *
+ * This filter is appied to the $field after it is loaded from the database
+ *
+ * @type filter
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $field - the field array holding all the field options
+ *
+ * @return $field - the field array holding all the field options
+ */
+
+ function load_field( $field ) {
+
+ // vars
+ $sub_fields = acf_get_fields( $field );
+
+ // append
+ if ( $sub_fields ) {
+
+ $field['sub_fields'] = $sub_fields;
- }
-
-
- /*
- * render_field()
- *
- * Create the HTML interface for your field
- *
- * @param $field - an array holding all the field's data
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- */
-
- function render_field( $field ) {
-
- // bail early if no sub fields
- if( empty($field['sub_fields']) ) return;
-
-
- // load values
- foreach( $field['sub_fields'] as &$sub_field ) {
-
- // add value
- if( isset($field['value'][ $sub_field['key'] ]) ) {
-
- // this is a normal value
- $sub_field['value'] = $field['value'][ $sub_field['key'] ];
-
- } elseif( isset($sub_field['default_value']) ) {
-
- // no value, but this sub field has a default value
- $sub_field['value'] = $sub_field['default_value'];
-
}
-
-
- // update prefix to allow for nested values
- $sub_field['prefix'] = $field['name'];
-
-
- // restore required
- if( $field['required'] ) $sub_field['required'] = 0;
-
+
+ // return
+ return $field;
+
}
-
-
- // render
- if( $field['layout'] == 'table' ) {
-
- $this->render_field_table( $field );
-
- } else {
-
- $this->render_field_block( $field );
-
+
+
+ /*
+ * load_value()
+ *
+ * This filter is applied to the $value after it is loaded from the db
+ *
+ * @type filter
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $value (mixed) the value found in the database
+ * @param $post_id (mixed) the $post_id from which the value was loaded
+ * @param $field (array) the field array holding all the field options
+ * @return $value
+ */
+
+ function load_value( $value, $post_id, $field ) {
+
+ // bail early if no sub fields
+ if ( empty( $field['sub_fields'] ) ) {
+ return $value;
+ }
+
+ // modify names
+ $field = $this->prepare_field_for_db( $field );
+
+ // load sub fields
+ $value = array();
+
+ // loop
+ foreach ( $field['sub_fields'] as $sub_field ) {
+
+ // load
+ $value[ $sub_field['key'] ] = acf_get_value( $post_id, $sub_field );
+
+ }
+
+ // return
+ return $value;
+
}
-
- }
-
-
- /*
- * render_field_block
- *
- * description
- *
- * @type function
- * @date 12/07/2016
- * @since 5.4.0
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
- function render_field_block( $field ) {
-
- // vars
- $label_placement = ($field['layout'] == 'block') ? 'top' : 'left';
-
-
- // html
- echo '
';
-
- foreach( $field['sub_fields'] as $sub_field ) {
-
- acf_render_field_wrap( $sub_field );
-
+
+
+ /*
+ * format_value()
+ *
+ * This filter is appied to the $value after it is loaded from the db and before it is returned to the template
+ *
+ * @type filter
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $value (mixed) the value which was loaded from the database
+ * @param $post_id (mixed) the $post_id from which the value was loaded
+ * @param $field (array) the field array holding all the field options
+ *
+ * @return $value (mixed) the modified value
+ */
+
+ function format_value( $value, $post_id, $field ) {
+
+ // bail early if no value
+ if ( empty( $value ) ) {
+ return false;
+ }
+
+ // modify names
+ $field = $this->prepare_field_for_db( $field );
+
+ // loop
+ foreach ( $field['sub_fields'] as $sub_field ) {
+
+ // extract value
+ $sub_value = acf_extract_var( $value, $sub_field['key'] );
+
+ // format value
+ $sub_value = acf_format_value( $sub_value, $post_id, $sub_field );
+
+ // append to $row
+ $value[ $sub_field['_name'] ] = $sub_value;
+
+ }
+
+ // return
+ return $value;
+
}
-
- echo '
';
-
- }
-
-
- /*
- * render_field_table
- *
- * description
- *
- * @type function
- * @date 12/07/2016
- * @since 5.4.0
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
- function render_field_table( $field ) {
-
-?>
+
+
+ /*
+ * update_value()
+ *
+ * This filter is appied to the $value before it is updated in the db
+ *
+ * @type filter
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $value - the value which will be saved in the database
+ * @param $field - the field array holding all the field options
+ * @param $post_id - the $post_id of which the value will be saved
+ *
+ * @return $value - the modified value
+ */
+
+ function update_value( $value, $post_id, $field ) {
+
+ // bail early if no value
+ if ( ! acf_is_array( $value ) ) {
+ return null;
+ }
+
+ // bail early if no sub fields
+ if ( empty( $field['sub_fields'] ) ) {
+ return null;
+ }
+
+ // modify names
+ $field = $this->prepare_field_for_db( $field );
+
+ // loop
+ foreach ( $field['sub_fields'] as $sub_field ) {
+
+ // vars
+ $v = false;
+
+ // key (backend)
+ if ( isset( $value[ $sub_field['key'] ] ) ) {
+
+ $v = $value[ $sub_field['key'] ];
+
+ // name (frontend)
+ } elseif ( isset( $value[ $sub_field['_name'] ] ) ) {
+
+ $v = $value[ $sub_field['_name'] ];
+
+ // empty
+ } else {
+
+ // input is not set (hidden by conditioanl logic)
+ continue;
+
+ }
+
+ // update value
+ acf_update_value( $v, $post_id, $sub_field );
+
+ }
+
+ // return
+ return '';
+
+ }
+
+
+ /*
+ * prepare_field_for_db
+ *
+ * This function will modify sub fields ready for update / load
+ *
+ * @type function
+ * @date 4/11/16
+ * @since 5.5.0
+ *
+ * @param $field (array)
+ * @return $field
+ */
+
+ function prepare_field_for_db( $field ) {
+
+ // bail early if no sub fields
+ if ( empty( $field['sub_fields'] ) ) {
+ return $field;
+ }
+
+ // loop
+ foreach ( $field['sub_fields'] as &$sub_field ) {
+
+ // prefix name
+ $sub_field['name'] = $field['name'] . '_' . $sub_field['_name'];
+
+ }
+
+ // return
+ return $field;
+
+ }
+
+
+ /*
+ * render_field()
+ *
+ * Create the HTML interface for your field
+ *
+ * @param $field - an array holding all the field's data
+ *
+ * @type action
+ * @since 3.6
+ * @date 23/01/13
+ */
+
+ function render_field( $field ) {
+
+ // bail early if no sub fields
+ if ( empty( $field['sub_fields'] ) ) {
+ return;
+ }
+
+ // load values
+ foreach ( $field['sub_fields'] as &$sub_field ) {
+
+ // add value
+ if ( isset( $field['value'][ $sub_field['key'] ] ) ) {
+
+ // this is a normal value
+ $sub_field['value'] = $field['value'][ $sub_field['key'] ];
+
+ } elseif ( isset( $sub_field['default_value'] ) ) {
+
+ // no value, but this sub field has a default value
+ $sub_field['value'] = $sub_field['default_value'];
+
+ }
+
+ // update prefix to allow for nested values
+ $sub_field['prefix'] = $field['name'];
+
+ // restore required
+ if ( $field['required'] ) {
+ $sub_field['required'] = 0;
+ }
+ }
+
+ // render
+ if ( $field['layout'] == 'table' ) {
+
+ $this->render_field_table( $field );
+
+ } else {
+
+ $this->render_field_block( $field );
+
+ }
+
+ }
+
+
+ /*
+ * render_field_block
+ *
+ * description
+ *
+ * @type function
+ * @date 12/07/2016
+ * @since 5.4.0
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+
+ function render_field_block( $field ) {
+
+ // vars
+ $label_placement = ( $field['layout'] == 'block' ) ? 'top' : 'left';
+
+ // html
+ echo '
';
+
+ foreach ( $field['sub_fields'] as $sub_field ) {
+
+ acf_render_field_wrap( $sub_field );
+
+ }
+
+ echo '
';
+
+ }
+
+
+ /*
+ * render_field_table
+ *
+ * description
+ *
+ * @type function
+ * @date 12/07/2016
+ * @since 5.4.0
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+
+ function render_field_table( $field ) {
+
+ ?>
- $field['sub_fields'],
- 'parent' => $field['ID']
- );
-
-
- ?>
-
-
-
-
-
-
-
- __('Layout','acf'),
- 'instructions' => __('Specify the style used to render the selected fields', 'acf'),
- 'type' => 'radio',
- 'name' => 'layout',
- 'layout' => 'horizontal',
- 'choices' => array(
- 'block' => __('Block','acf'),
- 'table' => __('Table','acf'),
- 'row' => __('Row','acf')
- )
- ));
-
- }
-
-
- /*
- * validate_value
- *
- * description
- *
- * @type function
- * @date 11/02/2014
- * @since 5.0.0
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
- function validate_value( $valid, $value, $field, $input ){
-
- // bail early if no $value
- if( empty($value) ) return $valid;
-
-
- // bail early if no sub fields
- if( empty($field['sub_fields']) ) return $valid;
-
-
- // loop
- foreach( $field['sub_fields'] as $sub_field ) {
-
- // get sub field
- $k = $sub_field['key'];
-
-
- // bail early if value not set (conditional logic?)
- if( !isset($value[ $k ]) ) continue;
-
-
- // required
- if( $field['required'] ) {
- $sub_field['required'] = 1;
- }
-
-
- // validate
- acf_validate_value( $value[ $k ], $sub_field, "{$input}[{$k}]" );
-
- }
-
-
- // return
- return $valid;
-
- }
-
-
- /*
- * duplicate_field()
- *
- * This filter is appied to the $field before it is duplicated and saved to the database
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $field - the field array holding all the field options
- *
- * @return $field - the modified field
- */
+ $field['sub_fields'],
+ 'parent' => $field['ID'],
+ 'is_subfield' => true,
+ );
+
+ ?>
+
+ __( 'Layout', 'acf' ),
+ 'instructions' => __( 'Specify the style used to render the selected fields', 'acf' ),
+ 'type' => 'radio',
+ 'name' => 'layout',
+ 'layout' => 'horizontal',
+ 'choices' => array(
+ 'block' => __( 'Block', 'acf' ),
+ 'table' => __( 'Table', 'acf' ),
+ 'row' => __( 'Row', 'acf' ),
+ ),
+ )
+ );
+
+ }
+
+
+ /*
+ * validate_value
+ *
+ * description
+ *
+ * @type function
+ * @date 11/02/2014
+ * @since 5.0.0
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+
+ function validate_value( $valid, $value, $field, $input ) {
+
+ // bail early if no $value
+ if ( empty( $value ) ) {
+ return $valid;
+ }
+
+ // bail early if no sub fields
+ if ( empty( $field['sub_fields'] ) ) {
+ return $valid;
+ }
+
+ // loop
+ foreach ( $field['sub_fields'] as $sub_field ) {
+
+ // get sub field
+ $k = $sub_field['key'];
+
+ // bail early if value not set (conditional logic?)
+ if ( ! isset( $value[ $k ] ) ) {
+ continue;
+ }
+
+ // required
+ if ( $field['required'] ) {
+ $sub_field['required'] = 1;
+ }
+
+ // validate
+ acf_validate_value( $value[ $k ], $sub_field, "{$input}[{$k}]" );
+
+ }
+
+ // return
+ return $valid;
+
+ }
+
+
+ /*
+ * duplicate_field()
+ *
+ * This filter is appied to the $field before it is duplicated and saved to the database
+ *
+ * @type filter
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $field - the field array holding all the field options
+ *
+ * @return $field - the modified field
+ */
+
+ function duplicate_field( $field ) {
+
+ // get sub fields
$sub_fields = acf_extract_var( $field, 'sub_fields' );
-
- // Modify sub fields.
- foreach( $sub_fields as $i => $sub_field ) {
- $sub_fields[ $i ]['parent'] = $field['key'];
- $sub_fields[ $i ]['menu_order'] = $i;
+
+ // save field to get ID
+ $field = acf_update_field( $field );
+
+ // duplicate sub fields
+ acf_duplicate_fields( $sub_fields, $field['ID'] );
+
+ // return
+ return $field;
+
+ }
+
+ /**
+ * prepare_field_for_export
+ *
+ * Prepares the field for export.
+ *
+ * @date 11/03/2014
+ * @since 5.0.0
+ *
+ * @param array $field The field settings.
+ * @return array
+ */
+ function prepare_field_for_export( $field ) {
+
+ // Check for sub fields.
+ if ( ! empty( $field['sub_fields'] ) ) {
+ $field['sub_fields'] = acf_prepare_fields_for_export( $field['sub_fields'] );
}
-
- // Return array of [field, sub_1, sub_2, ...].
- return array_merge( array($field), $sub_fields );
-
+ return $field;
}
- return $field;
- }
-
-
- /*
- * delete_value
- *
- * Called when deleting this field's value.
- *
- * @date 1/07/2015
- * @since 5.2.3
- *
- * @param mixed $post_id The post ID being saved
- * @param string $meta_key The field name as seen by the DB
- * @param array $field The field settings
- * @return void
- */
-
- function delete_value( $post_id, $meta_key, $field ) {
-
- // bail ealry if no sub fields
- if( empty($field['sub_fields']) ) return null;
-
- // modify names
- $field = $this->prepare_field_for_db( $field );
-
- // loop
- foreach( $field['sub_fields'] as $sub_field ) {
- acf_delete_value( $post_id, $sub_field );
- }
- }
-
- /**
- * delete_field
- *
- * Called when deleting a field of this type.
- *
- * @date 8/11/18
- * @since 5.8.0
- *
- * @param arra $field The field settings.
- * @return void
- */
- function delete_field( $field ) {
-
- // loop over sub fields and delete them
- if( $field['sub_fields'] ) {
- foreach( $field['sub_fields'] as $sub_field ) {
- acf_delete_field( $sub_field['ID'] );
+
+ /**
+ * prepare_field_for_import
+ *
+ * Returns a flat array of fields containing all sub fields ready for import.
+ *
+ * @date 11/03/2014
+ * @since 5.0.0
+ *
+ * @param array $field The field settings.
+ * @return array
+ */
+ function prepare_field_for_import( $field ) {
+
+ // Check for sub fields.
+ if ( ! empty( $field['sub_fields'] ) ) {
+ $sub_fields = acf_extract_var( $field, 'sub_fields' );
+
+ // Modify sub fields.
+ foreach ( $sub_fields as $i => $sub_field ) {
+ $sub_fields[ $i ]['parent'] = $field['key'];
+ $sub_fields[ $i ]['menu_order'] = $i;
+ }
+
+ // Return array of [field, sub_1, sub_2, ...].
+ return array_merge( array( $field ), $sub_fields );
+
}
+ return $field;
}
- }
-
-}
-// initialize
-acf_register_field_type( 'acf_field__group' );
+ /*
+ * delete_value
+ *
+ * Called when deleting this field's value.
+ *
+ * @date 1/07/2015
+ * @since 5.2.3
+ *
+ * @param mixed $post_id The post ID being saved
+ * @param string $meta_key The field name as seen by the DB
+ * @param array $field The field settings
+ * @return void
+ */
+
+ function delete_value( $post_id, $meta_key, $field ) {
+
+ // bail early if no sub fields
+ if ( empty( $field['sub_fields'] ) ) {
+ return null;
+ }
+
+ // modify names
+ $field = $this->prepare_field_for_db( $field );
+
+ // loop
+ foreach ( $field['sub_fields'] as $sub_field ) {
+ acf_delete_value( $post_id, $sub_field );
+ }
+ }
+
+ /**
+ * delete_field
+ *
+ * Called when deleting a field of this type.
+ *
+ * @date 8/11/18
+ * @since 5.8.0
+ *
+ * @param arra $field The field settings.
+ * @return void
+ */
+ function delete_field( $field ) {
+
+ // loop over sub fields and delete them
+ if ( $field['sub_fields'] ) {
+ foreach ( $field['sub_fields'] as $sub_field ) {
+ acf_delete_field( $sub_field['ID'] );
+ }
+ }
+ }
+
+ /**
+ * Return the schema array for the REST API.
+ *
+ * @param array $field
+ * @return array
+ */
+ public function get_rest_schema( array $field ) {
+ $schema = array(
+ 'type' => array( 'object', 'null' ),
+ 'properties' => array(),
+ 'required' => ! empty( $field['required'] ),
+ );
+
+ foreach ( $field['sub_fields'] as $sub_field ) {
+ if ( $sub_field_schema = acf_get_field_rest_schema( $sub_field ) ) {
+ $schema['properties'][ $sub_field['name'] ] = $sub_field_schema;
+ }
+ }
+
+ return $schema;
+ }
+
+ /**
+ * Apply basic formatting to prepare the value for default REST output.
+ *
+ * @param mixed $value
+ * @param int|string $post_id
+ * @param array $field
+ * @return array|mixed
+ */
+ public function format_value_for_rest( $value, $post_id, array $field ) {
+ if ( empty( $value ) || ! is_array( $value ) || empty( $field['sub_fields'] ) ) {
+ return $value;
+ }
+
+ // Loop through each row and within that, each sub field to process sub fields individually.
+ foreach ( $field['sub_fields'] as $sub_field ) {
+
+ // Extract the sub field 'field_key'=>'value' pair from the $value and format it.
+ $sub_value = acf_extract_var( $value, $sub_field['key'] );
+ $sub_value = acf_format_value_for_rest( $sub_value, $post_id, $sub_field );
+
+ // Add the sub field value back to the $value but mapped to the field name instead
+ // of the key reference.
+ $value[ $sub_field['name'] ] = $sub_value;
+ }
+
+ return $value;
+ }
+
+ }
+
+
+ // initialize
+ acf_register_field_type( 'acf_field__group' );
endif; // class_exists check
-?>
\ No newline at end of file
+?>
diff --git a/includes/fields/class-acf-field-image.php b/includes/fields/class-acf-field-image.php
index 5bc93c0..93e6f5d 100644
--- a/includes/fields/class-acf-field-image.php
+++ b/includes/fields/class-acf-field-image.php
@@ -1,419 +1,496 @@
name = 'image';
+ $this->label = __( 'Image', 'acf' );
+ $this->category = 'content';
+ $this->description = __( 'Uses the native WordPress media picker to upload, or choose images.', 'acf' );
+ $this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-image.png';
+ $this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/image/', 'docs', 'field-type-selection' );
+ $this->defaults = array(
+ 'return_format' => 'array',
+ 'preview_size' => 'medium',
+ 'library' => 'all',
+ 'min_width' => 0,
+ 'min_height' => 0,
+ 'min_size' => 0,
+ 'max_width' => 0,
+ 'max_height' => 0,
+ 'max_size' => 0,
+ 'mime_types' => '',
+ );
+
+ // filters
+ add_filter( 'get_media_item_args', array( $this, 'get_media_item_args' ) );
-class acf_field_image extends acf_field {
-
-
- /*
- * __construct
- *
- * This function will setup the field type data
- *
- * @type function
- * @date 5/03/2014
- * @since 5.0.0
- *
- * @param n/a
- * @return n/a
- */
-
- function initialize() {
-
- // vars
- $this->name = 'image';
- $this->label = __("Image",'acf');
- $this->category = 'content';
- $this->defaults = array(
- 'return_format' => 'array',
- 'preview_size' => 'medium',
- 'library' => 'all',
- 'min_width' => 0,
- 'min_height' => 0,
- 'min_size' => 0,
- 'max_width' => 0,
- 'max_height' => 0,
- 'max_size' => 0,
- 'mime_types' => ''
- );
-
- // filters
- add_filter('get_media_item_args', array($this, 'get_media_item_args'));
-
- }
-
-
- /*
- * input_admin_enqueue_scripts
- *
- * description
- *
- * @type function
- * @date 16/12/2015
- * @since 5.3.2
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
- function input_admin_enqueue_scripts() {
-
- // localize
- acf_localize_text(array(
- 'Select Image' => __('Select Image', 'acf'),
- 'Edit Image' => __('Edit Image', 'acf'),
- 'Update Image' => __('Update Image', 'acf'),
- 'All images' => __('All images', 'acf'),
- ));
- }
-
- /**
- * Renders the field HTML.
- *
- * @date 23/01/13
- * @since 3.6.0
- *
- * @param array $field The field settings.
- * @return void
- */
- function render_field( $field ) {
- $uploader = acf_get_setting('uploader');
-
- // Enqueue uploader scripts
- if( $uploader === 'wp' ) {
- acf_enqueue_uploader();
}
- // Elements and attributes.
- $value = '';
- $div_attrs = array(
- 'class' => 'acf-image-uploader',
- 'data-preview_size' => $field['preview_size'],
- 'data-library' => $field['library'],
- 'data-mime_types' => $field['mime_types'],
- 'data-uploader' => $uploader
- );
- $img_attrs = array(
- 'src' => '',
- 'alt' => '',
- 'data-name' => 'image'
- );
-
- // Detect value.
- if( $field['value'] && is_numeric($field['value']) ) {
- $image = wp_get_attachment_image_src( $field['value'], $field['preview_size'] );
- if( $image ) {
- $value = $field['value'];
- $img_attrs['src'] = $image[0];
- $img_attrs['alt'] = get_post_meta( $field['value'], '_wp_attachment_image_alt', true );
- $div_attrs['class'] .= ' has-value';
- }
- }
-
- // Add "preview size" max width and height style.
- // Apply max-width to wrap, and max-height to img for max compatibility with field widths.
- $size = acf_get_image_size( $field['preview_size'] );
- $size_w = $size['width'] ? $size['width'] . 'px' : '100%';
- $size_h = $size['height'] ? $size['height'] . 'px' : '100%';
- $img_attrs['style'] = sprintf( 'max-height: %s;', $size_h );
- // Render HTML.
- ?>
+ /*
+ * input_admin_enqueue_scripts
+ *
+ * description
+ *
+ * @type function
+ * @date 16/12/2015
+ * @since 5.3.2
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+
+ function input_admin_enqueue_scripts() {
+
+ // localize
+ acf_localize_text(
+ array(
+ 'Select Image' => __( 'Select Image', 'acf' ),
+ 'Edit Image' => __( 'Edit Image', 'acf' ),
+ 'Update Image' => __( 'Update Image', 'acf' ),
+ 'All images' => __( 'All images', 'acf' ),
+ )
+ );
+ }
+
+ /**
+ * Renders the field HTML.
+ *
+ * @date 23/01/13
+ * @since 3.6.0
+ *
+ * @param array $field The field settings.
+ * @return void
+ */
+ function render_field( $field ) {
+ $uploader = acf_get_setting( 'uploader' );
+
+ // Enqueue uploader scripts
+ if ( $uploader === 'wp' ) {
+ acf_enqueue_uploader();
+ }
+
+ // Elements and attributes.
+ $value = '';
+ $div_attrs = array(
+ 'class' => 'acf-image-uploader',
+ 'data-preview_size' => $field['preview_size'],
+ 'data-library' => $field['library'],
+ 'data-mime_types' => $field['mime_types'],
+ 'data-uploader' => $uploader,
+ );
+ $img_attrs = array(
+ 'src' => '',
+ 'alt' => '',
+ 'data-name' => 'image',
+ );
+
+ // Detect value.
+ if ( $field['value'] && is_numeric( $field['value'] ) ) {
+ $image = wp_get_attachment_image_src( $field['value'], $field['preview_size'] );
+ if ( $image ) {
+ $value = $field['value'];
+ $img_attrs['src'] = $image[0];
+ $img_attrs['alt'] = get_post_meta( $field['value'], '_wp_attachment_image_alt', true );
+ $div_attrs['class'] .= ' has-value';
+ }
+ }
+
+ // Add "preview size" max width and height style.
+ // Apply max-width to wrap, and max-height to img for max compatibility with field widths.
+ $size = acf_get_image_size( $field['preview_size'] );
+ $size_w = $size['width'] ? $size['width'] . 'px' : '100%';
+ $size_h = $size['height'] ? $size['height'] . 'px' : '100%';
+ $img_attrs['style'] = sprintf( 'max-height: %s;', $size_h );
+
+ // Render HTML.
+ ?>
>
- $field['name'],
- 'value' => $value
- )); ?>
+ $field['name'],
+ 'value' => $value,
+ )
+ );
+ ?>
/>
-
-
+
+
- $field['name'],
- 'id' => $field['id']
- )); ?>
+ $field['name'],
+ 'id' => $field['id'],
+ 'key' => $field['key'],
+ )
+ );
+ ?>
-
+
- __( 'Return Format', 'acf' ),
+ 'instructions' => '',
+ 'type' => 'radio',
+ 'name' => 'return_format',
+ 'layout' => 'horizontal',
+ 'choices' => array(
+ 'array' => __( 'Image Array', 'acf' ),
+ 'url' => __( 'Image URL', 'acf' ),
+ 'id' => __( 'Image ID', 'acf' ),
+ ),
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Library', 'acf' ),
+ 'instructions' => __( 'Limit the media library choice', 'acf' ),
+ 'type' => 'radio',
+ 'name' => 'library',
+ 'layout' => 'horizontal',
+ 'choices' => array(
+ 'all' => __( 'All', 'acf' ),
+ 'uploadedTo' => __( 'Uploaded to post', 'acf' ),
+ ),
+ )
+ );
+ }
+
+ /**
+ * Renders the field settings used in the "Validation" tab.
+ *
+ * @since 6.0
+ *
+ * @param array $field The field settings array.
+ * @return void
+ */
+ function render_field_validation_settings( $field ) {
+ // Clear numeric settings.
+ $clear = array(
+ 'min_width',
+ 'min_height',
+ 'min_size',
+ 'max_width',
+ 'max_height',
+ 'max_size',
+ );
+
+ foreach ( $clear as $k ) {
+ if ( empty( $field[ $k ] ) ) {
+ $field[ $k ] = '';
+ }
}
-
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Minimum', 'acf' ),
+ 'hint' => __( 'Restrict which images can be uploaded', 'acf' ),
+ 'type' => 'text',
+ 'name' => 'min_width',
+ 'prepend' => __( 'Width', 'acf' ),
+ 'append' => 'px',
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => '',
+ 'type' => 'text',
+ 'name' => 'min_height',
+ 'prepend' => __( 'Height', 'acf' ),
+ 'append' => 'px',
+ '_append' => 'min_width',
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => '',
+ 'type' => 'text',
+ 'name' => 'min_size',
+ 'prepend' => __( 'File size', 'acf' ),
+ 'append' => 'MB',
+ '_append' => 'min_width',
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Maximum', 'acf' ),
+ 'hint' => __( 'Restrict which images can be uploaded', 'acf' ),
+ 'type' => 'text',
+ 'name' => 'max_width',
+ 'prepend' => __( 'Width', 'acf' ),
+ 'append' => 'px',
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => '',
+ 'type' => 'text',
+ 'name' => 'max_height',
+ 'prepend' => __( 'Height', 'acf' ),
+ 'append' => 'px',
+ '_append' => 'max_width',
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => '',
+ 'type' => 'text',
+ 'name' => 'max_size',
+ 'prepend' => __( 'File size', 'acf' ),
+ 'append' => 'MB',
+ '_append' => 'max_width',
+ )
+ );
+
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Allowed File Types', 'acf' ),
+ 'instructions' => __( 'Comma separated list. Leave blank for all types', 'acf' ),
+ 'type' => 'text',
+ 'name' => 'mime_types',
+ )
+ );
}
-
-
- // return_format
- acf_render_field_setting( $field, array(
- 'label' => __('Return Format','acf'),
- 'instructions' => '',
- 'type' => 'radio',
- 'name' => 'return_format',
- 'layout' => 'horizontal',
- 'choices' => array(
- 'array' => __("Image Array",'acf'),
- 'url' => __("Image URL",'acf'),
- 'id' => __("Image ID",'acf')
- )
- ));
-
-
- // preview_size
- acf_render_field_setting( $field, array(
- 'label' => __('Preview Size','acf'),
- 'instructions' => '',
- 'type' => 'select',
- 'name' => 'preview_size',
- 'choices' => acf_get_image_sizes()
- ));
-
-
- // library
- acf_render_field_setting( $field, array(
- 'label' => __('Library','acf'),
- 'instructions' => __('Limit the media library choice','acf'),
- 'type' => 'radio',
- 'name' => 'library',
- 'layout' => 'horizontal',
- 'choices' => array(
- 'all' => __('All', 'acf'),
- 'uploadedTo' => __('Uploaded to post', 'acf')
- )
- ));
-
-
- // min
- acf_render_field_setting( $field, array(
- 'label' => __('Minimum','acf'),
- 'instructions' => __('Restrict which images can be uploaded','acf'),
- 'type' => 'text',
- 'name' => 'min_width',
- 'prepend' => __('Width', 'acf'),
- 'append' => 'px',
- ));
-
- acf_render_field_setting( $field, array(
- 'label' => '',
- 'type' => 'text',
- 'name' => 'min_height',
- 'prepend' => __('Height', 'acf'),
- 'append' => 'px',
- '_append' => 'min_width'
- ));
-
- acf_render_field_setting( $field, array(
- 'label' => '',
- 'type' => 'text',
- 'name' => 'min_size',
- 'prepend' => __('File size', 'acf'),
- 'append' => 'MB',
- '_append' => 'min_width'
- ));
-
-
- // max
- acf_render_field_setting( $field, array(
- 'label' => __('Maximum','acf'),
- 'instructions' => __('Restrict which images can be uploaded','acf'),
- 'type' => 'text',
- 'name' => 'max_width',
- 'prepend' => __('Width', 'acf'),
- 'append' => 'px',
- ));
-
- acf_render_field_setting( $field, array(
- 'label' => '',
- 'type' => 'text',
- 'name' => 'max_height',
- 'prepend' => __('Height', 'acf'),
- 'append' => 'px',
- '_append' => 'max_width'
- ));
-
- acf_render_field_setting( $field, array(
- 'label' => '',
- 'type' => 'text',
- 'name' => 'max_size',
- 'prepend' => __('File size', 'acf'),
- 'append' => 'MB',
- '_append' => 'max_width'
- ));
-
-
- // allowed type
- acf_render_field_setting( $field, array(
- 'label' => __('Allowed file types','acf'),
- 'instructions' => __('Comma separated list. Leave blank for all types','acf'),
- 'type' => 'text',
- 'name' => 'mime_types',
- ));
-
- }
-
-
- /*
- * format_value()
- *
- * This filter is appied to the $value after it is loaded from the db and before it is returned to the template
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value (mixed) the value which was loaded from the database
- * @param $post_id (mixed) the $post_id from which the value was loaded
- * @param $field (array) the field array holding all the field options
- *
- * @return $value (mixed) the modified value
- */
-
- function format_value( $value, $post_id, $field ) {
-
- // bail early if no value
- if( empty($value) ) return false;
-
-
- // bail early if not numeric (error message)
- if( !is_numeric($value) ) return false;
-
-
- // convert to int
- $value = intval($value);
-
-
- // format
- if( $field['return_format'] == 'url' ) {
-
- return wp_get_attachment_url( $value );
-
- } elseif( $field['return_format'] == 'array' ) {
-
- return acf_get_attachment( $value );
-
+
+ /**
+ * Renders the field settings used in the "Presentation" tab.
+ *
+ * @since 6.0
+ *
+ * @param array $field The field settings array.
+ * @return void
+ */
+ function render_field_presentation_settings( $field ) {
+ acf_render_field_setting(
+ $field,
+ array(
+ 'label' => __( 'Preview Size', 'acf' ),
+ 'instructions' => '',
+ 'type' => 'select',
+ 'name' => 'preview_size',
+ 'choices' => acf_get_image_sizes(),
+ )
+ );
+ }
+
+ /*
+ * format_value()
+ *
+ * This filter is appied to the $value after it is loaded from the db and before it is returned to the template
+ *
+ * @type filter
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $value (mixed) the value which was loaded from the database
+ * @param $post_id (mixed) the $post_id from which the value was loaded
+ * @param $field (array) the field array holding all the field options
+ *
+ * @return $value (mixed) the modified value
+ */
+
+ function format_value( $value, $post_id, $field ) {
+
+ // bail early if no value
+ if ( empty( $value ) ) {
+ return false;
+ }
+
+ // bail early if not numeric (error message)
+ if ( ! is_numeric( $value ) ) {
+ return false;
+ }
+
+ // convert to int
+ $value = intval( $value );
+
+ // format
+ if ( $field['return_format'] == 'url' ) {
+
+ return wp_get_attachment_url( $value );
+
+ } elseif ( $field['return_format'] == 'array' ) {
+
+ return acf_get_attachment( $value );
+
+ }
+
+ // return
+ return $value;
+
}
-
-
- // return
- return $value;
-
- }
-
-
- /*
- * get_media_item_args
- *
- * description
- *
- * @type function
- * @date 27/01/13
- * @since 3.6.0
- *
- * @param $vars (array)
- * @return $vars
- */
-
- function get_media_item_args( $vars ) {
-
- $vars['send'] = true;
- return($vars);
-
- }
-
-
- /*
- * update_value()
- *
- * This filter is appied to the $value before it is updated in the db
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value - the value which will be saved in the database
- * @param $post_id - the $post_id of which the value will be saved
- * @param $field - the field array holding all the field options
- *
- * @return $value - the modified value
- */
-
- function update_value( $value, $post_id, $field ) {
-
- return acf_get_field_type('file')->update_value( $value, $post_id, $field );
-
- }
-
-
- /*
- * validate_value
- *
- * This function will validate a basic file input
- *
- * @type function
- * @date 11/02/2014
- * @since 5.0.0
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
- function validate_value( $valid, $value, $field, $input ){
-
- return acf_get_field_type('file')->validate_value( $valid, $value, $field, $input );
-
- }
-
-}
-// initialize
-acf_register_field_type( 'acf_field_image' );
+ /*
+ * get_media_item_args
+ *
+ * description
+ *
+ * @type function
+ * @date 27/01/13
+ * @since 3.6.0
+ *
+ * @param $vars (array)
+ * @return $vars
+ */
+
+ function get_media_item_args( $vars ) {
+
+ $vars['send'] = true;
+ return( $vars );
+
+ }
+
+
+ /*
+ * update_value()
+ *
+ * This filter is appied to the $value before it is updated in the db
+ *
+ * @type filter
+ * @since 3.6
+ * @date 23/01/13
+ *
+ * @param $value - the value which will be saved in the database
+ * @param $post_id - the $post_id of which the value will be saved
+ * @param $field - the field array holding all the field options
+ *
+ * @return $value - the modified value
+ */
+
+ function update_value( $value, $post_id, $field ) {
+
+ return acf_get_field_type( 'file' )->update_value( $value, $post_id, $field );
+
+ }
+
+
+ /**
+ * validate_value
+ *
+ * This function will validate a basic file input
+ *
+ * @type function
+ * @date 11/02/2014
+ * @since 5.0.0
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+ function validate_value( $valid, $value, $field, $input ) {
+ return acf_get_field_type( 'file' )->validate_value( $valid, $value, $field, $input );
+ }
+
+ /**
+ * Additional validation for the image field when submitted via REST.
+ *
+ * @param bool $valid
+ * @param int $value
+ * @param array $field
+ *
+ * @return bool|WP_Error
+ */
+ public function validate_rest_value( $valid, $value, $field ) {
+ return acf_get_field_type( 'file' )->validate_rest_value( $valid, $value, $field );
+ }
+
+ /**
+ * Return the schema array for the REST API.
+ *
+ * @param array $field
+ * @return array
+ */
+ public function get_rest_schema( array $field ) {
+ return acf_get_field_type( 'file' )->get_rest_schema( $field );
+ }
+
+ /**
+ * Apply basic formatting to prepare the value for default REST output.
+ *
+ * @param mixed $value
+ * @param string|int $post_id
+ * @param array $field
+ * @return mixed
+ */
+ public function format_value_for_rest( $value, $post_id, array $field ) {
+ return acf_format_numerics( $value );
+ }
+
+ }
+
+
+ // initialize
+ acf_register_field_type( 'acf_field_image' );
endif; // class_exists check
-?>
\ No newline at end of file
+?>
diff --git a/includes/fields/class-acf-field-link.php b/includes/fields/class-acf-field-link.php
index d5bfb55..314363b 100644
--- a/includes/fields/class-acf-field-link.php
+++ b/includes/fields/class-acf-field-link.php
@@ -1,287 +1,316 @@
name = 'link';
- $this->label = __("Link",'acf');
- $this->category = 'relational';
- $this->defaults = array(
- 'return_format' => 'array',
- );
-
- }
-
-
- /*
- * get_link
- *
- * description
- *
- * @type function
- * @date 16/5/17
- * @since 5.5.13
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
- function get_link( $value = '' ) {
-
- // vars
- $link = array(
- 'title' => '',
- 'url' => '',
- 'target' => ''
- );
-
-
- // array (ACF 5.6.0)
- if( is_array($value) ) {
-
- $link = array_merge($link, $value);
-
- // post id (ACF < 5.6.0)
- } elseif( is_numeric($value) ) {
-
- $link['title'] = get_the_title( $value );
- $link['url'] = get_permalink( $value );
-
- // string (ACF < 5.6.0)
- } elseif( is_string($value) ) {
-
- $link['url'] = $value;
-
- }
-
-
- // return
- return $link;
-
- }
-
+ class acf_field_link extends acf_field {
+
+
+ /*
+ * __construct
+ *
+ * This function will setup the field type data
+ *
+ * @type function
+ * @date 5/03/2014
+ * @since 5.0.0
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ function initialize() {
+
+ // vars
+ $this->name = 'link';
+ $this->label = __( 'Link', 'acf' );
+ $this->category = 'relational';
+ $this->description = __( 'Allows you to specify a link and its properties such as title and target using the WordPress native link picker.', 'acf' );
+ $this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-link.png';
+ $this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/link/', 'docs', 'field-type-selection' );
+ $this->defaults = array(
+ 'return_format' => 'array',
+ );
- /*
- * render_field()
- *
- * Create the HTML interface for your field
- *
- * @param $field - an array holding all the field's data
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- */
-
- function render_field( $field ){
-
- // vars
- $div = array(
- 'id' => $field['id'],
- 'class' => $field['class'] . ' acf-link',
- );
-
-
- // render scripts/styles
- acf_enqueue_uploader();
-
-
- // get link
- $link = $this->get_link( $field['value'] );
-
-
- // classes
- if( $link['url'] ) {
- $div['class'] .= ' -value';
}
-
- if( $link['target'] === '_blank' ) {
- $div['class'] .= ' -external';
+
+
+ /*
+ * get_link
+ *
+ * description
+ *
+ * @type function
+ * @date 16/5/17
+ * @since 5.5.13
+ *
+ * @param $post_id (int)
+ * @return $post_id (int)
+ */
+
+ function get_link( $value = '' ) {
+
+ // vars
+ $link = array(
+ 'title' => '',
+ 'url' => '',
+ 'target' => '',
+ );
+
+ // array (ACF 5.6.0)
+ if ( is_array( $value ) ) {
+
+ $link = array_merge( $link, $value );
+
+ // post id (ACF < 5.6.0)
+ } elseif ( is_numeric( $value ) ) {
+
+ $link['title'] = get_the_title( $value );
+ $link['url'] = get_permalink( $value );
+
+ // string (ACF < 5.6.0)
+ } elseif ( is_string( $value ) ) {
+
+ $link['url'] = $value;
+
+ }
+
+ // return
+ return $link;
+
}
-
- /*
';
-
-
- // loop
- foreach( $field_groups as $field_group ) {
-
- // load fields
- $fields = acf_get_fields( $field_group );
-
-
- // override instruction placement for modal
- if( !$is_page ) {
-
- $field_group['instruction_placement'] = 'field';
- }
-
-
- // render
- acf_render_fields( $fields, $post_id, $el, $field_group['instruction_placement'] );
-
- }
-
-
- // close
- echo '
';
+
+ // loop
+ foreach ( $field_groups as $field_group ) {
+
+ // load fields
+ $fields = acf_get_fields( $field_group );
+
+ // override instruction placement for modal
+ if ( ! $is_page ) {
+
+ $field_group['instruction_placement'] = 'field';
+ }
+
+ // render
+ acf_render_fields( $fields, $post_id, $el, $field_group['instruction_placement'] );
+
+ }
+
+ // close
+ echo '