From f9cf9f39db10aad6624208856fd44bac839afcf2 Mon Sep 17 00:00:00 2001 From: Nick Diego Date: Sun, 5 Feb 2023 20:44:12 -0600 Subject: [PATCH] Fresh build. --- build/block-visibility-editor-styles.css | 2 +- build/block-visibility-editor.asset.php | 2 +- build/block-visibility-editor.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/block-visibility-editor-styles.css b/build/block-visibility-editor-styles.css index d5693b50..3779eeb5 100644 --- a/build/block-visibility-editor-styles.css +++ b/build/block-visibility-editor-styles.css @@ -1 +1 @@ -.information-popover{line-height:0}.information-popover .information-popover__button{height:22px;min-width:22px;opacity:.3;padding:0}.information-popover .information-popover__button svg{width:22px}.information-popover .information-popover__button:hover,.information-popover .information-popover__button[aria-expanded=true]{opacity:1}.information-popover__popover p{color:#32373c;font-size:13px;line-height:1.5;margin:0 0 1em}.information-popover__popover p:last-child{margin-bottom:0}.information-popover__popover .components-external-link svg{margin:0 2px}.information-popover__popover .components-popover__content{font-size:13px;font-weight:400;line-height:1.4;max-width:250px;min-width:220px;padding:12px;text-align:left}.information-popover__popover .components-popover__content>div{padding:0}.block-visibility__react-select .react-select__control{border:1px solid #1e1e1e;border-radius:2px;min-height:40px}.block-visibility__react-select .react-select__control:hover{border:1px solid #1e1e1e}.block-visibility__react-select .react-select__control.react-select__control--is-focused,.block-visibility__react-select .react-select__control:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px #007cba;box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.block-visibility__react-select .react-select__value-container div:last-child{padding-bottom:0;padding-top:0}.block-visibility__react-select .react-select__value-container--is-multi{padding:2px 4px}.block-visibility__react-select .react-select__value-container--is-multi .react-select__placeholder{margin-left:5px;margin-right:5px}.block-visibility__react-select .react-select__value-container--is-multi div:last-child{margin:0 2px}.block-visibility__react-select .react-select__multi-value{background-color:#ddd}.block-visibility__react-select .react-select__multi-value .react-select__multi-value__label{font-size:90%;white-space:normal}.block-visibility__react-select .react-select__input:focus{box-shadow:none}.block-visibility__react-select .react-select__input input{min-height:auto}.block-visibility__react-select .react-select__input input:focus{box-shadow:none}.block-visibility__react-select .react-select__clear-indicator,.block-visibility__react-select .react-select__dropdown-indicator{padding:6px}.block-visibility__react-select .react-select__clear-indicator:hover,.block-visibility__react-select .react-select__dropdown-indicator:hover{color:#007cba;color:var(--wp-admin-theme-color);cursor:pointer}.block-visibility__react-select .react-select__multi-value__remove,.block-visibility__react-select .react-select__option{cursor:pointer}.block-visibility__react-select .react-select__option--is-focused,.block-visibility__react-select .react-select__option--is-selected{background:#fff;color:#007cba;color:var(--wp-admin-theme-color)}.block-visibility__react-select .react-select__option--is-selected{background:#eee}.block-visibility__react-select .react-select__option--is-disabled{color:#ccc!important}.block-visibility__react-select .react-select__menu{margin-bottom:50px}.block-visibility__controls-panel{border-top:1px solid #ddd;display:grid;gap:16px;margin-top:-1px;padding:16px}.block-visibility__controls-panel .controls-panel-header{-webkit-box-align:center;-webkit-box-pack:justify;align-items:center;display:flex;flex-direction:row;gap:8px;grid-column:1/-1;justify-content:space-between;width:100%}.block-visibility__controls-panel .controls-panel-header h2{font-weight:500;margin:0}.block-visibility__controls-panel .controls-panel-header .controls-panel-header__dropdown-menus{line-height:0;margin:-4px 0}.block-visibility__controls-panel .controls-panel-header .controls-panel-header__dropdown-menus .components-button{min-width:24px;padding:0}.block-visibility__controls-panel .controls-panel-header .controls-panel-header__dropdown-menus .components-spinner{margin:0 4px}.block-visibility__controls-panel .components-disabled.hide-block-enabled,.block-visibility__controls-panel .controls-panel-container{display:grid;gap:32px}.block-visibility__controls-panel .controls-panel-notices .components-notice{margin:0}.block-visibility__controls-panel .components-button:not(.is-primary):disabled,.block-visibility__controls-panel .components-button[aria-disabled=true]:not(.is-primary){color:currentColor}.controls-panel-container .components-disabled,.preset-manager__content .components-disabled{opacity:.4}.controls-panel-container .components-disabled *,.preset-manager__content .components-disabled *{opacity:1!important}.controls-panel-container .components-button:not(.is-primary):disabled,.controls-panel-container .components-button[aria-disabled=true]:not(.is-primary),.preset-manager__content .components-button:not(.is-primary):disabled,.preset-manager__content .components-button[aria-disabled=true]:not(.is-primary){color:currentColor}.controls-panel-container .components-button.control-tips,.preset-manager__content .components-button.control-tips{height:18px;margin-left:5px;margin-top:-4px;min-width:18px;padding:0!important;vertical-align:middle;width:18px!important}.controls-panel-container .components-button.control-tips:not(:hover),.preset-manager__content .components-button.control-tips:not(:hover){color:#c8c8c8}.controls-panel-container .components-button.control-tips:focus,.preset-manager__content .components-button.control-tips:focus{box-shadow:none!important}.controls-panel-container .components-button.control-tips svg,.preset-manager__content .components-button.control-tips svg{height:18px;width:18px}.controls-panel-container .components-base-control__label,.preset-manager__content .components-base-control__label{display:inline-block;font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase}.controls-panel-container .components-base-control__label .components-base-control__label-hint,.preset-manager__content .components-base-control__label .components-base-control__label-hint{color:#757575}.controls-panel-container .controls-panel-item:last-child,.preset-manager__content .controls-panel-item:last-child{margin-bottom:12px}.controls-panel-container .controls-panel-item .controls-panel-item__header,.preset-manager__content .controls-panel-item .controls-panel-item__header{align-items:center;display:flex;font-size:11px;font-weight:500;line-height:1.4;margin-bottom:14px;margin-top:0;min-height:28px;text-transform:uppercase}.controls-panel-container .controls-panel-item .controls-panel-item__header.has-icon>svg,.preset-manager__content .controls-panel-item .controls-panel-item__header.has-icon>svg{margin-right:8px;width:16px}.controls-panel-container .controls-panel-item .controls-panel-item__header.has-icon span,.preset-manager__content .controls-panel-item .controls-panel-item__header.has-icon span{display:inline-block;margin-right:4px}.controls-panel-container .controls-panel-item .controls-panel-item__header.has-icon .information-popover__button,.preset-manager__content .controls-panel-item .controls-panel-item__header.has-icon .information-popover__button{height:20px;min-width:20px}.controls-panel-container .controls-panel-item .controls-panel-item__header.has-icon .information-popover__button svg,.preset-manager__content .controls-panel-item .controls-panel-item__header.has-icon .information-popover__button svg{width:18px}.controls-panel-container .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar,.preset-manager__content .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar{margin-left:auto}.controls-panel-container .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar button.has-padding,.preset-manager__content .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar button.has-padding{padding:1px}.controls-panel-container .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar .components-button,.preset-manager__content .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar .components-button{height:24px;min-width:24px;padding:0;width:24px}.controls-panel-container .controls-panel-item .controls-panel-item__description,.preset-manager__content .controls-panel-item .controls-panel-item__description{color:#757575;font-size:12px;font-style:normal;margin-bottom:16px}.controls-panel-container .controls-panel-item .controls-panel-item__description strong,.preset-manager__content .controls-panel-item .controls-panel-item__description strong{font-weight:700}.controls-panel-container .controls-panel-item .controls-panel-item__fields :last-child,.preset-manager__content .controls-panel-item .controls-panel-item__fields :last-child{margin-bottom:0}.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .components-base-control,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .components-base-control{margin-bottom:18px}.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .components-base-control.components-toggle-control,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .components-base-control.components-toggle-control{margin-bottom:12px}.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .components-base-control .components-base-control__help,.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .components-base-control:last-child,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .components-base-control .components-base-control__help,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .components-base-control:last-child{margin-bottom:0}.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .control-fields-item__hide-when,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .control-fields-item__hide-when{margin-top:20px}.controls-panel-container .control-fields-item,.preset-manager__content .control-fields-item{margin-bottom:18px}.controls-panel-container .control-fields-item.is-open,.preset-manager__content .control-fields-item.is-open{margin-bottom:24px}.controls-panel-container .control-fields-item.is-open>.components-base-control,.preset-manager__content .control-fields-item.is-open>.components-base-control{margin-bottom:12px}.controls-panel-container .control-fields-item:last-child,.preset-manager__content .control-fields-item:last-child{margin-bottom:0}.controls-panel-container .control-fields-item>.block-visibility__react-select,.preset-manager__content .control-fields-item>.block-visibility__react-select{margin:10px 0}.controls-panel-container .control-fields-item__label,.preset-manager__content .control-fields-item__label{color:#757575;font-size:12px;margin-bottom:8px}.controls-panel-container .control-fields-item__sub-label,.preset-manager__content .control-fields-item__sub-label{font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase}.controls-panel-container .control-fields-item__help,.preset-manager__content .control-fields-item__help{color:#757575;font-size:12px;font-style:normal;margin-top:8px}.controls-panel-container .control-fields-item__help a,.preset-manager__content .control-fields-item__help a{cursor:pointer}.controls-panel-container .control-fields-item__help strong,.preset-manager__content .control-fields-item__help strong{font-weight:700}.controls-panel-container .components-base-control__help,.preset-manager__content .components-base-control__help{color:#757575;font-size:12px;font-style:normal;margin-bottom:16px}.controls-panel-container .components-base-control__help strong,.preset-manager__content .components-base-control__help strong{font-weight:700}.controls-panel-container .components-notice,.preset-manager__content .components-notice{margin:18px 0 0}.controls-panel-container .components-notice .components-notice__content,.preset-manager__content .components-notice .components-notice__content{margin:2px 0}.controls-panel-container .components-notice .components-notice__content .components-base-control__help,.preset-manager__content .components-notice .components-notice__content .components-base-control__help{display:inline-block;margin:4px 0 0}.controls-panel-container .section-header,.preset-manager__content .section-header{align-items:center;display:flex;gap:24px;justify-content:space-between;margin-bottom:14px}.controls-panel-container .section-header.main,.preset-manager__content .section-header.main{border-top:1px solid #e0e0e0;margin-bottom:30px;margin-left:-16px;margin-right:-16px;min-height:48px;padding:8px 16px;width:calc(100% + 32px)}.controls-panel-container .section-header .section-header__title,.preset-manager__content .section-header .section-header__title{align-items:center;display:inline-flex;font-size:11px;font-weight:500;gap:6px;line-height:1.4;overflow-wrap:anywhere;text-transform:uppercase}.controls-panel-container .section-header .section-header__title .components-dropdown,.preset-manager__content .section-header .section-header__title .components-dropdown{height:18px}.controls-panel-container .section-header .section-header__title .components-dropdown .components-button,.preset-manager__content .section-header .section-header__title .components-dropdown .components-button{height:18px;line-height:16px;min-width:18px;opacity:.3;padding:0;width:18px}.controls-panel-container .section-header .section-header__title .components-dropdown .components-button:hover,.controls-panel-container .section-header .section-header__title .components-dropdown .components-button[aria-expanded=true],.preset-manager__content .section-header .section-header__title .components-dropdown .components-button:hover,.preset-manager__content .section-header .section-header__title .components-dropdown .components-button[aria-expanded=true]{opacity:1}.controls-panel-container .section-header .section-header__toolbar,.preset-manager__content .section-header .section-header__toolbar{display:flex;flex-shrink:0;gap:4px;height:24px;text-align:right}.controls-panel-container .section-header .section-header__toolbar .components-button,.preset-manager__content .section-header .section-header__toolbar .components-button{height:24px;min-width:24px;padding:0;width:24px}.controls-panel-container .section-header .section-header__toolbar .controls-dropdown .components-button.has-icon,.controls-panel-container .section-header .section-header__toolbar>.components-button,.preset-manager__content .section-header .section-header__toolbar .controls-dropdown .components-button.has-icon,.preset-manager__content .section-header .section-header__toolbar>.components-button{padding:1px}.controls-panel-container .section-header .section-header__toolbar .settings-dropdown,.preset-manager__content .section-header .section-header__toolbar .settings-dropdown{margin-left:5px}.controls-panel-container .section-header .section-header__toolbar .settings-dropdown .components-button.has-icon,.preset-manager__content .section-header .section-header__toolbar .settings-dropdown .components-button.has-icon{padding:1px}.controls-panel-container .section-header .section-header__toolbar .components-disabled,.preset-manager__content .section-header .section-header__toolbar .components-disabled{display:inline-block}.controls-panel-container .rule-sets,.preset-manager__content .rule-sets{grid-column-gap:32px;grid-row-gap:16px;display:grid;grid-template-columns:repeat(auto-fit,minmax(248px,1fr))}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules{grid-column-gap:32px;grid-row-gap:16px;display:grid;grid-template-columns:1fr}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header{align-items:center;color:#757575;display:flex;font-size:12px;justify-content:space-between;margin-bottom:8px;min-height:24px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header button,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header button{height:24px;min-width:24px;padding:0;width:24px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container{display:grid;gap:8px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified{display:grid;grid-template-columns:1fr 74px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__ruleField,.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__subField,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__ruleField,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__subField{grid-column-end:3;grid-column-start:1}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__help,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__help{margin-bottom:0;margin-top:10px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__field,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__field{margin-bottom:0}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-toggle-control,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-toggle-control{margin:4px 0}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-base-control,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-base-control{margin-bottom:0}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-text-control__input,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-text-control__input{border:1px solid #1e1e1e;min-height:40px;padding:8px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__add-rule,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__add-rule{margin-top:12px}.controls-panel-container .date-time-control .control-fields-item__schedules,.preset-manager__content .date-time-control .control-fields-item__schedules{grid-column-gap:32px;grid-row-gap:20px;display:grid;grid-template-columns:repeat(auto-fit,minmax(248px,1fr))}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item.disabled .date-time-control__schedule--heading span,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item.disabled .date-time-control__schedule--heading span{opacity:.4}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields{display:grid;gap:16px}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields>span,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields>span{display:none}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .control-fields-item__label,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .control-fields-item__label{margin-bottom:12px}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item{align-items:center;display:flex;gap:8px;margin-top:8px}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .control-fields-item__sub-label,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .control-fields-item__sub-label{min-width:40px}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field{align-items:center;border:1px solid #1e1e1e;border-radius:2px;display:flex;justify-content:space-between;min-height:36px;position:relative;width:100%}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field .components-button:first-child,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field .components-button:first-child{padding-right:30px;width:100%}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field .components-button.clear-date-time,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field .components-button.clear-date-time{margin:5px 4px;max-height:34px;min-width:24px;padding:2px;position:absolute;right:0}.controls-panel-container .screen-size-control .components-base-control,.preset-manager__content .screen-size-control .components-base-control{margin-bottom:12px}.controls-panel-container .screen-size-control .components-notice,.preset-manager__content .screen-size-control .components-notice{margin-top:20px}.controls-panel-container .user-role-control .control-fields-item>.components-base-control__help,.preset-manager__content .user-role-control .control-fields-item>.components-base-control__help{margin-top:-8px}.controls-panel-container .query-string-control textarea,.preset-manager__content .query-string-control textarea{white-space:nowrap}.controls-panel-container .acf-control .components-notice,.preset-manager__content .acf-control .components-notice{margin-bottom:20px}.controls-panel-container .wp-fusion-control .components-disabled,.preset-manager__content .wp-fusion-control .components-disabled{margin-bottom:18px}.block-visibility__date-time-popover .components-popover__content{padding:16px}.block-visibility__date-time-popover .date-time-popover__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.block-visibility__date-time-popover .date-time-popover__header h2{color:#1e1e1e;font-size:13px;font-weight:600;line-height:1.2;margin:0}.block-visibility__date-time-popover .components-datetime{padding:0}.block-visibility__control-popover.visibility-controls .components-popover__content{min-width:240px}.block-visibility__control-popover.visibility-controls .components-menu-item__button[aria-disabled=true]:not(.is-tertiary){color:#757575;opacity:1}.block-visibility__control-popover.visibility-controls .components-menu-item__button[aria-disabled=true]:not(.is-tertiary):focus{box-shadow:none;outline:none}.block-visibility__control-popover.visibility-controls .components-menu-item__button[aria-disabled=true]:not(.is-tertiary) .components-menu-item__item .control-branding-icon{opacity:.6}.block-visibility__control-popover.visibility-controls .components-menu-item__button.has-reset .components-menu-item__item{min-width:100%}.block-visibility__control-popover.visibility-controls .components-menu-item__button .components-menu-item__item .control-branding-icon{opacity:1}.block-visibility__control-popover.visibility-controls .components-menu-item__button .components-menu-item__item .menu-item-reset{color:var(--wp-admin-theme-color-darker-10);font-size:11px;font-weight:500;line-height:1.4;margin-left:auto;text-transform:uppercase}.block-visibility__control-popover.control-settings>div{min-width:300px;padding:6px}.block-visibility__control-popover.control-settings>div h3{color:#1e1e1e;font-size:11px;font-weight:500;margin-bottom:18px;margin-top:0;text-transform:uppercase}.block-visibility__control-popover.control-settings>div .components-base-control{margin-bottom:24px}.block-visibility__control-popover.control-settings>div .components-base-control:last-child{margin-bottom:0}.block-visibility__control-popover.edit-title .components-popover__content{min-width:240px;padding:12px}.block-visibility__control-popover.edit-title .components-popover__content>div{padding:0}.block-visibility__control-popover.edit-title .components-popover__content .components-base-control__field{margin-bottom:0}.block-visibility__control-popover .components-menu-item__button .control-branding-icon{margin-right:8px;width:14px}.block-visibility__control-popover .components-menu-item__button:hover .control-branding-icon{opacity:.6}.block-visibility__control-popover .components-notice{margin:10px 0}.block-visibility__control-popover .components-notice .components-notice__content{margin:2px 0}.block-visibility__control-popover .components-notice .components-notice__content .components-base-control__help{display:inline-block;margin:4px 0 0}.block-visibility__reset-modal{max-width:400px!important}.block-visibility__reset-modal .block-visibility__reset-modal--buttons{margin-top:24px}.block-visibility__reset-modal .block-visibility__reset-modal--buttons button:first-child{margin-right:10px}.block-visibility__confirmation-modal{max-width:400px!important}.block-visibility__confirmation-modal .block-visibility__confirmation-modal--buttons{display:flex;justify-content:space-between;margin-top:24px}#customize-theme-controls .controls-panel-container h3.controls-panel-item__header{font-size:13px!important;font-weight:500!important;margin-bottom:16px!important}#customize-theme-controls .control-set .control-set__header h3{font-size:12px!important;margin-bottom:8px!important} +.information-popover{line-height:0}.information-popover .information-popover__button{height:22px;min-width:22px;opacity:.3;padding:0}.information-popover .information-popover__button svg{width:22px}.information-popover .information-popover__button:hover,.information-popover .information-popover__button[aria-expanded=true]{opacity:1}.information-popover__popover p{color:#32373c;font-size:13px;line-height:1.5;margin:0 0 1em}.information-popover__popover p:last-child{margin-bottom:0}.information-popover__popover .components-external-link svg{margin:0 2px}.information-popover__popover .components-popover__content{font-size:13px;font-weight:400;line-height:1.4;max-width:250px;min-width:220px;padding:12px;text-align:left}.information-popover__popover .components-popover__content>div{padding:0}.block-visibility__react-select .react-select__control{border:1px solid #1e1e1e;border-radius:2px;min-height:40px}.block-visibility__react-select .react-select__control:hover{border:1px solid #1e1e1e}.block-visibility__react-select .react-select__control.react-select__control--is-focused,.block-visibility__react-select .react-select__control:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px #007cba;box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.block-visibility__react-select .react-select__value-container div:last-child{padding-bottom:0;padding-top:0}.block-visibility__react-select .react-select__value-container--is-multi{padding:2px 4px}.block-visibility__react-select .react-select__value-container--is-multi .react-select__placeholder{margin-left:5px;margin-right:5px}.block-visibility__react-select .react-select__value-container--is-multi div:last-child{margin:0 2px}.block-visibility__react-select .react-select__multi-value{background-color:#ddd}.block-visibility__react-select .react-select__multi-value .react-select__multi-value__label{font-size:90%;white-space:normal}.block-visibility__react-select .react-select__input:focus{box-shadow:none}.block-visibility__react-select .react-select__input input{min-height:auto}.block-visibility__react-select .react-select__input input:focus{box-shadow:none}.block-visibility__react-select .react-select__clear-indicator,.block-visibility__react-select .react-select__dropdown-indicator{padding:6px}.block-visibility__react-select .react-select__clear-indicator:hover,.block-visibility__react-select .react-select__dropdown-indicator:hover{color:#007cba;color:var(--wp-admin-theme-color);cursor:pointer}.block-visibility__react-select .react-select__multi-value__remove,.block-visibility__react-select .react-select__option{cursor:pointer}.block-visibility__react-select .react-select__option--is-focused,.block-visibility__react-select .react-select__option--is-selected{background:#fff;color:#007cba;color:var(--wp-admin-theme-color)}.block-visibility__react-select .react-select__option--is-selected{background:#eee}.block-visibility__react-select .react-select__option--is-disabled{color:#ccc!important}.block-visibility__react-select .react-select__menu{margin-bottom:50px}.block-visibility__controls-panel{border-top:1px solid #ddd;display:grid;gap:16px;margin-top:-1px;padding:16px}.block-visibility__controls-panel .controls-panel-header{-webkit-box-align:center;-webkit-box-pack:justify;align-items:center;display:flex;flex-direction:row;gap:8px;grid-column:1/-1;justify-content:space-between;width:100%}.block-visibility__controls-panel .controls-panel-header h2{font-weight:500;margin:0}.block-visibility__controls-panel .controls-panel-header .controls-panel-header__dropdown-menus{line-height:0;margin:-4px 0}.block-visibility__controls-panel .controls-panel-header .controls-panel-header__dropdown-menus .components-button{min-width:24px;padding:0}.block-visibility__controls-panel .controls-panel-header .controls-panel-header__dropdown-menus .components-spinner{margin:0 4px}.block-visibility__controls-panel .components-disabled.hide-block-enabled,.block-visibility__controls-panel .controls-panel-container{display:grid;gap:32px}.block-visibility__controls-panel .controls-panel-notices .components-notice{margin:0}.block-visibility__controls-panel .components-button:not(.is-primary):disabled,.block-visibility__controls-panel .components-button[aria-disabled=true]:not(.is-primary){color:currentColor}.controls-panel-container .components-disabled,.preset-manager__content .components-disabled{opacity:.4}.controls-panel-container .components-disabled *,.preset-manager__content .components-disabled *{opacity:1!important}.controls-panel-container .components-button:not(.is-primary):disabled,.controls-panel-container .components-button[aria-disabled=true]:not(.is-primary),.preset-manager__content .components-button:not(.is-primary):disabled,.preset-manager__content .components-button[aria-disabled=true]:not(.is-primary){color:currentColor}.controls-panel-container .components-button.control-tips,.preset-manager__content .components-button.control-tips{height:18px;margin-left:5px;margin-top:-4px;min-width:18px;padding:0!important;vertical-align:middle;width:18px!important}.controls-panel-container .components-button.control-tips:not(:hover),.preset-manager__content .components-button.control-tips:not(:hover){color:#c8c8c8}.controls-panel-container .components-button.control-tips:focus,.preset-manager__content .components-button.control-tips:focus{box-shadow:none!important}.controls-panel-container .components-button.control-tips svg,.preset-manager__content .components-button.control-tips svg{height:18px;width:18px}.controls-panel-container .components-base-control__label,.preset-manager__content .components-base-control__label{display:inline-block;font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase}.controls-panel-container .components-base-control__label .components-base-control__label-hint,.preset-manager__content .components-base-control__label .components-base-control__label-hint{color:#757575}.controls-panel-container .controls-panel-item:last-child,.preset-manager__content .controls-panel-item:last-child{margin-bottom:12px}.controls-panel-container .controls-panel-item .controls-panel-item__header,.preset-manager__content .controls-panel-item .controls-panel-item__header{align-items:center;display:flex;font-size:11px;font-weight:500;line-height:1.4;margin-bottom:14px;margin-top:0;min-height:28px;text-transform:uppercase}.controls-panel-container .controls-panel-item .controls-panel-item__header.has-icon>svg,.preset-manager__content .controls-panel-item .controls-panel-item__header.has-icon>svg{margin-right:8px;width:16px}.controls-panel-container .controls-panel-item .controls-panel-item__header.has-icon span,.preset-manager__content .controls-panel-item .controls-panel-item__header.has-icon span{display:inline-block;margin-right:4px}.controls-panel-container .controls-panel-item .controls-panel-item__header.has-icon .information-popover__button,.preset-manager__content .controls-panel-item .controls-panel-item__header.has-icon .information-popover__button{height:20px;min-width:20px}.controls-panel-container .controls-panel-item .controls-panel-item__header.has-icon .information-popover__button svg,.preset-manager__content .controls-panel-item .controls-panel-item__header.has-icon .information-popover__button svg{width:18px}.controls-panel-container .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar,.preset-manager__content .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar{margin-left:auto}.controls-panel-container .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar button.has-padding,.preset-manager__content .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar button.has-padding{padding:1px}.controls-panel-container .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar .components-button,.preset-manager__content .controls-panel-item .controls-panel-item__header .controls-panel-item__header-toolbar .components-button{height:24px;min-width:24px;padding:0;width:24px}.controls-panel-container .controls-panel-item .controls-panel-item__description,.preset-manager__content .controls-panel-item .controls-panel-item__description{color:#757575;font-size:12px;font-style:normal;margin-bottom:16px}.controls-panel-container .controls-panel-item .controls-panel-item__description strong,.preset-manager__content .controls-panel-item .controls-panel-item__description strong{font-weight:700}.controls-panel-container .controls-panel-item .controls-panel-item__fields :last-child,.preset-manager__content .controls-panel-item .controls-panel-item__fields :last-child{margin-bottom:0}.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .components-base-control,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .components-base-control{margin-bottom:18px}.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .components-base-control.components-toggle-control,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .components-base-control.components-toggle-control{margin-bottom:12px}.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .components-base-control .components-base-control__help,.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .components-base-control:last-child,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .components-base-control .components-base-control__help,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .components-base-control:last-child{margin-bottom:0}.controls-panel-container .controls-panel-item .controls-panel-item__control-fields .control-fields-item__hide-when,.preset-manager__content .controls-panel-item .controls-panel-item__control-fields .control-fields-item__hide-when{margin-top:20px}.controls-panel-container .control-fields-item,.preset-manager__content .control-fields-item{margin-bottom:18px}.controls-panel-container .control-fields-item.is-open,.preset-manager__content .control-fields-item.is-open{margin-bottom:24px}.controls-panel-container .control-fields-item.is-open>.components-base-control,.preset-manager__content .control-fields-item.is-open>.components-base-control{margin-bottom:12px}.controls-panel-container .control-fields-item:last-child,.preset-manager__content .control-fields-item:last-child{margin-bottom:0}.controls-panel-container .control-fields-item>.block-visibility__react-select,.preset-manager__content .control-fields-item>.block-visibility__react-select{margin:10px 0}.controls-panel-container .control-fields-item__label,.preset-manager__content .control-fields-item__label{color:#757575;font-size:12px;margin-bottom:8px}.controls-panel-container .control-fields-item__sub-label,.preset-manager__content .control-fields-item__sub-label{font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase}.controls-panel-container .control-fields-item__help,.preset-manager__content .control-fields-item__help{color:#757575;font-size:12px;font-style:normal;margin-top:8px}.controls-panel-container .control-fields-item__help a,.preset-manager__content .control-fields-item__help a{cursor:pointer}.controls-panel-container .control-fields-item__help strong,.preset-manager__content .control-fields-item__help strong{font-weight:700}.controls-panel-container .components-base-control__help,.preset-manager__content .components-base-control__help{color:#757575;font-size:12px;font-style:normal;margin-bottom:16px}.controls-panel-container .components-base-control__help strong,.preset-manager__content .components-base-control__help strong{font-weight:700}.controls-panel-container .components-notice,.preset-manager__content .components-notice{margin:18px 0 0}.controls-panel-container .components-notice .components-notice__content,.preset-manager__content .components-notice .components-notice__content{margin:2px 0}.controls-panel-container .components-notice .components-notice__content .components-base-control__help,.preset-manager__content .components-notice .components-notice__content .components-base-control__help{display:inline-block;margin:4px 0 0}.controls-panel-container .section-header,.preset-manager__content .section-header{align-items:center;display:flex;gap:24px;justify-content:space-between;margin-bottom:14px}.controls-panel-container .section-header.main,.preset-manager__content .section-header.main{border-top:1px solid #e0e0e0;margin-bottom:30px;margin-left:-16px;margin-right:-16px;min-height:48px;padding:8px 16px;width:calc(100% + 32px)}.controls-panel-container .section-header .section-header__title,.preset-manager__content .section-header .section-header__title{align-items:center;display:inline-flex;font-size:11px;font-weight:500;gap:6px;line-height:1.4;overflow-wrap:anywhere;text-transform:uppercase}.controls-panel-container .section-header .section-header__title .components-dropdown,.preset-manager__content .section-header .section-header__title .components-dropdown{height:18px}.controls-panel-container .section-header .section-header__title .components-dropdown .components-button,.preset-manager__content .section-header .section-header__title .components-dropdown .components-button{height:18px;line-height:16px;min-width:18px;opacity:.3;padding:0;width:18px}.controls-panel-container .section-header .section-header__title .components-dropdown .components-button:hover,.controls-panel-container .section-header .section-header__title .components-dropdown .components-button[aria-expanded=true],.preset-manager__content .section-header .section-header__title .components-dropdown .components-button:hover,.preset-manager__content .section-header .section-header__title .components-dropdown .components-button[aria-expanded=true]{opacity:1}.controls-panel-container .section-header .section-header__toolbar,.preset-manager__content .section-header .section-header__toolbar{display:flex;flex-shrink:0;gap:4px;height:24px;text-align:right}.controls-panel-container .section-header .section-header__toolbar .components-button,.preset-manager__content .section-header .section-header__toolbar .components-button{height:24px;min-width:24px;padding:0;width:24px}.controls-panel-container .section-header .section-header__toolbar .controls-dropdown .components-button.has-icon,.controls-panel-container .section-header .section-header__toolbar>.components-button,.preset-manager__content .section-header .section-header__toolbar .controls-dropdown .components-button.has-icon,.preset-manager__content .section-header .section-header__toolbar>.components-button{padding:1px}.controls-panel-container .section-header .section-header__toolbar .settings-dropdown,.preset-manager__content .section-header .section-header__toolbar .settings-dropdown{margin-left:5px}.controls-panel-container .section-header .section-header__toolbar .settings-dropdown .components-button.has-icon,.preset-manager__content .section-header .section-header__toolbar .settings-dropdown .components-button.has-icon{padding:1px}.controls-panel-container .section-header .section-header__toolbar .components-disabled,.preset-manager__content .section-header .section-header__toolbar .components-disabled{display:inline-block}.controls-panel-container .rule-sets,.preset-manager__content .rule-sets{grid-column-gap:32px;grid-row-gap:16px;display:grid;grid-template-columns:repeat(auto-fit,minmax(248px,1fr))}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules{grid-column-gap:32px;grid-row-gap:16px;display:grid;grid-template-columns:1fr}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header{align-items:center;color:#757575;display:flex;font-size:12px;justify-content:space-between;margin-bottom:8px;min-height:24px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header button,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__header button{height:24px;min-width:24px;padding:0;width:24px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container{display:grid;gap:8px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified{display:grid;grid-template-columns:1fr 74px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__ruleField,.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__subField,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__ruleField,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .fields-container.is-simplified .field__subField{grid-column-end:3;grid-column-start:1}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__help,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__help{margin-bottom:0;margin-top:10px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__field,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-base-control__field{margin-bottom:0}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-toggle-control,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .rule__fields .components-toggle-control{margin:4px 0}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-base-control,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-base-control{margin-bottom:0}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-text-control__input,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__rules .rule .components-text-control__input{border:1px solid #1e1e1e;min-height:40px;padding:8px}.controls-panel-container .rule-sets .rule-sets__rule-set .rule-set__add-rule,.preset-manager__content .rule-sets .rule-sets__rule-set .rule-set__add-rule{margin-top:12px}.controls-panel-container .date-time-control .control-fields-item__schedules,.preset-manager__content .date-time-control .control-fields-item__schedules{grid-column-gap:32px;grid-row-gap:20px;display:grid;grid-template-columns:repeat(auto-fit,minmax(248px,1fr))}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item.disabled .date-time-control__schedule--heading span,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item.disabled .date-time-control__schedule--heading span{opacity:.4}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields{display:grid;gap:16px}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields>span,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields>span{display:none}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .control-fields-item__label,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .control-fields-item__label{margin-bottom:12px}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item{align-items:center;display:flex;gap:8px;margin-top:8px}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .control-fields-item__sub-label,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .control-fields-item__sub-label{min-width:40px}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field{align-items:center;border:1px solid #1e1e1e;border-radius:2px;display:flex;justify-content:space-between;min-height:36px;position:relative;width:100%}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field .components-button:first-child,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field .components-button:first-child{padding-right:30px;width:100%}.controls-panel-container .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field .components-button.clear-date-time,.preset-manager__content .date-time-control .control-fields-item__schedules .schedules-item .schedules-item__fields .schedules-item__fields__date-time .date-time-item .date-time-item__field .components-button.clear-date-time{margin:5px 4px;max-height:34px;min-width:24px;padding:2px;position:absolute;right:0}.controls-panel-container .screen-size-control .components-base-control,.preset-manager__content .screen-size-control .components-base-control{margin-bottom:12px}.controls-panel-container .screen-size-control .components-notice,.preset-manager__content .screen-size-control .components-notice{margin-top:20px}.controls-panel-container .user-role-control .control-fields-item>.components-base-control__help,.preset-manager__content .user-role-control .control-fields-item>.components-base-control__help{margin-top:-8px}.controls-panel-container .query-string-control textarea,.preset-manager__content .query-string-control textarea{white-space:nowrap}.controls-panel-container .acf-control .components-notice,.preset-manager__content .acf-control .components-notice{margin-bottom:20px}.controls-panel-container .wp-fusion-control .components-disabled,.preset-manager__content .wp-fusion-control .components-disabled{margin-bottom:18px}.block-visibility__date-time-popover .components-popover__content{padding:16px}.block-visibility__date-time-popover .date-time-popover__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.block-visibility__date-time-popover .date-time-popover__header h2{color:#1e1e1e;font-size:13px;font-weight:600;line-height:1.2;margin:0}.block-visibility__date-time-popover .components-datetime{padding:0}.block-visibility__control-popover.visibility-controls .components-popover__content{min-width:240px}.block-visibility__control-popover.visibility-controls .components-menu-item__button[aria-disabled=true]:not(.is-tertiary){color:#757575;opacity:1}.block-visibility__control-popover.visibility-controls .components-menu-item__button[aria-disabled=true]:not(.is-tertiary):focus{box-shadow:none;outline:none}.block-visibility__control-popover.visibility-controls .components-menu-item__button[aria-disabled=true]:not(.is-tertiary) .components-menu-item__item .control-branding-icon{opacity:.6}.block-visibility__control-popover.visibility-controls .components-menu-item__button.has-reset .components-menu-item__item{min-width:100%}.block-visibility__control-popover.visibility-controls .components-menu-item__button .components-menu-item__item .control-branding-icon{opacity:1}.block-visibility__control-popover.visibility-controls .components-menu-item__button .components-menu-item__item .menu-item-reset{color:var(--wp-admin-theme-color-darker-10);font-size:11px;font-weight:500;line-height:1.4;margin-left:auto;text-transform:uppercase}.block-visibility__control-popover.control-settings>div{min-width:300px;padding:6px}.block-visibility__control-popover.control-settings>div h3{color:#1e1e1e;font-size:11px;font-weight:500;margin-bottom:18px;margin-top:0;text-transform:uppercase}.block-visibility__control-popover.control-settings>div .components-base-control{margin-bottom:24px}.block-visibility__control-popover.control-settings>div .components-base-control:last-child{margin-bottom:0}.block-visibility__control-popover.edit-title .components-popover__content{min-width:240px;padding:12px}.block-visibility__control-popover.edit-title .components-popover__content>div{padding:0}.block-visibility__control-popover.edit-title .components-popover__content .components-base-control__field{margin-bottom:0}.block-visibility__control-popover .components-menu-item__button .control-branding-icon{margin-right:8px;width:14px}.block-visibility__control-popover .components-menu-item__button:hover .control-branding-icon{opacity:.6}.block-visibility__control-popover .components-notice{margin:10px 0}.block-visibility__control-popover .components-notice .components-notice__content{margin:2px 0}.block-visibility__control-popover .components-notice .components-notice__content .components-base-control__help{display:inline-block;margin:4px 0 0}.block-visibility__reset-modal{max-width:400px!important}.block-visibility__reset-modal .block-visibility__reset-modal--buttons{margin-top:24px}.block-visibility__reset-modal .block-visibility__reset-modal--buttons button:first-child{margin-right:10px}.block-visibility__confirmation-modal{max-width:400px!important}.block-visibility__confirmation-modal .block-visibility__confirmation-modal--buttons{display:flex;justify-content:space-between;margin-top:24px}#customize-theme-controls .controls-panel-container h3.controls-panel-item__header{font-size:13px!important;font-weight:500!important;margin-bottom:16px!important}#customize-theme-controls .control-set .control-set__header h3{font-size:12px!important;margin-bottom:8px!important}[data-kadence-active-tab=general] .block-visibility__controls-panel,[data-kadence-active-tab=style] .block-visibility__controls-panel{display:none} diff --git a/build/block-visibility-editor.asset.php b/build/block-visibility-editor.asset.php index ac680a73..3a98fe83 100644 --- a/build/block-visibility-editor.asset.php +++ b/build/block-visibility-editor.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => '48870b57bedc0d7709fb'); + array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives'), 'version' => '7716ddd92eb115c122eb'); diff --git a/build/block-visibility-editor.js b/build/block-visibility-editor.js index 1dbcc281..889e3a81 100644 --- a/build/block-visibility-editor.js +++ b/build/block-visibility-editor.js @@ -1,4 +1,4 @@ -(()=>{var e={184:(e,t)=>{var n;!function(){"use strict";var i={}.hasOwnProperty;function o(){for(var e=[],t=0;t{"use strict";var i=n(864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},l={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function a(e){return i.isMemo(e)?r:s[e.$$typeof]||o}s[i.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[i.Memo]=r;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,b=Object.prototype;e.exports=function e(t,n,i){if("string"!=typeof n){if(b){var o=m(n);o&&o!==b&&e(t,o,i)}var r=u(n);d&&(r=r.concat(d(n)));for(var s=a(t),f=a(n),v=0;v{"use strict";var n="function"==typeof Symbol&&Symbol.for,i=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,l=n?Symbol.for("react.fragment"):60107,r=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,a=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,m=n?Symbol.for("react.suspense"):60113,b=n?Symbol.for("react.suspense_list"):60120,f=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,h=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case u:case d:case l:case s:case r:case m:return e;default:switch(e=e&&e.$$typeof){case c:case p:case v:case f:case a:return e;default:return t}}case o:return t}}}function E(e){return k(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=a,t.Element=i,t.ForwardRef=p,t.Fragment=l,t.Lazy=v,t.Memo=f,t.Portal=o,t.Profiler=s,t.StrictMode=r,t.Suspense=m,t.isAsyncMode=function(e){return E(e)||k(e)===u},t.isConcurrentMode=E,t.isContextConsumer=function(e){return k(e)===c},t.isContextProvider=function(e){return k(e)===a},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return k(e)===p},t.isFragment=function(e){return k(e)===l},t.isLazy=function(e){return k(e)===v},t.isMemo=function(e){return k(e)===f},t.isPortal=function(e){return k(e)===o},t.isProfiler=function(e){return k(e)===s},t.isStrictMode=function(e){return k(e)===r},t.isSuspense=function(e){return k(e)===m},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===l||e===d||e===s||e===r||e===m||e===b||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===f||e.$$typeof===a||e.$$typeof===c||e.$$typeof===p||e.$$typeof===g||e.$$typeof===y||e.$$typeof===_||e.$$typeof===h)},t.typeOf=k},864:(e,t,n)=>{"use strict";e.exports=n(921)}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var l=t[i]={exports:{}};return e[i](l,l.exports,n),l.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(){return e=Object.assign||function(e){for(var t=1;t"date_time"===e.settingSlug)))return!1;let i=[],o=!1;var l,s;if(t?(i=null!==(l=e.dateTime?.schedules)&&void 0!==l?l:[],o=null!==(s=e.dateTime?.hideOnSchedules)&&void 0!==s&&s):i=e?.scheduling?[e?.scheduling]:[],0===i.length)return!1;const a=[];i.forEach((e=>{var t,n,i;const l=null!==(t=e?.enable)&&void 0!==t&&t,s=null!==(n=e?.start)&&void 0!==n?n:"",c=null!==(i=e?.end)&&void 0!==i?i:"";let u=!0;l||(u=!1),o||!l||s||c||(u=!1),u=(0,r.applyFilters)("blockVisibility.hasDateTimeScheduleIndicator",u,e),l&&s&&c&&s>=c&&(u=!1),a.push(u)}));let c=a.includes(!0);return c=(0,r.applyFilters)("blockVisibility.hasDateTimeIndicator",c,e,t,n),c}function m(e,t,n){var i,o,l,s,a,c;if(t&&!e.hasOwnProperty("userRole"))return!1;const u=t?e.userRole:e,d=null!==(i=u?.visibilityByRole)&&void 0!==i?i:"public",p=null!==(o=u?.restrictedRoles)&&void 0!==o?o:[],m=null!==(l=u?.hideOnRestrictedRoles)&&void 0!==l&&l,b=null!==(s=u?.restrictedUsers)&&void 0!==s?s:[],f=null!==(a=u?.hideOnRestrictedUsers)&&void 0!==a&&a,v=null!==(c=u?.ruleSets)&&void 0!==c?c:[];let h=!0;return n.some((e=>"visibility_by_role"===e.settingSlug))&&d&&"public"!==d&&"all"!==d||(h=!1),"user-role"===d&&0===p.length&&m&&(h=!1),"users"===d&&0===b.length&&f&&(h=!1),"user-rule-sets"===d&&0===v.length&&(h=!1),h=(0,r.applyFilters)("blockVisibility.hasUserRoleIndicator",h,e,t,n),h}function b(e,t,n,i){var o,l;if(t&&!e.hasOwnProperty("screenSize"))return!1;const s=null!==(o=(t?e.screenSize:e)?.hideOnScreenSize)&&void 0!==o?o:{extraLarge:!1,large:!1,medium:!1,small:!1,extraSmall:!1},a=null!==(l=i?.visibility_controls?.screen_size?.controls)&&void 0!==l?l:{extra_large:!0,large:!0,medium:!0,small:!0,extra_small:!0},c=[!(!s.extraLarge||!a.extra_large),!(!s.large||!a.large),!(!s.medium||!a.medium),!(!s.small||!a.small),!(!s.extraSmall||!a.extra_small)];let u=!0;return n.some((e=>"screen_size"===e.settingSlug))&&c.includes(!0)||(u=!1),u=(0,r.applyFilters)("blockVisibility.hasScreenSizeIndicator",u,e,t,n,i),u}function f(e,t,n){var i,o,l;if(t&&!e.hasOwnProperty("queryString"))return!1;if(!n.some((e=>"query_string"===e.settingSlug)))return!1;const s=null!==(i=e?.queryString?.queryStringAny)&&void 0!==i?i:"",a=null!==(o=e?.queryString?.queryStringAll)&&void 0!==o?o:"",c=null!==(l=e?.queryString?.queryStringNot)&&void 0!==l?l:"";let u=!0;return s||a||c||(u=!1),u=(0,r.applyFilters)("blockVisibility.hasQueryStringIndicator",u,e,t,n),u}function v(e,t,n,i){var o,l;if(null===(o=i?.integrations?.acf?.active)||void 0===o||!o||!n.some((e=>"acf"===e.settingSlug)))return!1;if(t&&!e.hasOwnProperty("acf"))return!1;let s=!0;return 0===(null!==(l=e?.acf?.ruleSets)&&void 0!==l?l:[]).length&&(s=!1),s=(0,r.applyFilters)("blockVisibility.hasACFIndicator",s,e,t,n,i),s}function h(e,t,n,i){var o,l,s,a,c,u;if(null===(o=i?.integrations?.wp_fusion?.active)||void 0===o||!o||!n.some((e=>"wp_fusion"===e.settingSlug)))return!1;if(t&&!e.hasOwnProperty("wpFusion"))return!1;const d=null!==(l=e.hasOwnProperty("userRole"))&&void 0!==l&&l,p=null!==(s=e?.userRole?.visibilityByRole)&&void 0!==s?s:"public",m="public"===p||"logged-out"===p,b=null!==(a=e?.wpFusion?.tagsAny)&&void 0!==a?a:[],f=null!==(c=e?.wpFusion?.tagsAll)&&void 0!==c?c:[],v=null!==(u=e?.wpFusion?.tagsNot)&&void 0!==u?u:[];let h=!0;return(!d&&0===v.length||"public"===p&&0===v.length||"logged-out"===p)&&(h=!1),m||0!==b.length||0!==f.length||0!==v.length||(h=!1),h=(0,r.applyFilters)("blockVisibility.hasWPFusionIndicator",h,e,t,n,i),h}function g(e,t){if(!e||0===e.length)return!1;const n=e.disabled_blocks.includes(t),i=(0,s.getBlockSupport)(t,"blockVisibility",!1);return!(n||!i)}function y(e){const{data:t="fetching"}=(0,l.useSelect)((t=>{const{getEntityRecord:n}=t("core");return{data:n("block-visibility/v1",e)}}),[]);return t}function _(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||0===e.length)return!1;const o=e.plugin_settings,l=(0,i.has)(o,t);return l?o[t]:n}(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256"},(0,t.createElement)(c.Path,{d:"M128 0c70.7 0 128 57.3 128 128s-57.3 128-128 128S0 198.7 0 128 57.3 0 128 0Zm0 67a95.67 95.67 0 0 0-88.56 59.65l-.44 1.09v.52l.47 1.19A95.67 95.67 0 0 0 128 189a95.67 95.67 0 0 0 88.56-59.65l.44-1.09v-.52l-.47-1.19A95.67 95.67 0 0 0 128 67Zm0 21a40 40 0 1 1 0 80 40 40 0 0 1 0-80Zm8 16a16 16 0 1 0 0 32 16 16 0 0 0 0-32Z"}));const k=(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M12 16c2.208 0 4-1.792 4-4s-1.792-4-4-4-4 1.792-4 4 1.792 4 4 4Zm0-1.5c-1.3796 0-2.5-1.1204-2.5-2.5s1.1204-2.5 2.5-2.5 2.5 1.1204 2.5 2.5-1.1204 2.5-2.5 2.5Z"}),(0,t.createElement)(c.Path,{d:"M12 16c2.208 0 4-1.792 4-4s-1.792-4-4-4-4 1.792-4 4 1.792 4 4 4Zm0-1.5c-1.3796 0-2.5-1.1204-2.5-2.5s1.1204-2.5 2.5-2.5 2.5 1.1204 2.5 2.5-1.1204 2.5-2.5 2.5Z"}),(0,t.createElement)(c.Path,{d:"M12 4.5c5 0 9.27 3.11 11 7.5-1.73 4.39-6 7.5-11 7.5S2.73 16.39 1 12c1.73-4.39 6-7.5 11-7.5Zm9.3474 7.5C19.6714 8.4585 16.0654 6.1071 12 6.1071c-4.0653 0-7.6714 2.3514-9.3474 5.8929 1.676 3.5415 5.282 5.8929 9.3474 5.8929 4.0653 0 7.6714-2.3514 9.3474-5.8929Z"})),E=(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M13.9709 15.481A3.9797 3.9797 0 0 1 12 16c-2.208 0-4-1.792-4-4a3.98 3.98 0 0 1 .4854-1.9106l1.1417 1.1222A2.4937 2.4937 0 0 0 9.5 12c0 1.3796 1.1204 2.5 2.5 2.5.2906 0 .5697-.0497.8292-.141l1.1417 1.122ZM15.8137 13.2094l-1.315-1.2926c-.0436-1.3279-1.1252-2.3955-2.4587-2.4165l-1.315-1.2925A3.9918 3.9918 0 0 1 12 8c2.208 0 4 1.792 4 4a3.994 3.994 0 0 1-.1863 1.2094Z"}),(0,t.createElement)(c.Path,{d:"M16.9542 18.4125C15.4477 19.1105 13.7696 19.5 12 19.5c-5 0-9.27-3.11-11-7.5.8355-2.1201 2.2634-3.9417 4.0798-5.2586l1.1408 1.1212C4.697 8.8849 3.454 10.3063 2.6526 12c1.676 3.5415 5.282 5.8929 9.3474 5.8929 1.3052 0 2.563-.2424 3.7249-.6887l1.2293 1.2083ZM19.4899 16.8186l-1.1243-1.105c1.2566-.9771 2.2857-2.2427 2.9818-3.7136-1.676-3.5415-5.282-5.8929-9.3474-5.8929-1.027 0-2.0246.15-2.9692.4315L7.7566 5.2862C9.0734 4.7784 10.504 4.5 12 4.5c5 0 9.27 3.11 11 7.5-.746 1.8932-1.9645 3.5483-3.5101 4.8186ZM2.7243 4.4261l16.5 16.2175a.75.75 0 0 0 1.0514-1.0697l-16.5-16.2175A.75.75 0 0 0 2.7243 4.426Z"})),S=((0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M12 3c4.9706 0 9 4.0294 9 9s-4.0294 9-9 9-9-4.0294-9-9 4.0294-9 9-9Zm0 1.595c-4.0897 0-7.405 3.3153-7.405 7.405 0 4.0897 3.3153 7.405 7.405 7.405 4.0897 0 7.405-3.3153 7.405-7.405 0-4.0897-3.3153-7.405-7.405-7.405Zm0 2.5063c.4066 0 .742.3042.7913.6974l.0062.1v3.7714l2.9563 2.9559a.7975.7975 0 0 1-1.0462 1.1991l-.0816-.0713-3.2213-3.2231-.0749-.0983-.0304-.051a.7931.7931 0 0 1-.0907-.2814l-.0062-.1V7.8987c0-.4404.357-.7974.7975-.7974Z"})),(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M5.05 0H24v18.95A5.05 5.05 0 0 1 18.95 24H0V5.05A5.05 5.05 0 0 1 5.05 0Z",fill:"#E55B10"}),(0,t.createElement)(c.Path,{d:"M19.58 9.79c0 .52-.43.95-.95.95h-7.58v7.58c0 .52-.42.94-.94.94h-.64a.95.95 0 0 1-.94-.94V9.47c0-.34.18-.64.45-.8a.95.95 0 0 1 .8-.46h8.85c.52 0 .95.42.95.95v.63Z",fill:"#FFFFFF"}),(0,t.createElement)(c.Path,{d:"M5.05 14.53c0-.53.43-.95.95-.95h7.58V6c0-.52.42-.95.95-.95h.63c.52 0 .95.43.95.95v8.84c0 .34-.19.64-.46.81a.95.95 0 0 1-.8.46H6a.95.95 0 0 1-.95-.95v-.63Z",fill:"#FFFFFF"}))),w=(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M19.2 0A4.8 4.8 0 0 1 24 4.8v14.4a4.8 4.8 0 0 1-4.8 4.8H4.8A4.8 4.8 0 0 1 0 19.2V4.8A4.8 4.8 0 0 1 4.8 0h14.4ZM6.89 7.2H5.11l-3.87 9.79-.04.11h2.46l.64-1.63h3.4l.65 1.63h2.45l-.05-.11-.14-.38a4.93 4.93 0 0 0 5.9-1.23l-.01 1.72h2.4v-3.6h3.75v-2.4H18.9V9.6h3.9V7.2h-6.3v1.72a4.94 4.94 0 0 0-8.36 1.43L6.89 7.2Zm5.86 2.28c1.14 0 2.12.72 2.5 1.73l.06.2 1.19-.01v1.8h-1.3a2.67 2.67 0 0 1-2.25 1.61l-.2.01a2.67 2.67 0 1 1 0-5.34ZM6 11.16l.9 2.26H5.1l.9-2.26Z",fill:"#5DE8BF"}));function C(e,t){var n,l;let s=[];if(!e||!t||0===e.length||0===t.length)return s;let a=function(){let e=[{label:(0,o.__)("Hide Block","block-visibility"),attributeSlug:"hideBlock",settingSlug:"hide_block"},{label:(0,o.__)("Date & Time","block-visibility"),attributeSlug:"dateTime",settingSlug:"date_time"},{label:(0,o.__)("User Role","block-visibility"),attributeSlug:"userRole",settingSlug:"visibility_by_role"},{label:(0,o.__)("Screen Size","block-visibility"),attributeSlug:"screenSize",settingSlug:"screen_size"},{label:(0,o.__)("Query String","block-visibility"),attributeSlug:"queryString",settingSlug:"query_string"},{label:(0,o.__)("Advanced Custom Fields","block-visibility"),type:"integration",attributeSlug:"acf",settingSlug:"acf",icon:w},{label:(0,o.__)("WP Fusion","block-visibility"),type:"integration",attributeSlug:"wpFusion",settingSlug:"wp_fusion",icon:S}];return e=(0,r.applyFilters)("blockVisibility.controls",e),e=(0,r.applyFilters)("blockVisibility.coreControls",e),e=(0,r.applyFilters)("blockVisibility.integrationControls",e),e.sort(((e,t)=>e.label.localeCompare(t.label))),e}();a.forEach((function(e){"integration"!==e.type||(e=>{let n=!1;var i;return t?.integrations&&(n=null!==(i=t?.integrations[e]?.active)&&void 0!==i&&i),n})(e.settingSlug)||(a=a.filter((t=>t.settingSlug!==e.settingSlug)))}));const c=null!==(n=e?.visibility_controls)&&void 0!==n?n:{};(0,i.isEmpty)(c)||a.forEach((function(e){var t;let n=!1;(0,i.has)(c,e.settingSlug)||(n=!0),(null===(t=c[e.settingSlug]?.enable)||void 0===t||t)&&(n=!0),n&&s.push(e)}));const u=null!==(l=e?.plugin_settings?.default_controls)&&void 0!==l?l:[];return s.forEach((function(e){u.includes(e.settingSlug)&&(e.isDefault=!0)})),s=(0,r.applyFilters)("blockVisibility.enabledControls",s,e,t),s}(0,r.addFilter)("editor.BlockListBlock","block-visibility/contextual-indicators",(function(n){return i=>{var o,l,s;const a=y("settings"),c=y("variables");if("fetching"===a)return(0,t.createElement)(n,i);const{name:u,attributes:k}=i,E=_(a,"enable_contextual_indicators"),S=g(a,u),w=C(a,c);if(!E||!S||0===w.length)return(0,t.createElement)(n,i);const{blockVisibility:O}=k,x=null!==(o=O?.hideBlock)&&void 0!==o&&o&&w.some((e=>"hide_block"===e.settingSlug)),M=null!==(l=O?.controlSets)&&void 0!==l&&l;let V=null!=O?O:{};M&&(V=0!==O.controlSets.length&&O.controlSets[0]?.controls?O.controlSets[0].controls:{});let R={"date-time":p(V,M,w),"user-role":m(V,M,w),"screen-size":b(V,M,w,a),"query-string":f(V,M,w),acf:v(V,M,w,c),"wp-fusion":h(V,M,w,c)};R=(0,r.applyFilters)("blockVisibility.contextualIndicatorActiveControls",R,O,V,M,w,c),R=(0,r.applyFilters)("blockVisibility.conditionalIndicatorActiveCoreControls",R,O,V,M,w,c),R=Object.keys(R).filter((e=>!0===R[e])),!c?.is_pro||null===(s=a?.visibility_controls?.general?.enable_local_controls)||void 0===s||s||(R=R.filter((e=>"hide-block"===e||"visibility-presets"===e))),R.sort();let P="";R.length>1?P="block-visibility__has-"+R.length+"-controls":0!==R.length&&(P="block-visibility__has-"+R.join("-"));let F=d()({"block-visibility__is-hidden":x},i?.className,P);return F&&(F+=" block-visibility__has-visibility"),F=(0,r.applyFilters)("blockVisibility.contextualIndicatorClasses",F),F=(0,r.applyFilters)("blockVisibility.conditionalIndicatorClasses",F),(0,t.createElement)(n,e({},i,{className:F}))}}));const O=window.wp.blockEditor;function x(e,t){var n,i,o;let l=!0;if(null===(n=e?.plugin_settings?.enable_user_role_restrictions)||void 0===n||!n)return l;const r=null!==(i=e?.plugin_settings?.enabled_user_roles)&&void 0!==i?i:[];-1===r.indexOf("administrator")&&r.push("administrator");const s=null!==(o=t?.current_users_roles)&&void 0!==o?o:[];return l=0!==s.length&&s.every((e=>-1!==r.indexOf(e))),l}const M=(0,l.withSelect)((e=>{var t,n;const{getEntityRecord:i}=e("core"),{getBlocks:o,getBlockName:l,getSelectedBlockClientIds:r,getBlockAttributes:s,hasMultiSelection:a}=e("core/block-editor"),{getBlockType:c}=e("core/blocks"),u=!a(),d=r(),p=0===d.length?null:d[0],m=c(l(p)),b=s(p),f=null!==(t=i("block-visibility/v1","settings"))&&void 0!==t?t:"fetching";let v=null!==(n=i("block-visibility/v1","variables"))&&void 0!==n?n:"fetching";const h=o().filter((e=>"core/widget-area"===e.name));return"fetching"!==v&&(v={...v,isWidgetEditor:h.length>0}),{enableMenuItem:u,clientId:p,blockType:m,blockAttributes:b,settings:f,variables:v}}))((function(e){var n;const{flashBlock:r,updateBlockAttributes:s}=(0,l.useDispatch)("core/block-editor"),{createSuccessNotice:a}=(0,l.useDispatch)("core/notices"),{blockAttributes:u,blockType:d,clientId:p,enableMenuItem:m,globallyRestricted:b,settings:f,variables:v,widgetAreaRestricted:h}=e;if("fetching"===f||"fetching"===v)return null;if(!x(f,v))return null;if(!m||!d)return null;if(h.includes(d.name)&&v?.isWidgetEditor||b.includes(d.name))return null;const y=_(f,"enable_toolbar_controls"),S=g(f,d.name),w=C(f,v);if(!y||!S||!w.some((e=>"hide_block"===e.settingSlug)))return null;const{blockVisibility:M}=u,V=null!==(n=M?.hideBlock)&&void 0!==n&&n,R=V?k:E,P=V?(0,o.__)("Enable block","block-visibility"):(0,o.__)("Hide block","block-visibility"),F=d.title,I=V?(0,o.sprintf)( +(()=>{var e={184:(e,t)=>{var n;!function(){"use strict";var i={}.hasOwnProperty;function o(){for(var e=[],t=0;t{"use strict";var i=n(864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},l={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function a(e){return i.isMemo(e)?r:s[e.$$typeof]||o}s[i.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[i.Memo]=r;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,b=Object.prototype;e.exports=function e(t,n,i){if("string"!=typeof n){if(b){var o=m(n);o&&o!==b&&e(t,o,i)}var r=u(n);d&&(r=r.concat(d(n)));for(var s=a(t),f=a(n),v=0;v{"use strict";var n="function"==typeof Symbol&&Symbol.for,i=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,l=n?Symbol.for("react.fragment"):60107,r=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,a=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,m=n?Symbol.for("react.suspense"):60113,b=n?Symbol.for("react.suspense_list"):60120,f=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,h=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case u:case d:case l:case s:case r:case m:return e;default:switch(e=e&&e.$$typeof){case c:case p:case v:case f:case a:return e;default:return t}}case o:return t}}}function E(e){return k(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=a,t.Element=i,t.ForwardRef=p,t.Fragment=l,t.Lazy=v,t.Memo=f,t.Portal=o,t.Profiler=s,t.StrictMode=r,t.Suspense=m,t.isAsyncMode=function(e){return E(e)||k(e)===u},t.isConcurrentMode=E,t.isContextConsumer=function(e){return k(e)===c},t.isContextProvider=function(e){return k(e)===a},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return k(e)===p},t.isFragment=function(e){return k(e)===l},t.isLazy=function(e){return k(e)===v},t.isMemo=function(e){return k(e)===f},t.isPortal=function(e){return k(e)===o},t.isProfiler=function(e){return k(e)===s},t.isStrictMode=function(e){return k(e)===r},t.isSuspense=function(e){return k(e)===m},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===l||e===d||e===s||e===r||e===m||e===b||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===f||e.$$typeof===a||e.$$typeof===c||e.$$typeof===p||e.$$typeof===g||e.$$typeof===y||e.$$typeof===_||e.$$typeof===h)},t.typeOf=k},864:(e,t,n)=>{"use strict";e.exports=n(921)}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var l=t[i]={exports:{}};return e[i](l,l.exports,n),l.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(){return e=Object.assign||function(e){for(var t=1;t"date_time"===e.settingSlug)))return!1;let i=[],o=!1;var l,s;if(t?(i=null!==(l=e.dateTime?.schedules)&&void 0!==l?l:[],o=null!==(s=e.dateTime?.hideOnSchedules)&&void 0!==s&&s):i=e?.scheduling?[e?.scheduling]:[],0===i.length)return!1;const a=[];i.forEach((e=>{var t,n,i;const l=null!==(t=e?.enable)&&void 0!==t&&t,s=null!==(n=e?.start)&&void 0!==n?n:"",c=null!==(i=e?.end)&&void 0!==i?i:"";let u=!0;l||(u=!1),o||!l||s||c||(u=!1),u=(0,r.applyFilters)("blockVisibility.hasDateTimeScheduleIndicator",u,e),l&&s&&c&&s>=c&&(u=!1),a.push(u)}));let c=a.includes(!0);return c=(0,r.applyFilters)("blockVisibility.hasDateTimeIndicator",c,e,t,n),c}function m(e,t,n){var i,o,l,s,a,c;if(t&&!e.hasOwnProperty("userRole"))return!1;const u=t?e.userRole:e,d=null!==(i=u?.visibilityByRole)&&void 0!==i?i:"public",p=null!==(o=u?.restrictedRoles)&&void 0!==o?o:[],m=null!==(l=u?.hideOnRestrictedRoles)&&void 0!==l&&l,b=null!==(s=u?.restrictedUsers)&&void 0!==s?s:[],f=null!==(a=u?.hideOnRestrictedUsers)&&void 0!==a&&a,v=null!==(c=u?.ruleSets)&&void 0!==c?c:[];let h=!0;return n.some((e=>"visibility_by_role"===e.settingSlug))&&d&&"public"!==d&&"all"!==d||(h=!1),"user-role"===d&&0===p.length&&m&&(h=!1),"users"===d&&0===b.length&&f&&(h=!1),"user-rule-sets"===d&&0===v.length&&(h=!1),h=(0,r.applyFilters)("blockVisibility.hasUserRoleIndicator",h,e,t,n),h}function b(e,t,n,i){var o,l;if(t&&!e.hasOwnProperty("screenSize"))return!1;const s=null!==(o=(t?e.screenSize:e)?.hideOnScreenSize)&&void 0!==o?o:{extraLarge:!1,large:!1,medium:!1,small:!1,extraSmall:!1},a=null!==(l=i?.visibility_controls?.screen_size?.controls)&&void 0!==l?l:{extra_large:!0,large:!0,medium:!0,small:!0,extra_small:!0},c=[!(!s.extraLarge||!a.extra_large),!(!s.large||!a.large),!(!s.medium||!a.medium),!(!s.small||!a.small),!(!s.extraSmall||!a.extra_small)];let u=!0;return n.some((e=>"screen_size"===e.settingSlug))&&c.includes(!0)||(u=!1),u=(0,r.applyFilters)("blockVisibility.hasScreenSizeIndicator",u,e,t,n,i),u}function f(e,t,n){var i,o,l;if(t&&!e.hasOwnProperty("queryString"))return!1;if(!n.some((e=>"query_string"===e.settingSlug)))return!1;const s=null!==(i=e?.queryString?.queryStringAny)&&void 0!==i?i:"",a=null!==(o=e?.queryString?.queryStringAll)&&void 0!==o?o:"",c=null!==(l=e?.queryString?.queryStringNot)&&void 0!==l?l:"";let u=!0;return s||a||c||(u=!1),u=(0,r.applyFilters)("blockVisibility.hasQueryStringIndicator",u,e,t,n),u}function v(e,t,n,i){var o,l;if(null===(o=i?.integrations?.acf?.active)||void 0===o||!o||!n.some((e=>"acf"===e.settingSlug)))return!1;if(t&&!e.hasOwnProperty("acf"))return!1;let s=!0;return 0===(null!==(l=e?.acf?.ruleSets)&&void 0!==l?l:[]).length&&(s=!1),s=(0,r.applyFilters)("blockVisibility.hasACFIndicator",s,e,t,n,i),s}function h(e,t,n,i){var o,l,s,a,c,u;if(null===(o=i?.integrations?.wp_fusion?.active)||void 0===o||!o||!n.some((e=>"wp_fusion"===e.settingSlug)))return!1;if(t&&!e.hasOwnProperty("wpFusion"))return!1;const d=null!==(l=e.hasOwnProperty("userRole"))&&void 0!==l&&l,p=null!==(s=e?.userRole?.visibilityByRole)&&void 0!==s?s:"public",m="public"===p||"logged-out"===p,b=null!==(a=e?.wpFusion?.tagsAny)&&void 0!==a?a:[],f=null!==(c=e?.wpFusion?.tagsAll)&&void 0!==c?c:[],v=null!==(u=e?.wpFusion?.tagsNot)&&void 0!==u?u:[];let h=!0;return(!d&&0===v.length||"public"===p&&0===v.length||"logged-out"===p)&&(h=!1),m||0!==b.length||0!==f.length||0!==v.length||(h=!1),h=(0,r.applyFilters)("blockVisibility.hasWPFusionIndicator",h,e,t,n,i),h}function g(e,t){if(!e||0===e.length)return!1;const n=e.disabled_blocks.includes(t),i=(0,s.getBlockSupport)(t,"blockVisibility",!1);return!(n||!i)}function y(e){const{data:t="fetching"}=(0,l.useSelect)((t=>{const{getEntityRecord:n}=t("core");return{data:n("block-visibility/v1",e)}}),[]);return t}function _(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||0===e.length)return!1;const o=e.plugin_settings,l=(0,i.has)(o,t);return l?o[t]:n}(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256"},(0,t.createElement)(c.Path,{d:"M128 0c70.7 0 128 57.3 128 128s-57.3 128-128 128S0 198.7 0 128 57.3 0 128 0Zm0 67a95.67 95.67 0 0 0-88.56 59.65l-.44 1.09v.52l.47 1.19A95.67 95.67 0 0 0 128 189a95.67 95.67 0 0 0 88.56-59.65l.44-1.09v-.52l-.47-1.19A95.67 95.67 0 0 0 128 67Zm0 21a40 40 0 1 1 0 80 40 40 0 0 1 0-80Zm8 16a16 16 0 1 0 0 32 16 16 0 0 0 0-32Z"}));const k=(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M12 16c2.208 0 4-1.792 4-4s-1.792-4-4-4-4 1.792-4 4 1.792 4 4 4Zm0-1.5c-1.3796 0-2.5-1.1204-2.5-2.5s1.1204-2.5 2.5-2.5 2.5 1.1204 2.5 2.5-1.1204 2.5-2.5 2.5Z"}),(0,t.createElement)(c.Path,{d:"M12 16c2.208 0 4-1.792 4-4s-1.792-4-4-4-4 1.792-4 4 1.792 4 4 4Zm0-1.5c-1.3796 0-2.5-1.1204-2.5-2.5s1.1204-2.5 2.5-2.5 2.5 1.1204 2.5 2.5-1.1204 2.5-2.5 2.5Z"}),(0,t.createElement)(c.Path,{d:"M12 4.5c5 0 9.27 3.11 11 7.5-1.73 4.39-6 7.5-11 7.5S2.73 16.39 1 12c1.73-4.39 6-7.5 11-7.5Zm9.3474 7.5C19.6714 8.4585 16.0654 6.1071 12 6.1071c-4.0653 0-7.6714 2.3514-9.3474 5.8929 1.676 3.5415 5.282 5.8929 9.3474 5.8929 4.0653 0 7.6714-2.3514 9.3474-5.8929Z"})),E=(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M13.9709 15.481A3.9797 3.9797 0 0 1 12 16c-2.208 0-4-1.792-4-4a3.98 3.98 0 0 1 .4854-1.9106l1.1417 1.1222A2.4937 2.4937 0 0 0 9.5 12c0 1.3796 1.1204 2.5 2.5 2.5.2906 0 .5697-.0497.8292-.141l1.1417 1.122ZM15.8137 13.2094l-1.315-1.2926c-.0436-1.3279-1.1252-2.3955-2.4587-2.4165l-1.315-1.2925A3.9918 3.9918 0 0 1 12 8c2.208 0 4 1.792 4 4a3.994 3.994 0 0 1-.1863 1.2094Z"}),(0,t.createElement)(c.Path,{d:"M16.9542 18.4125C15.4477 19.1105 13.7696 19.5 12 19.5c-5 0-9.27-3.11-11-7.5.8355-2.1201 2.2634-3.9417 4.0798-5.2586l1.1408 1.1212C4.697 8.8849 3.454 10.3063 2.6526 12c1.676 3.5415 5.282 5.8929 9.3474 5.8929 1.3052 0 2.563-.2424 3.7249-.6887l1.2293 1.2083ZM19.4899 16.8186l-1.1243-1.105c1.2566-.9771 2.2857-2.2427 2.9818-3.7136-1.676-3.5415-5.282-5.8929-9.3474-5.8929-1.027 0-2.0246.15-2.9692.4315L7.7566 5.2862C9.0734 4.7784 10.504 4.5 12 4.5c5 0 9.27 3.11 11 7.5-.746 1.8932-1.9645 3.5483-3.5101 4.8186ZM2.7243 4.4261l16.5 16.2175a.75.75 0 0 0 1.0514-1.0697l-16.5-16.2175A.75.75 0 0 0 2.7243 4.426Z"})),S=((0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M12 3c4.9706 0 9 4.0294 9 9s-4.0294 9-9 9-9-4.0294-9-9 4.0294-9 9-9Zm0 1.595c-4.0897 0-7.405 3.3153-7.405 7.405 0 4.0897 3.3153 7.405 7.405 7.405 4.0897 0 7.405-3.3153 7.405-7.405 0-4.0897-3.3153-7.405-7.405-7.405Zm0 2.5063c.4066 0 .742.3042.7913.6974l.0062.1v3.7714l2.9563 2.9559a.7975.7975 0 0 1-1.0462 1.1991l-.0816-.0713-3.2213-3.2231-.0749-.0983-.0304-.051a.7931.7931 0 0 1-.0907-.2814l-.0062-.1V7.8987c0-.4404.357-.7974.7975-.7974Z"})),(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M5.05 0H24v18.95A5.05 5.05 0 0 1 18.95 24H0V5.05A5.05 5.05 0 0 1 5.05 0Z",fill:"#E55B10"}),(0,t.createElement)(c.Path,{d:"M19.58 9.79c0 .52-.43.95-.95.95h-7.58v7.58c0 .52-.42.94-.94.94h-.64a.95.95 0 0 1-.94-.94V9.47c0-.34.18-.64.45-.8a.95.95 0 0 1 .8-.46h8.85c.52 0 .95.42.95.95v.63Z",fill:"#FFFFFF"}),(0,t.createElement)(c.Path,{d:"M5.05 14.53c0-.53.43-.95.95-.95h7.58V6c0-.52.42-.95.95-.95h.63c.52 0 .95.43.95.95v8.84c0 .34-.19.64-.46.81a.95.95 0 0 1-.8.46H6a.95.95 0 0 1-.95-.95v-.63Z",fill:"#FFFFFF"}))),w=(0,t.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(c.Path,{d:"M19.2 0A4.8 4.8 0 0 1 24 4.8v14.4a4.8 4.8 0 0 1-4.8 4.8H4.8A4.8 4.8 0 0 1 0 19.2V4.8A4.8 4.8 0 0 1 4.8 0h14.4ZM6.89 7.2H5.11l-3.87 9.79-.04.11h2.46l.64-1.63h3.4l.65 1.63h2.45l-.05-.11-.14-.38a4.93 4.93 0 0 0 5.9-1.23l-.01 1.72h2.4v-3.6h3.75v-2.4H18.9V9.6h3.9V7.2h-6.3v1.72a4.94 4.94 0 0 0-8.36 1.43L6.89 7.2Zm5.86 2.28c1.14 0 2.12.72 2.5 1.73l.06.2 1.19-.01v1.8h-1.3a2.67 2.67 0 0 1-2.25 1.61l-.2.01a2.67 2.67 0 1 1 0-5.34ZM6 11.16l.9 2.26H5.1l.9-2.26Z",fill:"#5DE8BF"}));function C(e,t){var n,l;let s=[];if(!e||!t||0===e.length||0===t.length)return s;let a=function(){let e=[{label:(0,o.__)("Hide Block","block-visibility"),attributeSlug:"hideBlock",settingSlug:"hide_block"},{label:(0,o.__)("Date & Time","block-visibility"),attributeSlug:"dateTime",settingSlug:"date_time"},{label:(0,o.__)("User Role","block-visibility"),attributeSlug:"userRole",settingSlug:"visibility_by_role"},{label:(0,o.__)("Screen Size","block-visibility"),attributeSlug:"screenSize",settingSlug:"screen_size"},{label:(0,o.__)("Query String","block-visibility"),attributeSlug:"queryString",settingSlug:"query_string"},{label:(0,o.__)("Advanced Custom Fields","block-visibility"),type:"integration",attributeSlug:"acf",settingSlug:"acf",icon:w},{label:(0,o.__)("WP Fusion","block-visibility"),type:"integration",attributeSlug:"wpFusion",settingSlug:"wp_fusion",icon:S}];return e=(0,r.applyFilters)("blockVisibility.controls",e),e=(0,r.applyFilters)("blockVisibility.coreControls",e),e=(0,r.applyFilters)("blockVisibility.integrationControls",e),e.sort(((e,t)=>e.label.localeCompare(t.label))),e}();a.forEach((function(e){"integration"!==e.type||(e=>{let n=!1;var i;return t?.integrations&&(n=null!==(i=t?.integrations[e]?.active)&&void 0!==i&&i),n})(e.settingSlug)||(a=a.filter((t=>t.settingSlug!==e.settingSlug)))}));const c=null!==(n=e?.visibility_controls)&&void 0!==n?n:{};(0,i.isEmpty)(c)||a.forEach((function(e){var t;let n=!1;(0,i.has)(c,e.settingSlug)||(n=!0),(null===(t=c[e.settingSlug]?.enable)||void 0===t||t)&&(n=!0),n&&s.push(e)}));const u=null!==(l=e?.plugin_settings?.default_controls)&&void 0!==l?l:[];return s.forEach((function(e){u.includes(e.settingSlug)&&(e.isDefault=!0)})),s=(0,r.applyFilters)("blockVisibility.enabledControls",s,e,t),s}(0,r.addFilter)("editor.BlockListBlock","block-visibility/contextual-indicators",(function(n){return i=>{var o,l,s;const a=y("settings"),c=y("variables");if("fetching"===a)return(0,t.createElement)(n,i);const{name:u,attributes:k}=i,E=_(a,"enable_contextual_indicators"),S=g(a,u),w=C(a,c);if(!E||!S||0===w.length)return(0,t.createElement)(n,i);const{blockVisibility:O}=k,x=null!==(o=O?.hideBlock)&&void 0!==o&&o&&w.some((e=>"hide_block"===e.settingSlug)),M=null!==(l=O?.controlSets)&&void 0!==l&&l;let V=null!=O?O:{};M&&(V=0!==O.controlSets.length&&O.controlSets[0]?.controls?O.controlSets[0].controls:{});let R={"date-time":p(V,M,w),"user-role":m(V,M,w),"screen-size":b(V,M,w,a),"query-string":f(V,M,w),acf:v(V,M,w,c),"wp-fusion":h(V,M,w,c)};R=(0,r.applyFilters)("blockVisibility.contextualIndicatorActiveControls",R,O,V,M,w,c),R=(0,r.applyFilters)("blockVisibility.conditionalIndicatorActiveCoreControls",R,O,V,M,w,c),R=Object.keys(R).filter((e=>!0===R[e])),!c?.is_pro||null===(s=a?.visibility_controls?.general?.enable_local_controls)||void 0===s||s||(R=R.filter((e=>"hide-block"===e||"visibility-presets"===e))),R.sort();let P="";R.length>1?P="block-visibility__has-"+R.length+"-controls":0!==R.length&&(P="block-visibility__has-"+R.join("-"));let F=d()({"block-visibility__is-hidden":x},P);F&&(F+=" block-visibility__has-visibility"),F=(0,r.applyFilters)("blockVisibility.contextualIndicatorClasses",F),F=(0,r.applyFilters)("blockVisibility.conditionalIndicatorClasses",F);const I=d()(i?.className,F);return(0,t.createElement)(n,e({},i,{className:I}))}}));const O=window.wp.blockEditor;function x(e,t){var n,i,o;let l=!0;if(null===(n=e?.plugin_settings?.enable_user_role_restrictions)||void 0===n||!n)return l;const r=null!==(i=e?.plugin_settings?.enabled_user_roles)&&void 0!==i?i:[];-1===r.indexOf("administrator")&&r.push("administrator");const s=null!==(o=t?.current_users_roles)&&void 0!==o?o:[];return l=0!==s.length&&s.every((e=>-1!==r.indexOf(e))),l}const M=(0,l.withSelect)((e=>{var t,n;const{getEntityRecord:i}=e("core"),{getBlocks:o,getBlockName:l,getSelectedBlockClientIds:r,getBlockAttributes:s,hasMultiSelection:a}=e("core/block-editor"),{getBlockType:c}=e("core/blocks"),u=!a(),d=r(),p=0===d.length?null:d[0],m=c(l(p)),b=s(p),f=null!==(t=i("block-visibility/v1","settings"))&&void 0!==t?t:"fetching";let v=null!==(n=i("block-visibility/v1","variables"))&&void 0!==n?n:"fetching";const h=o().filter((e=>"core/widget-area"===e.name));return"fetching"!==v&&(v={...v,isWidgetEditor:h.length>0}),{enableMenuItem:u,clientId:p,blockType:m,blockAttributes:b,settings:f,variables:v}}))((function(e){var n;const{flashBlock:r,updateBlockAttributes:s}=(0,l.useDispatch)("core/block-editor"),{createSuccessNotice:a}=(0,l.useDispatch)("core/notices"),{blockAttributes:u,blockType:d,clientId:p,enableMenuItem:m,globallyRestricted:b,settings:f,variables:v,widgetAreaRestricted:h}=e;if("fetching"===f||"fetching"===v)return null;if(!x(f,v))return null;if(!m||!d)return null;if(h.includes(d.name)&&v?.isWidgetEditor||b.includes(d.name))return null;const y=_(f,"enable_toolbar_controls"),S=g(f,d.name),w=C(f,v);if(!y||!S||!w.some((e=>"hide_block"===e.settingSlug)))return null;const{blockVisibility:M}=u,V=null!==(n=M?.hideBlock)&&void 0!==n&&n,R=V?k:E,P=V?(0,o.__)("Enable block","block-visibility"):(0,o.__)("Hide block","block-visibility"),F=d.title,I=V?(0,o.sprintf)( // Translators: Name of the block being made visible, e.g. "Paragraph". (0,o.__)('"%s" is now visible.'),F):(0,o.sprintf)( // Translators: Name of the block being hidden, e.g. "Paragraph". @@ -24,4 +24,4 @@ // Translators: Whether the block is hidden or visible. (0,o.__)("%s the block if at least one user rule set applies.","block-visibility"),b?(0,o.__)("Hide","block-visibility"):(0,o.__)("Show","block-visibility"))),(0,t.createElement)("div",{className:"rule-sets"},a.map(((i,o)=>(0,t.createElement)(Ki,e({key:o,ruleSet:i,ruleSetIndex:o,ruleSets:a,groupedFields:f,allFields:v,controlName:"userRole",controlAtts:d,hideOnRuleSets:b},n))))),(0,t.createElement)("div",{className:"control-fields-item__hide-when"},(0,t.createElement)(c.ToggleControl,{label:(0,o.__)("Hide when rules apply","block-visibility"),checked:b,onChange:()=>u("userRole",(0,i.assign)({...d},{hideOnRuleSets:!b}))})))):(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,o.__)("Website Administrators can only configure the User rule sets option. Please choose another option.","block-visibility"))}function fo(e){var n,l,r,s;const{variables:a,userRole:u,setControlAtts:d,enableNotices:p}=e,m=null!==(n=u?.restrictedUsers)&&void 0!==n?n:[],b=null!==(l=u?.hideOnRestrictedUsers)&&void 0!==l&&l,f=null!==(s=(null!==(r=a?.current_users_roles)&&void 0!==r?r:[]).includes("administrator"))&&void 0!==s&&s,v=po(f);if(!f)return(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,o.__)("Website Administrators can only configure the Users option. Please choose another option.","block-visibility"));const h=v.filter((e=>m.includes(e.value))),g=b?(0,o.__)("Hide the block from","block-visibility"):(0,o.__)("Show the block to","block-visibility");return(0,t.createElement)("div",{className:"control-fields-item"},p&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,o.sprintf)( // Translators: Whether the block is hidden or visible. -(0,o.__)("%s the selected users.","block-visibility"),g)),(0,t.createElement)(Yi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:v,value:h,placeholder:(0,o.__)("Select Users…","block-visibility"),onChange:e=>(e=>{const t=[];0!==e.length&&e.forEach((e=>{t.push(e.value)})),d("userRole",(0,i.assign)({...u},{restrictedUsers:t}))})(e),isMulti:!0,isLoading:0===v.length}),(0,t.createElement)("div",{className:"control-fields-item__hide-when"},(0,t.createElement)(c.ToggleControl,{label:(0,o.__)("Hide from selected users","block-visibility"),checked:b,onChange:()=>d("userRole",(0,i.assign)({...u},{hideOnRestrictedUsers:!b}))})))}function vo(n){var l,r,s,a,u,d;const{settings:p,variables:m,enabledControls:b,setControlAtts:f,controlSetAtts:v}=n;if(!b.some((e=>"visibility_by_role"===e.settingSlug&&e.isActive)))return null;const h=null!==(l=v?.controls?.userRole)&&void 0!==l?l:{},g=null!==(r=h?.visibilityByRole)&&void 0!==r?r:"public",y=null!==(s=m?.plugin_variables.settings_url)&&void 0!==s?s:"",_=null===(a=p?.plugin_settings?.enable_editor_notices)||void 0===a||a,k=ao(p,"visibility_by_role","enable_user_roles"),E=ao(p,"visibility_by_role","enable_users"),S=ao(p,"visibility_by_role","enable_user_rule_sets");let w=[{label:(0,o.__)("Public","block-visibility"),value:"public"},{label:(0,o.__)("Logged-out","block-visibility"),value:"logged-out"},{label:(0,o.__)("Logged-in","block-visibility"),value:"logged-in"},{label:(0,o.__)("User roles","block-visibility"),value:"user-role"},{label:(0,o.__)("Users","block-visibility"),value:"users"},{label:(0,o.__)("User rule sets","block-visibility"),value:"user-rule-sets"}];const C=[{label:(0,o.__)("Block is visible to everyone.","block-visibility"),value:"public"},{label:(0,o.__)("Block is only visible to logged-out users.","block-visibility"),value:"logged-out"},{label:(0,o.__)("Block is only visible to logged-in users.","block-visibility"),value:"logged-in"}];k||(w=w.filter((e=>"user-role"!==e.value))),E||(w=w.filter((e=>"users"!==e.value))),S||(w=w.filter((e=>"user-rule-sets"!==e.value)));const O=w.filter((e=>e.value===g)),x=null!==(u=C.filter((e=>e.value===g))[0]?.label)&&void 0!==u?u:"",M=S&&"user-rule-sets"===g,V=null!==(d=h?.ruleSets)&&void 0!==d?d:[];return 0===V.length&&V.push({enable:!0,rules:[{field:""}]}),(0,t.createElement)("div",{className:"controls-panel-item user-role-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)("span",null,(0,o.__)("User Role","block-visibility")),_&&(0,t.createElement)(te,{message:(0,o.__)("The User Role control allows you to configure block visibility based on the current user's role or specific users.","block-visibility"),link:W.editorUserRole,position:"bottom center"}),M&&(0,t.createElement)("div",{className:"controls-panel-item__header-toolbar"},(0,t.createElement)(c.Button,{icon:P,onClick:()=>(()=>{const e=[...V,{enable:!0,rules:[{field:""}]}];f("userRole",(0,i.assign)({...h},{ruleSets:[...e]}))})(),label:(0,o.__)("Add rule set","block-visibility"),isSmall:!0}))),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},(0,t.createElement)("div",{className:"control-fields-item"},(0,t.createElement)(Yi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:w,value:O,onChange:e=>f("userRole",(0,i.assign)({...h},{visibilityByRole:e.value}))}),_&&x&&(0,t.createElement)("div",{className:"control-fields-item__help"},x)),"user-role"===g&&k&&(0,t.createElement)(uo,e({variables:m,userRole:h,setControlAtts:f,enableNotices:_},n)),"users"===g&&E&&(0,t.createElement)(fo,e({variables:m,userRole:h,setControlAtts:f,enableNotices:_},n)),"user-rule-sets"===g&&S&&(0,t.createElement)(bo,e({ruleSets:V,setControlAtts:f,userRole:h,variables:m,enableNotices:_},n)),!w.some((e=>e.value===g))&&(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,t.createInterpolateElement)((0,o.__)("The previously selected User Role option has been disabled. Choose another option or update the Visibility Control settings.","block-visibility"),{a:(0,t.createElement)("a",{href:y+"&tab=visibility-controls",target:"_blank",rel:"noreferrer"})}))))}function ho(e){var n,l,r,s,a,u,d,p,m;const{controlSetAtts:b,enabledControls:f,setControlAtts:v,settings:h,variables:g}=e,y=null!==(n=g?.integrations?.wp_fusion?.active)&&void 0!==n&&n;if(!f.some((e=>"wp_fusion"===e.settingSlug&&e?.isActive))||!y)return null;const _=null===(l=h?.plugin_settings?.enable_editor_notices)||void 0===l||l,k=null!==(r=b?.controls.hasOwnProperty("userRole"))&&void 0!==r&&r,E=null!==(s=b?.controls?.userRole?.visibilityByRole)&&void 0!==s?s:"public",w=null!==(a=g?.integrations?.wp_fusion?.tags)&&void 0!==a?a:[],C=e=>w.filter((t=>e.includes(t.value))),O=null!==(u=b?.controls?.wpFusion)&&void 0!==u?u:{},x=C(null!==(d=O?.tagsAny)&&void 0!==d?d:[]),M=C(null!==(p=O?.tagsAll)&&void 0!==p?p:[]),V=C(null!==(m=O?.tagsNot)&&void 0!==m?m:[]),R=(e,t)=>{const n=[];0!==t.length&&t.forEach((e=>{n.push(e.value)})),v("wpFusion",(0,i.assign)({...O},{[e]:n}))};let P=(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"control-fields-item"},(0,t.createElement)("div",{className:"components-base-control__label"},(0,t.createInterpolateElement)((0,o.__)("Required Tags (Any)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})})),(0,t.createElement)(Yi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:w,value:x,placeholder:(0,o.__)("Select Tag…","block-visibility"),onChange:e=>R("tagsAny",e),isMulti:!0}),_&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,o.__)("Only visible to logged-in users with at least one of the selected tags.","block-visibility"))),(0,t.createElement)("div",{className:"control-fields-item"},(0,t.createElement)("div",{className:"components-base-control__label"},(0,t.createInterpolateElement)((0,o.__)("Required Tags (All)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})})),(0,t.createElement)(Yi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:w,value:M,placeholder:(0,o.__)("Select Tag…","block-visibility"),onChange:e=>R("tagsAll",e),isMulti:!0}),_&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,t.createInterpolateElement)((0,o.__)("Only visible to logged-in users with all of the selected tags.","block-visibility"),{strong:(0,t.createElement)("strong",null)}))));"public"!==E&&"logged-out"!==E||(P=(0,t.createElement)(c.Disabled,null,P));let F=(0,t.createElement)("div",{className:"control-fields-item"},(0,t.createElement)("div",{className:"components-base-control__label"},(0,t.createInterpolateElement)((0,o.__)("Required Tags (Not)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})})),(0,t.createElement)(Yi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:w,value:V,placeholder:(0,o.__)("Select Tag…","block-visibility"),onChange:e=>R("tagsNot",e),isMulti:!0}),_&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,o.__)("Hide from logged-in users with at least one of the selected tags.","block-visibility")));return"logged-out"===E&&(F=(0,t.createElement)(c.Disabled,null,F)),(0,t.createElement)("div",{className:"controls-panel-item wp-fusion-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)(T,{icon:S}),(0,t.createElement)("span",null,(0,o.__)("WP Fusion","block-visibility")),_&&(0,t.createElement)(te,{message:(0,o.__)("The WP Fusion control allows you to configure block visibility based on WP Fusion tags.","block-visibility"),subMessage:(0,o.__)("Note that the available fields depend on the User Role control settings. If the User Role control is disabled, only the Required Tags (Not) field will be available.","block-visibility"),link:W.editorWpFusion,position:"bottom center"})),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},P,F,!k&&(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,o.__)("The WP Fusion control works best in coordination with the User Role control, which has been disabled.","block-visibility"))))}const go=(0,c.withFilters)("blockVisibility.addControlSetControls")((e=>(0,t.createElement)(t.Fragment,null)));function yo(n){var l,r;const{attributes:s,controlSetAtts:a,setControlSetAtts:u,enabledControls:d,variables:p}=n,m=null!==(l=s?.blockVisibility)&&void 0!==l?l:{},b=null!==(r=p?.plugin_variables?.settings_url)&&void 0!==r?r:"",f="inspector-controls-panel";d.forEach((e=>{(m?.hasOwnProperty(e.attributeSlug)||a?.controls.hasOwnProperty(e.attributeSlug)||e?.isDefault)&&(e.isActive=!0)}));const v=d.filter((e=>e.isActive));function h(e,t){var n;const o=null!==(n=a?.controls)&&void 0!==n?n:{},l=(0,i.assign)({...a},{controls:(0,i.assign)({...o},{[e]:t})});u(l)}let g=(0,t.createElement)(t.Fragment,null,(0,t.createElement)(c.Slot,{name:"ControlPanelContainer"}),(0,t.createElement)(c.Slot,{name:"ControlSetControlsTop-"+f}),(0,t.createElement)(lo,e({setControlAtts:h,type:f},n)),(0,t.createElement)(vo,e({setControlAtts:h},n)),(0,t.createElement)(co,e({setControlAtts:h},n)),(0,t.createElement)(so,e({setControlAtts:h},n)),(0,t.createElement)(c.Slot,{name:"ControlSetControlsMiddle-"+f}),(0,t.createElement)(Ji,e({setControlAtts:h},n)),(0,t.createElement)(ho,e({setControlAtts:h},n)),(0,t.createElement)(c.Slot,{name:"ControlSetControlsBottom-"+f}));return m?.hideBlock&&(g=v.length>1?(0,t.createElement)(c.Disabled,{className:"hide-block-enabled"},g):null),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(D,e({activeControls:v,enabledControls:d,setControlSetAtts:u},n)),0!==v.length&&(0,t.createElement)("div",{className:"controls-panel-container"},(0,t.createElement)(ro,n),g,(0,t.createElement)(go,e({uniqueIndex:f,setControlAtts:h},n))),0===d.length&&(0,t.createElement)("div",{className:"controls-panel-notices"},(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,t.createInterpolateElement)((0,o.__)("All visibility controls have been manually disabled. Visit the plugin settings to re-enable.","block-visibility"),{a:(0,t.createElement)("a",{href:b+"&tab=visibility-controls",target:"_blank",rel:"noreferrer"})}))))}const _o=(0,c.withFilters)("blockVisibility.addInspectorControls")((e=>(0,t.createElement)(t.Fragment,null))),ko=(0,l.withSelect)((e=>{var t,n;const{getEntityRecord:i}=e("core"),{getBlocks:o}=e("core/block-editor"),l=null!==(t=i("block-visibility/v1","settings"))&&void 0!==t?t:"fetching";let r=null!==(n=i("block-visibility/v1","variables"))&&void 0!==n?n:"fetching";const s=o().filter((e=>"core/widget-area"===e.name));return"fetching"!==r&&(r={...r,isWidgetEditor:s.length>0}),{settings:l,variables:r}}))((function(n){var l,r,s;const{attributes:a,globallyRestricted:u,name:d,setAttributes:p,settings:m,variables:b,widgetAreaRestricted:f}=n;if("fetching"===m||"fetching"===b)return(0,t.createElement)(O.InspectorControls,null,(0,t.createElement)("div",{className:"block-visibility__controls-panel"},(0,t.createElement)("div",{className:"controls-panel-header"},(0,t.createElement)("h2",null,(0,o.__)("Visibility","block-visibility")),(0,t.createElement)("div",{className:"controls-panel-header__dropdown-menus"},(0,t.createElement)(c.Spinner,null)))));if(f.includes(d)&&b?.isWidgetEditor||u.includes(d))return null;if(!x(m,b)||!g(m,d))return null;let v=C(m,b);const h=null!==(l=m?.plugin_settings?.default_controls)&&void 0!==l?l:[],y=[];(0,i.isEmpty)(h)||v.forEach((e=>{h.includes(e.settingSlug)&&y.push[e.attributeSlug]}));let _=a?.blockVisibility,k=null!==(r=_?.controlSets)&&void 0!==r?r:[];return 0===k.length&&(k=[{id:1,enable:!0,controls:Object.fromEntries(y.map((e=>[e,{}])))}],_=(0,i.assign)({..._},{controlSets:k})),!b?.is_pro||null===(s=m?.visibility_controls?.general?.enable_local_controls)||void 0===s||s||(v=v.filter((e=>"hideBlock"===e.attributeSlug||"visibilityPresets"===e.attributeSlug))),(0,t.createElement)(O.InspectorControls,null,(0,t.createElement)("div",{className:"block-visibility__controls-panel"},(0,t.createElement)(yo,e({controlSets:k,controlSetAtts:k[0],setControlSetAtts:function(e){p({blockVisibility:(0,i.assign)({...a.blockVisibility},{controlSets:[e]})})},enabledControls:v,defaultControls:y},n))),(0,t.createElement)(_o,e({blockAtts:_,enabledControls:v},n)))}));(0,l.dispatch)("core").addEntities([{label:(0,o.__)("Block Visibility Settings","block-visibility"),kind:"block-visibility/v1",name:"settings",baseURL:"/block-visibility/v1/settings"},{label:(0,o.__)("Block Visibility Variables","block-visibility"),kind:"block-visibility/v1",name:"variables",baseURL:"/block-visibility/v1/variables"}]);const Eo=["core/freeform","core/legacy-widget","core/widget-area"],So=["core/html"];(0,r.addFilter)("blocks.registerBlockType","block-visibility/add-attributes",(function(e){if(Eo.includes(e.name))return e;const t=blockVisibilityFullControlMode;let n={blockVisibility:{type:"object",properties:{hideBlock:{type:"boolean"},controlSets:{type:"array",items:{type:"object",properties:{id:{type:"number"},title:{type:"string"},enable:{type:"boolean"},controls:{type:"object",properties:{dateTime:{type:"object",properties:{schedules:{type:"array",items:{type:"object",properties:{id:{type:"number"},title:{type:"string"},enable:{type:"boolean"},start:{type:"string"},end:{type:"string"}}}},hideOnSchedules:{type:"boolean"}}},userRole:{type:"object",properties:{enable:{type:"boolean"},visibilityByRole:{type:"string"},hideOnRestrictedRoles:{type:"boolean"},restrictedRoles:{type:"array",items:{type:"string"}},hideOnRestrictedUsers:{type:"boolean"},restrictedUsers:{type:"array",items:{type:"string"}},hideOnRuleSets:{type:"boolean"},ruleSets:{type:"array",items:{type:"object",properties:{id:{type:"number"},title:{type:"string"},enable:{type:"boolean"},rules:{type:"array",items:{type:"object",properties:{field:{type:"string"},subField:{type:["string","integer","array"]},subFields:{type:"object"},operator:{type:"string"},value:{type:["string","integer","array"]}}}}}}}}},screenSize:{type:"object",properties:{enable:{type:"boolean"},hideOnScreenSize:{type:"object",properties:{extraLarge:{type:"boolean"},large:{type:"boolean"},medium:{type:"boolean"},small:{type:"boolean"},extraSmall:{type:"boolean"}}}}},queryString:{type:"object",properties:{enable:{type:"boolean"},queryStringAny:{type:"string"},queryStringAll:{type:"string"},queryStringNot:{type:"string"}}},acf:{type:"object",properties:{enable:{type:"boolean"},hideOnRuleSets:{type:"boolean"},ruleSets:{type:"array",items:{type:["array","object"],items:{type:"object",properties:{field:{type:"string"},operator:{type:"string"},value:{type:"string"}}},properties:{id:{type:"number"},title:{type:"string"},enable:{type:"boolean"},rules:{type:"array",items:{type:"object",properties:{field:{type:"string"},subField:{type:["string","integer","array"]},operator:{type:"string"},value:{type:["string","integer","array"]}}}}}}}}},wpFusion:{type:"object",properties:{enable:{type:"boolean"},tagsAny:{type:"array",items:{type:["number","string"]}},tagsAll:{type:"array",items:{type:["number","string"]}},tagsNot:{type:"array",items:{type:["number","string"]}}}}}}}}}}}};return n=(0,r.applyFilters)("blockVisibility.attributes",n),(t||(0,s.hasBlockSupport)(e,"inserter",!0)&&!e.hasOwnProperty("parent"))&&(e.attributes=(0,i.assign)(e.attributes,n),e.supports=(0,i.assign)(e.supports,{blockVisibility:!0})),e})),(0,r.addFilter)("editor.BlockEdit","block-visibility/add-inspector-controls",(function(n){return i=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n,i),(0,t.createElement)(ko,e({globallyRestricted:Eo,widgetAreaRestricted:So},i)))}),100),(0,r.addFilter)("blockVisibilityPro.addPresetManagerControlSet","block-visibility/preset-manager-control-set",(function(){return e=>{const{controlSetAtts:n,index:i}=e,o="multiple-"+n?.id;return(0,t.createElement)(c.Fill,{name:"PresetManagerControlSet-"+i},(0,t.createElement)("div",{className:"control-set__controls"},(0,t.createElement)(c.Slot,{name:"ControlSetControlsTop-"+o}),(0,t.createElement)(lo,e),(0,t.createElement)(vo,e),(0,t.createElement)(co,e),(0,t.createElement)(so,e),(0,t.createElement)(c.Slot,{name:"ControlSetControlsMiddle-"+o}),(0,t.createElement)(Ji,e),(0,t.createElement)(ho,e),(0,t.createElement)(c.Slot,{name:"ControlSetControlsBottom-"+o})))}})),(0,a.registerPlugin)("block-visibility-toolbar-options-hide-block",{render:n=>(0,t.createElement)(M,e({globallyRestricted:Eo,widgetAreaRestricted:So},n))})})()})(); \ No newline at end of file +(0,o.__)("%s the selected users.","block-visibility"),g)),(0,t.createElement)(Yi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:v,value:h,placeholder:(0,o.__)("Select Users…","block-visibility"),onChange:e=>(e=>{const t=[];0!==e.length&&e.forEach((e=>{t.push(e.value)})),d("userRole",(0,i.assign)({...u},{restrictedUsers:t}))})(e),isMulti:!0,isLoading:0===v.length}),(0,t.createElement)("div",{className:"control-fields-item__hide-when"},(0,t.createElement)(c.ToggleControl,{label:(0,o.__)("Hide from selected users","block-visibility"),checked:b,onChange:()=>d("userRole",(0,i.assign)({...u},{hideOnRestrictedUsers:!b}))})))}function vo(n){var l,r,s,a,u,d;const{settings:p,variables:m,enabledControls:b,setControlAtts:f,controlSetAtts:v}=n;if(!b.some((e=>"visibility_by_role"===e.settingSlug&&e.isActive)))return null;const h=null!==(l=v?.controls?.userRole)&&void 0!==l?l:{},g=null!==(r=h?.visibilityByRole)&&void 0!==r?r:"public",y=null!==(s=m?.plugin_variables.settings_url)&&void 0!==s?s:"",_=null===(a=p?.plugin_settings?.enable_editor_notices)||void 0===a||a,k=ao(p,"visibility_by_role","enable_user_roles"),E=ao(p,"visibility_by_role","enable_users"),S=ao(p,"visibility_by_role","enable_user_rule_sets");let w=[{label:(0,o.__)("Public","block-visibility"),value:"public"},{label:(0,o.__)("Logged-out","block-visibility"),value:"logged-out"},{label:(0,o.__)("Logged-in","block-visibility"),value:"logged-in"},{label:(0,o.__)("User roles","block-visibility"),value:"user-role"},{label:(0,o.__)("Users","block-visibility"),value:"users"},{label:(0,o.__)("User rule sets","block-visibility"),value:"user-rule-sets"}];const C=[{label:(0,o.__)("Block is visible to everyone.","block-visibility"),value:"public"},{label:(0,o.__)("Block is only visible to logged-out users.","block-visibility"),value:"logged-out"},{label:(0,o.__)("Block is only visible to logged-in users.","block-visibility"),value:"logged-in"}];k||(w=w.filter((e=>"user-role"!==e.value))),E||(w=w.filter((e=>"users"!==e.value))),S||(w=w.filter((e=>"user-rule-sets"!==e.value)));const O=w.filter((e=>e.value===g)),x=null!==(u=C.filter((e=>e.value===g))[0]?.label)&&void 0!==u?u:"",M=S&&"user-rule-sets"===g,V=null!==(d=h?.ruleSets)&&void 0!==d?d:[];return 0===V.length&&V.push({enable:!0,rules:[{field:""}]}),(0,t.createElement)("div",{className:"controls-panel-item user-role-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)("span",null,(0,o.__)("User Role","block-visibility")),_&&(0,t.createElement)(te,{message:(0,o.__)("The User Role control allows you to configure block visibility based on the current user's role or specific users.","block-visibility"),link:W.editorUserRole,position:"bottom center"}),M&&(0,t.createElement)("div",{className:"controls-panel-item__header-toolbar"},(0,t.createElement)(c.Button,{icon:P,onClick:()=>(()=>{const e=[...V,{enable:!0,rules:[{field:""}]}];f("userRole",(0,i.assign)({...h},{ruleSets:[...e]}))})(),label:(0,o.__)("Add rule set","block-visibility"),isSmall:!0}))),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},(0,t.createElement)("div",{className:"control-fields-item"},(0,t.createElement)(Yi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:w,value:O,onChange:e=>f("userRole",(0,i.assign)({...h},{visibilityByRole:e.value}))}),_&&x&&(0,t.createElement)("div",{className:"control-fields-item__help"},x)),"user-role"===g&&k&&(0,t.createElement)(uo,e({variables:m,userRole:h,setControlAtts:f,enableNotices:_},n)),"users"===g&&E&&(0,t.createElement)(fo,e({variables:m,userRole:h,setControlAtts:f,enableNotices:_},n)),"user-rule-sets"===g&&S&&(0,t.createElement)(bo,e({ruleSets:V,setControlAtts:f,userRole:h,variables:m,enableNotices:_},n)),!w.some((e=>e.value===g))&&(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,t.createInterpolateElement)((0,o.__)("The previously selected User Role option has been disabled. Choose another option or update the Visibility Control settings.","block-visibility"),{a:(0,t.createElement)("a",{href:y+"&tab=visibility-controls",target:"_blank",rel:"noreferrer"})}))))}function ho(e){var n,l,r,s,a,u,d,p,m;const{controlSetAtts:b,enabledControls:f,setControlAtts:v,settings:h,variables:g}=e,y=null!==(n=g?.integrations?.wp_fusion?.active)&&void 0!==n&&n;if(!f.some((e=>"wp_fusion"===e.settingSlug&&e?.isActive))||!y)return null;const _=null===(l=h?.plugin_settings?.enable_editor_notices)||void 0===l||l,k=null!==(r=b?.controls.hasOwnProperty("userRole"))&&void 0!==r&&r,E=null!==(s=b?.controls?.userRole?.visibilityByRole)&&void 0!==s?s:"public",w=null!==(a=g?.integrations?.wp_fusion?.tags)&&void 0!==a?a:[],C=e=>w.filter((t=>e.includes(t.value))),O=null!==(u=b?.controls?.wpFusion)&&void 0!==u?u:{},x=C(null!==(d=O?.tagsAny)&&void 0!==d?d:[]),M=C(null!==(p=O?.tagsAll)&&void 0!==p?p:[]),V=C(null!==(m=O?.tagsNot)&&void 0!==m?m:[]),R=(e,t)=>{const n=[];0!==t.length&&t.forEach((e=>{n.push(e.value)})),v("wpFusion",(0,i.assign)({...O},{[e]:n}))};let P=(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"control-fields-item"},(0,t.createElement)("div",{className:"components-base-control__label"},(0,t.createInterpolateElement)((0,o.__)("Required Tags (Any)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})})),(0,t.createElement)(Yi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:w,value:x,placeholder:(0,o.__)("Select Tag…","block-visibility"),onChange:e=>R("tagsAny",e),isMulti:!0}),_&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,o.__)("Only visible to logged-in users with at least one of the selected tags.","block-visibility"))),(0,t.createElement)("div",{className:"control-fields-item"},(0,t.createElement)("div",{className:"components-base-control__label"},(0,t.createInterpolateElement)((0,o.__)("Required Tags (All)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})})),(0,t.createElement)(Yi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:w,value:M,placeholder:(0,o.__)("Select Tag…","block-visibility"),onChange:e=>R("tagsAll",e),isMulti:!0}),_&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,t.createInterpolateElement)((0,o.__)("Only visible to logged-in users with all of the selected tags.","block-visibility"),{strong:(0,t.createElement)("strong",null)}))));"public"!==E&&"logged-out"!==E||(P=(0,t.createElement)(c.Disabled,null,P));let F=(0,t.createElement)("div",{className:"control-fields-item"},(0,t.createElement)("div",{className:"components-base-control__label"},(0,t.createInterpolateElement)((0,o.__)("Required Tags (Not)","block-visibility"),{span:(0,t.createElement)("span",{className:"components-base-control__label-hint"})})),(0,t.createElement)(Yi,{className:"block-visibility__react-select",classNamePrefix:"react-select",options:w,value:V,placeholder:(0,o.__)("Select Tag…","block-visibility"),onChange:e=>R("tagsNot",e),isMulti:!0}),_&&(0,t.createElement)("div",{className:"components-base-control__help"},(0,o.__)("Hide from logged-in users with at least one of the selected tags.","block-visibility")));return"logged-out"===E&&(F=(0,t.createElement)(c.Disabled,null,F)),(0,t.createElement)("div",{className:"controls-panel-item wp-fusion-control"},(0,t.createElement)("h3",{className:"controls-panel-item__header has-icon"},(0,t.createElement)(T,{icon:S}),(0,t.createElement)("span",null,(0,o.__)("WP Fusion","block-visibility")),_&&(0,t.createElement)(te,{message:(0,o.__)("The WP Fusion control allows you to configure block visibility based on WP Fusion tags.","block-visibility"),subMessage:(0,o.__)("Note that the available fields depend on the User Role control settings. If the User Role control is disabled, only the Required Tags (Not) field will be available.","block-visibility"),link:W.editorWpFusion,position:"bottom center"})),(0,t.createElement)("div",{className:"controls-panel-item__control-fields"},P,F,!k&&(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,o.__)("The WP Fusion control works best in coordination with the User Role control, which has been disabled.","block-visibility"))))}const go=(0,c.withFilters)("blockVisibility.addControlSetControls")((e=>(0,t.createElement)(t.Fragment,null)));function yo(n){var l,r;const{attributes:s,controlSetAtts:a,setControlSetAtts:u,enabledControls:d,variables:p}=n,m=null!==(l=s?.blockVisibility)&&void 0!==l?l:{},b=null!==(r=p?.plugin_variables?.settings_url)&&void 0!==r?r:"",f="inspector-controls-panel";d.forEach((e=>{(m?.hasOwnProperty(e.attributeSlug)||a?.controls.hasOwnProperty(e.attributeSlug)||e?.isDefault)&&(e.isActive=!0)}));const v=d.filter((e=>e.isActive));function h(e,t){var n;const o=null!==(n=a?.controls)&&void 0!==n?n:{},l=(0,i.assign)({...a},{controls:(0,i.assign)({...o},{[e]:t})});u(l)}let g=(0,t.createElement)(t.Fragment,null,(0,t.createElement)(c.Slot,{name:"ControlPanelContainer"}),(0,t.createElement)(c.Slot,{name:"ControlSetControlsTop-"+f}),(0,t.createElement)(lo,e({setControlAtts:h,type:f},n)),(0,t.createElement)(vo,e({setControlAtts:h},n)),(0,t.createElement)(co,e({setControlAtts:h},n)),(0,t.createElement)(so,e({setControlAtts:h},n)),(0,t.createElement)(c.Slot,{name:"ControlSetControlsMiddle-"+f}),(0,t.createElement)(Ji,e({setControlAtts:h},n)),(0,t.createElement)(ho,e({setControlAtts:h},n)),(0,t.createElement)(c.Slot,{name:"ControlSetControlsBottom-"+f}));return m?.hideBlock&&(g=v.length>1?(0,t.createElement)(c.Disabled,{className:"hide-block-enabled"},g):null),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(D,e({activeControls:v,enabledControls:d,setControlSetAtts:u},n)),0!==v.length&&(0,t.createElement)("div",{className:"controls-panel-container"},(0,t.createElement)(ro,n),g,(0,t.createElement)(go,e({uniqueIndex:f,setControlAtts:h},n))),0===d.length&&(0,t.createElement)("div",{className:"controls-panel-notices"},(0,t.createElement)(c.Notice,{status:"warning",isDismissible:!1},(0,t.createInterpolateElement)((0,o.__)("All visibility controls have been manually disabled. Visit the plugin settings to re-enable.","block-visibility"),{a:(0,t.createElement)("a",{href:b+"&tab=visibility-controls",target:"_blank",rel:"noreferrer"})}))))}const _o=(0,c.withFilters)("blockVisibility.addInspectorControls")((e=>(0,t.createElement)(t.Fragment,null))),ko=(0,l.withSelect)((e=>{var t,n;const{getEntityRecord:i}=e("core"),{getBlocks:o}=e("core/block-editor"),l=null!==(t=i("block-visibility/v1","settings"))&&void 0!==t?t:"fetching";let r=null!==(n=i("block-visibility/v1","variables"))&&void 0!==n?n:"fetching";const s=o().filter((e=>"core/widget-area"===e.name));return"fetching"!==r&&(r={...r,isWidgetEditor:s.length>0}),{settings:l,variables:r}}))((function(n){var l,r,s;const{attributes:a,globallyRestricted:u,name:d,setAttributes:p,settings:m,variables:b,widgetAreaRestricted:f}=n;if("fetching"===m||"fetching"===b)return(0,t.createElement)(O.InspectorControls,{group:"settings"},(0,t.createElement)("div",{className:"block-visibility__controls-panel"},(0,t.createElement)("div",{className:"controls-panel-header"},(0,t.createElement)("h2",null,(0,o.__)("Visibility","block-visibility")),(0,t.createElement)("div",{className:"controls-panel-header__dropdown-menus"},(0,t.createElement)(c.Spinner,null)))));if(f.includes(d)&&b?.isWidgetEditor||u.includes(d))return null;if(!x(m,b)||!g(m,d))return null;let v=C(m,b);const h=null!==(l=m?.plugin_settings?.default_controls)&&void 0!==l?l:[],y=[];(0,i.isEmpty)(h)||v.forEach((e=>{h.includes(e.settingSlug)&&y.push[e.attributeSlug]}));let _=a?.blockVisibility,k=null!==(r=_?.controlSets)&&void 0!==r?r:[];return 0===k.length&&(k=[{id:1,enable:!0,controls:Object.fromEntries(y.map((e=>[e,{}])))}],_=(0,i.assign)({..._},{controlSets:k})),!b?.is_pro||null===(s=m?.visibility_controls?.general?.enable_local_controls)||void 0===s||s||(v=v.filter((e=>"hideBlock"===e.attributeSlug||"visibilityPresets"===e.attributeSlug))),(0,t.createElement)(O.InspectorControls,{group:"settings"},(0,t.createElement)("div",{className:"block-visibility__controls-panel"},(0,t.createElement)(yo,e({controlSets:k,controlSetAtts:k[0],setControlSetAtts:function(e){p({blockVisibility:(0,i.assign)({...a.blockVisibility},{controlSets:[e]})})},enabledControls:v,defaultControls:y},n))),(0,t.createElement)(_o,e({blockAtts:_,enabledControls:v},n)))}));(0,l.dispatch)("core").addEntities([{label:(0,o.__)("Block Visibility Settings","block-visibility"),kind:"block-visibility/v1",name:"settings",baseURL:"/block-visibility/v1/settings"},{label:(0,o.__)("Block Visibility Variables","block-visibility"),kind:"block-visibility/v1",name:"variables",baseURL:"/block-visibility/v1/variables"}]);const Eo=["core/freeform","core/legacy-widget","core/widget-area"],So=["core/html"];(0,r.addFilter)("blocks.registerBlockType","block-visibility/add-attributes",(function(e){if(Eo.includes(e.name))return e;const t=blockVisibilityFullControlMode;let n={blockVisibility:{type:"object",properties:{hideBlock:{type:"boolean"},controlSets:{type:"array",items:{type:"object",properties:{id:{type:"number"},title:{type:"string"},enable:{type:"boolean"},controls:{type:"object",properties:{dateTime:{type:"object",properties:{schedules:{type:"array",items:{type:"object",properties:{id:{type:"number"},title:{type:"string"},enable:{type:"boolean"},start:{type:"string"},end:{type:"string"}}}},hideOnSchedules:{type:"boolean"}}},userRole:{type:"object",properties:{enable:{type:"boolean"},visibilityByRole:{type:"string"},hideOnRestrictedRoles:{type:"boolean"},restrictedRoles:{type:"array",items:{type:"string"}},hideOnRestrictedUsers:{type:"boolean"},restrictedUsers:{type:"array",items:{type:"string"}},hideOnRuleSets:{type:"boolean"},ruleSets:{type:"array",items:{type:"object",properties:{id:{type:"number"},title:{type:"string"},enable:{type:"boolean"},rules:{type:"array",items:{type:"object",properties:{field:{type:"string"},subField:{type:["string","integer","array"]},subFields:{type:"object"},operator:{type:"string"},value:{type:["string","integer","array"]}}}}}}}}},screenSize:{type:"object",properties:{enable:{type:"boolean"},hideOnScreenSize:{type:"object",properties:{extraLarge:{type:"boolean"},large:{type:"boolean"},medium:{type:"boolean"},small:{type:"boolean"},extraSmall:{type:"boolean"}}}}},queryString:{type:"object",properties:{enable:{type:"boolean"},queryStringAny:{type:"string"},queryStringAll:{type:"string"},queryStringNot:{type:"string"}}},acf:{type:"object",properties:{enable:{type:"boolean"},hideOnRuleSets:{type:"boolean"},ruleSets:{type:"array",items:{type:["array","object"],items:{type:"object",properties:{field:{type:"string"},operator:{type:"string"},value:{type:"string"}}},properties:{id:{type:"number"},title:{type:"string"},enable:{type:"boolean"},rules:{type:"array",items:{type:"object",properties:{field:{type:"string"},subField:{type:["string","integer","array"]},operator:{type:"string"},value:{type:["string","integer","array"]}}}}}}}}},wpFusion:{type:"object",properties:{enable:{type:"boolean"},tagsAny:{type:"array",items:{type:["number","string"]}},tagsAll:{type:"array",items:{type:["number","string"]}},tagsNot:{type:"array",items:{type:["number","string"]}}}}}}}}}}}};return n=(0,r.applyFilters)("blockVisibility.attributes",n),(t||(0,s.hasBlockSupport)(e,"inserter",!0)&&!e.hasOwnProperty("parent"))&&(e.attributes=(0,i.assign)(e.attributes,n),e.supports=(0,i.assign)(e.supports,{blockVisibility:!0})),e})),(0,r.addFilter)("editor.BlockEdit","block-visibility/add-inspector-controls",(function(n){return i=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n,i),(0,t.createElement)(ko,e({globallyRestricted:Eo,widgetAreaRestricted:So},i)))}),100),(0,r.addFilter)("blockVisibilityPro.addPresetManagerControlSet","block-visibility/preset-manager-control-set",(function(){return e=>{const{controlSetAtts:n,index:i}=e,o="multiple-"+n?.id;return(0,t.createElement)(c.Fill,{name:"PresetManagerControlSet-"+i},(0,t.createElement)("div",{className:"control-set__controls"},(0,t.createElement)(c.Slot,{name:"ControlSetControlsTop-"+o}),(0,t.createElement)(lo,e),(0,t.createElement)(vo,e),(0,t.createElement)(co,e),(0,t.createElement)(so,e),(0,t.createElement)(c.Slot,{name:"ControlSetControlsMiddle-"+o}),(0,t.createElement)(Ji,e),(0,t.createElement)(ho,e),(0,t.createElement)(c.Slot,{name:"ControlSetControlsBottom-"+o})))}})),(0,a.registerPlugin)("block-visibility-toolbar-options-hide-block",{render:n=>(0,t.createElement)(M,e({globallyRestricted:Eo,widgetAreaRestricted:So},n))})})()})(); \ No newline at end of file