Changeset 3256177
- Timestamp:
- 03/15/2025 08:03:42 AM (11 months ago)
- Location:
- content-control
- Files:
-
- 104 edited
- 1 copied
-
tags/2.6.1 (copied) (copied from content-control/trunk)
-
tags/2.6.1/classes/Controllers/Frontend/Restrictions/QueryTerms.php (modified) (1 diff)
-
tags/2.6.1/classes/Controllers/Frontend/Restrictions/RestAPI.php (modified) (1 diff)
-
tags/2.6.1/classes/Controllers/RestAPI.php (modified) (1 diff)
-
tags/2.6.1/classes/Controllers/TrustedLogin.php (modified) (2 diffs)
-
tags/2.6.1/classes/RuleEngine/Rules.php (modified) (2 diffs)
-
tags/2.6.1/content-control.php (modified) (2 diffs)
-
tags/2.6.1/dist/components.asset.php (modified) (1 diff)
-
tags/2.6.1/dist/components.js (modified) (1 diff)
-
tags/2.6.1/dist/fields.asset.php (modified) (1 diff)
-
tags/2.6.1/dist/fields.js (modified) (1 diff)
-
tags/2.6.1/inc/functions/query.php (modified) (8 diffs)
-
tags/2.6.1/inc/functions/rule-callbacks.php (modified) (3 diffs)
-
tags/2.6.1/readme.txt (modified) (2 diffs)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Container.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Exception/ExpectedInvokableException.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Exception/FrozenServiceException.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Exception/InvalidServiceIdentifierException.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Psr11/Container.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/ServiceIterator.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/ServiceProviderInterface.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Fixtures/Invokable.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Fixtures/NonInvokable.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Fixtures/Service.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/PimpleServiceProviderInterfaceTest.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/PimpleTest.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Psr11/ContainerTest.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/ServiceIteratorTest.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/psr/container/src/ContainerExceptionInterface.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/psr/container/src/ContainerInterface.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/psr/container/src/NotFoundExceptionInterface.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Admin.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Ajax.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Client.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Config.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Cron.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Encryption.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Endpoint.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Envelope.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Form.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Logger.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Logging.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Remote.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/SecurityChecks.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/SiteAccess.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/SupportRole.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/SupportUser.php (modified) (1 diff)
-
tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Utils.php (modified) (1 diff)
-
tags/2.6.1/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/classes/Controllers/Frontend/Restrictions/QueryTerms.php (modified) (1 diff)
-
trunk/classes/Controllers/Frontend/Restrictions/RestAPI.php (modified) (1 diff)
-
trunk/classes/Controllers/RestAPI.php (modified) (1 diff)
-
trunk/classes/Controllers/TrustedLogin.php (modified) (2 diffs)
-
trunk/classes/RuleEngine/Rules.php (modified) (2 diffs)
-
trunk/content-control.php (modified) (2 diffs)
-
trunk/dist/components.asset.php (modified) (1 diff)
-
trunk/dist/components.js (modified) (1 diff)
-
trunk/dist/fields.asset.php (modified) (1 diff)
-
trunk/dist/fields.js (modified) (1 diff)
-
trunk/inc/functions/query.php (modified) (8 diffs)
-
trunk/inc/functions/rule-callbacks.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/Container.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/Exception/ExpectedInvokableException.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/Exception/FrozenServiceException.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/Exception/InvalidServiceIdentifierException.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/Psr11/Container.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/ServiceIterator.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/ServiceProviderInterface.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Fixtures/Invokable.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Fixtures/NonInvokable.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Fixtures/Service.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/PimpleServiceProviderInterfaceTest.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/PimpleTest.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Psr11/ContainerTest.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php (modified) (1 diff)
-
trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/ServiceIteratorTest.php (modified) (1 diff)
-
trunk/vendor-prefixed/psr/container/src/ContainerExceptionInterface.php (modified) (1 diff)
-
trunk/vendor-prefixed/psr/container/src/ContainerInterface.php (modified) (1 diff)
-
trunk/vendor-prefixed/psr/container/src/NotFoundExceptionInterface.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/Admin.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/Ajax.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/Client.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/Config.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/Cron.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/Encryption.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/Endpoint.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/Envelope.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/Form.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/Logger.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/Logging.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/Remote.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/SecurityChecks.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/SiteAccess.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/SupportRole.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/SupportUser.php (modified) (1 diff)
-
trunk/vendor-prefixed/trustedlogin/client/src/Utils.php (modified) (1 diff)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
content-control/tags/2.6.1/classes/Controllers/Frontend/Restrictions/QueryTerms.php
r3105553 r3256177 137 137 $handling = $restriction->get_setting( 'additionalQueryHandling' ); 138 138 139 // If this is a search query and showInSearch is false, hide the post. 140 if ( $query->query_vars['search'] && false === $restriction->get_setting( 'showInSearch' ) ) { 141 $handling = 'hide'; 142 } 143 139 144 switch ( $handling ) { 140 145 case 'hide': -
content-control/tags/2.6.1/classes/Controllers/Frontend/Restrictions/RestAPI.php
r3052982 r3256177 65 65 return new \WP_Error( 66 66 'rest_forbidden', 67 $restriction->get_setting( 'restApiQueryMessage', __( 'You do not have permission to do this.', 'content-control' ) ,),67 $restriction->get_setting( 'restApiQueryMessage', __( 'You do not have permission to do this.', 'content-control' ) ), 68 68 [ 'status' => 403 ] 69 69 ); -
content-control/tags/2.6.1/classes/Controllers/RestAPI.php
r3137162 r3256177 85 85 } 86 86 87 $is_public = isset( $args['public'] ) && $args['public']; 88 87 89 // Check if this is a private taxonomy. 88 if ( true !== $args['public']) {90 if ( ! $is_public ) { 89 91 if ( $include_private ) { 90 92 $args['show_in_rest'] = true; // Enable REST API. -
content-control/tags/2.6.1/classes/Controllers/TrustedLogin.php
r2969631 r3256177 27 27 */ 28 28 public function init() { 29 $this->hooks(); 29 add_action( 'admin_menu', [ $this, 'admin_menu' ] ); 30 add_action( 'init', [ $this, 'initiate_trustedlogin' ] ); 31 } 32 33 /** 34 * Hooks. 35 * 36 * @return void 37 */ 38 public function initiate_trustedlogin() { 30 39 31 40 $config = [ … … 84 93 85 94 /** 86 * Hooks.87 *88 * @return void89 */90 public function hooks() {91 add_action( 'admin_menu', [ $this, 'admin_menu' ] );92 }93 94 /**95 95 * Admin menu. 96 96 * -
content-control/tags/2.6.1/classes/RuleEngine/Rules.php
r3105553 r3256177 475 475 } 476 476 477 /** 478 * Allow filtering post type rules. 479 * 480 * @param array<string,array<string,mixed>> $type_rules Post type rules. 481 * @param string $name Post type name. 482 * 483 * @return array<string,array<string,mixed>> 484 */ 485 $type_rules = apply_filters( 'content_control/rule_engine/post_type_rules', $type_rules, $name, $post_type ); 486 477 487 // Merge type rules & type tax rules. 478 488 $rules = array_merge( $rules, $type_rules, $this->get_post_type_tax_rules( $name ) ); … … 542 552 } 543 553 554 /** 555 * Allow filtering post type taxonomy rules. 556 * 557 * @param array<string,array<string,mixed>> $rules Post type taxonomy rules. 558 * @param string $name Post type name. 559 * 560 * @return array<string,array<string,mixed>> 561 */ 562 $rules = apply_filters( 'content_control/rule_engine/post_type_tax_rules', $rules, $name ); 563 544 564 return $rules; 545 565 } -
content-control/tags/2.6.1/content-control.php
r3253935 r3256177 4 4 * Plugin URI: https://contentcontrolplugin.com/?utm_campaign=plugin-info&utm_source=php-file-header&utm_medium=plugin-ui&utm_content=plugin-uri 5 5 * Description: Restrict content to logged in/out users or specific user roles. Restrict access to certain parts of a page/post. Control the visibility of widgets. 6 * Version: 2.6. 06 * Version: 2.6.1 7 7 * Author: Code Atlantic 8 8 * Author URI: https://code-atlantic.com/?utm_campaign=plugin-info&utm_source=php-file-header&utm_medium=plugin-ui&utm_content=author-uri … … 29 29 function get_plugin_config() { 30 30 return [ 31 'name' => \__( 'Content Control', 'content-control' ),31 'name' => 'Content Control', 32 32 'slug' => 'content-control', 33 'version' => '2.6. 0',33 'version' => '2.6.1', 34 34 'option_prefix' => 'content_control', 35 35 // Maybe remove this and simply prefix `name` with `'Popup Maker'`. 36 36 'text_domain' => 'content-control', 37 'fullname' => \__( 'Content Control', 'content-control' ),37 'fullname' => 'Content Control', 38 38 'min_php_ver' => '7.4.0', 39 39 'min_wp_ver' => '6.2.0', -
content-control/tags/2.6.1/dist/components.asset.php
r3007200 r3256177 1 <?php return array('dependencies' => array('content-control-core-data', 'content-control-utils', 'lodash', 'react', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives'), 'version' => ' b6046c2825b2afe2af46');1 <?php return array('dependencies' => array('content-control-core-data', 'content-control-utils', 'lodash', 'react', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives'), 'version' => '7f4b4f8aa3721e900183'); -
content-control/tags/2.6.1/dist/components.js
r3007200 r3256177 1 !function(){var e={184:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function l(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var c=l.apply(null,n);c&&e.push(c)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var a in n)o.call(n,a)&&n[a]&&e.push(a)}}}return e.join(" ")}e.exports?(l.default=l,e.exports=l):void 0===(n=function(){return l}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var l=t[o];if(void 0!==l)return l.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o),n.d(o,{ConfirmDialogue:function(){return u},ControlledTabPanel:function(){return s},DeviceToggle:function(){return d},EntitySelectControl:function(){return _},FieldPanel:function(){return S},FieldRow:function(){return C},FreeFormEditControl:function(){return $},ListTable:function(){return U},RadioButtonControl:function(){return K},SearchableMulticheckControl:function(){return Q},SmartTokenControl:function(){return w},TextHighlight:function(){return q},URLControl:function(){return z},useControlledState:function(){return H}});var e=window.React,t=n(184),l=n.n(t),r=window.wp.components,c=window.wp.compose,a=({tabId:t,onClick:n,children:o,selected:l,...c})=>(0,e.createElement)(r.Button,{role:"tab",tabIndex:l?void 0:-1,"aria-selected":l,id:t,onClick:n,...c},o),s=(0,c.withInstanceId)((({instanceId:t,orientation:n="horizontal",activeClass:o="is-active",tabsClass:c="tabs",tabClass:s="tab",className:i,tabs:u,selected:m,onSelect:d,children:p})=>{var g;const h=u.find((e=>m===e.name))||u[0],v=`${t}-${null!==(g=h?.name)&&void 0!==g?g:"none"}`;return(0,e.createElement)("div",{className:l()(i,"cc-"+n+"-tabs")},(0,e.createElement)(r.NavigableMenu,{role:"tablist",orientation:n,onNavigate:(e,t)=>{t.click()},className:l()([c,"components-tab-panel__tabs"])},u.map((n=>{var r,c;return(0,e.createElement)(a,{className:l()(s,"components-tab-panel__tabs-item","components-tab-panel__tab",n.className,{[o]:n.name===h.name}),tabId:`${t}-${n.name}`,"aria-controls":`${t}-${n.name}-view`,selected:n.name===h.name,key:n.name,onClick:()=>{return e=n.name,void d?.(e);var e},href:null!==(r=n?.href)&&void 0!==r?r:void 0,target:null!==(c=n?.target)&&void 0!==c?c:void 0},n.title)}))),h&&(0,e.createElement)("div",{key:v,"aria-labelledby":v,role:"tabpanel",id:`${v}-view`,className:"components-tab-panel__tab-content",tabIndex:0},p&&p(h)))})),i=window.wp.i18n,u=({message:t,callback:n,onClose:o,isDestructive:l=!1})=>t&&t.length&&n?(0,e.createElement)(r.Modal,{title:(0,i.__)("Confirm Action","content-control"),onRequestClose:o},(0,e.createElement)("p",null,t),(0,e.createElement)(r.Flex,{justify:"right"},(0,e.createElement)(r.Button,{text:(0,i.__)("Cancel","content-control"),onClick:o}),(0,e.createElement)(r.Button,{variant:"primary",text:(0,i.__)("Confirm","content-control"),isDestructive:l,onClick:()=>{n(),o()}}))):null,m=window.contentControl.utils,d=({label:t,icon:n,isVisible:o,onChange:c=m.noop})=>{const a=o?/* translators: 1. Device type. */1 !function(){var e={184:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function l(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var a=l.apply(null,n);a&&e.push(a)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var c in n)o.call(n,c)&&n[c]&&e.push(c)}}}return e.join(" ")}e.exports?(l.default=l,e.exports=l):void 0===(n=function(){return l}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var l=t[o];if(void 0!==l)return l.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o),n.d(o,{ConfirmDialogue:function(){return u},ControlledTabPanel:function(){return s},DeviceToggle:function(){return d},EntitySelectControl:function(){return _},FieldPanel:function(){return S},FieldRow:function(){return y},FreeFormEditControl:function(){return $},ListTable:function(){return U},RadioButtonControl:function(){return K},SearchableMulticheckControl:function(){return Q},SmartTokenControl:function(){return w},TextHighlight:function(){return q},URLControl:function(){return z},useControlledState:function(){return H}});var e=window.React,t=n(184),l=n.n(t),r=window.wp.components,a=window.wp.compose,c=({tabId:t,onClick:n,children:o,selected:l,...a})=>(0,e.createElement)(r.Button,{role:"tab",tabIndex:l?void 0:-1,"aria-selected":l,id:t,onClick:n,...a},o),s=(0,a.withInstanceId)((({instanceId:t,orientation:n="horizontal",activeClass:o="is-active",tabsClass:a="tabs",tabClass:s="tab",className:i,tabs:u,selected:m,onSelect:d,children:p})=>{var g;const h=u.find((e=>m===e.name))||u[0],v=`${t}-${null!==(g=h?.name)&&void 0!==g?g:"none"}`;return(0,e.createElement)("div",{className:l()(i,"cc-"+n+"-tabs")},(0,e.createElement)(r.NavigableMenu,{role:"tablist",orientation:n,onNavigate:(e,t)=>{t.click()},className:l()([a,"components-tab-panel__tabs"])},u.map((n=>{var r,a;return(0,e.createElement)(c,{className:l()(s,"components-tab-panel__tabs-item","components-tab-panel__tab",n.className,{[o]:n.name===h.name}),tabId:`${t}-${n.name}`,"aria-controls":`${t}-${n.name}-view`,selected:n.name===h.name,key:n.name,onClick:()=>{return e=n.name,void d?.(e);var e},href:null!==(r=n?.href)&&void 0!==r?r:void 0,target:null!==(a=n?.target)&&void 0!==a?a:void 0},n.title)}))),h&&(0,e.createElement)("div",{key:v,"aria-labelledby":v,role:"tabpanel",id:`${v}-view`,className:"components-tab-panel__tab-content",tabIndex:0},p&&p(h)))})),i=window.wp.i18n,u=({message:t,callback:n,onClose:o,isDestructive:l=!1})=>t&&t.length&&n?(0,e.createElement)(r.Modal,{title:(0,i.__)("Confirm Action","content-control"),onRequestClose:o},(0,e.createElement)("p",null,t),(0,e.createElement)(r.Flex,{justify:"right"},(0,e.createElement)(r.Button,{text:(0,i.__)("Cancel","content-control"),onClick:o}),(0,e.createElement)(r.Button,{variant:"primary",text:(0,i.__)("Confirm","content-control"),isDestructive:l,onClick:()=>{n(),o()}}))):null,m=window.contentControl.utils,d=({label:t,icon:n,isVisible:o,onChange:a=m.noop})=>{const c=o?/* translators: 1. Device type. */ 2 2 (0,i._x)("Show on %1$s","Device toggle option","content-control"):/* translators: 1. Device type. */ 3 (0,i._x)("Hide on %1$s","Device toggle option","content-control"),s=o?"visibility":"hidden",u=()=> c(!o);return(0,e.createElement)("div",{className:l()(["cc__component-device-toggle",o&&"is-checked"])},(0,e.createElement)("h3",{className:"cc__component-device-toggle__label"},(0,e.createElement)(r.Icon,{icon:n}),t),(0,e.createElement)("div",{className:"cc__component-device-toggle__control"},(0,e.createElement)(r.Tooltip,{text:(0,i.sprintf)(a,t)},(0,e.createElement)("span",null,(0,e.createElement)(r.Icon,{className:"cc__component-device-toggle__control-icon",onClick:u,icon:s}))),(0,e.createElement)(r.Tooltip,{text:(0,i.sprintf)(a,t)},(0,e.createElement)("span",null,(0,e.createElement)(r.ToggleControl,{className:"cc__component-device-toggle__control-input",checked:o,onChange:u,hideLabelFromVision:!0,"aria-label":a,label:(0,i.sprintf)(/* translators: 1. Device type. */4 (0,i._x)("Show on %1$s","Device toggle option","content-control"),t)})))))},p=window.wp.data,g=window.wp.element,h=window.wp.coreData,v=window.wp.primitives,f=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const E={container:"component-smart-token-control",popover:"component-smart-token-control__suggestions-popover",inputContainer:"component-smart-token-control__input",tokens:"component-smart-token-control__tokens",token:"component-smart-token-control__token",tokenLabel:"component-smart-token-control__token-label",tokenRemove:"component-smart-token-control__token-remove",textInput:"component-smart-token-control__text-input",toggleSuggestions:"component-smart-token-control__toggle",suggestions:"component-smart-token-control__suggestions",suggestion:"component-smart-token-control__suggestion"},b=({id:t,value:n,onChange:o,label: a,placeholder:s=(0,i.__)("Enter a value","content-control"),className:u,tokenOnComma:d=!1,classes:p=E,renderToken:h=(t=>(0,e.createElement)(e.Fragment,null,"string"==typeof t?t:t.item)),renderSuggestion:v=(t=>(0,e.createElement)(e.Fragment,null,t)),onInputChange:w=m.noop,saveTransform:_=(e=>e),closeOnSelect:S=!1,hideLabelFromVision:C=!1,extraKeyboardShortcuts:y={},multiple:k=!1,suggestions:x,messages:N={searchTokens:(0,i.__)("Search","content-control"),noSuggestions:(0,i.__)("No suggestions","content-control"),removeToken:(0,i.__)("Remove token","content-control")}},R)=>{const $={...E,...p},I=(0,c.useInstanceId)(b),F=(0,g.useRef)(null),B=(0,g.useRef)(null),T=(0,g.useRef)(null),[L,O]=(0,g.useState)({inputText:"",isFocused:!1,selectedSuggestion:-1,popoverOpen:!1,refocus:!1}),{inputText:D,isFocused:P,selectedSuggestion:M,popoverOpen:z}=L;function A(e){return"object"==typeof e?e.value:e}function V(e){return n.some((t=>A(e)===A(t)))}function H(e){!function(e){const t=[...new Set(e.map(_).filter(Boolean).filter((e=>!V(e))))];t.length>0&&o([...n,...t])}([e]),O({...L,inputText:"",popoverOpen:!S&&z})}const j=e=>O({...L,selectedSuggestion:e}),U=x.length,q=M>U?0:M;(0,g.useEffect)((()=>{setTimeout((()=>{T.current&&T.current.scrollIntoView()}),25)}),[M,z]),(0,g.useEffect)((()=>{L.refocus&&(O({...L,refocus:!1}),B.current?.focus())}),[L,L.refocus]);const G={up:e=>{e.preventDefault(),O({...L,popoverOpen:0===D.length&&!z||z,selectedSuggestion:(0,m.clamp)(q-1>=0?q-1:U,0,U)})},down:e=>{e.preventDefault(),O({...L,popoverOpen:0===D.length&&!z||z,selectedSuggestion:(0,m.clamp)(q+1<=U?q+1:0,0,U)})},"alt+down":()=>O({...L,popoverOpen:!0}),enter:()=>{if(-1===M)return O({...L,popoverOpen:!1});H(x[q])},escape:e=>{e.preventDefault(),e.stopPropagation(),O({...L,selectedSuggestion:-1,popoverOpen:!1})},",":e=>{d&&(e.preventDefault(),0!==D.length&&H(D))},...y};return(0,e.createElement)(r.KeyboardShortcuts,{shortcuts:G},(0,e.createElement)("div",{id:t?`${t}-wrapper`:`component-smart-token-control-${I}-wrapper`,className:l()([$.container,P&&"is-focused",u]),ref:e=>{F.current=e,R&&"object"==typeof R&&(R.current=e)},onBlur:e=>{e.relatedTarget&&e.relatedTarget.classList.contains($.popover)||O({...L,isFocused:!1,popoverOpen:!1})}},(0,e.createElement)(r.BaseControl,{id:t||`component-smart-token-control-${I}`,label:a,hideLabelFromVision:C},(0,e.createElement)("div",{className:l()([$.inputContainer,!k&&n.length>0&&"input-disabled"])},n.length>0&&(0,e.createElement)("div",{className:$.tokens},n.map((t=>(0,e.createElement)("div",{className:$.token,key:A(t)},(0,e.createElement)("div",{className:$.tokenLabel},h(t)),(0,e.createElement)(r.Button,{className:$.tokenRemove,label:N.removeToken,icon:f,onClick:()=>function(e){O({...L,refocus:!0}),o(n.filter((t=>A(t)!==A(e))))}(t)}))))),(0,e.createElement)("input",{id:t||`component-smart-token-control-${I}`,type:"text",className:l()([$.textInput]),placeholder:s,disabled:!k&&n.length>0,ref:B,value:null!=D?D:"",onChange:e=>{return t=e.target.value,O({...L,inputText:t,popoverOpen:t.length>=1}),void w(t);var t},autoComplete:"off","aria-autocomplete":"list","aria-controls":t?`${t}-listbox`:`${I}-listbox`,"aria-activedescendant":`sug-${q}`,onFocus:()=>{O({...L,isFocused:!0,popoverOpen:D.length>=1})},onClick:()=>{z||O({...L,popoverOpen:x.length>0})},onBlur:e=>{const t=e.relatedTarget;t&&t.classList.contains($.popover)||O({...L,isFocused:!1,popoverOpen:!1})}}))),z&&(0,e.createElement)(r.Popover,{focusOnMount:!1,onClose:()=>j(-1),position:"bottom right",anchor:B.current,className:$.popover},(0,e.createElement)("div",{className:$.suggestions,style:{width:B.current?.clientWidth}},x.length?x.map(((t,n)=>(0,e.createElement)("div",{key:n,id:`sug-${n}`,className:l()([$.suggestion,n===q&&"is-currently-highlighted",V(t)&&"is-selected"]),ref:n===q?T:void 0,onFocus:()=>{j(n)},onMouseDown:e=>{e.preventDefault(),H(x[n])},role:"option",tabIndex:n,"aria-selected":n===q},v(t)))):(0,e.createElement)("div",null,N.noSuggestions)))))};var w=(0,g.forwardRef)(b),_=({id:t,label:n,value:o,onChange:l,placeholder:r,entityKind:a="postType",entityType:s="post",multiple:u=!1,...m})=>{const[d,v]=(0,g.useState)(""),f=(0,c.useDebounce)((e=>{v(e)}),300),{prefill:E=[]}=(0,p.useSelect)((e=>({prefill:o?e(h.store).getEntityRecords(a,s,{context:"view",include:o,per_page:-1}):[]})),[o,a,s]),{suggestions:b=[],isSearching:_=!1}=(0,p.useSelect)((e=>({suggestions:e(h.store).getEntityRecords(a,s,{context:"view",search:d,per_page:-1}),isSearching:e("core/data").isResolving("core","getEntityRecords",[a,s,{context:"view",search:d,per_page:-1}])})),[a,s,d]),S=e=>b&&b.find((t=>t.id.toString()===e.toString()))||E&&E.find((t=>t.id.toString()===e.toString())),C=o?(Array.isArray(o)?o:[o]).map((e=>e.toString())):[],y=e=>"object"==typeof e?e.value:e;return(0,e.createElement)("div",{className:"cc-object-search-field"},(0,e.createElement)(w,{id:t,label:n||(0,i.sprintf)(3 (0,i._x)("Hide on %1$s","Device toggle option","content-control"),s=o?"visibility":"hidden",u=()=>a(!o);return(0,e.createElement)("div",{className:l()(["cc__component-device-toggle",o&&"is-checked"])},(0,e.createElement)("h3",{className:"cc__component-device-toggle__label"},(0,e.createElement)(r.Icon,{icon:n}),t),(0,e.createElement)("div",{className:"cc__component-device-toggle__control"},(0,e.createElement)(r.Tooltip,{text:(0,i.sprintf)(c,t)},(0,e.createElement)("span",null,(0,e.createElement)(r.Icon,{className:"cc__component-device-toggle__control-icon",onClick:u,icon:s}))),(0,e.createElement)(r.Tooltip,{text:(0,i.sprintf)(c,t)},(0,e.createElement)("span",null,(0,e.createElement)(r.ToggleControl,{className:"cc__component-device-toggle__control-input",checked:o,onChange:u,hideLabelFromVision:!0,"aria-label":c,label:(0,i.sprintf)(/* translators: 1. Device type. */ 4 (0,i._x)("Show on %1$s","Device toggle option","content-control"),t)})))))},p=window.wp.data,g=window.wp.element,h=window.wp.coreData,v=window.wp.primitives,f=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const E={container:"component-smart-token-control",popover:"component-smart-token-control__suggestions-popover",inputContainer:"component-smart-token-control__input",tokens:"component-smart-token-control__tokens",token:"component-smart-token-control__token",tokenLabel:"component-smart-token-control__token-label",tokenRemove:"component-smart-token-control__token-remove",textInput:"component-smart-token-control__text-input",toggleSuggestions:"component-smart-token-control__toggle",suggestions:"component-smart-token-control__suggestions",suggestion:"component-smart-token-control__suggestion"},b=({id:t,value:n,onChange:o,label:c,placeholder:s=(0,i.__)("Enter a value","content-control"),className:u,tokenOnComma:d=!1,classes:p=E,renderToken:h=(t=>(0,e.createElement)(e.Fragment,null,"string"==typeof t?t:t.item)),renderSuggestion:v=(t=>(0,e.createElement)(e.Fragment,null,t)),onInputChange:w=m.noop,saveTransform:_=(e=>e),closeOnSelect:S=!1,hideLabelFromVision:y=!1,extraKeyboardShortcuts:C={},multiple:k=!1,suggestions:x,messages:N={searchTokens:(0,i.__)("Search","content-control"),noSuggestions:(0,i.__)("No suggestions","content-control"),removeToken:(0,i.__)("Remove token","content-control")}},R)=>{const $={...E,...p},I=(0,a.useInstanceId)(b),F=(0,g.useRef)(null),T=(0,g.useRef)(null),B=(0,g.useRef)(null),[L,O]=(0,g.useState)({inputText:"",isFocused:!1,selectedSuggestion:-1,popoverOpen:!1,refocus:!1}),{inputText:D,isFocused:P,selectedSuggestion:M,popoverOpen:z}=L;function A(e){return"object"==typeof e?e.value:e}function V(e){return n.some((t=>A(e)===A(t)))}function H(e){!function(e){const t=[...new Set(e.map(_).filter(Boolean).filter((e=>!V(e))))];t.length>0&&o([...n,...t])}([e]),O({...L,inputText:"",popoverOpen:!S&&z})}const j=e=>O({...L,selectedSuggestion:e}),U=x.length,q=M>U?0:M;(0,g.useEffect)((()=>{setTimeout((()=>{B.current&&B.current.scrollIntoView()}),25)}),[M,z]),(0,g.useEffect)((()=>{L.refocus&&(O({...L,refocus:!1}),T.current?.focus())}),[L,L.refocus]);const G={up:e=>{e.preventDefault(),O({...L,popoverOpen:0===D.length&&!z||z,selectedSuggestion:(0,m.clamp)(q-1>=0?q-1:U,0,U)})},down:e=>{e.preventDefault(),O({...L,popoverOpen:0===D.length&&!z||z,selectedSuggestion:(0,m.clamp)(q+1<=U?q+1:0,0,U)})},"alt+down":()=>O({...L,popoverOpen:!0}),enter:()=>{if(-1===M)return O({...L,popoverOpen:!1});H(x[q])},escape:e=>{e.preventDefault(),e.stopPropagation(),O({...L,selectedSuggestion:-1,popoverOpen:!1})},",":e=>{d&&(e.preventDefault(),0!==D.length&&H(D))},...C};return(0,e.createElement)(r.KeyboardShortcuts,{shortcuts:G},(0,e.createElement)("div",{id:t?`${t}-wrapper`:`component-smart-token-control-${I}-wrapper`,className:l()([$.container,P&&"is-focused",u]),ref:e=>{F.current=e,R&&"object"==typeof R&&(R.current=e)},onBlur:e=>{e.relatedTarget&&e.relatedTarget.classList.contains($.popover)||O({...L,isFocused:!1,popoverOpen:!1})}},(0,e.createElement)(r.BaseControl,{id:t||`component-smart-token-control-${I}`,label:c,hideLabelFromVision:y},(0,e.createElement)("div",{className:l()([$.inputContainer,!k&&n.length>0&&"input-disabled"])},n.length>0&&(0,e.createElement)("div",{className:$.tokens},n.map((t=>(0,e.createElement)("div",{className:$.token,key:A(t)},(0,e.createElement)("div",{className:$.tokenLabel},h(t)),(0,e.createElement)(r.Button,{className:$.tokenRemove,label:N.removeToken,icon:f,onClick:()=>function(e){O({...L,refocus:!0}),o(n.filter((t=>A(t)!==A(e))))}(t)}))))),(0,e.createElement)("input",{id:t||`component-smart-token-control-${I}`,type:"text",className:l()([$.textInput]),placeholder:s,disabled:!k&&n.length>0,ref:T,value:null!=D?D:"",onChange:e=>{return t=e.target.value,O({...L,inputText:t,popoverOpen:t.length>=1}),void w(t);var t},autoComplete:"off","aria-autocomplete":"list","aria-controls":t?`${t}-listbox`:`${I}-listbox`,"aria-activedescendant":`sug-${q}`,onFocus:()=>{O({...L,isFocused:!0,popoverOpen:D.length>=1})},onClick:()=>{z||O({...L,popoverOpen:x.length>0})},onBlur:e=>{const t=e.relatedTarget;t&&t.classList.contains($.popover)||O({...L,isFocused:!1,popoverOpen:!1})}}))),z&&(0,e.createElement)(r.Popover,{focusOnMount:!1,onClose:()=>j(-1),position:"bottom right",anchor:T.current,className:$.popover},(0,e.createElement)("div",{className:$.suggestions,style:{width:T.current?.clientWidth}},x.length?x.map(((t,n)=>(0,e.createElement)("div",{key:n,id:`sug-${n}`,className:l()([$.suggestion,n===q&&"is-currently-highlighted",V(t)&&"is-selected"]),ref:n===q?B:void 0,onFocus:()=>{j(n)},onMouseDown:e=>{e.preventDefault(),H(x[n])},role:"option",tabIndex:n,"aria-selected":n===q},v(t)))):(0,e.createElement)("div",null,N.noSuggestions)))))};var w=(0,g.forwardRef)(b),_=({id:t,label:n,value:o,onChange:l,placeholder:r,entityKind:c="postType",entityType:s="post",multiple:u=!1,...m})=>{const[d,v]=(0,g.useState)(""),f=(0,a.useDebounce)((e=>{v(e)}),300),E=()=>"postType"===c?"id,title,name,type":"taxonomy"===c?"id,name,slug,taxonomy":null,b={context:"view",per_page:-1,...null!==E()?{_fields:E()}:{}},{prefill:_=[]}=(0,p.useSelect)((e=>({prefill:o?e(h.store).getEntityRecords(c,s,{...b,include:o}):[]})),[o,c,s]),{suggestions:S=[],isSearching:y=!1}=(0,p.useSelect)((e=>({suggestions:e(h.store).getEntityRecords(c,s,{...b,search:d}),isSearching:e("core/data").isResolving("core","getEntityRecords",[c,s,{...b,search:d}])})),[c,s,d]),C=e=>S&&S.find((t=>t.id.toString()===e.toString()))||_&&_.find((t=>t.id.toString()===e.toString())),k=o?(Array.isArray(o)?o:[o]).map((e=>e.toString())):[],x=e=>"object"==typeof e?e.value:e;return(0,e.createElement)("div",{className:"cc-object-search-field"},(0,e.createElement)(w,{id:t,label:n||(0,i.sprintf)( 5 5 // translators: %s: entity type. 6 6 (0,i.__)("%s(s)","content-control"),s.replace(/_/g," ").charAt(0).toUpperCase()+s.replace(/_/g," ").slice(1)),multiple:u,placeholder:r||(0,i.sprintf)( 7 7 // translators: %s: entity type. 8 (0,i.__)("Select %s(s)","content-control"),s.replace(/_/g," ").toLowerCase()),...m,tokenOnComma:!0,value: C,onInputChange:f,onChange:e=>{const t=e.map((e=>parseInt(y(e),10))).filter((e=>!isNaN(e)));l(u?t:t[0])},renderToken:e=>{var t;const n=S(y(e));return n?"postType"===a?null!==(t=n.title.rendered)&&void 0!==t?t:n.title.raw:n.name:y(e)},renderSuggestion:t=>{var n;const o=S(t);return o?(0,e.createElement)(e.Fragment,null,"postType"===a?null!==(n=o.title.rendered)&&void 0!==n?n:o.title.raw:o.name):t},suggestions:b?b.map((e=>{var t;return null!==(t=e?.id.toString())&&void 0!==t&&t})):[],messages:_?{noSuggestions:(0,i.__)("Searching…","content-control")}:void 0}))},S=({title:t,className:n,children:o})=>(0,e.createElement)(r.Panel,{header:t,className:l()(["components-field-panel",n])},(0,e.createElement)(r.PanelBody,{opened:!0},o)),C=({id:t,label:n,description:o,className:r,children:c})=>(0,e.createElement)("div",{className:l()(["components-field-row",r])},(0,e.createElement)("div",{className:"components-base-control"},(0,e.createElement)("label",{htmlFor:t,className:"components-truncate components-text components-input-control__label"},n),(0,e.createElement)("p",{className:"components-base-control__help"},o)),(0,e.createElement)("div",{className:"components-base-control__field"},c)),y=window.wp.keycodes;const{wp:k,tinymce:x,wpEditorL10n:N={tinymce:{baseURL:"",suffix:"",settings:{}}}}=window,R=t=>{const n=(0,c.useInstanceId)(R),{label:o,value:a,onChange:s=m.noop,className:u,minHeight:d=100}=t,p=(0,g.useRef)(!1);return(0,g.useEffect)((()=>{if(!p.current)return;const e=x.get(`editor-${n}`),t=e?.getContent();t!==a&&e.setContent(a||"")}),[a,n]),(0,g.useEffect)((()=>{const{baseURL:e,suffix:t}=N.tinymce;function o(e){let t;a&&e.on("loadContent",(()=>e.setContent(a))),e.on("blur",(()=>{t=e.selection.getBookmark(2,!0);const n=document.querySelector(".interface-interface-skeleton__content"),o=n?.scrollTop;return s(e.getContent()),e.once("focus",(()=>{t&&(e.selection.moveToBookmark(t),n&&n?.scrollTop!==o&&(n.scrollTop=o||0))})),!1})),e.on("mousedown touchstart",(()=>{t=null}));const n=(0,c.debounce)((()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,s(t))}),250);e.on("Paste Change input Undo Redo",n),e.on("remove",n.cancel),e.on("keydown",(e=>{y.isKeyboardEvent.primary(e,"z")&&e.stopPropagation();const{altKey:t}=e;t&&e.keyCode===y.F10&&e.stopPropagation()})),e.on("init",(()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function l(){const{settings:e}=N.tinymce;k.oldEditor.initialize(`editor-${n}`,{tinymce:{...e,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${n}`,setup:o}})}function r(){"complete"===document.readyState&&l()}return p.current=!0,x.EditorManager.overrideDefaults({base_url:e,suffix:t}),"complete"===document.readyState?l():document.addEventListener("readystatechange",r),()=>{document.removeEventListener("readystatechange",r),k.oldEditor.remove(`editor-${n}`)}}),[]),(0,e.createElement)(r.BaseControl,{id:`freeform-edit-control-${n}`,label:o,className:l()(["component-freeform-edit-control",u])},(0,e.createElement)("div",{key:"toolbar",id:`toolbar-${n}`,className:"block-library-classic__toolbar",onClick:function(){const e=x.get(`editor-${n}`);e&&e.focus()},onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},"data-placeholder":(0,i.__)("Click here to edit this text.","content-control")}),(0,e.createElement)("div",{key:"editor",id:`editor-${n}`,style:{minHeight:d},className:"wp-block-freeform block-library-rich-text__tinymce"}))};var $=R,I=window.lodash,F=window.contentControl.coreData,B=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})),T=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),L=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})),O=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,e.createElement)(v.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),D=(0,g.forwardRef)((({icon:t,title:n,info:o,type:c,className:a,isSelected:s,onFocus:i=m.noop,onSelect:u=m.noop,...d},p)=>(0,e.createElement)(r.Button,{type:"button",className:l()(["suggestion",s&&"is-selected",a]),ref:p,onClick:u,onFocus:i,onMouseOver:i,"aria-selected":s,role:"option",tabIndex:-1,...d},t&&(0,e.createElement)(r.Icon,{icon:t,className:"suggestion-item-icon"}),(0,e.createElement)("span",{className:"suggestion-item-header"},(0,e.createElement)("span",{className:"suggestion-item-title"},n),o&&(0,e.createElement)("span",{"aria-hidden":"true",className:"suggestion-item-info"},o)),c&&(0,e.createElement)("span",{className:"suggestion-item-type"},c))));const P={id:-1,title:"",url:"",type:(0,i.__)("URL","content-control")},M=({id:t,label:n,value:o,onChange:a=(()=>{}),className:s=""},u)=>{var m,d;const h=(0,c.useInstanceId)(M),v=(0,g.useRef)(null),f=(0,g.useRef)(null),E=(0,g.useRef)(null),b=(0,g.useRef)(null),w=(0,g.useRef)(null),_=(0,g.useRef)([]);(0,g.useImperativeHandle)(u,(()=>E.current),[E]);const S="string"==typeof o?{...P,url:o}:null!=o?o:P,C={value:S,query:null!==(m=S.url)&&void 0!==m?m:"",isEditing:!1,isFocused:!1,selected:-1,showSuggestions:!1},[y,k]=(0,g.useState)(C),{value:x,query:N,isFocused:R,isEditing:$,selected:z,showSuggestions:A}=y,V=t||`url-input-control-${h}`,H=`url-input-control-suggestions-${h}`,j=`url-input-${h}-sug-`,{unfilteredSuggestions:U,isFetchingSuggestions:q}=(0,p.useSelect)((e=>({unfilteredSuggestions:e(F.urlSearchStore).getSuggestions(),isFetchingSuggestions:e(F.urlSearchStore).isDispatching("updateSuggestions")})),[]),{updateSuggestions:G}=(0,p.useDispatch)(F.urlSearchStore),K=(0,I.debounce)(G,200,{leading:!0}),Z=e=>k({...y,selected:e}),W=e=>{const t={...y,value:{...x,...e},query:"",isEditing:!1,isFocused:!0,selected:-1,showSuggestions:!1};k(t)};(0,g.useEffect)((()=>{S.url!==x.url&&a(x)}),[x,S.url,a]),(0,g.useEffect)((()=>{R&&($?E.current?.focus():w.current?.focus())}),[$,R]);const J=(0,g.useMemo)((()=>U.filter(((e,t)=>U.findIndex((t=>e.id===t.id))===t))),[U]).slice(0,10),Q=J.length,X=z>Q?0:z,Y={up:()=>k({...y,showSuggestions:0===N.length&&!A||A,selected:(0,I.clamp)(X-1>=0?X-1:Q,0,Q)}),down:()=>{k({...y,showSuggestions:0===N.length&&!A||A,selected:(0,I.clamp)(X+1<=Q?X+1:0,0,Q)})},"alt+down":()=>k({...y,showSuggestions:!0}),enter:e=>{e.preventDefault(),A&&X>-1&&X!==Q?W(J[X]):x.url===N?k({...y,isEditing:!1,query:"",showSuggestions:!1,selected:-1}):W({title:(0,i.__)("Custom URL","content-control"),type:"URL",url:N})},escape:e=>{e.preventDefault(),e.stopPropagation(),k({...y,selected:-1,showSuggestions:!1})}};return(0,e.createElement)(r.BaseControl,{id:V,label:n,className:l()(["components-url-control",R&&"is-focused",s])},(0,e.createElement)("div",{ref:v,onFocus:()=>{k({...y,isFocused:!0,showSuggestions:N.length>=1})},onBlur:e=>{if(!v.current?.contains(e.relatedTarget)&&!b.current?.contains(e.relatedTarget)){const e={...y,selected:-1,isFocused:!1,showSuggestions:!1};$&&(e.isEditing=!1,e.value=z>-1?J[z]:{title:(0,i.__)("Custom URL"),type:"URL",url:N}),k(e)}}},!$&&S.url.length>0?(0,e.createElement)("div",{className:"suggestion"},(0,e.createElement)(r.Icon,{icon:B,className:"suggestion-item-icon"}),(0,e.createElement)("span",{className:"suggestion-item-header"},(0,e.createElement)("span",{className:"suggestion-item-title"},(0,e.createElement)(e.Fragment,null,null!==(d=x?.title)&&void 0!==d?d:x?.url)),(0,e.createElement)("span",{"aria-hidden":"true",className:"suggestion-item-info"},x.url)),(0,e.createElement)(r.Button,{"aria-label":(0,i.__)("Edit","content-control"),icon:T,onClick:()=>{k({...y,isEditing:!0,isFocused:!0,query:S.url})},ref:w})):(0,e.createElement)(r.KeyboardShortcuts,{shortcuts:Y},(0,e.createElement)("div",{className:l()(["url-control-wrapper"]),ref:f},(0,e.createElement)("div",{className:"url-control"},(0,e.createElement)(r.Icon,{icon:L,className:"url-control__input-icon"}),(0,e.createElement)("input",{id:V,className:"url-control__input",ref:E,type:"text",role:"combobox",placeholder:(0,i.__)("Search or type url","content-control"),value:N,onChange:e=>{return t=e.target.value,k({...y,query:t,showSuggestions:t.length>=1}),void K(t.trim(),{type:["post","term"]});var t},autoComplete:"off","aria-autocomplete":"list","aria-controls":H,"aria-expanded":A,"aria-activedescendant":X>=0?`${j}-${X}`:void 0,"aria-label":n?void 0:(0,i.__)("URL")}),(0,e.createElement)("div",{className:"url-control__actions"},q&&(0,e.createElement)(r.Spinner,null),(0,e.createElement)(r.Button,{icon:O,iconSize:30,onClick:()=>W({title:(0,i.__)("Custom URL","content-control"),type:"URL",url:N})}))),A&&J.length>0&&(0,e.createElement)(r.Popover,{ref:b,focusOnMount:!1,onClose:()=>Z(-1),position:"bottom right",anchor:f.current,className:"suggestions-popover"},(0,e.createElement)("div",{className:"suggestions",id:H,role:"listbox"},J.map(((t,n)=>(0,e.createElement)(D,{key:t.id,id:`${j}-${n}`,title:t.title,info:t.url,type:t.type,isSelected:n===X,onSelect:()=>W(t),onFocus:()=>Z(n),ref:e=>{_.current[n]=e}}))),N.length>0&&(0,e.createElement)(D,{key:"use-current-input-text",id:`${j}-${Q}`,icon:B,title:N,info:(0,i.__)("Press ENTER to add this link","content-control"),type:(0,i.__)("URL","content-control"),className:"is-url",isSelected:Q===X,onSelect:()=>W({title:(0,i.__)("Custom URL","content-control"),type:"URL",url:N}),onFocus:()=>{Z(Q)},ref:e=>{_.current[Q]=e}})))))))};var z=(0,g.forwardRef)(M),A=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})),V=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"}));function H(e,t,n){const[o,l]=(0,g.useState)(e||t),r=(0,g.useRef)(void 0!==e),c=r.current,a=void 0!==e,s=(0,g.useRef)(o);c!==a&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),r.current=a;const i=(0,g.useCallback)(((e,...t)=>{const o=(e,...t)=>{n&&(Object.is(s.current,e)||n(e,...t)),a||(s.current=e)};"function"==typeof e?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),l(((n,...l)=>{const r=e(a?s.current:n,...l);return o(r,...t),a?n:r}))):(a||l(e),o(e,...t))}),[a,n]);return a?s.current=e:e=o,[e,i]}const j=({heading:t=!1,children:n,...o})=>t?(0,e.createElement)("th",{...o},n):(0,e.createElement)("td",{...o},n);var U=({items:t,columns:n,sortableColumns:o=[],idCol:c="id",rowClasses:a=(e=>[`item-${e.id}`]),renderCell:s=((e,t)=>t[e]),noItemsText:u=(0,i.__)("No items found.","content-control"),showBulkSelect:m=!0,className:d,selectedItems:p=[],onSelectItems:h=(()=>{})})=>{var v;const f={[c]:null!==(v=n[c])&&void 0!==v?v:"",...n},E=Object.keys(f).length,[b,w]=H(p,[],h),[_,S]=(0,g.useState)(o.length?o[0]:null),[C,y]=(0,g.useState)("ASC");(0,g.useEffect)((()=>{h(b)}),[b,h]);const k=_?t.sort(((e,t)=>"ASC"===C?e[_]>t[_]?1:-1:t[_]>e[_]?1:-1)):t,x=({header:n=!1})=>(0,e.createElement)(e.Fragment,null,Object.entries(f).map((([a,s])=>{const i=m&&a===c,u=a===_,d=!i&&o.indexOf(a)>=0,p={key:a,heading:!i,id:n&&!i?a:void 0,scope:i?void 0:"col",className:l()([`column-${a}`,...!i&&d?["sortable",C.toLowerCase()]:[],i&&"check-column"])},g=()=>(0,e.createElement)(e.Fragment,null,"function"==typeof s?s():(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,s),u&&(0,e.createElement)(r.Icon,{icon:"ASC"===C?A:V,size:16})));return(0,e.createElement)(j,{...p,key:a},i&&(0,e.createElement)(r.CheckboxControl,{onChange:e=>w(e?t.map((e=>e.id)):[]),checked:b.length>0&&b.length===t.length,indeterminate:b.length>0&&b.length<t.length}),!i&&d&&(0,e.createElement)(r.Button,{variant:"link",onClick:()=>{_===a?y("ASC"===C?"DESC":"ASC"):(S(a),y("ASC"))}},(0,e.createElement)(g,null)),!i&&!d&&(0,e.createElement)(g,null))})));return(0,e.createElement)("table",{className:l()([d,"component-list-table","list-table",0===k.length&&"no-items"])},(0,e.createElement)("thead",null,(0,e.createElement)("tr",null,(0,e.createElement)(x,{header:!0}))),(0,e.createElement)("tbody",null,k.length?k.map(((t,n)=>(0,e.createElement)("tr",{key:t.id,className:l()(a(t))},Object.entries(f).map((([o])=>{const a=o===c;return(0,e.createElement)(j,{key:o,heading:a,className:l()([`column-${o}`,m&&a&&"check-column"]),scope:a?"row":void 0},a?(0,e.createElement)(r.CheckboxControl,{onChange:e=>{const n=e?[...b,t.id]:b.filter((e=>e!==t.id));w(n)},checked:b.indexOf(t.id)>=0}):s(o,t,n))}))))):(0,e.createElement)("tr",null,(0,e.createElement)("td",{colSpan:E},u))),(0,e.createElement)("tfoot",null,(0,e.createElement)("tr",null,(0,e.createElement)(x,null))))},q=t=>{const{text:n="",highlight:o=""}=t,l=(Array.isArray(o)?o:[o]).map((e=>e.trim())).filter((e=>!!e)).map((e=>(0,I.escapeRegExp)(e)));if(!l.length)return(0,e.createElement)(e.Fragment,null,n);const r=new RegExp(`(${l.join("|")})`,"gi");return(0,g.createInterpolateElement)(n.replace(r,"<mark>$&</mark>"),{mark:(0,e.createElement)("mark",null)})};const G=({id:t,label:n,value:o,onChange:a,className:s,options:i=[],orientation:u="horizontal",equalWidth:m=!1,spacing:d,hideLabelFromVision:p=!1})=>{const g=(0,c.useInstanceId)(G);return(0,e.createElement)(r.BaseControl,{id:t||`radio-button-control-${g}`,label:n,className:l()("components-radio-button-control",u,m&&"equal-width",s),hideLabelFromVision:p},(0,e.createElement)("div",{className:"options",style:d?{gap:`${d}px`}:void 0},i.map((({label:t,value:n})=>(0,e.createElement)(r.Button,{key:n,variant:n===o?"primary":"secondary",onClick:()=>a(n)},t)))))};var K=G,Z=(0,e.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(v.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),W=(0,e.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(v.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const J=({label:t="",placeholder:n="",searchIcon:o,value:a=[],options:s=[],onChange:u=(()=>{}),className:m=""})=>{const d=(0,c.useInstanceId)(J),[p,h]=(0,g.useState)(""),[v,f]=(0,g.useState)("ASC"),E=e=>-1!==a.indexOf(e),b=e=>u(E(e)?[...a.filter((t=>t!==e))]:[...a,e]),w=s.filter((({label:e,value:t,keywords:n})=>e.includes(p)||"string"==typeof t&&t.includes(p)||n&&n.includes(p))),_=w.sort(((e,t)=>"ASC"===v?e.label>t.label?1:-1:t.label>e.label?1:-1));return(0,e.createElement)(r.BaseControl,{id:`searchable-multicheck-control-${d}`,label:t,className:l()(["component-searchable-multicheck-control",m])},(0,e.createElement)("div",{className:"select-actions"},(0,e.createElement)(r.Button,{variant:"link",text:(0,i.__)("Select All","content-control"),onClick:()=>{const e=w.map((({value:e})=>e)),t=[...a,...e];u([...new Set(t)])}}),(0,e.createElement)(r.Button,{variant:"link",text:(0,i.__)("Deselect All","content-control"),onClick:()=>{const e=w.map((({value:e})=>e)),t=[...a.filter((t=>-1===e.indexOf(t)))];u([...new Set(t)])}})),(0,e.createElement)("div",{className:l()([o?"icon-input":null])},(0,e.createElement)("input",{type:"text",className:"components-text-control__input",placeholder:n,value:p,onChange:e=>h(e.target.value)}),o&&(0,e.createElement)(r.Icon,{icon:o})),(0,e.createElement)("table",null,(0,e.createElement)("thead",null,(0,e.createElement)("tr",null,(0,e.createElement)("th",{className:"label-column"},(0,e.createElement)(r.Button,{text:(0,i.__)("Name","content-control"),onClick:()=>f("DESC"===v?"ASC":"DESC"),icon:"DESC"===v?Z:W,iconPosition:"right"})),(0,e.createElement)("td",{className:"cb-column"}))),(0,e.createElement)("tbody",null,_.map((({label:t,value:n})=>(0,e.createElement)("tr",{key:n.toString()},(0,e.createElement)("td",null,(0,e.createElement)("span",{role:"button",tabIndex:-1,onClick:()=>b(n),onKeyDown:()=>{}},t)),(0,e.createElement)("th",{className:"cb-column"},(0,e.createElement)(r.CheckboxControl,{checked:E(n),onChange:()=>b(n)}))))))))};var Q=J}(),(window.contentControl=window.contentControl||{}).components=o}();8 (0,i.__)("Select %s(s)","content-control"),s.replace(/_/g," ").toLowerCase()),...m,tokenOnComma:!0,value:k,onInputChange:f,onChange:e=>{const t=e.map((e=>parseInt(x(e),10))).filter((e=>!isNaN(e)));l(u?t:t[0])},renderToken:e=>{var t;const n=C(x(e));return n?"postType"===c?null!==(t=n.title.rendered)&&void 0!==t?t:n.title.raw:n.name:x(e)},renderSuggestion:t=>{var n;const o=C(t);return o?(0,e.createElement)(e.Fragment,null,"postType"===c?null!==(n=o.title.rendered)&&void 0!==n?n:o.title.raw:o.name):t},suggestions:S?S.map((e=>{var t;return null!==(t=e?.id.toString())&&void 0!==t&&t})):[],messages:y?{noSuggestions:(0,i.__)("Searching…","content-control")}:void 0}))},S=({title:t,className:n,children:o})=>(0,e.createElement)(r.Panel,{header:t,className:l()(["components-field-panel",n])},(0,e.createElement)(r.PanelBody,{opened:!0},o)),y=({id:t,label:n,description:o,className:r,children:a})=>(0,e.createElement)("div",{className:l()(["components-field-row",r])},(0,e.createElement)("div",{className:"components-base-control"},(0,e.createElement)("label",{htmlFor:t,className:"components-truncate components-text components-input-control__label"},n),(0,e.createElement)("p",{className:"components-base-control__help"},o)),(0,e.createElement)("div",{className:"components-base-control__field"},a)),C=window.wp.keycodes;const{wp:k,tinymce:x,wpEditorL10n:N={tinymce:{baseURL:"",suffix:"",settings:{}}}}=window,R=t=>{const n=(0,a.useInstanceId)(R),{label:o,value:c,onChange:s=m.noop,className:u,minHeight:d=100}=t,p=(0,g.useRef)(!1);return(0,g.useEffect)((()=>{if(!p.current)return;const e=x.get(`editor-${n}`),t=e?.getContent();t!==c&&e.setContent(c||"")}),[c,n]),(0,g.useEffect)((()=>{const{baseURL:e,suffix:t}=N.tinymce;function o(e){let t;c&&e.on("loadContent",(()=>e.setContent(c))),e.on("blur",(()=>{t=e.selection.getBookmark(2,!0);const n=document.querySelector(".interface-interface-skeleton__content"),o=n?.scrollTop;return s(e.getContent()),e.once("focus",(()=>{t&&(e.selection.moveToBookmark(t),n&&n?.scrollTop!==o&&(n.scrollTop=o||0))})),!1})),e.on("mousedown touchstart",(()=>{t=null}));const n=(0,a.debounce)((()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,s(t))}),250);e.on("Paste Change input Undo Redo",n),e.on("remove",n.cancel),e.on("keydown",(e=>{C.isKeyboardEvent.primary(e,"z")&&e.stopPropagation();const{altKey:t}=e;t&&e.keyCode===C.F10&&e.stopPropagation()})),e.on("init",(()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function l(){const{settings:e}=N.tinymce;k.oldEditor.initialize(`editor-${n}`,{tinymce:{...e,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${n}`,setup:o}})}function r(){"complete"===document.readyState&&l()}return p.current=!0,x.EditorManager.overrideDefaults({base_url:e,suffix:t}),"complete"===document.readyState?l():document.addEventListener("readystatechange",r),()=>{document.removeEventListener("readystatechange",r),k.oldEditor.remove(`editor-${n}`)}}),[]),(0,e.createElement)(r.BaseControl,{id:`freeform-edit-control-${n}`,label:o,className:l()(["component-freeform-edit-control",u])},(0,e.createElement)("div",{key:"toolbar",id:`toolbar-${n}`,className:"block-library-classic__toolbar",onClick:function(){const e=x.get(`editor-${n}`);e&&e.focus()},onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},"data-placeholder":(0,i.__)("Click here to edit this text.","content-control")}),(0,e.createElement)("div",{key:"editor",id:`editor-${n}`,style:{minHeight:d},className:"wp-block-freeform block-library-rich-text__tinymce"}))};var $=R,I=window.lodash,F=window.contentControl.coreData,T=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})),B=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),L=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})),O=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,e.createElement)(v.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),D=(0,g.forwardRef)((({icon:t,title:n,info:o,type:a,className:c,isSelected:s,onFocus:i=m.noop,onSelect:u=m.noop,...d},p)=>(0,e.createElement)(r.Button,{type:"button",className:l()(["suggestion",s&&"is-selected",c]),ref:p,onClick:u,onFocus:i,onMouseOver:i,"aria-selected":s,role:"option",tabIndex:-1,...d},t&&(0,e.createElement)(r.Icon,{icon:t,className:"suggestion-item-icon"}),(0,e.createElement)("span",{className:"suggestion-item-header"},(0,e.createElement)("span",{className:"suggestion-item-title"},n),o&&(0,e.createElement)("span",{"aria-hidden":"true",className:"suggestion-item-info"},o)),a&&(0,e.createElement)("span",{className:"suggestion-item-type"},a))));const P={id:-1,title:"",url:"",type:(0,i.__)("URL","content-control")},M=({id:t,label:n,value:o,onChange:c=(()=>{}),className:s=""},u)=>{var m,d;const h=(0,a.useInstanceId)(M),v=(0,g.useRef)(null),f=(0,g.useRef)(null),E=(0,g.useRef)(null),b=(0,g.useRef)(null),w=(0,g.useRef)(null),_=(0,g.useRef)([]);(0,g.useImperativeHandle)(u,(()=>E.current),[E]);const S="string"==typeof o?{...P,url:o}:null!=o?o:P,y={value:S,query:null!==(m=S.url)&&void 0!==m?m:"",isEditing:!1,isFocused:!1,selected:-1,showSuggestions:!1},[C,k]=(0,g.useState)(y),{value:x,query:N,isFocused:R,isEditing:$,selected:z,showSuggestions:A}=C,V=t||`url-input-control-${h}`,H=`url-input-control-suggestions-${h}`,j=`url-input-${h}-sug-`,{unfilteredSuggestions:U,isFetchingSuggestions:q}=(0,p.useSelect)((e=>({unfilteredSuggestions:e(F.urlSearchStore).getSuggestions(),isFetchingSuggestions:e(F.urlSearchStore).isDispatching("updateSuggestions")})),[]),{updateSuggestions:G}=(0,p.useDispatch)(F.urlSearchStore),K=(0,I.debounce)(G,200,{leading:!0}),Z=e=>k({...C,selected:e}),W=e=>{const t={...C,value:{...x,...e},query:"",isEditing:!1,isFocused:!0,selected:-1,showSuggestions:!1};k(t)};(0,g.useEffect)((()=>{S.url!==x.url&&c(x)}),[x,S.url,c]),(0,g.useEffect)((()=>{R&&($?E.current?.focus():w.current?.focus())}),[$,R]);const J=(0,g.useMemo)((()=>U.filter(((e,t)=>U.findIndex((t=>e.id===t.id))===t))),[U]).slice(0,10),Q=J.length,X=z>Q?0:z,Y={up:()=>k({...C,showSuggestions:0===N.length&&!A||A,selected:(0,I.clamp)(X-1>=0?X-1:Q,0,Q)}),down:()=>{k({...C,showSuggestions:0===N.length&&!A||A,selected:(0,I.clamp)(X+1<=Q?X+1:0,0,Q)})},"alt+down":()=>k({...C,showSuggestions:!0}),enter:e=>{e.preventDefault(),A&&X>-1&&X!==Q?W(J[X]):x.url===N?k({...C,isEditing:!1,query:"",showSuggestions:!1,selected:-1}):W({title:(0,i.__)("Custom URL","content-control"),type:"URL",url:N})},escape:e=>{e.preventDefault(),e.stopPropagation(),k({...C,selected:-1,showSuggestions:!1})}};return(0,e.createElement)(r.BaseControl,{id:V,label:n,className:l()(["components-url-control",R&&"is-focused",s])},(0,e.createElement)("div",{ref:v,onFocus:()=>{k({...C,isFocused:!0,showSuggestions:N.length>=1})},onBlur:e=>{if(!v.current?.contains(e.relatedTarget)&&!b.current?.contains(e.relatedTarget)){const e={...C,selected:-1,isFocused:!1,showSuggestions:!1};$&&(e.isEditing=!1,e.value=z>-1?J[z]:{title:(0,i.__)("Custom URL"),type:"URL",url:N}),k(e)}}},!$&&S.url.length>0?(0,e.createElement)("div",{className:"suggestion"},(0,e.createElement)(r.Icon,{icon:T,className:"suggestion-item-icon"}),(0,e.createElement)("span",{className:"suggestion-item-header"},(0,e.createElement)("span",{className:"suggestion-item-title"},(0,e.createElement)(e.Fragment,null,null!==(d=x?.title)&&void 0!==d?d:x?.url)),(0,e.createElement)("span",{"aria-hidden":"true",className:"suggestion-item-info"},x.url)),(0,e.createElement)(r.Button,{"aria-label":(0,i.__)("Edit","content-control"),icon:B,onClick:()=>{k({...C,isEditing:!0,isFocused:!0,query:S.url})},ref:w})):(0,e.createElement)(r.KeyboardShortcuts,{shortcuts:Y},(0,e.createElement)("div",{className:l()(["url-control-wrapper"]),ref:f},(0,e.createElement)("div",{className:"url-control"},(0,e.createElement)(r.Icon,{icon:L,className:"url-control__input-icon"}),(0,e.createElement)("input",{id:V,className:"url-control__input",ref:E,type:"text",role:"combobox",placeholder:(0,i.__)("Search or type url","content-control"),value:N,onChange:e=>{return t=e.target.value,k({...C,query:t,showSuggestions:t.length>=1}),void K(t.trim(),{type:["post","term"]});var t},autoComplete:"off","aria-autocomplete":"list","aria-controls":H,"aria-expanded":A,"aria-activedescendant":X>=0?`${j}-${X}`:void 0,"aria-label":n?void 0:(0,i.__)("URL")}),(0,e.createElement)("div",{className:"url-control__actions"},q&&(0,e.createElement)(r.Spinner,null),(0,e.createElement)(r.Button,{icon:O,iconSize:30,onClick:()=>W({title:(0,i.__)("Custom URL","content-control"),type:"URL",url:N})}))),A&&J.length>0&&(0,e.createElement)(r.Popover,{ref:b,focusOnMount:!1,onClose:()=>Z(-1),position:"bottom right",anchor:f.current,className:"suggestions-popover"},(0,e.createElement)("div",{className:"suggestions",id:H,role:"listbox"},J.map(((t,n)=>(0,e.createElement)(D,{key:t.id,id:`${j}-${n}`,title:t.title,info:t.url,type:t.type,isSelected:n===X,onSelect:()=>W(t),onFocus:()=>Z(n),ref:e=>{_.current[n]=e}}))),N.length>0&&(0,e.createElement)(D,{key:"use-current-input-text",id:`${j}-${Q}`,icon:T,title:N,info:(0,i.__)("Press ENTER to add this link","content-control"),type:(0,i.__)("URL","content-control"),className:"is-url",isSelected:Q===X,onSelect:()=>W({title:(0,i.__)("Custom URL","content-control"),type:"URL",url:N}),onFocus:()=>{Z(Q)},ref:e=>{_.current[Q]=e}})))))))};var z=(0,g.forwardRef)(M),A=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})),V=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"}));function H(e,t,n){const[o,l]=(0,g.useState)(e||t),r=(0,g.useRef)(void 0!==e),a=r.current,c=void 0!==e,s=(0,g.useRef)(o);a!==c&&console.warn(`WARN: A component changed from ${a?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}.`),r.current=c;const i=(0,g.useCallback)(((e,...t)=>{const o=(e,...t)=>{n&&(Object.is(s.current,e)||n(e,...t)),c||(s.current=e)};"function"==typeof e?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),l(((n,...l)=>{const r=e(c?s.current:n,...l);return o(r,...t),c?n:r}))):(c||l(e),o(e,...t))}),[c,n]);return c?s.current=e:e=o,[e,i]}const j=({heading:t=!1,children:n,...o})=>t?(0,e.createElement)("th",{...o},n):(0,e.createElement)("td",{...o},n);var U=({items:t,columns:n,sortableColumns:o=[],idCol:a="id",rowClasses:c=(e=>[`item-${e.id}`]),renderCell:s=((e,t)=>t[e]),noItemsText:u=(0,i.__)("No items found.","content-control"),showBulkSelect:m=!0,className:d,selectedItems:p=[],onSelectItems:h=(()=>{})})=>{var v;const f={[a]:null!==(v=n[a])&&void 0!==v?v:"",...n},E=Object.keys(f).length,[b,w]=H(p,[],h),[_,S]=(0,g.useState)(o.length?o[0]:null),[y,C]=(0,g.useState)("ASC");(0,g.useEffect)((()=>{h(b)}),[b,h]);const k=_?t.sort(((e,t)=>"ASC"===y?e[_]>t[_]?1:-1:t[_]>e[_]?1:-1)):t,x=({header:n=!1})=>(0,e.createElement)(e.Fragment,null,Object.entries(f).map((([c,s])=>{const i=m&&c===a,u=c===_,d=!i&&o.indexOf(c)>=0,p={key:c,heading:!i,id:n&&!i?c:void 0,scope:i?void 0:"col",className:l()([`column-${c}`,...!i&&d?["sortable",y.toLowerCase()]:[],i&&"check-column"])},g=()=>(0,e.createElement)(e.Fragment,null,"function"==typeof s?s():(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,s),u&&(0,e.createElement)(r.Icon,{icon:"ASC"===y?A:V,size:16})));return(0,e.createElement)(j,{...p,key:c},i&&(0,e.createElement)(r.CheckboxControl,{onChange:e=>w(e?t.map((e=>e.id)):[]),checked:b.length>0&&b.length===t.length,indeterminate:b.length>0&&b.length<t.length}),!i&&d&&(0,e.createElement)(r.Button,{variant:"link",onClick:()=>{_===c?C("ASC"===y?"DESC":"ASC"):(S(c),C("ASC"))}},(0,e.createElement)(g,null)),!i&&!d&&(0,e.createElement)(g,null))})));return(0,e.createElement)("table",{className:l()([d,"component-list-table","list-table",0===k.length&&"no-items"])},(0,e.createElement)("thead",null,(0,e.createElement)("tr",null,(0,e.createElement)(x,{header:!0}))),(0,e.createElement)("tbody",null,k.length?k.map(((t,n)=>(0,e.createElement)("tr",{key:t.id,className:l()(c(t))},Object.entries(f).map((([o])=>{const c=o===a;return(0,e.createElement)(j,{key:o,heading:c,className:l()([`column-${o}`,m&&c&&"check-column"]),scope:c?"row":void 0},c?(0,e.createElement)(r.CheckboxControl,{onChange:e=>{const n=e?[...b,t.id]:b.filter((e=>e!==t.id));w(n)},checked:b.indexOf(t.id)>=0}):s(o,t,n))}))))):(0,e.createElement)("tr",null,(0,e.createElement)("td",{colSpan:E},u))),(0,e.createElement)("tfoot",null,(0,e.createElement)("tr",null,(0,e.createElement)(x,null))))},q=t=>{const{text:n="",highlight:o=""}=t,l=(Array.isArray(o)?o:[o]).map((e=>e.trim())).filter((e=>!!e)).map((e=>(0,I.escapeRegExp)(e)));if(!l.length)return(0,e.createElement)(e.Fragment,null,n);const r=new RegExp(`(${l.join("|")})`,"gi");return(0,g.createInterpolateElement)(n.replace(r,"<mark>$&</mark>"),{mark:(0,e.createElement)("mark",null)})};const G=({id:t,label:n,value:o,onChange:c,className:s,options:i=[],orientation:u="horizontal",equalWidth:m=!1,spacing:d,hideLabelFromVision:p=!1})=>{const g=(0,a.useInstanceId)(G);return(0,e.createElement)(r.BaseControl,{id:t||`radio-button-control-${g}`,label:n,className:l()("components-radio-button-control",u,m&&"equal-width",s),hideLabelFromVision:p},(0,e.createElement)("div",{className:"options",style:d?{gap:`${d}px`}:void 0},i.map((({label:t,value:n})=>(0,e.createElement)(r.Button,{key:n,variant:n===o?"primary":"secondary",onClick:()=>c(n)},t)))))};var K=G,Z=(0,e.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(v.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),W=(0,e.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(v.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const J=({label:t="",placeholder:n="",searchIcon:o,value:c=[],options:s=[],onChange:u=(()=>{}),className:m=""})=>{const d=(0,a.useInstanceId)(J),[p,h]=(0,g.useState)(""),[v,f]=(0,g.useState)("ASC"),E=e=>-1!==c.indexOf(e),b=e=>u(E(e)?[...c.filter((t=>t!==e))]:[...c,e]),w=s.filter((({label:e,value:t,keywords:n})=>e.includes(p)||"string"==typeof t&&t.includes(p)||n&&n.includes(p))),_=w.sort(((e,t)=>"ASC"===v?e.label>t.label?1:-1:t.label>e.label?1:-1));return(0,e.createElement)(r.BaseControl,{id:`searchable-multicheck-control-${d}`,label:t,className:l()(["component-searchable-multicheck-control",m])},(0,e.createElement)("div",{className:"select-actions"},(0,e.createElement)(r.Button,{variant:"link",text:(0,i.__)("Select All","content-control"),onClick:()=>{const e=w.map((({value:e})=>e)),t=[...c,...e];u([...new Set(t)])}}),(0,e.createElement)(r.Button,{variant:"link",text:(0,i.__)("Deselect All","content-control"),onClick:()=>{const e=w.map((({value:e})=>e)),t=[...c.filter((t=>-1===e.indexOf(t)))];u([...new Set(t)])}})),(0,e.createElement)("div",{className:l()([o?"icon-input":null])},(0,e.createElement)("input",{type:"text",className:"components-text-control__input",placeholder:n,value:p,onChange:e=>h(e.target.value)}),o&&(0,e.createElement)(r.Icon,{icon:o})),(0,e.createElement)("table",null,(0,e.createElement)("thead",null,(0,e.createElement)("tr",null,(0,e.createElement)("th",{className:"label-column"},(0,e.createElement)(r.Button,{text:(0,i.__)("Name","content-control"),onClick:()=>f("DESC"===v?"ASC":"DESC"),icon:"DESC"===v?Z:W,iconPosition:"right"})),(0,e.createElement)("td",{className:"cb-column"}))),(0,e.createElement)("tbody",null,_.map((({label:t,value:n})=>(0,e.createElement)("tr",{key:n.toString()},(0,e.createElement)("td",null,(0,e.createElement)("span",{role:"button",tabIndex:-1,onClick:()=>b(n),onKeyDown:()=>{}},t)),(0,e.createElement)("th",{className:"cb-column"},(0,e.createElement)(r.CheckboxControl,{checked:E(n),onChange:()=>b(n)}))))))))};var Q=J}(),(window.contentControl=window.contentControl||{}).components=o}(); -
content-control/tags/2.6.1/dist/fields.asset.php
r3052982 r3256177 1 <?php return array('dependencies' => array('content-control-components', 'content-control-utils', 'react', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n'), 'version' => ' b80778b8bb769e7642fe');1 <?php return array('dependencies' => array('content-control-components', 'content-control-utils', 'react', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n'), 'version' => '76c6247f3b49cae646c0'); -
content-control/tags/2.6.1/dist/fields.js
r3052982 r3256177 1 !function(){var e={184:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var l=typeof n;if("string"===l||"number"===l)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===l){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)o.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var l=t[o]={exports:{}};return e[o](l,l.exports,n),l.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o),n.d(o,{CheckboxField:function(){return r},ColorField:function(){return l},DateField:function(){return a},Field:function(){return v},FieldContextProvider:function(){return P},Fields:function(){return g},FieldsContext:function(){return I},MeasureField:function(){return f},MulticheckField:function(){return h},NumberField:function(){return b},ObjectSelectField:function(){return _},RadioField:function(){return F},RangeSliderField:function(){return S},SelectField:function(){return T},TextAreaField:function(){return N},TextField:function(){return O},TokenSelectField:function(){return M},useFields:function(){return R}});var e=window.React,t=window.wp.components,r=({value:n,onChange:o,label:r,...l})=>(0,e.createElement)(t.CheckboxControl,{...l,label:r,checked:n,onChange:o}),l=({value:n="",onChange:o,...r})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t.ColorIndicator,{colorValue:n}),(0,e.createElement)(t.ColorPicker,{...r,color:n,onChangeComplete:e=>{var t;return o(null!==(t=e?.hex)&&void 0!==t?t:e)}}),(0,e.createElement)(t.ColorPalette,{value:n,onChange:e=>{o(null!=e?e:"")},colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],clearable:!0})),a=({value:n,onChange:o,...r})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t.BaseControl,{...r,__nextHasNoMarginBottom:!0,hideLabelFromVision:!0},(0,e.createElement)("input",{type:"date",value:n,onChange:e=>o(e.target.value)}))),s=n(184),i=n.n(s),c=window.wp.i18n,u=window.contentControl.utils;window.wp.htmlEntities;const p=e=>"string"==typeof e?e.split(",").map((e=>({label:e,value:e}))):Array.isArray(e)||"object"!=typeof e?e.map((e=>"string"==typeof e?{label:e,value:e}:e)):Object.entries(e).map((([e,t])=>({label:t,value:e}))),d=t=>{var n,o,r,l,a,s;let c;switch(c=function(e){const t={...e};return!(!t||"object"!=typeof t||void 0===t?.std&&void 0===t?.user_roles&&(void 0===t?.type||"userselect"!==t?.type)&&void 0===t?.taxonomy&&void 0===t?.post_type)}(t)?(t=>{var n,o,r,l,a,s,c;const d={type:"select2"!==t.type?t.type:"select",default:t.std,id:null!==(n=null!==(o=t.id)&&void 0!==o?o:t.name)&&void 0!==n?n:"",...(0,u.pick)(t,"id","name","label","value","required","dependencies")},m=[];switch(void 0!==t.classes&&("string"==typeof t.classes?m.push(...t.classes.split(" ")):Array.isArray(t.classes)&&m.push(...t.classes)),void 0!==t.class&&m.push(t.class),d.className=i()(m),t.dynamic_desc?d.help=(0,e.createElement)(e.Fragment,null,t.dynamic_desc):t.desc&&(d.help=t.desc),d.type){case"checkbox":case"hidden":case"license_key":return d;case"color":return{...d,default:null!==(r=t.value)&&void 0!==r?r:""};case"text":case"email":case"tel":case"password":default:return{...d,...d.type===t.type&&{size:t?.size,placeholder:t?.placeholder}};case"radio":case"multicheck":return{...d,options:[],...d.type===t.type&&{options:null!==(l=t.options)&&void 0!==l?l:[]}};case"select":case"multiselect":var v;return d.type!==t.type&&"select2"!==t.type||(d.options=p(null!==(v=t.options)&&void 0!==v?v:[]),d.searchable="select2"===t.type,d.multiple="multiselect"===d.type||t.multiple),{options:[],...d};case"tokenselect":return{value:[],options:{},...d};case"number":case"rangeslider":return{...d,...d.type===t.type&&{size:t?.size,placeholder:t?.placeholder,min:t?.min,max:t?.max,step:t?.step}};case"measure":return{...d,units:{},...d.type===t.type&&{size:t?.size,placeholder:t?.placeholder,min:t?.min,max:t?.max,step:t?.step,units:null!==(a=t?.units)&&void 0!==a?a:{}}};case"objectselect":case"postselect":case"taxonomyselect":case"userselect":d.type="objectselect",d.multiple=null!==(s=t?.multiple)&&void 0!==s&&s,d.placeholder=null!==(c=t?.placeholder)&&void 0!==c?c:"";let e="postType",n="";var g;if("postselect"===t.type)e="postType",n=null!==(g=t?.post_type)&&void 0!==g?g:"post";else if("taxonomyselect"===t.type){var y;e="taxonomy",n=null!==(y=t?.taxonomy)&&void 0!==y?y:"category"}else if("userselect"===t.type)e="user",n="user";else{var f;e=t?.post_type?"postType":"taxonomy",n=null!==(f=t?.post_type)&&void 0!==f?f:t?.taxonomy}return{...d,entityKind:e,entityType:n};case"textarea":return{...d,...d.type===t.type&&{allowHtml:t?.allow_html}}}})(t):t,c.type){case"checkbox":case"color":case"radio":case"rangeslider":case"number":default:case"email":case"tel":case"hidden":case"text":case"password":case"license_key":case"measure":case"textarea":return{...c};case"multicheck":return{...c,options:null!==(n=c.options)&&void 0!==n?n:[]};case"select":return{...c,options:null!==(o=c.options)&&void 0!==o?o:[]};case"multiselect":return{...c,options:null!==(r=c.options)&&void 0!==r?r:[],multiple:!0};case"objectselect":case"postselect":case"taxonomyselect":case"userselect":return{...c,entityKind:null!==(l=c.entityKind)&&void 0!==l?l:""};case"tokenselect":return{...c,value:null!==(a=c.value)&&void 0!==a?a:[],options:null!==(s=c.options)&&void 0!==s?s:[]}}},m=t=>{const{type:n}=t;switch(n){case"checkbox":return(0,e.createElement)(r,{...t});case"color":return(0,e.createElement)(l,{...t});case"date":return(0,e.createElement)(a,{...t});case"measure":return(0,e.createElement)(f,{...t});case"multicheck":return(0,e.createElement)(h,{...t});case"select":case"multiselect":return(0,e.createElement)(T,{...t});case"objectselect":case"postselect":case"taxonomyselect":case"userselect":return(0,e.createElement)(_,{...t});case"radio":return(0,e.createElement)(F,{...t});case"rangeslider":return(0,e.createElement)(S,{...t});case"number":return(0,e.createElement)(b,{...t});case"email":case"tel":case"hidden":case"text":case"password":return(0,e.createElement)(O,{...t});case"textarea":return(0,e.createElement)(N,{...t});case"tokenselect":return(0,e.createElement)(M,{...t})}return(0,e.createElement)(e.Fragment,null,(0,c.sprintf)(/* translators: 1. type of field not found. */2 (0,c.__)("Field type `%s` not found","content-control"),n))};var v=t=>{const{type:n,className:o,onChange: r}=t;return(0,e.createElement)("div",{className:i()(["cc-field",`cc-field--${n}`,o])},(0,e.createElement)(m,{onChange:r,...d(t)}))},g=t=>{const{fields:n}=t;return(0,e.createElement)(e.Fragment,null,n.map(((t,n)=>(0,e.createElement)(v,{key:n,...t}))))},y=window.wp.element,f=({value:n,onChange:o,units:r,...l})=>{var a;const s=n?parseInt(n):"",[i,c]=(0,y.useState)({number:s,unit:null!==(a=n?.replace(`${s}`,""))&&void 0!==a?a:""});(0,y.useEffect)((()=>{o(`${i.number}${i.unit}`)}),[i,o]);const u=Object.entries(r).map((([e,t])=>({value:e,label:t})));return(0,e.createElement)(t.__experimentalUnitControl,{...l,value:n,onChange:(e="0")=>c({...i,number:e}),disableUnits:0===u.length,units:u,onUnitChange:(e="")=>c({...i,unit:e}),__nextHasNoMarginBottom:!0})},h=({value:n,onChange:o,...r})=>{const l=null!=n?n:[],a=p(r.options),s=null!=n?n:[];return(0,e.createElement)((()=>(0,e.createElement)(e.Fragment,null,a.map((({label:n,value:r})=>{const a=l.indexOf(r)>=0;return(0,e.createElement)(t.CheckboxControl,{key:r,label:n,checked:a,onChange:()=>o(a?s.filter((e=>r!==e)):[...s,r])})})))),null)},b=({value:n,onChange:o,...r})=>(0,e.createElement)(t.__experimentalNumberControl,{...r,value:n,onChange:(e="0")=>o(parseInt(e,10)),__nextHasNoMarginBottom:!0}),C=window.wp.data,x=window.wp.compose,w=window.wp.coreData,E=window.contentControl.components,_=({label:t,value:n,onChange:o,entityKind:r="postType",entityType:l="post",multiple:a=!1})=>{const[s,i]=(0,y.useState)(""),u=(0,x.useDebounce)((e=>{i(e)}),300),{prefill:p=[]}=(0,C.useSelect)((e=>({prefill:n?e(w.store).getEntityRecords(r,l,{context:"view",include:n,per_page:-1}):[]})),[n,r,l]),{suggestions:d=[],isSearching:m=!1}=(0,C.useSelect)((e=>({suggestions:"user"===r?e(w.store).getUsers({context:"view",search:s,per_page:-1}):e(w.store).getEntityRecords(r,l,{context:"view",search:s,per_page:-1}),isSearching:"user"===r?e("core/data").isResolving("core","getUsers",[r,l,{context:"view",search:s,per_page:-1}]):e("core/data").isResolving("core","getEntityRecords",[r,l,{context:"view",search:s,per_page:-1}])})),[s,r,l]),v=e=>d&&d.find((t=>t.id.toString()===e.toString()))||p&&p.find((t=>t.id.toString()===e.toString())),g=n?"number"==typeof n||"string"==typeof n?[n]:n:[],f=e=>"object"==typeof e?e.value:e;return(0,e.createElement)("div",{className:"cc-object-search-field"},(0,e.createElement)(E.SmartTokenControl,{label:t||(0,c.sprintf)(1 !function(){var e={184:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function l(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var a=l.apply(null,n);a&&e.push(a)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)o.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(l.default=l,e.exports=l):void 0===(n=function(){return l}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var l=t[o];if(void 0!==l)return l.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o),n.d(o,{CheckboxField:function(){return l},ColorField:function(){return r},DateField:function(){return a},Field:function(){return v},FieldContextProvider:function(){return P},Fields:function(){return g},FieldsContext:function(){return I},MeasureField:function(){return f},MulticheckField:function(){return h},NumberField:function(){return b},ObjectSelectField:function(){return _},RadioField:function(){return F},RangeSliderField:function(){return S},SelectField:function(){return T},TextAreaField:function(){return N},TextField:function(){return O},TokenSelectField:function(){return M},useFields:function(){return R}});var e=window.React,t=window.wp.components,l=({value:n,onChange:o,label:l,...r})=>(0,e.createElement)(t.CheckboxControl,{...r,label:l,checked:n,onChange:o}),r=({value:n="",onChange:o,...l})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t.ColorIndicator,{colorValue:n}),(0,e.createElement)(t.ColorPicker,{...l,color:n,onChangeComplete:e=>{var t;return o(null!==(t=e?.hex)&&void 0!==t?t:e)}}),(0,e.createElement)(t.ColorPalette,{value:n,onChange:e=>{o(null!=e?e:"")},colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],clearable:!0})),a=({value:n,onChange:o,...l})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t.BaseControl,{...l,__nextHasNoMarginBottom:!0,hideLabelFromVision:!0},(0,e.createElement)("input",{type:"date",value:n,onChange:e=>o(e.target.value)}))),s=n(184),i=n.n(s),c=window.wp.i18n,u=window.contentControl.utils;window.wp.htmlEntities;const p=e=>"string"==typeof e?e.split(",").map((e=>({label:e,value:e}))):Array.isArray(e)||"object"!=typeof e?e.map((e=>"string"==typeof e?{label:e,value:e}:e)):Object.entries(e).map((([e,t])=>({label:t,value:e}))),d=t=>{var n,o,l,r,a,s;let c;switch(c=function(e){const t={...e};return!(!t||"object"!=typeof t||void 0===t?.std&&void 0===t?.user_roles&&(void 0===t?.type||"userselect"!==t?.type)&&void 0===t?.taxonomy&&void 0===t?.post_type)}(t)?(t=>{var n,o,l,r,a,s,c;const d={type:"select2"!==t.type?t.type:"select",default:t.std,id:null!==(n=null!==(o=t.id)&&void 0!==o?o:t.name)&&void 0!==n?n:"",...(0,u.pick)(t,"id","name","label","value","required","dependencies")},m=[];switch(void 0!==t.classes&&("string"==typeof t.classes?m.push(...t.classes.split(" ")):Array.isArray(t.classes)&&m.push(...t.classes)),void 0!==t.class&&m.push(t.class),d.className=i()(m),t.dynamic_desc?d.help=(0,e.createElement)(e.Fragment,null,t.dynamic_desc):t.desc&&(d.help=t.desc),d.type){case"checkbox":case"hidden":case"license_key":return d;case"color":return{...d,default:null!==(l=t.value)&&void 0!==l?l:""};case"text":case"email":case"tel":case"password":default:return{...d,...d.type===t.type&&{size:t?.size,placeholder:t?.placeholder}};case"radio":case"multicheck":return{...d,options:[],...d.type===t.type&&{options:null!==(r=t.options)&&void 0!==r?r:[]}};case"select":case"multiselect":var v;return d.type!==t.type&&"select2"!==t.type||(d.options=p(null!==(v=t.options)&&void 0!==v?v:[]),d.searchable="select2"===t.type,d.multiple="multiselect"===d.type||t.multiple),{options:[],...d};case"tokenselect":return{value:[],options:{},...d};case"number":case"rangeslider":return{...d,...d.type===t.type&&{size:t?.size,placeholder:t?.placeholder,min:t?.min,max:t?.max,step:t?.step}};case"measure":return{...d,units:{},...d.type===t.type&&{size:t?.size,placeholder:t?.placeholder,min:t?.min,max:t?.max,step:t?.step,units:null!==(a=t?.units)&&void 0!==a?a:{}}};case"objectselect":case"postselect":case"taxonomyselect":case"userselect":d.type="objectselect",d.multiple=null!==(s=t?.multiple)&&void 0!==s&&s,d.placeholder=null!==(c=t?.placeholder)&&void 0!==c?c:"";let e="postType",n="";var g;if("postselect"===t.type)e="postType",n=null!==(g=t?.post_type)&&void 0!==g?g:"post";else if("taxonomyselect"===t.type){var y;e="taxonomy",n=null!==(y=t?.taxonomy)&&void 0!==y?y:"category"}else if("userselect"===t.type)e="user",n="user";else{var f;e=t?.post_type?"postType":"taxonomy",n=null!==(f=t?.post_type)&&void 0!==f?f:t?.taxonomy}return{...d,entityKind:e,entityType:n};case"textarea":return{...d,...d.type===t.type&&{allowHtml:t?.allow_html}}}})(t):t,c.type){case"checkbox":case"color":case"radio":case"rangeslider":case"number":default:case"email":case"tel":case"hidden":case"text":case"password":case"license_key":case"measure":case"textarea":return{...c};case"multicheck":return{...c,options:null!==(n=c.options)&&void 0!==n?n:[]};case"select":return{...c,options:null!==(o=c.options)&&void 0!==o?o:[]};case"multiselect":return{...c,options:null!==(l=c.options)&&void 0!==l?l:[],multiple:!0};case"objectselect":case"postselect":case"taxonomyselect":case"userselect":return{...c,entityKind:null!==(r=c.entityKind)&&void 0!==r?r:""};case"tokenselect":return{...c,value:null!==(a=c.value)&&void 0!==a?a:[],options:null!==(s=c.options)&&void 0!==s?s:[]}}},m=t=>{const{type:n}=t;switch(n){case"checkbox":return(0,e.createElement)(l,{...t});case"color":return(0,e.createElement)(r,{...t});case"date":return(0,e.createElement)(a,{...t});case"measure":return(0,e.createElement)(f,{...t});case"multicheck":return(0,e.createElement)(h,{...t});case"select":case"multiselect":return(0,e.createElement)(T,{...t});case"objectselect":case"postselect":case"taxonomyselect":case"userselect":return(0,e.createElement)(_,{...t});case"radio":return(0,e.createElement)(F,{...t});case"rangeslider":return(0,e.createElement)(S,{...t});case"number":return(0,e.createElement)(b,{...t});case"email":case"tel":case"hidden":case"text":case"password":return(0,e.createElement)(O,{...t});case"textarea":return(0,e.createElement)(N,{...t});case"tokenselect":return(0,e.createElement)(M,{...t})}return(0,e.createElement)(e.Fragment,null,(0,c.sprintf)(/* translators: 1. type of field not found. */ 2 (0,c.__)("Field type `%s` not found","content-control"),n))};var v=t=>{const{type:n,className:o,onChange:l}=t;return(0,e.createElement)("div",{className:i()(["cc-field",`cc-field--${n}`,o])},(0,e.createElement)(m,{onChange:l,...d(t)}))},g=t=>{const{fields:n}=t;return(0,e.createElement)(e.Fragment,null,n.map(((t,n)=>(0,e.createElement)(v,{key:n,...t}))))},y=window.wp.element,f=({value:n,onChange:o,units:l,...r})=>{var a;const s=n?parseInt(n):"",[i,c]=(0,y.useState)({number:s,unit:null!==(a=n?.replace(`${s}`,""))&&void 0!==a?a:""});(0,y.useEffect)((()=>{o(`${i.number}${i.unit}`)}),[i,o]);const u=Object.entries(l).map((([e,t])=>({value:e,label:t})));return(0,e.createElement)(t.__experimentalUnitControl,{...r,value:n,onChange:(e="0")=>c({...i,number:e}),disableUnits:0===u.length,units:u,onUnitChange:(e="")=>c({...i,unit:e}),__nextHasNoMarginBottom:!0})},h=({value:n,onChange:o,...l})=>{const r=null!=n?n:[],a=p(l.options),s=null!=n?n:[];return(0,e.createElement)((()=>(0,e.createElement)(e.Fragment,null,a.map((({label:n,value:l})=>{const a=r.indexOf(l)>=0;return(0,e.createElement)(t.CheckboxControl,{key:l,label:n,checked:a,onChange:()=>o(a?s.filter((e=>l!==e)):[...s,l])})})))),null)},b=({value:n,onChange:o,...l})=>(0,e.createElement)(t.__experimentalNumberControl,{...l,value:n,onChange:(e="0")=>o(parseInt(e,10)),__nextHasNoMarginBottom:!0}),C=window.wp.data,x=window.wp.compose,E=window.wp.coreData,w=window.contentControl.components,_=({label:t,value:n,onChange:o,entityKind:l="postType",entityType:r="post",multiple:a=!1})=>{const[s,i]=(0,y.useState)(""),u=(0,x.useDebounce)((e=>{i(e)}),300),p=()=>"postType"===l?"id,title,name,type":"taxonomy"===l?"id,name,slug,taxonomy":null,d={context:"view",per_page:-1,...null!==p()?{_fields:p()}:{}},{prefill:m=[]}=(0,C.useSelect)((e=>({prefill:n?e(E.store).getEntityRecords(l,r,{...d,include:n}):[]})),[n,l,r]),{suggestions:v=[],isSearching:g=!1}=(0,C.useSelect)((e=>({suggestions:"user"===l?e(E.store).getUsers({...d,search:s}):e(E.store).getEntityRecords(l,r,{...d,search:s}),isSearching:"user"===l?e("core/data").isResolving("core","getUsers",[l,r,{...d,search:s}]):e("core/data").isResolving("core","getEntityRecords",[l,r,{...d,search:s}])})),[s,l,r]),f=e=>v&&v.find((t=>t.id.toString()===e.toString()))||m&&m.find((t=>t.id.toString()===e.toString())),h=n?"number"==typeof n||"string"==typeof n?[n]:n:[],b=e=>"object"==typeof e?e.value:e;return(0,e.createElement)("div",{className:"cc-object-search-field"},(0,e.createElement)(w.SmartTokenControl,{label:t||(0,c.sprintf)( 3 3 // translators: %s: entity type. 4 (0,c.__)("%s(s)","content-control"), l.replace(/_/g," ").charAt(0).toUpperCase()+l.replace(/_/g," ").slice(1)),hideLabelFromVision:!0,multiple:a,placeholder:(0,c.sprintf)(4 (0,c.__)("%s(s)","content-control"),r.replace(/_/g," ").charAt(0).toUpperCase()+r.replace(/_/g," ").slice(1)),hideLabelFromVision:!0,multiple:a,placeholder:(0,c.sprintf)( 5 5 // translators: %s: entity type. 6 (0,c.__)("Select %s(s)","content-control"), l.replace(/_/g," ").toLowerCase()),tokenOnComma:!0,value:g.map((e=>e.toString())),onInputChange:u,onChange:e=>{o(e.map((e=>parseInt(f(e),10))).filter((e=>!isNaN(e))))},renderToken:e=>{const t=v(f(e));return t?"postType"===r?t.title.rendered:t.name:f(e)},renderSuggestion:t=>{var n;const o=v(t);return o?(0,e.createElement)(e.Fragment,null,"postType"===r?null!==(n=o.title.rendered)&&void 0!==n?n:o.title.raw:o.name):t},suggestions:d?d.map((e=>{var t;return null!==(t=e?.id.toString())&&void 0!==t&&t})):[],messages:m?{noSuggestions:(0,c.__)("Searching…","content-control")}:void 0}))},F=({value:n,onChange:o,...r})=>{const l=r.options;return(0,e.createElement)(t.RadioControl,{...r,selected:n?.toString(),options:l,onChange:o,__nextHasNoMarginBottom:!0})},S=({value:n,onChange:o,initialPosition:r=0,...l})=>{const{step:a}=l;return(0,e.createElement)(t.RangeControl,{value:null!=n?n:r,onChange:(e=0)=>o(e),withInputField:!0,__nextHasNoMarginBottom:!0,type:a?"stepper":void 0})};const k=({options:t})=>(0,e.createElement)(e.Fragment,null,p(t).map((({label:t,value:n})=>(0,e.createElement)("option",{key:n,value:n},t)))),j=({optGroups:t})=>(0,e.createElement)(e.Fragment,null,Object.entries(t).map((([t,n])=>(0,e.createElement)("optgroup",{key:t,label:t},(0,e.createElement)(k,{options:n})))));var T=({value:n,onChange:o,...r})=>{var l;const{multiple:a=!1}=r,s=null!==(l=r.options)&&void 0!==l?l:{};return(0,e.createElement)(t.SelectControl,{...r,multiple:a,value:a&&"string"==typeof n?n.split(","):n,onChange:o,__nextHasNoMarginBottom:!0},(e=>Object.entries(e).reduce(((e,[t,n])=>!0===e?e:"string"==typeof t&&!(parseInt(t)>=0)&&"object"==typeof n),!1))(s)?(0,e.createElement)(j,{optGroups:s}):(0,e.createElement)(k,{options:s}))},N=({value:n,onChange:o,rows:r=5,...l})=>(0,e.createElement)(t.TextareaControl,{...l,value:null!=n?n:"",onChange:o,rows:r,__nextHasNoMarginBottom:!0}),O=({type:n,value:o,onChange:r,...l})=>(0,e.createElement)(t.TextControl,{...l,type:"hidden"!==n?n:void 0,value:null!=o?o:"",onChange:r,__nextHasNoMarginBottom:!0}),M=({label:t,value:n,onChange:o,multiple:r=!1,placeholder:l=(0,c.__)("Search","content-control"),options:a={}})=>{const[s,i]=(0,y.useState)(""),u=n?"number"==typeof n||"string"==typeof n?[n]:n:[],p=Object.keys(a).filter((e=>!s||e.toLowerCase().includes(s.toLowerCase()))),d=e=>{var t;const n="object"==typeof e?e.value:e;return(null!==(t=a[n])&&void 0!==t?t:null)||n};return(0,e.createElement)("div",{className:"cc-token-select-field"},(0,e.createElement)(E.SmartTokenControl,{label:t,hideLabelFromVision:!0,multiple:r,placeholder:l,value:u.map((e=>e.toString())),onInputChange:i,onChange:e=>o(e),renderToken:d,renderSuggestion:d,suggestions:p}))},V=window.wp.hooks;const I=(0,y.createContext)({context:"",fields:[],values:{},setValues:()=>{}}),P=({context:t,fields:n,values:o,setValues:r,children:l})=>(0,e.createElement)(I.Provider,{value:{context:t,fields:n,values:o,setValues:r}},l);var R=()=>{const{context:e,fields:t=[],values:n,setValues:o}=(0,y.useContext)(I),r=t=>{const o=(0,V.applyFilters)(`${e}.fieldIsVisible`,void 0,t,n);return void 0===o||o};return{context:e,fields:t,values:n,setValues:o,getFields:(n={visible:!0})=>{const o=(null!=t?t:[]).filter((e=>!(n?.tab&&e.tab!==n.tab||n?.section&&e.section!==n.section||n?.panel&&e.panel!==n.panel||n?.visible&&!r(e.id)))).sort(((e,t)=>e.priority-t.priority)).map((t=>{const n=(0,V.applyFilters)(`${e}.renderField`,t.component,t.id,t);return{...t,component:n}}));return(0,V.applyFilters)(`${e}.getFields`,o,n)},updateField:(e,t)=>{o({...n,[e]:t})},fieldIsVisible:r}}}(),(window.contentControl=window.contentControl||{}).fields=o}();6 (0,c.__)("Select %s(s)","content-control"),r.replace(/_/g," ").toLowerCase()),tokenOnComma:!0,value:h.map((e=>e.toString())),onInputChange:u,onChange:e=>{o(e.map((e=>parseInt(b(e),10))).filter((e=>!isNaN(e))))},renderToken:e=>{const t=f(b(e));return t?"postType"===l?t.title.rendered:t.name:b(e)},renderSuggestion:t=>{var n;const o=f(t);return o?(0,e.createElement)(e.Fragment,null,"postType"===l?null!==(n=o.title.rendered)&&void 0!==n?n:o.title.raw:o.name):t},suggestions:v?v.map((e=>{var t;return null!==(t=e?.id.toString())&&void 0!==t&&t})):[],messages:g?{noSuggestions:(0,c.__)("Searching…","content-control")}:void 0}))},F=({value:n,onChange:o,...l})=>{const r=l.options;return(0,e.createElement)(t.RadioControl,{...l,selected:n?.toString(),options:r,onChange:o,__nextHasNoMarginBottom:!0})},S=({value:n,onChange:o,initialPosition:l=0,...r})=>{const{step:a}=r;return(0,e.createElement)(t.RangeControl,{value:null!=n?n:l,onChange:(e=0)=>o(e),withInputField:!0,__nextHasNoMarginBottom:!0,type:a?"stepper":void 0})};const k=({options:t})=>(0,e.createElement)(e.Fragment,null,p(t).map((({label:t,value:n})=>(0,e.createElement)("option",{key:n,value:n},t)))),j=({optGroups:t})=>(0,e.createElement)(e.Fragment,null,Object.entries(t).map((([t,n])=>(0,e.createElement)("optgroup",{key:t,label:t},(0,e.createElement)(k,{options:n})))));var T=({value:n,onChange:o,...l})=>{var r;const{multiple:a=!1}=l,s=null!==(r=l.options)&&void 0!==r?r:{};return(0,e.createElement)(t.SelectControl,{...l,multiple:a,value:a&&"string"==typeof n?n.split(","):n,onChange:o,__nextHasNoMarginBottom:!0},(e=>Object.entries(e).reduce(((e,[t,n])=>!0===e?e:"string"==typeof t&&!(parseInt(t)>=0)&&"object"==typeof n),!1))(s)?(0,e.createElement)(j,{optGroups:s}):(0,e.createElement)(k,{options:s}))},N=({value:n,onChange:o,rows:l=5,...r})=>(0,e.createElement)(t.TextareaControl,{...r,value:null!=n?n:"",onChange:o,rows:l,__nextHasNoMarginBottom:!0}),O=({type:n,value:o,onChange:l,...r})=>(0,e.createElement)(t.TextControl,{...r,type:"hidden"!==n?n:void 0,value:null!=o?o:"",onChange:l,__nextHasNoMarginBottom:!0}),M=({label:t,value:n,onChange:o,multiple:l=!1,placeholder:r=(0,c.__)("Search","content-control"),options:a={}})=>{const[s,i]=(0,y.useState)(""),u=n?"number"==typeof n||"string"==typeof n?[n]:n:[],p=Object.keys(a).filter((e=>!s||e.toLowerCase().includes(s.toLowerCase()))),d=e=>{var t;const n="object"==typeof e?e.value:e;return(null!==(t=a[n])&&void 0!==t?t:null)||n};return(0,e.createElement)("div",{className:"cc-token-select-field"},(0,e.createElement)(w.SmartTokenControl,{label:t,hideLabelFromVision:!0,multiple:l,placeholder:r,value:u.map((e=>e.toString())),onInputChange:i,onChange:e=>o(e),renderToken:d,renderSuggestion:d,suggestions:p}))},V=window.wp.hooks;const I=(0,y.createContext)({context:"",fields:[],values:{},setValues:()=>{}}),P=({context:t,fields:n,values:o,setValues:l,children:r})=>(0,e.createElement)(I.Provider,{value:{context:t,fields:n,values:o,setValues:l}},r);var R=()=>{const{context:e,fields:t=[],values:n,setValues:o}=(0,y.useContext)(I),l=t=>{const o=(0,V.applyFilters)(`${e}.fieldIsVisible`,void 0,t,n);return void 0===o||o};return{context:e,fields:t,values:n,setValues:o,getFields:(n={visible:!0})=>{const o=(null!=t?t:[]).filter((e=>!(n?.tab&&e.tab!==n.tab||n?.section&&e.section!==n.section||n?.panel&&e.panel!==n.panel||n?.visible&&!l(e.id)))).sort(((e,t)=>e.priority-t.priority)).map((t=>{const n=(0,V.applyFilters)(`${e}.renderField`,t.component,t.id,t);return{...t,component:n}}));return(0,V.applyFilters)(`${e}.getFields`,o,n)},updateField:(e,t)=>{o({...n,[e]:t})},fieldIsVisible:l}}}(),(window.contentControl=window.contentControl||{}).fields=o}(); -
content-control/tags/2.6.1/inc/functions/query.php
r3137162 r3256177 232 232 } 233 233 234 // Set current post id ba esd on global $post.234 // Set current post id based on global $post. 235 235 $current_post_id = $post->ID ?? null; 236 236 … … 244 244 if ( $overload_post ) { 245 245 // Push the current $post to the stack so we can restore it later. 246 push_to_global( 'overloaded_posts', $ post ?? $current_post_id );246 push_to_global( 'overloaded_posts', $current_post_id ); 247 247 248 248 // Overload the globals so conditionals work properly. … … 276 276 } 277 277 278 // Set current post id baesd on global $current_term.278 // Set current term id based on global $current_term. 279 279 $current_term_id = $current_term->term_id ?? null; 280 280 281 // Check if we should overload the post. This means its not the current post.281 // Check if we should overload the term. 282 282 $overload_term = 283 // If we have a term ID, check if it's different from the current term ID.284 ( is_object( $term_id ) && $term_id->term_id !== $current_term_id ) ||285 // If we have an int, check if it's different from the current term ID.286 ( is_int( $term_id ) && $term_id !== $current_term_id );283 // If we have a term ID, check if it's different from the current term ID. 284 ( is_object( $term_id ) && $term_id->term_id !== $current_term_id ) || 285 // If we have an int, check if it's different from the current term ID. 286 ( is_int( $term_id ) && $term_id !== $current_term_id ); 287 287 288 288 if ( $overload_term ) { 289 // Push the current $post to the stack so we can restore it later.290 push_to_global( 'overloaded_terms', $current_term ?? $current_term_id );289 // Store only the ID of the current term for later restoration. 290 push_to_global( 'overloaded_terms', $current_term_id ); 291 291 292 292 // Overload the globals so conditionals work properly. 293 293 $cc_term = get_term( $term_id ); 294 294 // Set the global term object (forward compatibility). 295 set_global( 'term', $cc_term ?? $current_term_id);295 set_global( 'term', $cc_term ); 296 296 } 297 297 … … 334 334 global $post; 335 335 336 $stored_post_id = pop_from_global( 'overloaded_posts' ); 336 337 // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited 337 $post = pop_from_global( 'overloaded_posts');338 $post = get_post( $stored_post_id ); 338 339 // Reset global post object. 339 340 setup_postdata( $post ); … … 356 357 global $cc_term; // Backward compatibility. 357 358 359 $stored_term_id = pop_from_global( 'overloaded_terms' ); 358 360 // Reset global post object. 359 $cc_term = pop_from_global( 'overloaded_terms');361 $cc_term = get_term( $stored_term_id ); 360 362 set_global( 'term', $cc_term ); 361 363 } … … 531 533 // If we have a post type or taxonomy, the name is the first part (posts, categories). 532 534 $intent['name'] = sanitize_key( $endpoint_parts[0] ); 535 // Check if this is a search request. 536 $intent['search'] = isset( $wp->query_vars['search'] ) ? sanitize_title( $wp->query_vars['search'] ) : false; 533 537 534 538 if ( count( $endpoint_parts ) > 1 ) { … … 537 541 } else { 538 542 // If we have no ID, then we are either searching or indexing. 539 $intent['index'] = true; 540 $intent['search'] = isset( $wp->query_vars['s'] ) ? sanitize_title( $wp->query_vars['s'] ) : false; 543 $intent['index'] = true; 541 544 } 542 545 … … 546 549 if ( isset( $post_type_endpoints[ $endpoint_route ] ) ) { 547 550 $intent['type'] = 'post_type'; 548 } 549 550 if ( isset( $taxonomy_endpoints[ $endpoint_route ] ) ) { 551 } elseif ( isset( $taxonomy_endpoints[ $endpoint_route ] ) ) { 551 552 $intent['type'] = 'taxonomy'; 553 } elseif ( 'search' === $intent['name'] ) { 554 $intent['type'] = 'search'; 552 555 } 553 556 } else { -
content-control/tags/2.6.1/inc/functions/rule-callbacks.php
r3137162 r3256177 850 850 // Fill in defaults to prevent errors. 851 851 wp_parse_args( $rest_intent, [ 852 'type' => '', 853 'name' => '', 852 'type' => '', 853 'name' => '', 854 'search' => false, 854 855 ] ); 855 856 856 857 // Check if this is a post type intent. 857 858 if ( 'post_type' !== $rest_intent['type'] ) { 859 860 // If this is a search request, we need to check if the post type is public and searchable. 861 if ( false !== $rest_intent['search'] ) { 862 $post_type_object = get_post_type_object( $post_type ); 863 return $post_type_object && $post_type_object->show_in_rest && $post_type_object->publicly_queryable; 864 } 865 858 866 return false; 859 867 } … … 885 893 // Fill in defaults to prevent errors. 886 894 wp_parse_args( $rest_intent, [ 887 'type' => '', 888 'name' => '', 895 'type' => '', 896 'name' => '', 897 'search' => false, 889 898 ] ); 890 899 891 900 // Check if this is a taxonomy intent. 892 901 if ( 'taxonomy' !== $rest_intent['type'] ) { 902 903 // If this is a search request, we need to check if the taxonomy is public and searchable. 904 if ( false !== $rest_intent['search'] ) { 905 $taxonomy_object = get_taxonomy( $taxonomy ); 906 return $taxonomy_object && $taxonomy_object->show_in_rest && $taxonomy_object->publicly_queryable; 907 } 908 893 909 return false; 894 910 } … … 898 914 // Check that rest_base or selected name match. 899 915 return // Check the rest_base for the selected taxonomy matches the intent. 900 check_type_match( $taxonomy_object->rest_base, $rest_intent['name'] ) ||916 check_type_match( $taxonomy_object->rest_base, $rest_intent['name'] ) || 901 917 // Check the taxonomy matches the intent. 902 918 check_type_match( $taxonomy, $rest_intent['name'] ); -
content-control/tags/2.6.1/readme.txt
r3253926 r3256177 7 7 Requires at least: 6.2 8 8 Tested up to: 6.7.2 9 Stable tag: 2.6. 09 Stable tag: 2.6.1 10 10 Requires PHP: 7.4 11 11 License: GPLv3 (or later) … … 111 111 == Changelog == 112 112 113 = v2.6.1 - 03/15/2025 = 114 115 * Improvement: Only fetch titles & ids when loading posts/taxonomy for the Restriction Editor. Reducing request overhead. 116 * Improvement: Ensure taxonomies are also removed from search appropriately. 117 * Improvement: Reduce memory footprint of overloaded object handling. 118 * Tweak: Adjust rest intent when using search endpoint or arg for better detection. 119 * Fix: Prevent undefined post type or taxonomy `public` arg from generating warning notices. 120 * Fix: Prvent warnings due to translations being loaded too early. 121 113 122 = v2.6.0 - 03/11/2025 = 114 123 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Container.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Exception/ExpectedInvokableException.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Exception/FrozenServiceException.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Exception/InvalidServiceIdentifierException.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Psr11/Container.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/ServiceIterator.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/ServiceProviderInterface.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Fixtures/Invokable.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Fixtures/NonInvokable.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Fixtures/Service.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/PimpleServiceProviderInterfaceTest.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/PimpleTest.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Psr11/ContainerTest.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/pimple/pimple/src/Pimple/Tests/ServiceIteratorTest.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/tags/2.6.1/vendor-prefixed/psr/container/src/ContainerExceptionInterface.php
r3253935 r3256177 3 3 * @license MIT 4 4 * 5 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.5 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 6 6 */ 7 7 -
content-control/tags/2.6.1/vendor-prefixed/psr/container/src/ContainerInterface.php
r3253935 r3256177 3 3 * @license MIT 4 4 * 5 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.5 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 6 6 */ 7 7 -
content-control/tags/2.6.1/vendor-prefixed/psr/container/src/NotFoundExceptionInterface.php
r3253935 r3256177 3 3 * @license MIT 4 4 * 5 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.5 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 6 6 */ 7 7 -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Admin.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Ajax.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Client.php
r3253935 r3256177 19 19 * 20 20 * @license GPL-2.0-or-later 21 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.21 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 22 22 */ 23 23 -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Config.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Cron.php
r3253935 r3256177 6 6 * 7 7 * @license GPL-2.0-or-later 8 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.8 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 9 9 */ 10 10 -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Encryption.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Endpoint.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Envelope.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Form.php
r3253935 r3256177 3 3 * @license GPL-2.0-or-later 4 4 * 5 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.5 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 6 6 */ 7 7 /** -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Logger.php
r3253935 r3256177 10 10 * 11 11 * @license GPL-2.0-or-later 12 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.12 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 13 13 */ 14 14 -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Logging.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Remote.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/SecurityChecks.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/SiteAccess.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/SupportRole.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/SupportUser.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/tags/2.6.1/vendor-prefixed/trustedlogin/client/src/Utils.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/tags/2.6.1/vendor/composer/installed.php
r3253935 r3256177 2 2 'root' => array( 3 3 'name' => 'code-atlantic/content-control', 4 'pretty_version' => '2.6. 0',5 'version' => '2.6. 0.0',4 'pretty_version' => '2.6.1', 5 'version' => '2.6.1.0', 6 6 'reference' => null, 7 7 'type' => 'wordpress-plugin', … … 12 12 'versions' => array( 13 13 'code-atlantic/content-control' => array( 14 'pretty_version' => '2.6. 0',15 'version' => '2.6. 0.0',14 'pretty_version' => '2.6.1', 15 'version' => '2.6.1.0', 16 16 'reference' => null, 17 17 'type' => 'wordpress-plugin', -
content-control/trunk/classes/Controllers/Frontend/Restrictions/QueryTerms.php
r3105553 r3256177 137 137 $handling = $restriction->get_setting( 'additionalQueryHandling' ); 138 138 139 // If this is a search query and showInSearch is false, hide the post. 140 if ( $query->query_vars['search'] && false === $restriction->get_setting( 'showInSearch' ) ) { 141 $handling = 'hide'; 142 } 143 139 144 switch ( $handling ) { 140 145 case 'hide': -
content-control/trunk/classes/Controllers/Frontend/Restrictions/RestAPI.php
r3052982 r3256177 65 65 return new \WP_Error( 66 66 'rest_forbidden', 67 $restriction->get_setting( 'restApiQueryMessage', __( 'You do not have permission to do this.', 'content-control' ) ,),67 $restriction->get_setting( 'restApiQueryMessage', __( 'You do not have permission to do this.', 'content-control' ) ), 68 68 [ 'status' => 403 ] 69 69 ); -
content-control/trunk/classes/Controllers/RestAPI.php
r3137162 r3256177 85 85 } 86 86 87 $is_public = isset( $args['public'] ) && $args['public']; 88 87 89 // Check if this is a private taxonomy. 88 if ( true !== $args['public']) {90 if ( ! $is_public ) { 89 91 if ( $include_private ) { 90 92 $args['show_in_rest'] = true; // Enable REST API. -
content-control/trunk/classes/Controllers/TrustedLogin.php
r2969631 r3256177 27 27 */ 28 28 public function init() { 29 $this->hooks(); 29 add_action( 'admin_menu', [ $this, 'admin_menu' ] ); 30 add_action( 'init', [ $this, 'initiate_trustedlogin' ] ); 31 } 32 33 /** 34 * Hooks. 35 * 36 * @return void 37 */ 38 public function initiate_trustedlogin() { 30 39 31 40 $config = [ … … 84 93 85 94 /** 86 * Hooks.87 *88 * @return void89 */90 public function hooks() {91 add_action( 'admin_menu', [ $this, 'admin_menu' ] );92 }93 94 /**95 95 * Admin menu. 96 96 * -
content-control/trunk/classes/RuleEngine/Rules.php
r3105553 r3256177 475 475 } 476 476 477 /** 478 * Allow filtering post type rules. 479 * 480 * @param array<string,array<string,mixed>> $type_rules Post type rules. 481 * @param string $name Post type name. 482 * 483 * @return array<string,array<string,mixed>> 484 */ 485 $type_rules = apply_filters( 'content_control/rule_engine/post_type_rules', $type_rules, $name, $post_type ); 486 477 487 // Merge type rules & type tax rules. 478 488 $rules = array_merge( $rules, $type_rules, $this->get_post_type_tax_rules( $name ) ); … … 542 552 } 543 553 554 /** 555 * Allow filtering post type taxonomy rules. 556 * 557 * @param array<string,array<string,mixed>> $rules Post type taxonomy rules. 558 * @param string $name Post type name. 559 * 560 * @return array<string,array<string,mixed>> 561 */ 562 $rules = apply_filters( 'content_control/rule_engine/post_type_tax_rules', $rules, $name ); 563 544 564 return $rules; 545 565 } -
content-control/trunk/content-control.php
r3253935 r3256177 4 4 * Plugin URI: https://contentcontrolplugin.com/?utm_campaign=plugin-info&utm_source=php-file-header&utm_medium=plugin-ui&utm_content=plugin-uri 5 5 * Description: Restrict content to logged in/out users or specific user roles. Restrict access to certain parts of a page/post. Control the visibility of widgets. 6 * Version: 2.6. 06 * Version: 2.6.1 7 7 * Author: Code Atlantic 8 8 * Author URI: https://code-atlantic.com/?utm_campaign=plugin-info&utm_source=php-file-header&utm_medium=plugin-ui&utm_content=author-uri … … 29 29 function get_plugin_config() { 30 30 return [ 31 'name' => \__( 'Content Control', 'content-control' ),31 'name' => 'Content Control', 32 32 'slug' => 'content-control', 33 'version' => '2.6. 0',33 'version' => '2.6.1', 34 34 'option_prefix' => 'content_control', 35 35 // Maybe remove this and simply prefix `name` with `'Popup Maker'`. 36 36 'text_domain' => 'content-control', 37 'fullname' => \__( 'Content Control', 'content-control' ),37 'fullname' => 'Content Control', 38 38 'min_php_ver' => '7.4.0', 39 39 'min_wp_ver' => '6.2.0', -
content-control/trunk/dist/components.asset.php
r3007200 r3256177 1 <?php return array('dependencies' => array('content-control-core-data', 'content-control-utils', 'lodash', 'react', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives'), 'version' => ' b6046c2825b2afe2af46');1 <?php return array('dependencies' => array('content-control-core-data', 'content-control-utils', 'lodash', 'react', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives'), 'version' => '7f4b4f8aa3721e900183'); -
content-control/trunk/dist/components.js
r3007200 r3256177 1 !function(){var e={184:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function l(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var c=l.apply(null,n);c&&e.push(c)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var a in n)o.call(n,a)&&n[a]&&e.push(a)}}}return e.join(" ")}e.exports?(l.default=l,e.exports=l):void 0===(n=function(){return l}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var l=t[o];if(void 0!==l)return l.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o),n.d(o,{ConfirmDialogue:function(){return u},ControlledTabPanel:function(){return s},DeviceToggle:function(){return d},EntitySelectControl:function(){return _},FieldPanel:function(){return S},FieldRow:function(){return C},FreeFormEditControl:function(){return $},ListTable:function(){return U},RadioButtonControl:function(){return K},SearchableMulticheckControl:function(){return Q},SmartTokenControl:function(){return w},TextHighlight:function(){return q},URLControl:function(){return z},useControlledState:function(){return H}});var e=window.React,t=n(184),l=n.n(t),r=window.wp.components,c=window.wp.compose,a=({tabId:t,onClick:n,children:o,selected:l,...c})=>(0,e.createElement)(r.Button,{role:"tab",tabIndex:l?void 0:-1,"aria-selected":l,id:t,onClick:n,...c},o),s=(0,c.withInstanceId)((({instanceId:t,orientation:n="horizontal",activeClass:o="is-active",tabsClass:c="tabs",tabClass:s="tab",className:i,tabs:u,selected:m,onSelect:d,children:p})=>{var g;const h=u.find((e=>m===e.name))||u[0],v=`${t}-${null!==(g=h?.name)&&void 0!==g?g:"none"}`;return(0,e.createElement)("div",{className:l()(i,"cc-"+n+"-tabs")},(0,e.createElement)(r.NavigableMenu,{role:"tablist",orientation:n,onNavigate:(e,t)=>{t.click()},className:l()([c,"components-tab-panel__tabs"])},u.map((n=>{var r,c;return(0,e.createElement)(a,{className:l()(s,"components-tab-panel__tabs-item","components-tab-panel__tab",n.className,{[o]:n.name===h.name}),tabId:`${t}-${n.name}`,"aria-controls":`${t}-${n.name}-view`,selected:n.name===h.name,key:n.name,onClick:()=>{return e=n.name,void d?.(e);var e},href:null!==(r=n?.href)&&void 0!==r?r:void 0,target:null!==(c=n?.target)&&void 0!==c?c:void 0},n.title)}))),h&&(0,e.createElement)("div",{key:v,"aria-labelledby":v,role:"tabpanel",id:`${v}-view`,className:"components-tab-panel__tab-content",tabIndex:0},p&&p(h)))})),i=window.wp.i18n,u=({message:t,callback:n,onClose:o,isDestructive:l=!1})=>t&&t.length&&n?(0,e.createElement)(r.Modal,{title:(0,i.__)("Confirm Action","content-control"),onRequestClose:o},(0,e.createElement)("p",null,t),(0,e.createElement)(r.Flex,{justify:"right"},(0,e.createElement)(r.Button,{text:(0,i.__)("Cancel","content-control"),onClick:o}),(0,e.createElement)(r.Button,{variant:"primary",text:(0,i.__)("Confirm","content-control"),isDestructive:l,onClick:()=>{n(),o()}}))):null,m=window.contentControl.utils,d=({label:t,icon:n,isVisible:o,onChange:c=m.noop})=>{const a=o?/* translators: 1. Device type. */1 !function(){var e={184:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function l(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var a=l.apply(null,n);a&&e.push(a)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var c in n)o.call(n,c)&&n[c]&&e.push(c)}}}return e.join(" ")}e.exports?(l.default=l,e.exports=l):void 0===(n=function(){return l}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var l=t[o];if(void 0!==l)return l.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o),n.d(o,{ConfirmDialogue:function(){return u},ControlledTabPanel:function(){return s},DeviceToggle:function(){return d},EntitySelectControl:function(){return _},FieldPanel:function(){return S},FieldRow:function(){return y},FreeFormEditControl:function(){return $},ListTable:function(){return U},RadioButtonControl:function(){return K},SearchableMulticheckControl:function(){return Q},SmartTokenControl:function(){return w},TextHighlight:function(){return q},URLControl:function(){return z},useControlledState:function(){return H}});var e=window.React,t=n(184),l=n.n(t),r=window.wp.components,a=window.wp.compose,c=({tabId:t,onClick:n,children:o,selected:l,...a})=>(0,e.createElement)(r.Button,{role:"tab",tabIndex:l?void 0:-1,"aria-selected":l,id:t,onClick:n,...a},o),s=(0,a.withInstanceId)((({instanceId:t,orientation:n="horizontal",activeClass:o="is-active",tabsClass:a="tabs",tabClass:s="tab",className:i,tabs:u,selected:m,onSelect:d,children:p})=>{var g;const h=u.find((e=>m===e.name))||u[0],v=`${t}-${null!==(g=h?.name)&&void 0!==g?g:"none"}`;return(0,e.createElement)("div",{className:l()(i,"cc-"+n+"-tabs")},(0,e.createElement)(r.NavigableMenu,{role:"tablist",orientation:n,onNavigate:(e,t)=>{t.click()},className:l()([a,"components-tab-panel__tabs"])},u.map((n=>{var r,a;return(0,e.createElement)(c,{className:l()(s,"components-tab-panel__tabs-item","components-tab-panel__tab",n.className,{[o]:n.name===h.name}),tabId:`${t}-${n.name}`,"aria-controls":`${t}-${n.name}-view`,selected:n.name===h.name,key:n.name,onClick:()=>{return e=n.name,void d?.(e);var e},href:null!==(r=n?.href)&&void 0!==r?r:void 0,target:null!==(a=n?.target)&&void 0!==a?a:void 0},n.title)}))),h&&(0,e.createElement)("div",{key:v,"aria-labelledby":v,role:"tabpanel",id:`${v}-view`,className:"components-tab-panel__tab-content",tabIndex:0},p&&p(h)))})),i=window.wp.i18n,u=({message:t,callback:n,onClose:o,isDestructive:l=!1})=>t&&t.length&&n?(0,e.createElement)(r.Modal,{title:(0,i.__)("Confirm Action","content-control"),onRequestClose:o},(0,e.createElement)("p",null,t),(0,e.createElement)(r.Flex,{justify:"right"},(0,e.createElement)(r.Button,{text:(0,i.__)("Cancel","content-control"),onClick:o}),(0,e.createElement)(r.Button,{variant:"primary",text:(0,i.__)("Confirm","content-control"),isDestructive:l,onClick:()=>{n(),o()}}))):null,m=window.contentControl.utils,d=({label:t,icon:n,isVisible:o,onChange:a=m.noop})=>{const c=o?/* translators: 1. Device type. */ 2 2 (0,i._x)("Show on %1$s","Device toggle option","content-control"):/* translators: 1. Device type. */ 3 (0,i._x)("Hide on %1$s","Device toggle option","content-control"),s=o?"visibility":"hidden",u=()=> c(!o);return(0,e.createElement)("div",{className:l()(["cc__component-device-toggle",o&&"is-checked"])},(0,e.createElement)("h3",{className:"cc__component-device-toggle__label"},(0,e.createElement)(r.Icon,{icon:n}),t),(0,e.createElement)("div",{className:"cc__component-device-toggle__control"},(0,e.createElement)(r.Tooltip,{text:(0,i.sprintf)(a,t)},(0,e.createElement)("span",null,(0,e.createElement)(r.Icon,{className:"cc__component-device-toggle__control-icon",onClick:u,icon:s}))),(0,e.createElement)(r.Tooltip,{text:(0,i.sprintf)(a,t)},(0,e.createElement)("span",null,(0,e.createElement)(r.ToggleControl,{className:"cc__component-device-toggle__control-input",checked:o,onChange:u,hideLabelFromVision:!0,"aria-label":a,label:(0,i.sprintf)(/* translators: 1. Device type. */4 (0,i._x)("Show on %1$s","Device toggle option","content-control"),t)})))))},p=window.wp.data,g=window.wp.element,h=window.wp.coreData,v=window.wp.primitives,f=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const E={container:"component-smart-token-control",popover:"component-smart-token-control__suggestions-popover",inputContainer:"component-smart-token-control__input",tokens:"component-smart-token-control__tokens",token:"component-smart-token-control__token",tokenLabel:"component-smart-token-control__token-label",tokenRemove:"component-smart-token-control__token-remove",textInput:"component-smart-token-control__text-input",toggleSuggestions:"component-smart-token-control__toggle",suggestions:"component-smart-token-control__suggestions",suggestion:"component-smart-token-control__suggestion"},b=({id:t,value:n,onChange:o,label: a,placeholder:s=(0,i.__)("Enter a value","content-control"),className:u,tokenOnComma:d=!1,classes:p=E,renderToken:h=(t=>(0,e.createElement)(e.Fragment,null,"string"==typeof t?t:t.item)),renderSuggestion:v=(t=>(0,e.createElement)(e.Fragment,null,t)),onInputChange:w=m.noop,saveTransform:_=(e=>e),closeOnSelect:S=!1,hideLabelFromVision:C=!1,extraKeyboardShortcuts:y={},multiple:k=!1,suggestions:x,messages:N={searchTokens:(0,i.__)("Search","content-control"),noSuggestions:(0,i.__)("No suggestions","content-control"),removeToken:(0,i.__)("Remove token","content-control")}},R)=>{const $={...E,...p},I=(0,c.useInstanceId)(b),F=(0,g.useRef)(null),B=(0,g.useRef)(null),T=(0,g.useRef)(null),[L,O]=(0,g.useState)({inputText:"",isFocused:!1,selectedSuggestion:-1,popoverOpen:!1,refocus:!1}),{inputText:D,isFocused:P,selectedSuggestion:M,popoverOpen:z}=L;function A(e){return"object"==typeof e?e.value:e}function V(e){return n.some((t=>A(e)===A(t)))}function H(e){!function(e){const t=[...new Set(e.map(_).filter(Boolean).filter((e=>!V(e))))];t.length>0&&o([...n,...t])}([e]),O({...L,inputText:"",popoverOpen:!S&&z})}const j=e=>O({...L,selectedSuggestion:e}),U=x.length,q=M>U?0:M;(0,g.useEffect)((()=>{setTimeout((()=>{T.current&&T.current.scrollIntoView()}),25)}),[M,z]),(0,g.useEffect)((()=>{L.refocus&&(O({...L,refocus:!1}),B.current?.focus())}),[L,L.refocus]);const G={up:e=>{e.preventDefault(),O({...L,popoverOpen:0===D.length&&!z||z,selectedSuggestion:(0,m.clamp)(q-1>=0?q-1:U,0,U)})},down:e=>{e.preventDefault(),O({...L,popoverOpen:0===D.length&&!z||z,selectedSuggestion:(0,m.clamp)(q+1<=U?q+1:0,0,U)})},"alt+down":()=>O({...L,popoverOpen:!0}),enter:()=>{if(-1===M)return O({...L,popoverOpen:!1});H(x[q])},escape:e=>{e.preventDefault(),e.stopPropagation(),O({...L,selectedSuggestion:-1,popoverOpen:!1})},",":e=>{d&&(e.preventDefault(),0!==D.length&&H(D))},...y};return(0,e.createElement)(r.KeyboardShortcuts,{shortcuts:G},(0,e.createElement)("div",{id:t?`${t}-wrapper`:`component-smart-token-control-${I}-wrapper`,className:l()([$.container,P&&"is-focused",u]),ref:e=>{F.current=e,R&&"object"==typeof R&&(R.current=e)},onBlur:e=>{e.relatedTarget&&e.relatedTarget.classList.contains($.popover)||O({...L,isFocused:!1,popoverOpen:!1})}},(0,e.createElement)(r.BaseControl,{id:t||`component-smart-token-control-${I}`,label:a,hideLabelFromVision:C},(0,e.createElement)("div",{className:l()([$.inputContainer,!k&&n.length>0&&"input-disabled"])},n.length>0&&(0,e.createElement)("div",{className:$.tokens},n.map((t=>(0,e.createElement)("div",{className:$.token,key:A(t)},(0,e.createElement)("div",{className:$.tokenLabel},h(t)),(0,e.createElement)(r.Button,{className:$.tokenRemove,label:N.removeToken,icon:f,onClick:()=>function(e){O({...L,refocus:!0}),o(n.filter((t=>A(t)!==A(e))))}(t)}))))),(0,e.createElement)("input",{id:t||`component-smart-token-control-${I}`,type:"text",className:l()([$.textInput]),placeholder:s,disabled:!k&&n.length>0,ref:B,value:null!=D?D:"",onChange:e=>{return t=e.target.value,O({...L,inputText:t,popoverOpen:t.length>=1}),void w(t);var t},autoComplete:"off","aria-autocomplete":"list","aria-controls":t?`${t}-listbox`:`${I}-listbox`,"aria-activedescendant":`sug-${q}`,onFocus:()=>{O({...L,isFocused:!0,popoverOpen:D.length>=1})},onClick:()=>{z||O({...L,popoverOpen:x.length>0})},onBlur:e=>{const t=e.relatedTarget;t&&t.classList.contains($.popover)||O({...L,isFocused:!1,popoverOpen:!1})}}))),z&&(0,e.createElement)(r.Popover,{focusOnMount:!1,onClose:()=>j(-1),position:"bottom right",anchor:B.current,className:$.popover},(0,e.createElement)("div",{className:$.suggestions,style:{width:B.current?.clientWidth}},x.length?x.map(((t,n)=>(0,e.createElement)("div",{key:n,id:`sug-${n}`,className:l()([$.suggestion,n===q&&"is-currently-highlighted",V(t)&&"is-selected"]),ref:n===q?T:void 0,onFocus:()=>{j(n)},onMouseDown:e=>{e.preventDefault(),H(x[n])},role:"option",tabIndex:n,"aria-selected":n===q},v(t)))):(0,e.createElement)("div",null,N.noSuggestions)))))};var w=(0,g.forwardRef)(b),_=({id:t,label:n,value:o,onChange:l,placeholder:r,entityKind:a="postType",entityType:s="post",multiple:u=!1,...m})=>{const[d,v]=(0,g.useState)(""),f=(0,c.useDebounce)((e=>{v(e)}),300),{prefill:E=[]}=(0,p.useSelect)((e=>({prefill:o?e(h.store).getEntityRecords(a,s,{context:"view",include:o,per_page:-1}):[]})),[o,a,s]),{suggestions:b=[],isSearching:_=!1}=(0,p.useSelect)((e=>({suggestions:e(h.store).getEntityRecords(a,s,{context:"view",search:d,per_page:-1}),isSearching:e("core/data").isResolving("core","getEntityRecords",[a,s,{context:"view",search:d,per_page:-1}])})),[a,s,d]),S=e=>b&&b.find((t=>t.id.toString()===e.toString()))||E&&E.find((t=>t.id.toString()===e.toString())),C=o?(Array.isArray(o)?o:[o]).map((e=>e.toString())):[],y=e=>"object"==typeof e?e.value:e;return(0,e.createElement)("div",{className:"cc-object-search-field"},(0,e.createElement)(w,{id:t,label:n||(0,i.sprintf)(3 (0,i._x)("Hide on %1$s","Device toggle option","content-control"),s=o?"visibility":"hidden",u=()=>a(!o);return(0,e.createElement)("div",{className:l()(["cc__component-device-toggle",o&&"is-checked"])},(0,e.createElement)("h3",{className:"cc__component-device-toggle__label"},(0,e.createElement)(r.Icon,{icon:n}),t),(0,e.createElement)("div",{className:"cc__component-device-toggle__control"},(0,e.createElement)(r.Tooltip,{text:(0,i.sprintf)(c,t)},(0,e.createElement)("span",null,(0,e.createElement)(r.Icon,{className:"cc__component-device-toggle__control-icon",onClick:u,icon:s}))),(0,e.createElement)(r.Tooltip,{text:(0,i.sprintf)(c,t)},(0,e.createElement)("span",null,(0,e.createElement)(r.ToggleControl,{className:"cc__component-device-toggle__control-input",checked:o,onChange:u,hideLabelFromVision:!0,"aria-label":c,label:(0,i.sprintf)(/* translators: 1. Device type. */ 4 (0,i._x)("Show on %1$s","Device toggle option","content-control"),t)})))))},p=window.wp.data,g=window.wp.element,h=window.wp.coreData,v=window.wp.primitives,f=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));const E={container:"component-smart-token-control",popover:"component-smart-token-control__suggestions-popover",inputContainer:"component-smart-token-control__input",tokens:"component-smart-token-control__tokens",token:"component-smart-token-control__token",tokenLabel:"component-smart-token-control__token-label",tokenRemove:"component-smart-token-control__token-remove",textInput:"component-smart-token-control__text-input",toggleSuggestions:"component-smart-token-control__toggle",suggestions:"component-smart-token-control__suggestions",suggestion:"component-smart-token-control__suggestion"},b=({id:t,value:n,onChange:o,label:c,placeholder:s=(0,i.__)("Enter a value","content-control"),className:u,tokenOnComma:d=!1,classes:p=E,renderToken:h=(t=>(0,e.createElement)(e.Fragment,null,"string"==typeof t?t:t.item)),renderSuggestion:v=(t=>(0,e.createElement)(e.Fragment,null,t)),onInputChange:w=m.noop,saveTransform:_=(e=>e),closeOnSelect:S=!1,hideLabelFromVision:y=!1,extraKeyboardShortcuts:C={},multiple:k=!1,suggestions:x,messages:N={searchTokens:(0,i.__)("Search","content-control"),noSuggestions:(0,i.__)("No suggestions","content-control"),removeToken:(0,i.__)("Remove token","content-control")}},R)=>{const $={...E,...p},I=(0,a.useInstanceId)(b),F=(0,g.useRef)(null),T=(0,g.useRef)(null),B=(0,g.useRef)(null),[L,O]=(0,g.useState)({inputText:"",isFocused:!1,selectedSuggestion:-1,popoverOpen:!1,refocus:!1}),{inputText:D,isFocused:P,selectedSuggestion:M,popoverOpen:z}=L;function A(e){return"object"==typeof e?e.value:e}function V(e){return n.some((t=>A(e)===A(t)))}function H(e){!function(e){const t=[...new Set(e.map(_).filter(Boolean).filter((e=>!V(e))))];t.length>0&&o([...n,...t])}([e]),O({...L,inputText:"",popoverOpen:!S&&z})}const j=e=>O({...L,selectedSuggestion:e}),U=x.length,q=M>U?0:M;(0,g.useEffect)((()=>{setTimeout((()=>{B.current&&B.current.scrollIntoView()}),25)}),[M,z]),(0,g.useEffect)((()=>{L.refocus&&(O({...L,refocus:!1}),T.current?.focus())}),[L,L.refocus]);const G={up:e=>{e.preventDefault(),O({...L,popoverOpen:0===D.length&&!z||z,selectedSuggestion:(0,m.clamp)(q-1>=0?q-1:U,0,U)})},down:e=>{e.preventDefault(),O({...L,popoverOpen:0===D.length&&!z||z,selectedSuggestion:(0,m.clamp)(q+1<=U?q+1:0,0,U)})},"alt+down":()=>O({...L,popoverOpen:!0}),enter:()=>{if(-1===M)return O({...L,popoverOpen:!1});H(x[q])},escape:e=>{e.preventDefault(),e.stopPropagation(),O({...L,selectedSuggestion:-1,popoverOpen:!1})},",":e=>{d&&(e.preventDefault(),0!==D.length&&H(D))},...C};return(0,e.createElement)(r.KeyboardShortcuts,{shortcuts:G},(0,e.createElement)("div",{id:t?`${t}-wrapper`:`component-smart-token-control-${I}-wrapper`,className:l()([$.container,P&&"is-focused",u]),ref:e=>{F.current=e,R&&"object"==typeof R&&(R.current=e)},onBlur:e=>{e.relatedTarget&&e.relatedTarget.classList.contains($.popover)||O({...L,isFocused:!1,popoverOpen:!1})}},(0,e.createElement)(r.BaseControl,{id:t||`component-smart-token-control-${I}`,label:c,hideLabelFromVision:y},(0,e.createElement)("div",{className:l()([$.inputContainer,!k&&n.length>0&&"input-disabled"])},n.length>0&&(0,e.createElement)("div",{className:$.tokens},n.map((t=>(0,e.createElement)("div",{className:$.token,key:A(t)},(0,e.createElement)("div",{className:$.tokenLabel},h(t)),(0,e.createElement)(r.Button,{className:$.tokenRemove,label:N.removeToken,icon:f,onClick:()=>function(e){O({...L,refocus:!0}),o(n.filter((t=>A(t)!==A(e))))}(t)}))))),(0,e.createElement)("input",{id:t||`component-smart-token-control-${I}`,type:"text",className:l()([$.textInput]),placeholder:s,disabled:!k&&n.length>0,ref:T,value:null!=D?D:"",onChange:e=>{return t=e.target.value,O({...L,inputText:t,popoverOpen:t.length>=1}),void w(t);var t},autoComplete:"off","aria-autocomplete":"list","aria-controls":t?`${t}-listbox`:`${I}-listbox`,"aria-activedescendant":`sug-${q}`,onFocus:()=>{O({...L,isFocused:!0,popoverOpen:D.length>=1})},onClick:()=>{z||O({...L,popoverOpen:x.length>0})},onBlur:e=>{const t=e.relatedTarget;t&&t.classList.contains($.popover)||O({...L,isFocused:!1,popoverOpen:!1})}}))),z&&(0,e.createElement)(r.Popover,{focusOnMount:!1,onClose:()=>j(-1),position:"bottom right",anchor:T.current,className:$.popover},(0,e.createElement)("div",{className:$.suggestions,style:{width:T.current?.clientWidth}},x.length?x.map(((t,n)=>(0,e.createElement)("div",{key:n,id:`sug-${n}`,className:l()([$.suggestion,n===q&&"is-currently-highlighted",V(t)&&"is-selected"]),ref:n===q?B:void 0,onFocus:()=>{j(n)},onMouseDown:e=>{e.preventDefault(),H(x[n])},role:"option",tabIndex:n,"aria-selected":n===q},v(t)))):(0,e.createElement)("div",null,N.noSuggestions)))))};var w=(0,g.forwardRef)(b),_=({id:t,label:n,value:o,onChange:l,placeholder:r,entityKind:c="postType",entityType:s="post",multiple:u=!1,...m})=>{const[d,v]=(0,g.useState)(""),f=(0,a.useDebounce)((e=>{v(e)}),300),E=()=>"postType"===c?"id,title,name,type":"taxonomy"===c?"id,name,slug,taxonomy":null,b={context:"view",per_page:-1,...null!==E()?{_fields:E()}:{}},{prefill:_=[]}=(0,p.useSelect)((e=>({prefill:o?e(h.store).getEntityRecords(c,s,{...b,include:o}):[]})),[o,c,s]),{suggestions:S=[],isSearching:y=!1}=(0,p.useSelect)((e=>({suggestions:e(h.store).getEntityRecords(c,s,{...b,search:d}),isSearching:e("core/data").isResolving("core","getEntityRecords",[c,s,{...b,search:d}])})),[c,s,d]),C=e=>S&&S.find((t=>t.id.toString()===e.toString()))||_&&_.find((t=>t.id.toString()===e.toString())),k=o?(Array.isArray(o)?o:[o]).map((e=>e.toString())):[],x=e=>"object"==typeof e?e.value:e;return(0,e.createElement)("div",{className:"cc-object-search-field"},(0,e.createElement)(w,{id:t,label:n||(0,i.sprintf)( 5 5 // translators: %s: entity type. 6 6 (0,i.__)("%s(s)","content-control"),s.replace(/_/g," ").charAt(0).toUpperCase()+s.replace(/_/g," ").slice(1)),multiple:u,placeholder:r||(0,i.sprintf)( 7 7 // translators: %s: entity type. 8 (0,i.__)("Select %s(s)","content-control"),s.replace(/_/g," ").toLowerCase()),...m,tokenOnComma:!0,value: C,onInputChange:f,onChange:e=>{const t=e.map((e=>parseInt(y(e),10))).filter((e=>!isNaN(e)));l(u?t:t[0])},renderToken:e=>{var t;const n=S(y(e));return n?"postType"===a?null!==(t=n.title.rendered)&&void 0!==t?t:n.title.raw:n.name:y(e)},renderSuggestion:t=>{var n;const o=S(t);return o?(0,e.createElement)(e.Fragment,null,"postType"===a?null!==(n=o.title.rendered)&&void 0!==n?n:o.title.raw:o.name):t},suggestions:b?b.map((e=>{var t;return null!==(t=e?.id.toString())&&void 0!==t&&t})):[],messages:_?{noSuggestions:(0,i.__)("Searching…","content-control")}:void 0}))},S=({title:t,className:n,children:o})=>(0,e.createElement)(r.Panel,{header:t,className:l()(["components-field-panel",n])},(0,e.createElement)(r.PanelBody,{opened:!0},o)),C=({id:t,label:n,description:o,className:r,children:c})=>(0,e.createElement)("div",{className:l()(["components-field-row",r])},(0,e.createElement)("div",{className:"components-base-control"},(0,e.createElement)("label",{htmlFor:t,className:"components-truncate components-text components-input-control__label"},n),(0,e.createElement)("p",{className:"components-base-control__help"},o)),(0,e.createElement)("div",{className:"components-base-control__field"},c)),y=window.wp.keycodes;const{wp:k,tinymce:x,wpEditorL10n:N={tinymce:{baseURL:"",suffix:"",settings:{}}}}=window,R=t=>{const n=(0,c.useInstanceId)(R),{label:o,value:a,onChange:s=m.noop,className:u,minHeight:d=100}=t,p=(0,g.useRef)(!1);return(0,g.useEffect)((()=>{if(!p.current)return;const e=x.get(`editor-${n}`),t=e?.getContent();t!==a&&e.setContent(a||"")}),[a,n]),(0,g.useEffect)((()=>{const{baseURL:e,suffix:t}=N.tinymce;function o(e){let t;a&&e.on("loadContent",(()=>e.setContent(a))),e.on("blur",(()=>{t=e.selection.getBookmark(2,!0);const n=document.querySelector(".interface-interface-skeleton__content"),o=n?.scrollTop;return s(e.getContent()),e.once("focus",(()=>{t&&(e.selection.moveToBookmark(t),n&&n?.scrollTop!==o&&(n.scrollTop=o||0))})),!1})),e.on("mousedown touchstart",(()=>{t=null}));const n=(0,c.debounce)((()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,s(t))}),250);e.on("Paste Change input Undo Redo",n),e.on("remove",n.cancel),e.on("keydown",(e=>{y.isKeyboardEvent.primary(e,"z")&&e.stopPropagation();const{altKey:t}=e;t&&e.keyCode===y.F10&&e.stopPropagation()})),e.on("init",(()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function l(){const{settings:e}=N.tinymce;k.oldEditor.initialize(`editor-${n}`,{tinymce:{...e,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${n}`,setup:o}})}function r(){"complete"===document.readyState&&l()}return p.current=!0,x.EditorManager.overrideDefaults({base_url:e,suffix:t}),"complete"===document.readyState?l():document.addEventListener("readystatechange",r),()=>{document.removeEventListener("readystatechange",r),k.oldEditor.remove(`editor-${n}`)}}),[]),(0,e.createElement)(r.BaseControl,{id:`freeform-edit-control-${n}`,label:o,className:l()(["component-freeform-edit-control",u])},(0,e.createElement)("div",{key:"toolbar",id:`toolbar-${n}`,className:"block-library-classic__toolbar",onClick:function(){const e=x.get(`editor-${n}`);e&&e.focus()},onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},"data-placeholder":(0,i.__)("Click here to edit this text.","content-control")}),(0,e.createElement)("div",{key:"editor",id:`editor-${n}`,style:{minHeight:d},className:"wp-block-freeform block-library-rich-text__tinymce"}))};var $=R,I=window.lodash,F=window.contentControl.coreData,B=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})),T=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),L=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})),O=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,e.createElement)(v.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),D=(0,g.forwardRef)((({icon:t,title:n,info:o,type:c,className:a,isSelected:s,onFocus:i=m.noop,onSelect:u=m.noop,...d},p)=>(0,e.createElement)(r.Button,{type:"button",className:l()(["suggestion",s&&"is-selected",a]),ref:p,onClick:u,onFocus:i,onMouseOver:i,"aria-selected":s,role:"option",tabIndex:-1,...d},t&&(0,e.createElement)(r.Icon,{icon:t,className:"suggestion-item-icon"}),(0,e.createElement)("span",{className:"suggestion-item-header"},(0,e.createElement)("span",{className:"suggestion-item-title"},n),o&&(0,e.createElement)("span",{"aria-hidden":"true",className:"suggestion-item-info"},o)),c&&(0,e.createElement)("span",{className:"suggestion-item-type"},c))));const P={id:-1,title:"",url:"",type:(0,i.__)("URL","content-control")},M=({id:t,label:n,value:o,onChange:a=(()=>{}),className:s=""},u)=>{var m,d;const h=(0,c.useInstanceId)(M),v=(0,g.useRef)(null),f=(0,g.useRef)(null),E=(0,g.useRef)(null),b=(0,g.useRef)(null),w=(0,g.useRef)(null),_=(0,g.useRef)([]);(0,g.useImperativeHandle)(u,(()=>E.current),[E]);const S="string"==typeof o?{...P,url:o}:null!=o?o:P,C={value:S,query:null!==(m=S.url)&&void 0!==m?m:"",isEditing:!1,isFocused:!1,selected:-1,showSuggestions:!1},[y,k]=(0,g.useState)(C),{value:x,query:N,isFocused:R,isEditing:$,selected:z,showSuggestions:A}=y,V=t||`url-input-control-${h}`,H=`url-input-control-suggestions-${h}`,j=`url-input-${h}-sug-`,{unfilteredSuggestions:U,isFetchingSuggestions:q}=(0,p.useSelect)((e=>({unfilteredSuggestions:e(F.urlSearchStore).getSuggestions(),isFetchingSuggestions:e(F.urlSearchStore).isDispatching("updateSuggestions")})),[]),{updateSuggestions:G}=(0,p.useDispatch)(F.urlSearchStore),K=(0,I.debounce)(G,200,{leading:!0}),Z=e=>k({...y,selected:e}),W=e=>{const t={...y,value:{...x,...e},query:"",isEditing:!1,isFocused:!0,selected:-1,showSuggestions:!1};k(t)};(0,g.useEffect)((()=>{S.url!==x.url&&a(x)}),[x,S.url,a]),(0,g.useEffect)((()=>{R&&($?E.current?.focus():w.current?.focus())}),[$,R]);const J=(0,g.useMemo)((()=>U.filter(((e,t)=>U.findIndex((t=>e.id===t.id))===t))),[U]).slice(0,10),Q=J.length,X=z>Q?0:z,Y={up:()=>k({...y,showSuggestions:0===N.length&&!A||A,selected:(0,I.clamp)(X-1>=0?X-1:Q,0,Q)}),down:()=>{k({...y,showSuggestions:0===N.length&&!A||A,selected:(0,I.clamp)(X+1<=Q?X+1:0,0,Q)})},"alt+down":()=>k({...y,showSuggestions:!0}),enter:e=>{e.preventDefault(),A&&X>-1&&X!==Q?W(J[X]):x.url===N?k({...y,isEditing:!1,query:"",showSuggestions:!1,selected:-1}):W({title:(0,i.__)("Custom URL","content-control"),type:"URL",url:N})},escape:e=>{e.preventDefault(),e.stopPropagation(),k({...y,selected:-1,showSuggestions:!1})}};return(0,e.createElement)(r.BaseControl,{id:V,label:n,className:l()(["components-url-control",R&&"is-focused",s])},(0,e.createElement)("div",{ref:v,onFocus:()=>{k({...y,isFocused:!0,showSuggestions:N.length>=1})},onBlur:e=>{if(!v.current?.contains(e.relatedTarget)&&!b.current?.contains(e.relatedTarget)){const e={...y,selected:-1,isFocused:!1,showSuggestions:!1};$&&(e.isEditing=!1,e.value=z>-1?J[z]:{title:(0,i.__)("Custom URL"),type:"URL",url:N}),k(e)}}},!$&&S.url.length>0?(0,e.createElement)("div",{className:"suggestion"},(0,e.createElement)(r.Icon,{icon:B,className:"suggestion-item-icon"}),(0,e.createElement)("span",{className:"suggestion-item-header"},(0,e.createElement)("span",{className:"suggestion-item-title"},(0,e.createElement)(e.Fragment,null,null!==(d=x?.title)&&void 0!==d?d:x?.url)),(0,e.createElement)("span",{"aria-hidden":"true",className:"suggestion-item-info"},x.url)),(0,e.createElement)(r.Button,{"aria-label":(0,i.__)("Edit","content-control"),icon:T,onClick:()=>{k({...y,isEditing:!0,isFocused:!0,query:S.url})},ref:w})):(0,e.createElement)(r.KeyboardShortcuts,{shortcuts:Y},(0,e.createElement)("div",{className:l()(["url-control-wrapper"]),ref:f},(0,e.createElement)("div",{className:"url-control"},(0,e.createElement)(r.Icon,{icon:L,className:"url-control__input-icon"}),(0,e.createElement)("input",{id:V,className:"url-control__input",ref:E,type:"text",role:"combobox",placeholder:(0,i.__)("Search or type url","content-control"),value:N,onChange:e=>{return t=e.target.value,k({...y,query:t,showSuggestions:t.length>=1}),void K(t.trim(),{type:["post","term"]});var t},autoComplete:"off","aria-autocomplete":"list","aria-controls":H,"aria-expanded":A,"aria-activedescendant":X>=0?`${j}-${X}`:void 0,"aria-label":n?void 0:(0,i.__)("URL")}),(0,e.createElement)("div",{className:"url-control__actions"},q&&(0,e.createElement)(r.Spinner,null),(0,e.createElement)(r.Button,{icon:O,iconSize:30,onClick:()=>W({title:(0,i.__)("Custom URL","content-control"),type:"URL",url:N})}))),A&&J.length>0&&(0,e.createElement)(r.Popover,{ref:b,focusOnMount:!1,onClose:()=>Z(-1),position:"bottom right",anchor:f.current,className:"suggestions-popover"},(0,e.createElement)("div",{className:"suggestions",id:H,role:"listbox"},J.map(((t,n)=>(0,e.createElement)(D,{key:t.id,id:`${j}-${n}`,title:t.title,info:t.url,type:t.type,isSelected:n===X,onSelect:()=>W(t),onFocus:()=>Z(n),ref:e=>{_.current[n]=e}}))),N.length>0&&(0,e.createElement)(D,{key:"use-current-input-text",id:`${j}-${Q}`,icon:B,title:N,info:(0,i.__)("Press ENTER to add this link","content-control"),type:(0,i.__)("URL","content-control"),className:"is-url",isSelected:Q===X,onSelect:()=>W({title:(0,i.__)("Custom URL","content-control"),type:"URL",url:N}),onFocus:()=>{Z(Q)},ref:e=>{_.current[Q]=e}})))))))};var z=(0,g.forwardRef)(M),A=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})),V=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"}));function H(e,t,n){const[o,l]=(0,g.useState)(e||t),r=(0,g.useRef)(void 0!==e),c=r.current,a=void 0!==e,s=(0,g.useRef)(o);c!==a&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),r.current=a;const i=(0,g.useCallback)(((e,...t)=>{const o=(e,...t)=>{n&&(Object.is(s.current,e)||n(e,...t)),a||(s.current=e)};"function"==typeof e?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),l(((n,...l)=>{const r=e(a?s.current:n,...l);return o(r,...t),a?n:r}))):(a||l(e),o(e,...t))}),[a,n]);return a?s.current=e:e=o,[e,i]}const j=({heading:t=!1,children:n,...o})=>t?(0,e.createElement)("th",{...o},n):(0,e.createElement)("td",{...o},n);var U=({items:t,columns:n,sortableColumns:o=[],idCol:c="id",rowClasses:a=(e=>[`item-${e.id}`]),renderCell:s=((e,t)=>t[e]),noItemsText:u=(0,i.__)("No items found.","content-control"),showBulkSelect:m=!0,className:d,selectedItems:p=[],onSelectItems:h=(()=>{})})=>{var v;const f={[c]:null!==(v=n[c])&&void 0!==v?v:"",...n},E=Object.keys(f).length,[b,w]=H(p,[],h),[_,S]=(0,g.useState)(o.length?o[0]:null),[C,y]=(0,g.useState)("ASC");(0,g.useEffect)((()=>{h(b)}),[b,h]);const k=_?t.sort(((e,t)=>"ASC"===C?e[_]>t[_]?1:-1:t[_]>e[_]?1:-1)):t,x=({header:n=!1})=>(0,e.createElement)(e.Fragment,null,Object.entries(f).map((([a,s])=>{const i=m&&a===c,u=a===_,d=!i&&o.indexOf(a)>=0,p={key:a,heading:!i,id:n&&!i?a:void 0,scope:i?void 0:"col",className:l()([`column-${a}`,...!i&&d?["sortable",C.toLowerCase()]:[],i&&"check-column"])},g=()=>(0,e.createElement)(e.Fragment,null,"function"==typeof s?s():(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,s),u&&(0,e.createElement)(r.Icon,{icon:"ASC"===C?A:V,size:16})));return(0,e.createElement)(j,{...p,key:a},i&&(0,e.createElement)(r.CheckboxControl,{onChange:e=>w(e?t.map((e=>e.id)):[]),checked:b.length>0&&b.length===t.length,indeterminate:b.length>0&&b.length<t.length}),!i&&d&&(0,e.createElement)(r.Button,{variant:"link",onClick:()=>{_===a?y("ASC"===C?"DESC":"ASC"):(S(a),y("ASC"))}},(0,e.createElement)(g,null)),!i&&!d&&(0,e.createElement)(g,null))})));return(0,e.createElement)("table",{className:l()([d,"component-list-table","list-table",0===k.length&&"no-items"])},(0,e.createElement)("thead",null,(0,e.createElement)("tr",null,(0,e.createElement)(x,{header:!0}))),(0,e.createElement)("tbody",null,k.length?k.map(((t,n)=>(0,e.createElement)("tr",{key:t.id,className:l()(a(t))},Object.entries(f).map((([o])=>{const a=o===c;return(0,e.createElement)(j,{key:o,heading:a,className:l()([`column-${o}`,m&&a&&"check-column"]),scope:a?"row":void 0},a?(0,e.createElement)(r.CheckboxControl,{onChange:e=>{const n=e?[...b,t.id]:b.filter((e=>e!==t.id));w(n)},checked:b.indexOf(t.id)>=0}):s(o,t,n))}))))):(0,e.createElement)("tr",null,(0,e.createElement)("td",{colSpan:E},u))),(0,e.createElement)("tfoot",null,(0,e.createElement)("tr",null,(0,e.createElement)(x,null))))},q=t=>{const{text:n="",highlight:o=""}=t,l=(Array.isArray(o)?o:[o]).map((e=>e.trim())).filter((e=>!!e)).map((e=>(0,I.escapeRegExp)(e)));if(!l.length)return(0,e.createElement)(e.Fragment,null,n);const r=new RegExp(`(${l.join("|")})`,"gi");return(0,g.createInterpolateElement)(n.replace(r,"<mark>$&</mark>"),{mark:(0,e.createElement)("mark",null)})};const G=({id:t,label:n,value:o,onChange:a,className:s,options:i=[],orientation:u="horizontal",equalWidth:m=!1,spacing:d,hideLabelFromVision:p=!1})=>{const g=(0,c.useInstanceId)(G);return(0,e.createElement)(r.BaseControl,{id:t||`radio-button-control-${g}`,label:n,className:l()("components-radio-button-control",u,m&&"equal-width",s),hideLabelFromVision:p},(0,e.createElement)("div",{className:"options",style:d?{gap:`${d}px`}:void 0},i.map((({label:t,value:n})=>(0,e.createElement)(r.Button,{key:n,variant:n===o?"primary":"secondary",onClick:()=>a(n)},t)))))};var K=G,Z=(0,e.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(v.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),W=(0,e.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(v.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const J=({label:t="",placeholder:n="",searchIcon:o,value:a=[],options:s=[],onChange:u=(()=>{}),className:m=""})=>{const d=(0,c.useInstanceId)(J),[p,h]=(0,g.useState)(""),[v,f]=(0,g.useState)("ASC"),E=e=>-1!==a.indexOf(e),b=e=>u(E(e)?[...a.filter((t=>t!==e))]:[...a,e]),w=s.filter((({label:e,value:t,keywords:n})=>e.includes(p)||"string"==typeof t&&t.includes(p)||n&&n.includes(p))),_=w.sort(((e,t)=>"ASC"===v?e.label>t.label?1:-1:t.label>e.label?1:-1));return(0,e.createElement)(r.BaseControl,{id:`searchable-multicheck-control-${d}`,label:t,className:l()(["component-searchable-multicheck-control",m])},(0,e.createElement)("div",{className:"select-actions"},(0,e.createElement)(r.Button,{variant:"link",text:(0,i.__)("Select All","content-control"),onClick:()=>{const e=w.map((({value:e})=>e)),t=[...a,...e];u([...new Set(t)])}}),(0,e.createElement)(r.Button,{variant:"link",text:(0,i.__)("Deselect All","content-control"),onClick:()=>{const e=w.map((({value:e})=>e)),t=[...a.filter((t=>-1===e.indexOf(t)))];u([...new Set(t)])}})),(0,e.createElement)("div",{className:l()([o?"icon-input":null])},(0,e.createElement)("input",{type:"text",className:"components-text-control__input",placeholder:n,value:p,onChange:e=>h(e.target.value)}),o&&(0,e.createElement)(r.Icon,{icon:o})),(0,e.createElement)("table",null,(0,e.createElement)("thead",null,(0,e.createElement)("tr",null,(0,e.createElement)("th",{className:"label-column"},(0,e.createElement)(r.Button,{text:(0,i.__)("Name","content-control"),onClick:()=>f("DESC"===v?"ASC":"DESC"),icon:"DESC"===v?Z:W,iconPosition:"right"})),(0,e.createElement)("td",{className:"cb-column"}))),(0,e.createElement)("tbody",null,_.map((({label:t,value:n})=>(0,e.createElement)("tr",{key:n.toString()},(0,e.createElement)("td",null,(0,e.createElement)("span",{role:"button",tabIndex:-1,onClick:()=>b(n),onKeyDown:()=>{}},t)),(0,e.createElement)("th",{className:"cb-column"},(0,e.createElement)(r.CheckboxControl,{checked:E(n),onChange:()=>b(n)}))))))))};var Q=J}(),(window.contentControl=window.contentControl||{}).components=o}();8 (0,i.__)("Select %s(s)","content-control"),s.replace(/_/g," ").toLowerCase()),...m,tokenOnComma:!0,value:k,onInputChange:f,onChange:e=>{const t=e.map((e=>parseInt(x(e),10))).filter((e=>!isNaN(e)));l(u?t:t[0])},renderToken:e=>{var t;const n=C(x(e));return n?"postType"===c?null!==(t=n.title.rendered)&&void 0!==t?t:n.title.raw:n.name:x(e)},renderSuggestion:t=>{var n;const o=C(t);return o?(0,e.createElement)(e.Fragment,null,"postType"===c?null!==(n=o.title.rendered)&&void 0!==n?n:o.title.raw:o.name):t},suggestions:S?S.map((e=>{var t;return null!==(t=e?.id.toString())&&void 0!==t&&t})):[],messages:y?{noSuggestions:(0,i.__)("Searching…","content-control")}:void 0}))},S=({title:t,className:n,children:o})=>(0,e.createElement)(r.Panel,{header:t,className:l()(["components-field-panel",n])},(0,e.createElement)(r.PanelBody,{opened:!0},o)),y=({id:t,label:n,description:o,className:r,children:a})=>(0,e.createElement)("div",{className:l()(["components-field-row",r])},(0,e.createElement)("div",{className:"components-base-control"},(0,e.createElement)("label",{htmlFor:t,className:"components-truncate components-text components-input-control__label"},n),(0,e.createElement)("p",{className:"components-base-control__help"},o)),(0,e.createElement)("div",{className:"components-base-control__field"},a)),C=window.wp.keycodes;const{wp:k,tinymce:x,wpEditorL10n:N={tinymce:{baseURL:"",suffix:"",settings:{}}}}=window,R=t=>{const n=(0,a.useInstanceId)(R),{label:o,value:c,onChange:s=m.noop,className:u,minHeight:d=100}=t,p=(0,g.useRef)(!1);return(0,g.useEffect)((()=>{if(!p.current)return;const e=x.get(`editor-${n}`),t=e?.getContent();t!==c&&e.setContent(c||"")}),[c,n]),(0,g.useEffect)((()=>{const{baseURL:e,suffix:t}=N.tinymce;function o(e){let t;c&&e.on("loadContent",(()=>e.setContent(c))),e.on("blur",(()=>{t=e.selection.getBookmark(2,!0);const n=document.querySelector(".interface-interface-skeleton__content"),o=n?.scrollTop;return s(e.getContent()),e.once("focus",(()=>{t&&(e.selection.moveToBookmark(t),n&&n?.scrollTop!==o&&(n.scrollTop=o||0))})),!1})),e.on("mousedown touchstart",(()=>{t=null}));const n=(0,a.debounce)((()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,s(t))}),250);e.on("Paste Change input Undo Redo",n),e.on("remove",n.cancel),e.on("keydown",(e=>{C.isKeyboardEvent.primary(e,"z")&&e.stopPropagation();const{altKey:t}=e;t&&e.keyCode===C.F10&&e.stopPropagation()})),e.on("init",(()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function l(){const{settings:e}=N.tinymce;k.oldEditor.initialize(`editor-${n}`,{tinymce:{...e,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${n}`,setup:o}})}function r(){"complete"===document.readyState&&l()}return p.current=!0,x.EditorManager.overrideDefaults({base_url:e,suffix:t}),"complete"===document.readyState?l():document.addEventListener("readystatechange",r),()=>{document.removeEventListener("readystatechange",r),k.oldEditor.remove(`editor-${n}`)}}),[]),(0,e.createElement)(r.BaseControl,{id:`freeform-edit-control-${n}`,label:o,className:l()(["component-freeform-edit-control",u])},(0,e.createElement)("div",{key:"toolbar",id:`toolbar-${n}`,className:"block-library-classic__toolbar",onClick:function(){const e=x.get(`editor-${n}`);e&&e.focus()},onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},"data-placeholder":(0,i.__)("Click here to edit this text.","content-control")}),(0,e.createElement)("div",{key:"editor",id:`editor-${n}`,style:{minHeight:d},className:"wp-block-freeform block-library-rich-text__tinymce"}))};var $=R,I=window.lodash,F=window.contentControl.coreData,T=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})),B=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),L=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})),O=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,e.createElement)(v.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),D=(0,g.forwardRef)((({icon:t,title:n,info:o,type:a,className:c,isSelected:s,onFocus:i=m.noop,onSelect:u=m.noop,...d},p)=>(0,e.createElement)(r.Button,{type:"button",className:l()(["suggestion",s&&"is-selected",c]),ref:p,onClick:u,onFocus:i,onMouseOver:i,"aria-selected":s,role:"option",tabIndex:-1,...d},t&&(0,e.createElement)(r.Icon,{icon:t,className:"suggestion-item-icon"}),(0,e.createElement)("span",{className:"suggestion-item-header"},(0,e.createElement)("span",{className:"suggestion-item-title"},n),o&&(0,e.createElement)("span",{"aria-hidden":"true",className:"suggestion-item-info"},o)),a&&(0,e.createElement)("span",{className:"suggestion-item-type"},a))));const P={id:-1,title:"",url:"",type:(0,i.__)("URL","content-control")},M=({id:t,label:n,value:o,onChange:c=(()=>{}),className:s=""},u)=>{var m,d;const h=(0,a.useInstanceId)(M),v=(0,g.useRef)(null),f=(0,g.useRef)(null),E=(0,g.useRef)(null),b=(0,g.useRef)(null),w=(0,g.useRef)(null),_=(0,g.useRef)([]);(0,g.useImperativeHandle)(u,(()=>E.current),[E]);const S="string"==typeof o?{...P,url:o}:null!=o?o:P,y={value:S,query:null!==(m=S.url)&&void 0!==m?m:"",isEditing:!1,isFocused:!1,selected:-1,showSuggestions:!1},[C,k]=(0,g.useState)(y),{value:x,query:N,isFocused:R,isEditing:$,selected:z,showSuggestions:A}=C,V=t||`url-input-control-${h}`,H=`url-input-control-suggestions-${h}`,j=`url-input-${h}-sug-`,{unfilteredSuggestions:U,isFetchingSuggestions:q}=(0,p.useSelect)((e=>({unfilteredSuggestions:e(F.urlSearchStore).getSuggestions(),isFetchingSuggestions:e(F.urlSearchStore).isDispatching("updateSuggestions")})),[]),{updateSuggestions:G}=(0,p.useDispatch)(F.urlSearchStore),K=(0,I.debounce)(G,200,{leading:!0}),Z=e=>k({...C,selected:e}),W=e=>{const t={...C,value:{...x,...e},query:"",isEditing:!1,isFocused:!0,selected:-1,showSuggestions:!1};k(t)};(0,g.useEffect)((()=>{S.url!==x.url&&c(x)}),[x,S.url,c]),(0,g.useEffect)((()=>{R&&($?E.current?.focus():w.current?.focus())}),[$,R]);const J=(0,g.useMemo)((()=>U.filter(((e,t)=>U.findIndex((t=>e.id===t.id))===t))),[U]).slice(0,10),Q=J.length,X=z>Q?0:z,Y={up:()=>k({...C,showSuggestions:0===N.length&&!A||A,selected:(0,I.clamp)(X-1>=0?X-1:Q,0,Q)}),down:()=>{k({...C,showSuggestions:0===N.length&&!A||A,selected:(0,I.clamp)(X+1<=Q?X+1:0,0,Q)})},"alt+down":()=>k({...C,showSuggestions:!0}),enter:e=>{e.preventDefault(),A&&X>-1&&X!==Q?W(J[X]):x.url===N?k({...C,isEditing:!1,query:"",showSuggestions:!1,selected:-1}):W({title:(0,i.__)("Custom URL","content-control"),type:"URL",url:N})},escape:e=>{e.preventDefault(),e.stopPropagation(),k({...C,selected:-1,showSuggestions:!1})}};return(0,e.createElement)(r.BaseControl,{id:V,label:n,className:l()(["components-url-control",R&&"is-focused",s])},(0,e.createElement)("div",{ref:v,onFocus:()=>{k({...C,isFocused:!0,showSuggestions:N.length>=1})},onBlur:e=>{if(!v.current?.contains(e.relatedTarget)&&!b.current?.contains(e.relatedTarget)){const e={...C,selected:-1,isFocused:!1,showSuggestions:!1};$&&(e.isEditing=!1,e.value=z>-1?J[z]:{title:(0,i.__)("Custom URL"),type:"URL",url:N}),k(e)}}},!$&&S.url.length>0?(0,e.createElement)("div",{className:"suggestion"},(0,e.createElement)(r.Icon,{icon:T,className:"suggestion-item-icon"}),(0,e.createElement)("span",{className:"suggestion-item-header"},(0,e.createElement)("span",{className:"suggestion-item-title"},(0,e.createElement)(e.Fragment,null,null!==(d=x?.title)&&void 0!==d?d:x?.url)),(0,e.createElement)("span",{"aria-hidden":"true",className:"suggestion-item-info"},x.url)),(0,e.createElement)(r.Button,{"aria-label":(0,i.__)("Edit","content-control"),icon:B,onClick:()=>{k({...C,isEditing:!0,isFocused:!0,query:S.url})},ref:w})):(0,e.createElement)(r.KeyboardShortcuts,{shortcuts:Y},(0,e.createElement)("div",{className:l()(["url-control-wrapper"]),ref:f},(0,e.createElement)("div",{className:"url-control"},(0,e.createElement)(r.Icon,{icon:L,className:"url-control__input-icon"}),(0,e.createElement)("input",{id:V,className:"url-control__input",ref:E,type:"text",role:"combobox",placeholder:(0,i.__)("Search or type url","content-control"),value:N,onChange:e=>{return t=e.target.value,k({...C,query:t,showSuggestions:t.length>=1}),void K(t.trim(),{type:["post","term"]});var t},autoComplete:"off","aria-autocomplete":"list","aria-controls":H,"aria-expanded":A,"aria-activedescendant":X>=0?`${j}-${X}`:void 0,"aria-label":n?void 0:(0,i.__)("URL")}),(0,e.createElement)("div",{className:"url-control__actions"},q&&(0,e.createElement)(r.Spinner,null),(0,e.createElement)(r.Button,{icon:O,iconSize:30,onClick:()=>W({title:(0,i.__)("Custom URL","content-control"),type:"URL",url:N})}))),A&&J.length>0&&(0,e.createElement)(r.Popover,{ref:b,focusOnMount:!1,onClose:()=>Z(-1),position:"bottom right",anchor:f.current,className:"suggestions-popover"},(0,e.createElement)("div",{className:"suggestions",id:H,role:"listbox"},J.map(((t,n)=>(0,e.createElement)(D,{key:t.id,id:`${j}-${n}`,title:t.title,info:t.url,type:t.type,isSelected:n===X,onSelect:()=>W(t),onFocus:()=>Z(n),ref:e=>{_.current[n]=e}}))),N.length>0&&(0,e.createElement)(D,{key:"use-current-input-text",id:`${j}-${Q}`,icon:T,title:N,info:(0,i.__)("Press ENTER to add this link","content-control"),type:(0,i.__)("URL","content-control"),className:"is-url",isSelected:Q===X,onSelect:()=>W({title:(0,i.__)("Custom URL","content-control"),type:"URL",url:N}),onFocus:()=>{Z(Q)},ref:e=>{_.current[Q]=e}})))))))};var z=(0,g.forwardRef)(M),A=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})),V=(0,e.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(v.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"}));function H(e,t,n){const[o,l]=(0,g.useState)(e||t),r=(0,g.useRef)(void 0!==e),a=r.current,c=void 0!==e,s=(0,g.useRef)(o);a!==c&&console.warn(`WARN: A component changed from ${a?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}.`),r.current=c;const i=(0,g.useCallback)(((e,...t)=>{const o=(e,...t)=>{n&&(Object.is(s.current,e)||n(e,...t)),c||(s.current=e)};"function"==typeof e?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),l(((n,...l)=>{const r=e(c?s.current:n,...l);return o(r,...t),c?n:r}))):(c||l(e),o(e,...t))}),[c,n]);return c?s.current=e:e=o,[e,i]}const j=({heading:t=!1,children:n,...o})=>t?(0,e.createElement)("th",{...o},n):(0,e.createElement)("td",{...o},n);var U=({items:t,columns:n,sortableColumns:o=[],idCol:a="id",rowClasses:c=(e=>[`item-${e.id}`]),renderCell:s=((e,t)=>t[e]),noItemsText:u=(0,i.__)("No items found.","content-control"),showBulkSelect:m=!0,className:d,selectedItems:p=[],onSelectItems:h=(()=>{})})=>{var v;const f={[a]:null!==(v=n[a])&&void 0!==v?v:"",...n},E=Object.keys(f).length,[b,w]=H(p,[],h),[_,S]=(0,g.useState)(o.length?o[0]:null),[y,C]=(0,g.useState)("ASC");(0,g.useEffect)((()=>{h(b)}),[b,h]);const k=_?t.sort(((e,t)=>"ASC"===y?e[_]>t[_]?1:-1:t[_]>e[_]?1:-1)):t,x=({header:n=!1})=>(0,e.createElement)(e.Fragment,null,Object.entries(f).map((([c,s])=>{const i=m&&c===a,u=c===_,d=!i&&o.indexOf(c)>=0,p={key:c,heading:!i,id:n&&!i?c:void 0,scope:i?void 0:"col",className:l()([`column-${c}`,...!i&&d?["sortable",y.toLowerCase()]:[],i&&"check-column"])},g=()=>(0,e.createElement)(e.Fragment,null,"function"==typeof s?s():(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,s),u&&(0,e.createElement)(r.Icon,{icon:"ASC"===y?A:V,size:16})));return(0,e.createElement)(j,{...p,key:c},i&&(0,e.createElement)(r.CheckboxControl,{onChange:e=>w(e?t.map((e=>e.id)):[]),checked:b.length>0&&b.length===t.length,indeterminate:b.length>0&&b.length<t.length}),!i&&d&&(0,e.createElement)(r.Button,{variant:"link",onClick:()=>{_===c?C("ASC"===y?"DESC":"ASC"):(S(c),C("ASC"))}},(0,e.createElement)(g,null)),!i&&!d&&(0,e.createElement)(g,null))})));return(0,e.createElement)("table",{className:l()([d,"component-list-table","list-table",0===k.length&&"no-items"])},(0,e.createElement)("thead",null,(0,e.createElement)("tr",null,(0,e.createElement)(x,{header:!0}))),(0,e.createElement)("tbody",null,k.length?k.map(((t,n)=>(0,e.createElement)("tr",{key:t.id,className:l()(c(t))},Object.entries(f).map((([o])=>{const c=o===a;return(0,e.createElement)(j,{key:o,heading:c,className:l()([`column-${o}`,m&&c&&"check-column"]),scope:c?"row":void 0},c?(0,e.createElement)(r.CheckboxControl,{onChange:e=>{const n=e?[...b,t.id]:b.filter((e=>e!==t.id));w(n)},checked:b.indexOf(t.id)>=0}):s(o,t,n))}))))):(0,e.createElement)("tr",null,(0,e.createElement)("td",{colSpan:E},u))),(0,e.createElement)("tfoot",null,(0,e.createElement)("tr",null,(0,e.createElement)(x,null))))},q=t=>{const{text:n="",highlight:o=""}=t,l=(Array.isArray(o)?o:[o]).map((e=>e.trim())).filter((e=>!!e)).map((e=>(0,I.escapeRegExp)(e)));if(!l.length)return(0,e.createElement)(e.Fragment,null,n);const r=new RegExp(`(${l.join("|")})`,"gi");return(0,g.createInterpolateElement)(n.replace(r,"<mark>$&</mark>"),{mark:(0,e.createElement)("mark",null)})};const G=({id:t,label:n,value:o,onChange:c,className:s,options:i=[],orientation:u="horizontal",equalWidth:m=!1,spacing:d,hideLabelFromVision:p=!1})=>{const g=(0,a.useInstanceId)(G);return(0,e.createElement)(r.BaseControl,{id:t||`radio-button-control-${g}`,label:n,className:l()("components-radio-button-control",u,m&&"equal-width",s),hideLabelFromVision:p},(0,e.createElement)("div",{className:"options",style:d?{gap:`${d}px`}:void 0},i.map((({label:t,value:n})=>(0,e.createElement)(r.Button,{key:n,variant:n===o?"primary":"secondary",onClick:()=>c(n)},t)))))};var K=G,Z=(0,e.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(v.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),W=(0,e.createElement)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(v.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));const J=({label:t="",placeholder:n="",searchIcon:o,value:c=[],options:s=[],onChange:u=(()=>{}),className:m=""})=>{const d=(0,a.useInstanceId)(J),[p,h]=(0,g.useState)(""),[v,f]=(0,g.useState)("ASC"),E=e=>-1!==c.indexOf(e),b=e=>u(E(e)?[...c.filter((t=>t!==e))]:[...c,e]),w=s.filter((({label:e,value:t,keywords:n})=>e.includes(p)||"string"==typeof t&&t.includes(p)||n&&n.includes(p))),_=w.sort(((e,t)=>"ASC"===v?e.label>t.label?1:-1:t.label>e.label?1:-1));return(0,e.createElement)(r.BaseControl,{id:`searchable-multicheck-control-${d}`,label:t,className:l()(["component-searchable-multicheck-control",m])},(0,e.createElement)("div",{className:"select-actions"},(0,e.createElement)(r.Button,{variant:"link",text:(0,i.__)("Select All","content-control"),onClick:()=>{const e=w.map((({value:e})=>e)),t=[...c,...e];u([...new Set(t)])}}),(0,e.createElement)(r.Button,{variant:"link",text:(0,i.__)("Deselect All","content-control"),onClick:()=>{const e=w.map((({value:e})=>e)),t=[...c.filter((t=>-1===e.indexOf(t)))];u([...new Set(t)])}})),(0,e.createElement)("div",{className:l()([o?"icon-input":null])},(0,e.createElement)("input",{type:"text",className:"components-text-control__input",placeholder:n,value:p,onChange:e=>h(e.target.value)}),o&&(0,e.createElement)(r.Icon,{icon:o})),(0,e.createElement)("table",null,(0,e.createElement)("thead",null,(0,e.createElement)("tr",null,(0,e.createElement)("th",{className:"label-column"},(0,e.createElement)(r.Button,{text:(0,i.__)("Name","content-control"),onClick:()=>f("DESC"===v?"ASC":"DESC"),icon:"DESC"===v?Z:W,iconPosition:"right"})),(0,e.createElement)("td",{className:"cb-column"}))),(0,e.createElement)("tbody",null,_.map((({label:t,value:n})=>(0,e.createElement)("tr",{key:n.toString()},(0,e.createElement)("td",null,(0,e.createElement)("span",{role:"button",tabIndex:-1,onClick:()=>b(n),onKeyDown:()=>{}},t)),(0,e.createElement)("th",{className:"cb-column"},(0,e.createElement)(r.CheckboxControl,{checked:E(n),onChange:()=>b(n)}))))))))};var Q=J}(),(window.contentControl=window.contentControl||{}).components=o}(); -
content-control/trunk/dist/fields.asset.php
r3052982 r3256177 1 <?php return array('dependencies' => array('content-control-components', 'content-control-utils', 'react', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n'), 'version' => ' b80778b8bb769e7642fe');1 <?php return array('dependencies' => array('content-control-components', 'content-control-utils', 'react', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n'), 'version' => '76c6247f3b49cae646c0'); -
content-control/trunk/dist/fields.js
r3052982 r3256177 1 !function(){var e={184:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var l=typeof n;if("string"===l||"number"===l)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===l){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)o.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var l=t[o]={exports:{}};return e[o](l,l.exports,n),l.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o),n.d(o,{CheckboxField:function(){return r},ColorField:function(){return l},DateField:function(){return a},Field:function(){return v},FieldContextProvider:function(){return P},Fields:function(){return g},FieldsContext:function(){return I},MeasureField:function(){return f},MulticheckField:function(){return h},NumberField:function(){return b},ObjectSelectField:function(){return _},RadioField:function(){return F},RangeSliderField:function(){return S},SelectField:function(){return T},TextAreaField:function(){return N},TextField:function(){return O},TokenSelectField:function(){return M},useFields:function(){return R}});var e=window.React,t=window.wp.components,r=({value:n,onChange:o,label:r,...l})=>(0,e.createElement)(t.CheckboxControl,{...l,label:r,checked:n,onChange:o}),l=({value:n="",onChange:o,...r})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t.ColorIndicator,{colorValue:n}),(0,e.createElement)(t.ColorPicker,{...r,color:n,onChangeComplete:e=>{var t;return o(null!==(t=e?.hex)&&void 0!==t?t:e)}}),(0,e.createElement)(t.ColorPalette,{value:n,onChange:e=>{o(null!=e?e:"")},colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],clearable:!0})),a=({value:n,onChange:o,...r})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t.BaseControl,{...r,__nextHasNoMarginBottom:!0,hideLabelFromVision:!0},(0,e.createElement)("input",{type:"date",value:n,onChange:e=>o(e.target.value)}))),s=n(184),i=n.n(s),c=window.wp.i18n,u=window.contentControl.utils;window.wp.htmlEntities;const p=e=>"string"==typeof e?e.split(",").map((e=>({label:e,value:e}))):Array.isArray(e)||"object"!=typeof e?e.map((e=>"string"==typeof e?{label:e,value:e}:e)):Object.entries(e).map((([e,t])=>({label:t,value:e}))),d=t=>{var n,o,r,l,a,s;let c;switch(c=function(e){const t={...e};return!(!t||"object"!=typeof t||void 0===t?.std&&void 0===t?.user_roles&&(void 0===t?.type||"userselect"!==t?.type)&&void 0===t?.taxonomy&&void 0===t?.post_type)}(t)?(t=>{var n,o,r,l,a,s,c;const d={type:"select2"!==t.type?t.type:"select",default:t.std,id:null!==(n=null!==(o=t.id)&&void 0!==o?o:t.name)&&void 0!==n?n:"",...(0,u.pick)(t,"id","name","label","value","required","dependencies")},m=[];switch(void 0!==t.classes&&("string"==typeof t.classes?m.push(...t.classes.split(" ")):Array.isArray(t.classes)&&m.push(...t.classes)),void 0!==t.class&&m.push(t.class),d.className=i()(m),t.dynamic_desc?d.help=(0,e.createElement)(e.Fragment,null,t.dynamic_desc):t.desc&&(d.help=t.desc),d.type){case"checkbox":case"hidden":case"license_key":return d;case"color":return{...d,default:null!==(r=t.value)&&void 0!==r?r:""};case"text":case"email":case"tel":case"password":default:return{...d,...d.type===t.type&&{size:t?.size,placeholder:t?.placeholder}};case"radio":case"multicheck":return{...d,options:[],...d.type===t.type&&{options:null!==(l=t.options)&&void 0!==l?l:[]}};case"select":case"multiselect":var v;return d.type!==t.type&&"select2"!==t.type||(d.options=p(null!==(v=t.options)&&void 0!==v?v:[]),d.searchable="select2"===t.type,d.multiple="multiselect"===d.type||t.multiple),{options:[],...d};case"tokenselect":return{value:[],options:{},...d};case"number":case"rangeslider":return{...d,...d.type===t.type&&{size:t?.size,placeholder:t?.placeholder,min:t?.min,max:t?.max,step:t?.step}};case"measure":return{...d,units:{},...d.type===t.type&&{size:t?.size,placeholder:t?.placeholder,min:t?.min,max:t?.max,step:t?.step,units:null!==(a=t?.units)&&void 0!==a?a:{}}};case"objectselect":case"postselect":case"taxonomyselect":case"userselect":d.type="objectselect",d.multiple=null!==(s=t?.multiple)&&void 0!==s&&s,d.placeholder=null!==(c=t?.placeholder)&&void 0!==c?c:"";let e="postType",n="";var g;if("postselect"===t.type)e="postType",n=null!==(g=t?.post_type)&&void 0!==g?g:"post";else if("taxonomyselect"===t.type){var y;e="taxonomy",n=null!==(y=t?.taxonomy)&&void 0!==y?y:"category"}else if("userselect"===t.type)e="user",n="user";else{var f;e=t?.post_type?"postType":"taxonomy",n=null!==(f=t?.post_type)&&void 0!==f?f:t?.taxonomy}return{...d,entityKind:e,entityType:n};case"textarea":return{...d,...d.type===t.type&&{allowHtml:t?.allow_html}}}})(t):t,c.type){case"checkbox":case"color":case"radio":case"rangeslider":case"number":default:case"email":case"tel":case"hidden":case"text":case"password":case"license_key":case"measure":case"textarea":return{...c};case"multicheck":return{...c,options:null!==(n=c.options)&&void 0!==n?n:[]};case"select":return{...c,options:null!==(o=c.options)&&void 0!==o?o:[]};case"multiselect":return{...c,options:null!==(r=c.options)&&void 0!==r?r:[],multiple:!0};case"objectselect":case"postselect":case"taxonomyselect":case"userselect":return{...c,entityKind:null!==(l=c.entityKind)&&void 0!==l?l:""};case"tokenselect":return{...c,value:null!==(a=c.value)&&void 0!==a?a:[],options:null!==(s=c.options)&&void 0!==s?s:[]}}},m=t=>{const{type:n}=t;switch(n){case"checkbox":return(0,e.createElement)(r,{...t});case"color":return(0,e.createElement)(l,{...t});case"date":return(0,e.createElement)(a,{...t});case"measure":return(0,e.createElement)(f,{...t});case"multicheck":return(0,e.createElement)(h,{...t});case"select":case"multiselect":return(0,e.createElement)(T,{...t});case"objectselect":case"postselect":case"taxonomyselect":case"userselect":return(0,e.createElement)(_,{...t});case"radio":return(0,e.createElement)(F,{...t});case"rangeslider":return(0,e.createElement)(S,{...t});case"number":return(0,e.createElement)(b,{...t});case"email":case"tel":case"hidden":case"text":case"password":return(0,e.createElement)(O,{...t});case"textarea":return(0,e.createElement)(N,{...t});case"tokenselect":return(0,e.createElement)(M,{...t})}return(0,e.createElement)(e.Fragment,null,(0,c.sprintf)(/* translators: 1. type of field not found. */2 (0,c.__)("Field type `%s` not found","content-control"),n))};var v=t=>{const{type:n,className:o,onChange: r}=t;return(0,e.createElement)("div",{className:i()(["cc-field",`cc-field--${n}`,o])},(0,e.createElement)(m,{onChange:r,...d(t)}))},g=t=>{const{fields:n}=t;return(0,e.createElement)(e.Fragment,null,n.map(((t,n)=>(0,e.createElement)(v,{key:n,...t}))))},y=window.wp.element,f=({value:n,onChange:o,units:r,...l})=>{var a;const s=n?parseInt(n):"",[i,c]=(0,y.useState)({number:s,unit:null!==(a=n?.replace(`${s}`,""))&&void 0!==a?a:""});(0,y.useEffect)((()=>{o(`${i.number}${i.unit}`)}),[i,o]);const u=Object.entries(r).map((([e,t])=>({value:e,label:t})));return(0,e.createElement)(t.__experimentalUnitControl,{...l,value:n,onChange:(e="0")=>c({...i,number:e}),disableUnits:0===u.length,units:u,onUnitChange:(e="")=>c({...i,unit:e}),__nextHasNoMarginBottom:!0})},h=({value:n,onChange:o,...r})=>{const l=null!=n?n:[],a=p(r.options),s=null!=n?n:[];return(0,e.createElement)((()=>(0,e.createElement)(e.Fragment,null,a.map((({label:n,value:r})=>{const a=l.indexOf(r)>=0;return(0,e.createElement)(t.CheckboxControl,{key:r,label:n,checked:a,onChange:()=>o(a?s.filter((e=>r!==e)):[...s,r])})})))),null)},b=({value:n,onChange:o,...r})=>(0,e.createElement)(t.__experimentalNumberControl,{...r,value:n,onChange:(e="0")=>o(parseInt(e,10)),__nextHasNoMarginBottom:!0}),C=window.wp.data,x=window.wp.compose,w=window.wp.coreData,E=window.contentControl.components,_=({label:t,value:n,onChange:o,entityKind:r="postType",entityType:l="post",multiple:a=!1})=>{const[s,i]=(0,y.useState)(""),u=(0,x.useDebounce)((e=>{i(e)}),300),{prefill:p=[]}=(0,C.useSelect)((e=>({prefill:n?e(w.store).getEntityRecords(r,l,{context:"view",include:n,per_page:-1}):[]})),[n,r,l]),{suggestions:d=[],isSearching:m=!1}=(0,C.useSelect)((e=>({suggestions:"user"===r?e(w.store).getUsers({context:"view",search:s,per_page:-1}):e(w.store).getEntityRecords(r,l,{context:"view",search:s,per_page:-1}),isSearching:"user"===r?e("core/data").isResolving("core","getUsers",[r,l,{context:"view",search:s,per_page:-1}]):e("core/data").isResolving("core","getEntityRecords",[r,l,{context:"view",search:s,per_page:-1}])})),[s,r,l]),v=e=>d&&d.find((t=>t.id.toString()===e.toString()))||p&&p.find((t=>t.id.toString()===e.toString())),g=n?"number"==typeof n||"string"==typeof n?[n]:n:[],f=e=>"object"==typeof e?e.value:e;return(0,e.createElement)("div",{className:"cc-object-search-field"},(0,e.createElement)(E.SmartTokenControl,{label:t||(0,c.sprintf)(1 !function(){var e={184:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function l(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var a=l.apply(null,n);a&&e.push(a)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)o.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(l.default=l,e.exports=l):void 0===(n=function(){return l}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var l=t[o];if(void 0!==l)return l.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o),n.d(o,{CheckboxField:function(){return l},ColorField:function(){return r},DateField:function(){return a},Field:function(){return v},FieldContextProvider:function(){return P},Fields:function(){return g},FieldsContext:function(){return I},MeasureField:function(){return f},MulticheckField:function(){return h},NumberField:function(){return b},ObjectSelectField:function(){return _},RadioField:function(){return F},RangeSliderField:function(){return S},SelectField:function(){return T},TextAreaField:function(){return N},TextField:function(){return O},TokenSelectField:function(){return M},useFields:function(){return R}});var e=window.React,t=window.wp.components,l=({value:n,onChange:o,label:l,...r})=>(0,e.createElement)(t.CheckboxControl,{...r,label:l,checked:n,onChange:o}),r=({value:n="",onChange:o,...l})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t.ColorIndicator,{colorValue:n}),(0,e.createElement)(t.ColorPicker,{...l,color:n,onChangeComplete:e=>{var t;return o(null!==(t=e?.hex)&&void 0!==t?t:e)}}),(0,e.createElement)(t.ColorPalette,{value:n,onChange:e=>{o(null!=e?e:"")},colors:[{name:"red",color:"#f00"},{name:"white",color:"#fff"},{name:"blue",color:"#00f"}],clearable:!0})),a=({value:n,onChange:o,...l})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t.BaseControl,{...l,__nextHasNoMarginBottom:!0,hideLabelFromVision:!0},(0,e.createElement)("input",{type:"date",value:n,onChange:e=>o(e.target.value)}))),s=n(184),i=n.n(s),c=window.wp.i18n,u=window.contentControl.utils;window.wp.htmlEntities;const p=e=>"string"==typeof e?e.split(",").map((e=>({label:e,value:e}))):Array.isArray(e)||"object"!=typeof e?e.map((e=>"string"==typeof e?{label:e,value:e}:e)):Object.entries(e).map((([e,t])=>({label:t,value:e}))),d=t=>{var n,o,l,r,a,s;let c;switch(c=function(e){const t={...e};return!(!t||"object"!=typeof t||void 0===t?.std&&void 0===t?.user_roles&&(void 0===t?.type||"userselect"!==t?.type)&&void 0===t?.taxonomy&&void 0===t?.post_type)}(t)?(t=>{var n,o,l,r,a,s,c;const d={type:"select2"!==t.type?t.type:"select",default:t.std,id:null!==(n=null!==(o=t.id)&&void 0!==o?o:t.name)&&void 0!==n?n:"",...(0,u.pick)(t,"id","name","label","value","required","dependencies")},m=[];switch(void 0!==t.classes&&("string"==typeof t.classes?m.push(...t.classes.split(" ")):Array.isArray(t.classes)&&m.push(...t.classes)),void 0!==t.class&&m.push(t.class),d.className=i()(m),t.dynamic_desc?d.help=(0,e.createElement)(e.Fragment,null,t.dynamic_desc):t.desc&&(d.help=t.desc),d.type){case"checkbox":case"hidden":case"license_key":return d;case"color":return{...d,default:null!==(l=t.value)&&void 0!==l?l:""};case"text":case"email":case"tel":case"password":default:return{...d,...d.type===t.type&&{size:t?.size,placeholder:t?.placeholder}};case"radio":case"multicheck":return{...d,options:[],...d.type===t.type&&{options:null!==(r=t.options)&&void 0!==r?r:[]}};case"select":case"multiselect":var v;return d.type!==t.type&&"select2"!==t.type||(d.options=p(null!==(v=t.options)&&void 0!==v?v:[]),d.searchable="select2"===t.type,d.multiple="multiselect"===d.type||t.multiple),{options:[],...d};case"tokenselect":return{value:[],options:{},...d};case"number":case"rangeslider":return{...d,...d.type===t.type&&{size:t?.size,placeholder:t?.placeholder,min:t?.min,max:t?.max,step:t?.step}};case"measure":return{...d,units:{},...d.type===t.type&&{size:t?.size,placeholder:t?.placeholder,min:t?.min,max:t?.max,step:t?.step,units:null!==(a=t?.units)&&void 0!==a?a:{}}};case"objectselect":case"postselect":case"taxonomyselect":case"userselect":d.type="objectselect",d.multiple=null!==(s=t?.multiple)&&void 0!==s&&s,d.placeholder=null!==(c=t?.placeholder)&&void 0!==c?c:"";let e="postType",n="";var g;if("postselect"===t.type)e="postType",n=null!==(g=t?.post_type)&&void 0!==g?g:"post";else if("taxonomyselect"===t.type){var y;e="taxonomy",n=null!==(y=t?.taxonomy)&&void 0!==y?y:"category"}else if("userselect"===t.type)e="user",n="user";else{var f;e=t?.post_type?"postType":"taxonomy",n=null!==(f=t?.post_type)&&void 0!==f?f:t?.taxonomy}return{...d,entityKind:e,entityType:n};case"textarea":return{...d,...d.type===t.type&&{allowHtml:t?.allow_html}}}})(t):t,c.type){case"checkbox":case"color":case"radio":case"rangeslider":case"number":default:case"email":case"tel":case"hidden":case"text":case"password":case"license_key":case"measure":case"textarea":return{...c};case"multicheck":return{...c,options:null!==(n=c.options)&&void 0!==n?n:[]};case"select":return{...c,options:null!==(o=c.options)&&void 0!==o?o:[]};case"multiselect":return{...c,options:null!==(l=c.options)&&void 0!==l?l:[],multiple:!0};case"objectselect":case"postselect":case"taxonomyselect":case"userselect":return{...c,entityKind:null!==(r=c.entityKind)&&void 0!==r?r:""};case"tokenselect":return{...c,value:null!==(a=c.value)&&void 0!==a?a:[],options:null!==(s=c.options)&&void 0!==s?s:[]}}},m=t=>{const{type:n}=t;switch(n){case"checkbox":return(0,e.createElement)(l,{...t});case"color":return(0,e.createElement)(r,{...t});case"date":return(0,e.createElement)(a,{...t});case"measure":return(0,e.createElement)(f,{...t});case"multicheck":return(0,e.createElement)(h,{...t});case"select":case"multiselect":return(0,e.createElement)(T,{...t});case"objectselect":case"postselect":case"taxonomyselect":case"userselect":return(0,e.createElement)(_,{...t});case"radio":return(0,e.createElement)(F,{...t});case"rangeslider":return(0,e.createElement)(S,{...t});case"number":return(0,e.createElement)(b,{...t});case"email":case"tel":case"hidden":case"text":case"password":return(0,e.createElement)(O,{...t});case"textarea":return(0,e.createElement)(N,{...t});case"tokenselect":return(0,e.createElement)(M,{...t})}return(0,e.createElement)(e.Fragment,null,(0,c.sprintf)(/* translators: 1. type of field not found. */ 2 (0,c.__)("Field type `%s` not found","content-control"),n))};var v=t=>{const{type:n,className:o,onChange:l}=t;return(0,e.createElement)("div",{className:i()(["cc-field",`cc-field--${n}`,o])},(0,e.createElement)(m,{onChange:l,...d(t)}))},g=t=>{const{fields:n}=t;return(0,e.createElement)(e.Fragment,null,n.map(((t,n)=>(0,e.createElement)(v,{key:n,...t}))))},y=window.wp.element,f=({value:n,onChange:o,units:l,...r})=>{var a;const s=n?parseInt(n):"",[i,c]=(0,y.useState)({number:s,unit:null!==(a=n?.replace(`${s}`,""))&&void 0!==a?a:""});(0,y.useEffect)((()=>{o(`${i.number}${i.unit}`)}),[i,o]);const u=Object.entries(l).map((([e,t])=>({value:e,label:t})));return(0,e.createElement)(t.__experimentalUnitControl,{...r,value:n,onChange:(e="0")=>c({...i,number:e}),disableUnits:0===u.length,units:u,onUnitChange:(e="")=>c({...i,unit:e}),__nextHasNoMarginBottom:!0})},h=({value:n,onChange:o,...l})=>{const r=null!=n?n:[],a=p(l.options),s=null!=n?n:[];return(0,e.createElement)((()=>(0,e.createElement)(e.Fragment,null,a.map((({label:n,value:l})=>{const a=r.indexOf(l)>=0;return(0,e.createElement)(t.CheckboxControl,{key:l,label:n,checked:a,onChange:()=>o(a?s.filter((e=>l!==e)):[...s,l])})})))),null)},b=({value:n,onChange:o,...l})=>(0,e.createElement)(t.__experimentalNumberControl,{...l,value:n,onChange:(e="0")=>o(parseInt(e,10)),__nextHasNoMarginBottom:!0}),C=window.wp.data,x=window.wp.compose,E=window.wp.coreData,w=window.contentControl.components,_=({label:t,value:n,onChange:o,entityKind:l="postType",entityType:r="post",multiple:a=!1})=>{const[s,i]=(0,y.useState)(""),u=(0,x.useDebounce)((e=>{i(e)}),300),p=()=>"postType"===l?"id,title,name,type":"taxonomy"===l?"id,name,slug,taxonomy":null,d={context:"view",per_page:-1,...null!==p()?{_fields:p()}:{}},{prefill:m=[]}=(0,C.useSelect)((e=>({prefill:n?e(E.store).getEntityRecords(l,r,{...d,include:n}):[]})),[n,l,r]),{suggestions:v=[],isSearching:g=!1}=(0,C.useSelect)((e=>({suggestions:"user"===l?e(E.store).getUsers({...d,search:s}):e(E.store).getEntityRecords(l,r,{...d,search:s}),isSearching:"user"===l?e("core/data").isResolving("core","getUsers",[l,r,{...d,search:s}]):e("core/data").isResolving("core","getEntityRecords",[l,r,{...d,search:s}])})),[s,l,r]),f=e=>v&&v.find((t=>t.id.toString()===e.toString()))||m&&m.find((t=>t.id.toString()===e.toString())),h=n?"number"==typeof n||"string"==typeof n?[n]:n:[],b=e=>"object"==typeof e?e.value:e;return(0,e.createElement)("div",{className:"cc-object-search-field"},(0,e.createElement)(w.SmartTokenControl,{label:t||(0,c.sprintf)( 3 3 // translators: %s: entity type. 4 (0,c.__)("%s(s)","content-control"), l.replace(/_/g," ").charAt(0).toUpperCase()+l.replace(/_/g," ").slice(1)),hideLabelFromVision:!0,multiple:a,placeholder:(0,c.sprintf)(4 (0,c.__)("%s(s)","content-control"),r.replace(/_/g," ").charAt(0).toUpperCase()+r.replace(/_/g," ").slice(1)),hideLabelFromVision:!0,multiple:a,placeholder:(0,c.sprintf)( 5 5 // translators: %s: entity type. 6 (0,c.__)("Select %s(s)","content-control"), l.replace(/_/g," ").toLowerCase()),tokenOnComma:!0,value:g.map((e=>e.toString())),onInputChange:u,onChange:e=>{o(e.map((e=>parseInt(f(e),10))).filter((e=>!isNaN(e))))},renderToken:e=>{const t=v(f(e));return t?"postType"===r?t.title.rendered:t.name:f(e)},renderSuggestion:t=>{var n;const o=v(t);return o?(0,e.createElement)(e.Fragment,null,"postType"===r?null!==(n=o.title.rendered)&&void 0!==n?n:o.title.raw:o.name):t},suggestions:d?d.map((e=>{var t;return null!==(t=e?.id.toString())&&void 0!==t&&t})):[],messages:m?{noSuggestions:(0,c.__)("Searching…","content-control")}:void 0}))},F=({value:n,onChange:o,...r})=>{const l=r.options;return(0,e.createElement)(t.RadioControl,{...r,selected:n?.toString(),options:l,onChange:o,__nextHasNoMarginBottom:!0})},S=({value:n,onChange:o,initialPosition:r=0,...l})=>{const{step:a}=l;return(0,e.createElement)(t.RangeControl,{value:null!=n?n:r,onChange:(e=0)=>o(e),withInputField:!0,__nextHasNoMarginBottom:!0,type:a?"stepper":void 0})};const k=({options:t})=>(0,e.createElement)(e.Fragment,null,p(t).map((({label:t,value:n})=>(0,e.createElement)("option",{key:n,value:n},t)))),j=({optGroups:t})=>(0,e.createElement)(e.Fragment,null,Object.entries(t).map((([t,n])=>(0,e.createElement)("optgroup",{key:t,label:t},(0,e.createElement)(k,{options:n})))));var T=({value:n,onChange:o,...r})=>{var l;const{multiple:a=!1}=r,s=null!==(l=r.options)&&void 0!==l?l:{};return(0,e.createElement)(t.SelectControl,{...r,multiple:a,value:a&&"string"==typeof n?n.split(","):n,onChange:o,__nextHasNoMarginBottom:!0},(e=>Object.entries(e).reduce(((e,[t,n])=>!0===e?e:"string"==typeof t&&!(parseInt(t)>=0)&&"object"==typeof n),!1))(s)?(0,e.createElement)(j,{optGroups:s}):(0,e.createElement)(k,{options:s}))},N=({value:n,onChange:o,rows:r=5,...l})=>(0,e.createElement)(t.TextareaControl,{...l,value:null!=n?n:"",onChange:o,rows:r,__nextHasNoMarginBottom:!0}),O=({type:n,value:o,onChange:r,...l})=>(0,e.createElement)(t.TextControl,{...l,type:"hidden"!==n?n:void 0,value:null!=o?o:"",onChange:r,__nextHasNoMarginBottom:!0}),M=({label:t,value:n,onChange:o,multiple:r=!1,placeholder:l=(0,c.__)("Search","content-control"),options:a={}})=>{const[s,i]=(0,y.useState)(""),u=n?"number"==typeof n||"string"==typeof n?[n]:n:[],p=Object.keys(a).filter((e=>!s||e.toLowerCase().includes(s.toLowerCase()))),d=e=>{var t;const n="object"==typeof e?e.value:e;return(null!==(t=a[n])&&void 0!==t?t:null)||n};return(0,e.createElement)("div",{className:"cc-token-select-field"},(0,e.createElement)(E.SmartTokenControl,{label:t,hideLabelFromVision:!0,multiple:r,placeholder:l,value:u.map((e=>e.toString())),onInputChange:i,onChange:e=>o(e),renderToken:d,renderSuggestion:d,suggestions:p}))},V=window.wp.hooks;const I=(0,y.createContext)({context:"",fields:[],values:{},setValues:()=>{}}),P=({context:t,fields:n,values:o,setValues:r,children:l})=>(0,e.createElement)(I.Provider,{value:{context:t,fields:n,values:o,setValues:r}},l);var R=()=>{const{context:e,fields:t=[],values:n,setValues:o}=(0,y.useContext)(I),r=t=>{const o=(0,V.applyFilters)(`${e}.fieldIsVisible`,void 0,t,n);return void 0===o||o};return{context:e,fields:t,values:n,setValues:o,getFields:(n={visible:!0})=>{const o=(null!=t?t:[]).filter((e=>!(n?.tab&&e.tab!==n.tab||n?.section&&e.section!==n.section||n?.panel&&e.panel!==n.panel||n?.visible&&!r(e.id)))).sort(((e,t)=>e.priority-t.priority)).map((t=>{const n=(0,V.applyFilters)(`${e}.renderField`,t.component,t.id,t);return{...t,component:n}}));return(0,V.applyFilters)(`${e}.getFields`,o,n)},updateField:(e,t)=>{o({...n,[e]:t})},fieldIsVisible:r}}}(),(window.contentControl=window.contentControl||{}).fields=o}();6 (0,c.__)("Select %s(s)","content-control"),r.replace(/_/g," ").toLowerCase()),tokenOnComma:!0,value:h.map((e=>e.toString())),onInputChange:u,onChange:e=>{o(e.map((e=>parseInt(b(e),10))).filter((e=>!isNaN(e))))},renderToken:e=>{const t=f(b(e));return t?"postType"===l?t.title.rendered:t.name:b(e)},renderSuggestion:t=>{var n;const o=f(t);return o?(0,e.createElement)(e.Fragment,null,"postType"===l?null!==(n=o.title.rendered)&&void 0!==n?n:o.title.raw:o.name):t},suggestions:v?v.map((e=>{var t;return null!==(t=e?.id.toString())&&void 0!==t&&t})):[],messages:g?{noSuggestions:(0,c.__)("Searching…","content-control")}:void 0}))},F=({value:n,onChange:o,...l})=>{const r=l.options;return(0,e.createElement)(t.RadioControl,{...l,selected:n?.toString(),options:r,onChange:o,__nextHasNoMarginBottom:!0})},S=({value:n,onChange:o,initialPosition:l=0,...r})=>{const{step:a}=r;return(0,e.createElement)(t.RangeControl,{value:null!=n?n:l,onChange:(e=0)=>o(e),withInputField:!0,__nextHasNoMarginBottom:!0,type:a?"stepper":void 0})};const k=({options:t})=>(0,e.createElement)(e.Fragment,null,p(t).map((({label:t,value:n})=>(0,e.createElement)("option",{key:n,value:n},t)))),j=({optGroups:t})=>(0,e.createElement)(e.Fragment,null,Object.entries(t).map((([t,n])=>(0,e.createElement)("optgroup",{key:t,label:t},(0,e.createElement)(k,{options:n})))));var T=({value:n,onChange:o,...l})=>{var r;const{multiple:a=!1}=l,s=null!==(r=l.options)&&void 0!==r?r:{};return(0,e.createElement)(t.SelectControl,{...l,multiple:a,value:a&&"string"==typeof n?n.split(","):n,onChange:o,__nextHasNoMarginBottom:!0},(e=>Object.entries(e).reduce(((e,[t,n])=>!0===e?e:"string"==typeof t&&!(parseInt(t)>=0)&&"object"==typeof n),!1))(s)?(0,e.createElement)(j,{optGroups:s}):(0,e.createElement)(k,{options:s}))},N=({value:n,onChange:o,rows:l=5,...r})=>(0,e.createElement)(t.TextareaControl,{...r,value:null!=n?n:"",onChange:o,rows:l,__nextHasNoMarginBottom:!0}),O=({type:n,value:o,onChange:l,...r})=>(0,e.createElement)(t.TextControl,{...r,type:"hidden"!==n?n:void 0,value:null!=o?o:"",onChange:l,__nextHasNoMarginBottom:!0}),M=({label:t,value:n,onChange:o,multiple:l=!1,placeholder:r=(0,c.__)("Search","content-control"),options:a={}})=>{const[s,i]=(0,y.useState)(""),u=n?"number"==typeof n||"string"==typeof n?[n]:n:[],p=Object.keys(a).filter((e=>!s||e.toLowerCase().includes(s.toLowerCase()))),d=e=>{var t;const n="object"==typeof e?e.value:e;return(null!==(t=a[n])&&void 0!==t?t:null)||n};return(0,e.createElement)("div",{className:"cc-token-select-field"},(0,e.createElement)(w.SmartTokenControl,{label:t,hideLabelFromVision:!0,multiple:l,placeholder:r,value:u.map((e=>e.toString())),onInputChange:i,onChange:e=>o(e),renderToken:d,renderSuggestion:d,suggestions:p}))},V=window.wp.hooks;const I=(0,y.createContext)({context:"",fields:[],values:{},setValues:()=>{}}),P=({context:t,fields:n,values:o,setValues:l,children:r})=>(0,e.createElement)(I.Provider,{value:{context:t,fields:n,values:o,setValues:l}},r);var R=()=>{const{context:e,fields:t=[],values:n,setValues:o}=(0,y.useContext)(I),l=t=>{const o=(0,V.applyFilters)(`${e}.fieldIsVisible`,void 0,t,n);return void 0===o||o};return{context:e,fields:t,values:n,setValues:o,getFields:(n={visible:!0})=>{const o=(null!=t?t:[]).filter((e=>!(n?.tab&&e.tab!==n.tab||n?.section&&e.section!==n.section||n?.panel&&e.panel!==n.panel||n?.visible&&!l(e.id)))).sort(((e,t)=>e.priority-t.priority)).map((t=>{const n=(0,V.applyFilters)(`${e}.renderField`,t.component,t.id,t);return{...t,component:n}}));return(0,V.applyFilters)(`${e}.getFields`,o,n)},updateField:(e,t)=>{o({...n,[e]:t})},fieldIsVisible:l}}}(),(window.contentControl=window.contentControl||{}).fields=o}(); -
content-control/trunk/inc/functions/query.php
r3137162 r3256177 232 232 } 233 233 234 // Set current post id ba esd on global $post.234 // Set current post id based on global $post. 235 235 $current_post_id = $post->ID ?? null; 236 236 … … 244 244 if ( $overload_post ) { 245 245 // Push the current $post to the stack so we can restore it later. 246 push_to_global( 'overloaded_posts', $ post ?? $current_post_id );246 push_to_global( 'overloaded_posts', $current_post_id ); 247 247 248 248 // Overload the globals so conditionals work properly. … … 276 276 } 277 277 278 // Set current post id baesd on global $current_term.278 // Set current term id based on global $current_term. 279 279 $current_term_id = $current_term->term_id ?? null; 280 280 281 // Check if we should overload the post. This means its not the current post.281 // Check if we should overload the term. 282 282 $overload_term = 283 // If we have a term ID, check if it's different from the current term ID.284 ( is_object( $term_id ) && $term_id->term_id !== $current_term_id ) ||285 // If we have an int, check if it's different from the current term ID.286 ( is_int( $term_id ) && $term_id !== $current_term_id );283 // If we have a term ID, check if it's different from the current term ID. 284 ( is_object( $term_id ) && $term_id->term_id !== $current_term_id ) || 285 // If we have an int, check if it's different from the current term ID. 286 ( is_int( $term_id ) && $term_id !== $current_term_id ); 287 287 288 288 if ( $overload_term ) { 289 // Push the current $post to the stack so we can restore it later.290 push_to_global( 'overloaded_terms', $current_term ?? $current_term_id );289 // Store only the ID of the current term for later restoration. 290 push_to_global( 'overloaded_terms', $current_term_id ); 291 291 292 292 // Overload the globals so conditionals work properly. 293 293 $cc_term = get_term( $term_id ); 294 294 // Set the global term object (forward compatibility). 295 set_global( 'term', $cc_term ?? $current_term_id);295 set_global( 'term', $cc_term ); 296 296 } 297 297 … … 334 334 global $post; 335 335 336 $stored_post_id = pop_from_global( 'overloaded_posts' ); 336 337 // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited 337 $post = pop_from_global( 'overloaded_posts');338 $post = get_post( $stored_post_id ); 338 339 // Reset global post object. 339 340 setup_postdata( $post ); … … 356 357 global $cc_term; // Backward compatibility. 357 358 359 $stored_term_id = pop_from_global( 'overloaded_terms' ); 358 360 // Reset global post object. 359 $cc_term = pop_from_global( 'overloaded_terms');361 $cc_term = get_term( $stored_term_id ); 360 362 set_global( 'term', $cc_term ); 361 363 } … … 531 533 // If we have a post type or taxonomy, the name is the first part (posts, categories). 532 534 $intent['name'] = sanitize_key( $endpoint_parts[0] ); 535 // Check if this is a search request. 536 $intent['search'] = isset( $wp->query_vars['search'] ) ? sanitize_title( $wp->query_vars['search'] ) : false; 533 537 534 538 if ( count( $endpoint_parts ) > 1 ) { … … 537 541 } else { 538 542 // If we have no ID, then we are either searching or indexing. 539 $intent['index'] = true; 540 $intent['search'] = isset( $wp->query_vars['s'] ) ? sanitize_title( $wp->query_vars['s'] ) : false; 543 $intent['index'] = true; 541 544 } 542 545 … … 546 549 if ( isset( $post_type_endpoints[ $endpoint_route ] ) ) { 547 550 $intent['type'] = 'post_type'; 548 } 549 550 if ( isset( $taxonomy_endpoints[ $endpoint_route ] ) ) { 551 } elseif ( isset( $taxonomy_endpoints[ $endpoint_route ] ) ) { 551 552 $intent['type'] = 'taxonomy'; 553 } elseif ( 'search' === $intent['name'] ) { 554 $intent['type'] = 'search'; 552 555 } 553 556 } else { -
content-control/trunk/inc/functions/rule-callbacks.php
r3137162 r3256177 850 850 // Fill in defaults to prevent errors. 851 851 wp_parse_args( $rest_intent, [ 852 'type' => '', 853 'name' => '', 852 'type' => '', 853 'name' => '', 854 'search' => false, 854 855 ] ); 855 856 856 857 // Check if this is a post type intent. 857 858 if ( 'post_type' !== $rest_intent['type'] ) { 859 860 // If this is a search request, we need to check if the post type is public and searchable. 861 if ( false !== $rest_intent['search'] ) { 862 $post_type_object = get_post_type_object( $post_type ); 863 return $post_type_object && $post_type_object->show_in_rest && $post_type_object->publicly_queryable; 864 } 865 858 866 return false; 859 867 } … … 885 893 // Fill in defaults to prevent errors. 886 894 wp_parse_args( $rest_intent, [ 887 'type' => '', 888 'name' => '', 895 'type' => '', 896 'name' => '', 897 'search' => false, 889 898 ] ); 890 899 891 900 // Check if this is a taxonomy intent. 892 901 if ( 'taxonomy' !== $rest_intent['type'] ) { 902 903 // If this is a search request, we need to check if the taxonomy is public and searchable. 904 if ( false !== $rest_intent['search'] ) { 905 $taxonomy_object = get_taxonomy( $taxonomy ); 906 return $taxonomy_object && $taxonomy_object->show_in_rest && $taxonomy_object->publicly_queryable; 907 } 908 893 909 return false; 894 910 } … … 898 914 // Check that rest_base or selected name match. 899 915 return // Check the rest_base for the selected taxonomy matches the intent. 900 check_type_match( $taxonomy_object->rest_base, $rest_intent['name'] ) ||916 check_type_match( $taxonomy_object->rest_base, $rest_intent['name'] ) || 901 917 // Check the taxonomy matches the intent. 902 918 check_type_match( $taxonomy, $rest_intent['name'] ); -
content-control/trunk/readme.txt
r3253926 r3256177 7 7 Requires at least: 6.2 8 8 Tested up to: 6.7.2 9 Stable tag: 2.6. 09 Stable tag: 2.6.1 10 10 Requires PHP: 7.4 11 11 License: GPLv3 (or later) … … 111 111 == Changelog == 112 112 113 = v2.6.1 - 03/15/2025 = 114 115 * Improvement: Only fetch titles & ids when loading posts/taxonomy for the Restriction Editor. Reducing request overhead. 116 * Improvement: Ensure taxonomies are also removed from search appropriately. 117 * Improvement: Reduce memory footprint of overloaded object handling. 118 * Tweak: Adjust rest intent when using search endpoint or arg for better detection. 119 * Fix: Prevent undefined post type or taxonomy `public` arg from generating warning notices. 120 * Fix: Prvent warnings due to translations being loaded too early. 121 113 122 = v2.6.0 - 03/11/2025 = 114 123 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/Container.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/Exception/ExpectedInvokableException.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/Exception/FrozenServiceException.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/Exception/InvalidServiceIdentifierException.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/Psr11/Container.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/ServiceIterator.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/ServiceProviderInterface.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Fixtures/Invokable.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Fixtures/NonInvokable.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Fixtures/Service.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/PimpleServiceProviderInterfaceTest.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/PimpleTest.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Psr11/ContainerTest.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/pimple/pimple/src/Pimple/Tests/ServiceIteratorTest.php
r3253935 r3256177 24 24 * THE SOFTWARE. 25 25 * 26 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.26 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 27 27 */ 28 28 -
content-control/trunk/vendor-prefixed/psr/container/src/ContainerExceptionInterface.php
r3253935 r3256177 3 3 * @license MIT 4 4 * 5 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.5 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 6 6 */ 7 7 -
content-control/trunk/vendor-prefixed/psr/container/src/ContainerInterface.php
r3253935 r3256177 3 3 * @license MIT 4 4 * 5 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.5 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 6 6 */ 7 7 -
content-control/trunk/vendor-prefixed/psr/container/src/NotFoundExceptionInterface.php
r3253935 r3256177 3 3 * @license MIT 4 4 * 5 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.5 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 6 6 */ 7 7 -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/Admin.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/Ajax.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/Client.php
r3253935 r3256177 19 19 * 20 20 * @license GPL-2.0-or-later 21 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.21 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 22 22 */ 23 23 -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/Config.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/Cron.php
r3253935 r3256177 6 6 * 7 7 * @license GPL-2.0-or-later 8 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.8 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 9 9 */ 10 10 -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/Encryption.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/Endpoint.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/Envelope.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/Form.php
r3253935 r3256177 3 3 * @license GPL-2.0-or-later 4 4 * 5 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.5 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 6 6 */ 7 7 /** -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/Logger.php
r3253935 r3256177 10 10 * 11 11 * @license GPL-2.0-or-later 12 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.12 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 13 13 */ 14 14 -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/Logging.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/Remote.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/SecurityChecks.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/SiteAccess.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/SupportRole.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/SupportUser.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/trunk/vendor-prefixed/trustedlogin/client/src/Utils.php
r3253935 r3256177 8 8 * 9 9 * @license GPL-2.0-or-later 10 * Modified by code-atlantic on 1 1-March-2025 using {@see https://github.com/BrianHenryIE/strauss}.10 * Modified by code-atlantic on 15-March-2025 using {@see https://github.com/BrianHenryIE/strauss}. 11 11 */ 12 12 -
content-control/trunk/vendor/composer/installed.php
r3253935 r3256177 2 2 'root' => array( 3 3 'name' => 'code-atlantic/content-control', 4 'pretty_version' => '2.6. 0',5 'version' => '2.6. 0.0',4 'pretty_version' => '2.6.1', 5 'version' => '2.6.1.0', 6 6 'reference' => null, 7 7 'type' => 'wordpress-plugin', … … 12 12 'versions' => array( 13 13 'code-atlantic/content-control' => array( 14 'pretty_version' => '2.6. 0',15 'version' => '2.6. 0.0',14 'pretty_version' => '2.6.1', 15 'version' => '2.6.1.0', 16 16 'reference' => null, 17 17 'type' => 'wordpress-plugin',
Note: See TracChangeset
for help on using the changeset viewer.