Version Description
Release Date: February 1, 2022.
- New feature: border support for shapes.
- Enhancement: added contrast check to color picker.
- Enhancement: added support for
tel:
andmailto:
links. - Enhancement: improved element resizing handling.
- Bug fixes and performance improvements.
Download this release
Release Info
Developer | swissspidy |
Plugin | Web Stories |
Version | 1.17.0 |
Comparing to | |
See all releases |
Code changes from version 1.16.0 to 1.17.0
- assets/css/vendors-chunk-getStoryPropsToSave-wp-story-editor-rtl.css +1 -1
- assets/css/vendors-chunk-getStoryPropsToSave-wp-story-editor.css +1 -1
- assets/css/web-stories-block-rtl.css +1 -1
- assets/css/web-stories-block.css +1 -1
- assets/css/web-stories-list-styles-rtl.css +1 -1
- assets/css/web-stories-list-styles.css +1 -1
- assets/js/chunk-colorthief.js +1 -1
- assets/js/chunk-focus-visible.js +1 -1
- assets/js/chunk-getStoryPropsToSave.js +56 -56
assets/css/vendors-chunk-getStoryPropsToSave-wp-story-editor-rtl.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.react-calendar{background:#fff;border:1px solid #a0a096;font-family:Arial,Helvetica,sans-serif;line-height:1.125em;max-width:100%;width:350px}.react-calendar--doubleView{width:700px}.react-calendar--doubleView .react-calendar__viewContainer{display:flex;margin:-.5em}.react-calendar--doubleView .react-calendar__viewContainer>*{margin:.5em;width:50%}.react-calendar,.react-calendar *,.react-calendar :after,.react-calendar :before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.react-calendar button{border:0;margin:0;outline:none}.react-calendar button:enabled:hover{cursor:pointer}.react-calendar__navigation{display:flex;height:44px;margin-bottom:1em}.react-calendar__navigation button{background:none;min-width:44px}.react-calendar__navigation button:enabled:focus,.react-calendar__navigation button:enabled:hover{background-color:#e6e6e6}.react-
|
1 |
+
.react-calendar{background:#fff;border:1px solid #a0a096;font-family:Arial,Helvetica,sans-serif;line-height:1.125em;max-width:100%;width:350px}.react-calendar--doubleView{width:700px}.react-calendar--doubleView .react-calendar__viewContainer{display:flex;margin:-.5em}.react-calendar--doubleView .react-calendar__viewContainer>*{margin:.5em;width:50%}.react-calendar,.react-calendar *,.react-calendar :after,.react-calendar :before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.react-calendar button{border:0;margin:0;outline:none}.react-calendar button:enabled:hover{cursor:pointer}.react-calendar__navigation{display:flex;height:44px;margin-bottom:1em}.react-calendar__navigation button{background:none;min-width:44px}.react-calendar__navigation button:disabled{background-color:#f0f0f0}.react-calendar__navigation button:enabled:focus,.react-calendar__navigation button:enabled:hover{background-color:#e6e6e6}.react-calendar__month-view__weekdays{font-size:.75em;font-weight:700;text-align:center;text-transform:uppercase}.react-calendar__month-view__weekdays__weekday{padding:.5em}.react-calendar__month-view__weekNumbers .react-calendar__tile{align-items:center;display:flex;font-size:.75em;font-weight:700;justify-content:center}.react-calendar__month-view__days__day--weekend{color:#d10000}.react-calendar__month-view__days__day--neighboringMonth{color:#757575}.react-calendar__century-view .react-calendar__tile,.react-calendar__decade-view .react-calendar__tile,.react-calendar__year-view .react-calendar__tile{padding:2em .5em}.react-calendar__tile{background:none;line-height:16px;max-width:100%;padding:10px 6.6667px;text-align:center}.react-calendar__tile:disabled{background-color:#f0f0f0}.react-calendar__tile:enabled:focus,.react-calendar__tile:enabled:hover{background-color:#e6e6e6}.react-calendar__tile--now{background:#ffff76}.react-calendar__tile--now:enabled:focus,.react-calendar__tile--now:enabled:hover{background:#ffffa9}.react-calendar__tile--hasActive{background:#76baff}.react-calendar__tile--hasActive:enabled:focus,.react-calendar__tile--hasActive:enabled:hover{background:#a9d4ff}.react-calendar__tile--active{background:#006edc;color:#fff}.react-calendar__tile--active:enabled:focus,.react-calendar__tile--active:enabled:hover{background:#1087ff}.react-calendar--selectRange .react-calendar__tile--hover{background-color:#e6e6e6}
|
assets/css/vendors-chunk-getStoryPropsToSave-wp-story-editor.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.react-calendar{background:#fff;border:1px solid #a0a096;font-family:Arial,Helvetica,sans-serif;line-height:1.125em;max-width:100%;width:350px}.react-calendar--doubleView{width:700px}.react-calendar--doubleView .react-calendar__viewContainer{display:flex;margin:-.5em}.react-calendar--doubleView .react-calendar__viewContainer>*{margin:.5em;width:50%}.react-calendar,.react-calendar *,.react-calendar :after,.react-calendar :before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.react-calendar button{border:0;margin:0;outline:none}.react-calendar button:enabled:hover{cursor:pointer}.react-calendar__navigation{display:flex;height:44px;margin-bottom:1em}.react-calendar__navigation button{background:none;min-width:44px}.react-calendar__navigation button:enabled:focus,.react-calendar__navigation button:enabled:hover{background-color:#e6e6e6}.react-
|
1 |
+
.react-calendar{background:#fff;border:1px solid #a0a096;font-family:Arial,Helvetica,sans-serif;line-height:1.125em;max-width:100%;width:350px}.react-calendar--doubleView{width:700px}.react-calendar--doubleView .react-calendar__viewContainer{display:flex;margin:-.5em}.react-calendar--doubleView .react-calendar__viewContainer>*{margin:.5em;width:50%}.react-calendar,.react-calendar *,.react-calendar :after,.react-calendar :before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.react-calendar button{border:0;margin:0;outline:none}.react-calendar button:enabled:hover{cursor:pointer}.react-calendar__navigation{display:flex;height:44px;margin-bottom:1em}.react-calendar__navigation button{background:none;min-width:44px}.react-calendar__navigation button:disabled{background-color:#f0f0f0}.react-calendar__navigation button:enabled:focus,.react-calendar__navigation button:enabled:hover{background-color:#e6e6e6}.react-calendar__month-view__weekdays{font-size:.75em;font-weight:700;text-align:center;text-transform:uppercase}.react-calendar__month-view__weekdays__weekday{padding:.5em}.react-calendar__month-view__weekNumbers .react-calendar__tile{align-items:center;display:flex;font-size:.75em;font-weight:700;justify-content:center}.react-calendar__month-view__days__day--weekend{color:#d10000}.react-calendar__month-view__days__day--neighboringMonth{color:#757575}.react-calendar__century-view .react-calendar__tile,.react-calendar__decade-view .react-calendar__tile,.react-calendar__year-view .react-calendar__tile{padding:2em .5em}.react-calendar__tile{background:none;line-height:16px;max-width:100%;padding:10px 6.6667px;text-align:center}.react-calendar__tile:disabled{background-color:#f0f0f0}.react-calendar__tile:enabled:focus,.react-calendar__tile:enabled:hover{background-color:#e6e6e6}.react-calendar__tile--now{background:#ffff76}.react-calendar__tile--now:enabled:focus,.react-calendar__tile--now:enabled:hover{background:#ffffa9}.react-calendar__tile--hasActive{background:#76baff}.react-calendar__tile--hasActive:enabled:focus,.react-calendar__tile--hasActive:enabled:hover{background:#a9d4ff}.react-calendar__tile--active{background:#006edc;color:#fff}.react-calendar__tile--active:enabled:focus,.react-calendar__tile--active:enabled:hover{background:#1087ff}.react-calendar--selectRange .react-calendar__tile--hover{background-color:#e6e6e6}
|
assets/css/web-stories-block-rtl.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.glider-contain{width:100%}.glider,.glider-contain{margin:0 auto;position:relative}.glider{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;overflow-y:hidden}.glider,.glider-track{transform:translateZ(0)}.glider-track{display:flex;margin:0;padding:0;width:100%;z-index:1}.glider.draggable{cursor:-webkit-grab;cursor:grab;user-select:none}.glider.draggable .glider-slide img{pointer-events:none;user-select:none}.glider.drag{cursor:-webkit-grabbing;cursor:grabbing}.glider-slide{align-content:center;justify-content:center;user-select:none;width:100%}.glider-slide img{max-width:100%}.glider::-webkit-scrollbar{height:0;opacity:0}.glider-next,.glider-prev{background:none;border:0;color:#666;cursor:pointer;font-size:40px;right:-23px;line-height:1;opacity:1;outline:none;padding:0;position:absolute;text-decoration:none;top:30%;transition:opacity .5s cubic-bezier(.17,.67,.83,.67),color .5s cubic-bezier(.17,.67,.83,.67);user-select:none;z-index:2}.glider-next:focus,.glider-next:hover,.glider-prev:focus,.glider-prev:hover{color:#a89cc8}.glider-next{right:auto;left:-23px}.glider-next.disabled,.glider-prev.disabled{color:#666;cursor:default;opacity:.25}.glider-slide{min-width:150px}.glider-hide{opacity:0}.glider-dots{display:flex;flex-wrap:wrap;justify-content:center;margin:0 auto}.glider-dot,.glider-dots{padding:0;user-select:none}.glider-dot{background:#ccc;border:0;border-radius:999px;color:#ccc;cursor:pointer;display:block;height:12px;margin:7px;outline:none;width:12px}.glider-dot.active,.glider-dot:focus,.glider-dot:hover{background:#a89cc8}@media(max-width:36em){.glider::-webkit-scrollbar{-webkit-appearance:none;height:3px;opacity:1;width:7px}.glider::-webkit-scrollbar-thumb{background-color:#9c9c9c40;border-radius:99px;box-shadow:0 0 1px #ffffff40;opacity:1}}.block-editor-block-list__block[data-type="web-stories/embed"] .wp-block{height:auto;overflow:hidden}.wp-block-web-stories-embed.is-loading{align-items:center;background:#f8f9f9;display:flex;flex-direction:column;justify-content:center;min-height:200px;padding:1em;text-align:center}.wp-block-web-stories-embed.is-loading p{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.wp-block-web-stories-embed .components-placeholder__learn-more{margin-top:1em}.wp-block-web-stories-embed .components-resizable-box__container amp-story-player{height:inherit;width:inherit}.wp-block-web-stories-embed.alignleft .components-resizable-box__container{margin-right:auto}.wp-block-web-stories-embed.alignright .components-resizable-box__container{margin-left:auto}.wp-block-web-stories-embed.aligncenter .components-resizable-box__container{margin:auto}.wp-block-web-stories-embed .components-resizable-box__container.hide-resize-handle .components-resizable-box__handle{display:none}.wp-block-web-stories-embed .components-resizable-box__container.show-resize-handle .components-resizable-box__handle{display:block}.web-stories-embed-preview{height:inherit;position:relative;width:inherit}.web-stories-embed-preview-overlay{bottom:0;right:0;opacity:0;position:absolute;left:0;top:0}.web-stories-embed-poster-label{display:block!important}.web-stories-embed-size-control{margin-bottom:1em}.web-stories-embed-size-control__row{display:flex;justify-content:space-between}.web-stories-embed-size-control__height input,.web-stories-embed-size-control__width input{line-height:1.25}.web-stories-embed-size-control__width{margin-left:5px}.web-stories-embed-size-control__height{margin-right:5px}:root{--ws-font-size-title:18px;--ws-font-size-circle-title:14px;--ws-font-size-excerpt:16px;--ws-font-size-author-date:14px;--ws-aspect-ratio:176.2%;--ws-list-aspect-ratio:75%;--ws-overlay-text-color:#fff;--ws-overlay-text-lh:1.3;--ws-story-min-width:160px;--ws-story-max-width:285px;--ws-circle-size:96px;--ws-circle-border-color:#ccc}.web-stories-list{margin-bottom:24px;margin-top:24px}.web-stories-theme-header-section .web-stories-list{margin-bottom:0;margin-top:0}.web-stories-list.is-carousel .web-stories-list__inner-wrapper{margin:0 auto;max-width:max-content;position:relative}.web-stories-list__story{cursor:pointer;position:relative}.web-stories-list.is-view-type-carousel .web-stories-list__story,.web-stories-list.is-view-type-grid .web-stories-list__story{min-width:var(--ws-story-min-width)}.web-stories-list.is-style-default.is-view-type-carousel .web-stories-list__story,.web-stories-list.is-style-default.is-view-type-grid .web-stories-list__story{border-radius:8px;overflow:hidden}.web-stories-list__story-poster{position:relative}.web-stories-list__story-poster a{display:block;margin:0}.web-stories-list__story-poster .web-stories-list__story-poster-placeholder{box-sizing:border-box}.web-stories-list__story-poster .web-stories-list__story-poster-placeholder a,.web-stories-list__story-poster .web-stories-list__story-poster-placeholder span{clip:rect(1px,1px,1px,1px);word-wrap:normal!important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-break:normal}.web-stories-list__story.web-stories-list__story--amp .web-stories-list__story-poster a{pointer-events:none}.web-stories-list__story-poster img{box-sizing:border-box;height:100%;object-fit:cover;position:absolute;width:100%}.web-stories-list__story-poster:before{background:linear-gradient(-180deg,#fff0,#000c);content:"";display:block;height:100%;right:0;position:absolute;top:0;width:100%;z-index:1}.web-stories-list__story-poster:after{content:"";display:block;padding-bottom:var(--ws-aspect-ratio)}.web-stories-list__story-content-overlay{line-height:var(--ws-overlay-text-lh);padding:10px}html[amp] .web-stories-list__story-content-overlay{white-space:normal}.web-stories-list.is-view-type-carousel .web-stories-list__story-content-overlay,.web-stories-list.is-view-type-grid .web-stories-list__story-content-overlay{bottom:0;color:var(--ws-overlay-text-color);position:absolute;z-index:1}.web-stories-list .story-content-overlay__title{font-size:var(--ws-font-size-title);font-weight:700}.web-stories-list .story-content-overlay__author,.web-stories-list .story-content-overlay__date{font-size:var(--ws-font-size-author-date)}.web-stories-list .story-content-overlay__excerpt,.web-stories-list .story-content-overlay__title{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.web-stories-list .story-content-overlay__title:not(:last-child){margin-bottom:15px}.web-stories-list .story-content-overlay__excerpt{-webkit-line-clamp:3;font-size:var(--ws-font-size-excerpt);margin-bottom:8px}.web-stories-list.alignfull .web-stories-list__archive-link{left:10px}.web-stories-list.is-view-type-grid .web-stories-list__archive-link,.web-stories-list.is-view-type-list .web-stories-list__archive-link{display:block;flex-basis:100%;margin:32px auto 0;text-align:center}.web-stories-list.is-view-type-grid .web-stories-list__archive-link a,.web-stories-list.is-view-type-list .web-stories-list__archive-link a{border:1px solid;border-radius:100px;padding:7px 53px}.web-stories-lightbox-open{overflow-y:hidden}.web-stories-list__lightbox{align-items:center;background:#000;display:none;height:100%;justify-content:center;right:0;opacity:0;position:fixed;top:0;transform:translateY(-100vh);width:100%}.web-stories-list__lightbox-wrapper amp-lightbox,.web-stories-list__lightbox.show{z-index:999999999}.web-stories-list__lightbox.show{display:block;opacity:1;transform:translate(0)}.web-stories-list__lightbox amp-story-player{height:100%;width:100%}.story-lightbox__close-button{background:none!important;border:none;border-radius:0;cursor:pointer;display:inline-block;height:40px;right:0;position:absolute;top:8px;width:40px;z-index:1}.story-lightbox__close-button--stick{background-color:#fff;display:inline-block;height:20px;right:20px;position:absolute;top:15px;transform:rotate(-45deg);width:3px}.story-lightbox__close-button--stick:first-child{transform:rotate(45deg)}html:not([amp]) .web-stories-list .web-stories-list__lightbox amp-story-player a{position:absolute}@media (min-width:676px){.admin-bar .web-stories-list__lightbox{top:46px}.story-lightbox__close-button{right:10px}.story-lightbox__close-button--stick{height:25px;right:20px;top:5px}}@media (min-width:783px){.admin-bar .web-stories-list__lightbox{top:32px}}.web-stories-list.is-view-type-grid .web-stories-list__inner-wrapper{display:flex;flex-wrap:wrap}.web-stories-list.is-view-type-grid .web-stories-list__story{flex-basis:calc(100% - 8px);margin:4px}@media (min-width:415px){.web-stories-list.is-view-type-grid.columns-1 .web-stories-list__story{flex-basis:calc(100% - 8px)}.web-stories-list.is-view-type-grid.columns-2 .web-stories-list__story{flex-basis:calc(50% - 8px)}.web-stories-list.is-view-type-grid.columns-3 .web-stories-list__story{flex-basis:calc(33.33333% - 8px)}.web-stories-list.is-view-type-grid.columns-4 .web-stories-list__story{flex-basis:calc(25% - 8px)}.web-stories-list.is-view-type-grid.columns-5 .web-stories-list__story{flex-basis:calc(20% - 8px)}}.web-stories-theme-header-section .web-stories-list.is-view-type-circles{border-bottom:1px solid #ccc;padding:12px 0}.web-stories-list.is-view-type-circles .amp-carousel-slide{vertical-align:top}.web-stories-list.is-view-type-circles .glider-track{justify-content:center;margin:0 auto}.web-stories-list.is-view-type-circles .web-stories-list__story{display:inline-block;margin:0 5px;max-width:var(--ws-circle-size);min-width:var(--ws-circle-size);text-align:center}.web-stories-list.is-view-type-circles .web-stories-list__story-poster>img{border-radius:50%}.web-stories-list.is-view-type-circles .web-stories-list__story-poster .web-stories-list__story-poster-placeholder,.web-stories-list.is-view-type-circles .web-stories-list__story-poster>img,.web-stories-list.is-view-type-circles .web-stories-list__story-poster a>img{background-clip:content-box;border:2px solid var(--ws-circle-border-color);border-radius:50%;height:var(--ws-circle-size);right:0;max-width:none;padding:2px;position:absolute;top:0;width:var(--ws-circle-size)}.web-stories-list.is-view-type-circles .web-stories-list__story-poster a>img{border-radius:50%}.web-stories-list.is-view-type-circles .web-stories-list__story-poster:after{padding-bottom:var(--ws-circle-size)}.web-stories-list.is-view-type-circles .web-stories-list__story-poster:before{display:none}.web-stories-list.is-view-type-circles .web-stories-list__story-content-overlay{padding-bottom:0}.web-stories-list.is-view-type-circles .story-content-overlay__title{font-size:var(--ws-font-size-circle-title)}.web-stories-list.is-view-type-circles.has-title .glider-next,.web-stories-list.is-view-type-circles.has-title .glider-prev{top:35%}.web-stories-list.is-view-type-list .web-stories-list__story{margin-bottom:12px}.web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{bottom:0;color:var(--ws-overlay-text-color);position:absolute;z-index:1}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story{align-items:center;display:flex;flex-wrap:nowrap}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster{flex-basis:40%}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster:before{display:none}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster:after{padding-bottom:var(--ws-list-aspect-ratio)}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{color:inherit;flex-basis:60%;padding:10px 15px;position:relative}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-poster{order:2}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-content-overlay{order:1}.ws-legacy-widget-preview .web-stories-list.is-view-type-list.is-style-default .web-stories-list__story-poster{border-radius:8px;overflow:hidden}@media (min-width:676px){.web-stories-list.is-view-type-list .web-stories-list__story{align-items:center;display:flex;flex-wrap:nowrap}.web-stories-list.is-view-type-list .web-stories-list__story-poster{flex-basis:40%}.web-stories-list.is-view-type-list .web-stories-list__story-poster:before{display:none}.web-stories-list.is-view-type-list .web-stories-list__story-poster:after{padding-bottom:var(--ws-list-aspect-ratio)}.web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{color:inherit;flex-basis:60%;padding:10px 15px;position:relative}.web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-poster{order:2}.web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-content-overlay{order:1}.web-stories-list.is-view-type-list.is-style-default .web-stories-list__story-poster{border-radius:8px;overflow:hidden}.web-stories-list.is-view-type-carousel .web-stories-list__story{margin:0 5px;max-width:var(--ws-story-max-width)}}.ws-legacy-widget-preview .web-stories-list.is-view-type-carousel .web-stories-list__story{margin:0 5px;max-width:var(--ws-story-max-width)}.web-stories-list.is-carousel.has-archive-link{margin-top:59px}.web-stories-theme-header-section .web-stories-list.is-carousel.has-archive-link{margin-top:24px;padding-top:59px;position:relative}.web-stories-list.is-carousel .web-stories-list__archive-link{position:absolute;left:0;top:-35px}.web-stories-theme-header-section .web-stories-list.is-carousel .web-stories-list__archive-link{left:10px}.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{padding:10px;top:50%;transform:translateY(-50%)}.web-stories-list.is-carousel .glider-prev{transform:translateY(-50%) rotate(-180deg)}.web-stories-list.is-carousel .amp-carousel-button-next,.web-stories-list.is-carousel .amp-carousel-button-prev,.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSIxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMS41MzIgMS4zODMgNS41MSA1LjUxLTUuNTEgNS41MTEiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSIyIi8+PC9zdmc+)}.web-stories-list.is-carousel .amp-carousel-button-next,.web-stories-list.is-carousel .glider-next{left:0}.web-stories-list.is-carousel .amp-carousel-button-prev,.web-stories-list.is-carousel .glider-prev{right:0}.web-stories-list.is-carousel .amp-carousel-button-prev{transform:rotate(-180deg)}html[dir=rtl] .web-stories-list.is-carousel .amp-carousel-button-next{transform:rotate(-180deg)}.web-stories-list.is-carousel .amp-carousel-button,.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{background-color:#eaeaea;background-position:50%;background-repeat:no-repeat;background-size:30%;border-radius:50%;border-style:none;box-sizing:border-box;cursor:pointer;height:34px;pointer-events:all;width:34px;z-index:10}html[dir=rtl] .web-stories-list.is-carousel .glider-next{transform:translateY(-50%) rotate(-180deg)}.glider-next.disabled,.glider-prev.disabled,.web-stories-list.is-carousel .amp-carousel-button.amp-disabled{opacity:0}html[dir=rtl] .glider-next.disabled,html[dir=rtl] .glider-prev.disabled{cursor:pointer;opacity:1}.web-stories-list.is-carousel .amp-carousel-button:not(.amp-disabled):hover,.web-stories-list.is-carousel .glider-next:not(.disabled):focus,.web-stories-list.is-carousel .glider-next:not(.disabled):hover,.web-stories-list.is-carousel .glider-prev:not(.disabled):focus,.web-stories-list.is-carousel .glider-prev:not(.disabled):hover,html[dir=rtl] .glider-next.disabled:hover,html[dir=rtl] .glider-prev.disabled:hover{filter:invert(1)}.web-stories-list.is-carousel .web-stories-list__carousel{scrollbar-width:none}.web-stories-list.is-carousel .glider-track::-webkit-scrollbar{display:none}.web-stories-list__story{cursor:default}.web-stories-list.is-view-type-carousel .web-stories-list__story{flex-shrink:0;margin-left:10px;min-width:235px}.web-stories-list .web-stories-list__story-poster img{height:100%}.web-stories-list .story-content-overlay__excerpt p{margin:0}.web-stories-list.is-carousel.has-archive-link{margin-top:0;padding-top:59px}.web-stories-list.is-carousel.has-archive-link .web-stories-list__archive-link{top:0}.is-pressed .web-stories-block__toolbar-icon.icon__circles-carousel circle{stroke:#000}.web-stories-block-configuration-panel .components-placeholder__instructions{margin:0}.web-stories-block-configuration-panel .web-stories-block-configuration-panel__options{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;list-style:none;margin:16px 0 0;padding:0;width:100%}.web-stories-block-configuration-panel .web-stories-block-configuration-panel__options>li{align-items:center;display:flex;flex-direction:column;margin:8px 0 0 20px}.web-stories-block-configuration-panel .web-stories-block-configuration-panel__options .components-button{height:70px;justify-content:center;margin:0 0 12px;padding:0;width:70px}.web-stories-block-configuration-panel .web-stories-block-configuration-panel__options .components-button svg{fill:none;color:var(--wp-admin-theme-color,#007cba)}.web-stories-block__loader-container{align-items:center;display:flex;height:100%;justify-content:center}.web-stories-block__loader-container .components-spinner{margin-top:0}.web-stories-story-picker-modal{height:100%;overflow:hidden;position:relative;width:100%}@media screen and (min-width:768px){.web-stories-story-picker-modal{height:calc(100% - 120px);width:calc(100% - 32px)}}.web-stories-story-picker-modal .components-modal__header{margin-bottom:0}.web-stories-story-picker-modal__content{height:calc(100% - 110px);margin:0;overflow-x:hidden;overflow-y:scroll;padding:20px 0;position:relative}.web-stories-story-picker-modal__footer{align-items:center;background:#fff;bottom:0;display:flex;justify-content:space-between;margin:0;padding:10px 0;position:fixed;width:calc(100% - 64px);z-index:2}.web-stories-story-picker-modal__footer .components-button{margin-right:8px}.web-stories-story-picker-modal__footer--left{min-width:1px}.web-stories-story-picker-modal__footer--right{display:flex;flex-direction:row}@media screen and (min-width:768px){.web-stories-story-picker-modal__footer--right{display:block}}.web-stories-story-picker-filter{display:flex;justify-content:flex-end;margin-top:-12px;padding:0;z-index:2}@media screen and (min-height:768px) and (min-width:768px){.web-stories-story-picker-filter{position:sticky;top:0}}.web-stories-story-picker-filter__search-container{background:#fff;display:block;position:relative;width:100%}@media screen and (min-width:768px){.web-stories-story-picker-filter__search-container{grid-column-gap:1%;display:grid;grid-template-columns:0 32% 32% 32%}}@media screen and (min-width:1200px){.web-stories-story-picker-filter__search-container{grid-template-columns:57% 15% 15% 10%}}.web-stories-story-picker-filter .web-stories-story-picker-filter__search-container .components-base-control .components-input-control__label{margin-bottom:7px}.web-stories-story-picker-filter .web-stories-story-picker-filter__search-container .components-base-control .components-select-control__input{height:34px}.web-stories-story-picker-filter__search-inner{grid-column:2}.web-stories-story-picker-filter__combobox .components-combobox-control__suggestions-container{position:relative}.web-stories-story-picker-filter__combobox .components-form-token-field__suggestions-list{background:#fff;border:1px solid #757575;position:absolute;top:28px}.web-stories-story-picker-filter__combobox .components-combobox-control__suggestions-container:focus-within .components-form-token-field__suggestions-list{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.web-stories-story-picker-filter__grid{grid-column-gap:24px;grid-row-gap:80px;display:grid;grid-auto-rows:minmax(min-content,max-content);grid-template-columns:repeat(auto-fill,minmax(100px,1fr));overflow:auto;padding:30px 20px 0;scroll-margin-top:30vh;width:100%}@media screen and (min-height:768px) and (min-width:768px){.web-stories-story-picker-filter__grid{height:calc(100% - 125px)}}@media screen and (min-width:768px){.web-stories-story-picker-filter__grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}}.web-stories-story-picker-filter__grid .droppable{position:relative}.web-stories-story-picker-filter__grid .droppable.web-stories-story-picker-show-drag-inserter:before{background:var(--wp-admin-theme-color,#007cba);bottom:0;content:"";right:-14px;position:absolute;top:0;width:4px}.web-stories-story-picker-filter__grid .droppable.web-stories-story-picker-show-drag-inserter.web-stories-story-picker-show-drag-inserter-right:before{right:auto;left:-14px}.web-stories-story-picker-filter__grid_item{display:flex;flex-direction:column;margin:0;width:100%}.web-stories-story-picker-filter__load_more{display:flex;flex-direction:row;justify-content:center}.web-stories-story-preview-card__poster{border:1px solid #adb1b3;border-radius:4px;position:relative}.web-stories-story-preview-card__poster img{border-radius:4px;height:auto;position:absolute;width:100%}.web-stories-story-preview-card__poster:before{background:linear-gradient(-180deg,#fff0,#000c);content:"";display:block;height:100%;right:0;position:absolute;top:0;width:100%;z-index:1}.web-stories-story-preview-card__poster:after{content:"";display:block;padding-bottom:133.28125%}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay{background:#0000;border:none;bottom:0;box-shadow:none;display:block;height:100%;right:0;margin:0;padding:0;position:absolute;left:0;top:0;width:100%;z-index:2}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay:focus{box-shadow:0 0 3px 3px #5b9dd9,0 0 2px 1px #1e8cbecc}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon{position:absolute;left:-7px;top:-7px;z-index:1}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon span,.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon svg{background-color:#ccc;box-shadow:0 0 0 1px #fff,0 0 0 2px #00000026;color:#000;cursor:pointer;padding:3px}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected:focus .item-selected-icon span{color:#fff}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon svg{stroke:#000;stroke-width:2px}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected:focus .item-selected-icon svg{stroke:#fff;background-color:#0073aa}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon span:before{right:0;position:absolute;top:0}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon .item-selected-icon-minus{display:none}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon:hover .item-selected-icon-minus{display:block}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon:hover .item-selected-icon-check{display:none}.web-stories-story-preview-card__label>div{margin-bottom:8px}.web-stories-story-preview-card__title{font-size:16px;font-weight:700;margin-top:8px}.web-stories-settings .components-toggle-control .components-base-control__help,.web-stories-settings .web-stories-settings-archive-link{margin-right:auto;width:80%}
|
1 |
+
.glider-contain{width:100%}.glider,.glider-contain{margin:0 auto;position:relative}.glider{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;overflow-y:hidden}.glider,.glider-track{transform:translateZ(0)}.glider-track{display:flex;margin:0;padding:0;width:100%;z-index:1}.glider.draggable{cursor:-webkit-grab;cursor:grab;user-select:none}.glider.draggable .glider-slide img{pointer-events:none;user-select:none}.glider.drag{cursor:-webkit-grabbing;cursor:grabbing}.glider-slide{align-content:center;justify-content:center;user-select:none;width:100%}.glider-slide img{max-width:100%}.glider::-webkit-scrollbar{height:0;opacity:0}.glider-next,.glider-prev{background:none;border:0;color:#666;cursor:pointer;font-size:40px;right:-23px;line-height:1;opacity:1;outline:none;padding:0;position:absolute;text-decoration:none;top:30%;transition:opacity .5s cubic-bezier(.17,.67,.83,.67),color .5s cubic-bezier(.17,.67,.83,.67);user-select:none;z-index:2}.glider-next:focus,.glider-next:hover,.glider-prev:focus,.glider-prev:hover{color:#a89cc8}.glider-next{right:auto;left:-23px}.glider-next.disabled,.glider-prev.disabled{color:#666;cursor:default;opacity:.25}.glider-slide{min-width:150px}.glider-hide{opacity:0}.glider-dots{display:flex;flex-wrap:wrap;justify-content:center;margin:0 auto}.glider-dot,.glider-dots{padding:0;user-select:none}.glider-dot{background:#ccc;border:0;border-radius:999px;color:#ccc;cursor:pointer;display:block;height:12px;margin:7px;outline:none;width:12px}.glider-dot.active,.glider-dot:focus,.glider-dot:hover{background:#a89cc8}@media(max-width:36em){.glider::-webkit-scrollbar{-webkit-appearance:none;height:3px;opacity:1;width:7px}.glider::-webkit-scrollbar-thumb{background-color:#9c9c9c40;border-radius:99px;box-shadow:0 0 1px #ffffff40;opacity:1}}.block-editor-block-list__block[data-type="web-stories/embed"] .wp-block{height:auto;overflow:hidden}.wp-block-web-stories-embed.is-loading{align-items:center;background:#f8f9f9;display:flex;flex-direction:column;justify-content:center;min-height:200px;padding:1em;text-align:center}.wp-block-web-stories-embed.is-loading p{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.wp-block-web-stories-embed .components-placeholder__learn-more{margin-top:1em}.wp-block-web-stories-embed .components-resizable-box__container amp-story-player{height:inherit;width:inherit}.wp-block-web-stories-embed.alignleft .components-resizable-box__container{margin-right:auto}.wp-block-web-stories-embed.alignright .components-resizable-box__container{margin-left:auto}.wp-block-web-stories-embed.aligncenter .components-resizable-box__container{margin:auto}.wp-block-web-stories-embed .components-resizable-box__container.hide-resize-handle .components-resizable-box__handle{display:none}.wp-block-web-stories-embed .components-resizable-box__container.show-resize-handle .components-resizable-box__handle{display:block}.web-stories-embed-preview{height:inherit;position:relative;width:inherit}.web-stories-embed-preview-overlay{bottom:0;right:0;opacity:0;position:absolute;left:0;top:0}.web-stories-embed-poster-label{display:block!important}.web-stories-embed-size-control{margin-bottom:1em}.web-stories-embed-size-control__row{display:flex;justify-content:space-between}.web-stories-embed-size-control__height input,.web-stories-embed-size-control__width input{line-height:1.25}.web-stories-embed-size-control__width{margin-left:5px}.web-stories-embed-size-control__height{margin-right:5px}:root{--ws-font-size-title:18px;--ws-font-size-circle-title:14px;--ws-font-size-excerpt:16px;--ws-font-size-author-date:14px;--ws-aspect-ratio:4/6;--ws-list-aspect-ratio:4/6;--ws-overlay-text-color:#fff;--ws-overlay-text-lh:1.3;--ws-story-min-width:160px;--ws-story-max-width:285px;--ws-circle-size:96px;--ws-circle-border-color:#ccc}.web-stories-list{margin-bottom:24px;margin-top:24px}.web-stories-theme-header-section .web-stories-list{margin-bottom:0;margin-top:0}.web-stories-list.is-carousel .web-stories-list__inner-wrapper{margin:0 auto;max-width:max-content;position:relative}.web-stories-list__story{cursor:pointer;position:relative}.web-stories-list.is-view-type-carousel .web-stories-list__story,.web-stories-list.is-view-type-grid .web-stories-list__story{min-width:var(--ws-story-min-width)}.web-stories-list.is-style-default.is-view-type-carousel .web-stories-list__story,.web-stories-list.is-style-default.is-view-type-grid .web-stories-list__story{border-radius:8px;overflow:hidden}.web-stories-list__story-poster{aspect-ratio:var(--ws-aspect-ratio);position:relative}.web-stories-list__story-poster a{aspect-ratio:var(--ws-aspect-ratio);display:block;margin:0}.web-stories-list__story-poster .web-stories-list__story-poster-placeholder{box-sizing:border-box}.web-stories-list__story-poster .web-stories-list__story-poster-placeholder a,.web-stories-list__story-poster .web-stories-list__story-poster-placeholder span{clip:rect(1px,1px,1px,1px);word-wrap:normal!important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-break:normal}.web-stories-list__story.web-stories-list__story--amp .web-stories-list__story-poster a{pointer-events:none}.web-stories-list__story-poster img{box-sizing:border-box;height:100%;object-fit:cover;position:absolute;width:100%}.web-stories-list__story-poster:after{background:linear-gradient(-180deg,#fff0,#000c);content:"";display:block;height:100%;right:0;position:absolute;top:0;width:100%}.web-stories-list__story-content-overlay{line-height:var(--ws-overlay-text-lh);padding:10px}html[amp] .web-stories-list__story-content-overlay{white-space:normal}.web-stories-list.is-view-type-carousel .web-stories-list__story-content-overlay,.web-stories-list.is-view-type-grid .web-stories-list__story-content-overlay{bottom:0;color:var(--ws-overlay-text-color);position:absolute;z-index:1}.web-stories-list .story-content-overlay__title{font-size:var(--ws-font-size-title);font-weight:700}.web-stories-list .story-content-overlay__author,.web-stories-list .story-content-overlay__date{font-size:var(--ws-font-size-author-date)}.web-stories-list .story-content-overlay__excerpt,.web-stories-list .story-content-overlay__title{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.web-stories-list .story-content-overlay__title:not(:last-child){margin-bottom:15px}.web-stories-list .story-content-overlay__excerpt{-webkit-line-clamp:3;font-size:var(--ws-font-size-excerpt);margin-bottom:8px}.web-stories-list.alignfull .web-stories-list__archive-link{left:10px}.web-stories-list.is-view-type-grid .web-stories-list__archive-link,.web-stories-list.is-view-type-list .web-stories-list__archive-link{display:block;flex-basis:100%;margin:32px auto 0;text-align:center}.web-stories-list.is-view-type-grid .web-stories-list__archive-link a,.web-stories-list.is-view-type-list .web-stories-list__archive-link a{border:1px solid;border-radius:100px;padding:7px 53px}.web-stories-lightbox-open{overflow-y:hidden}.web-stories-list__lightbox{align-items:center;background:#000;display:none;height:100%;justify-content:center;right:0;opacity:0;position:fixed;top:0;transform:translateY(-100vh);width:100%}.web-stories-list__lightbox-wrapper amp-lightbox,.web-stories-list__lightbox.show{z-index:999999999}.web-stories-list__lightbox.show{display:block;opacity:1;transform:translate(0)}.web-stories-list__lightbox amp-story-player{height:100%;width:100%}.story-lightbox__close-button{background:none!important;border:none;border-radius:0;cursor:pointer;display:inline-block;height:40px;right:0;position:absolute;top:8px;width:40px;z-index:1}.story-lightbox__close-button--stick{background-color:#fff;display:inline-block;height:20px;right:20px;position:absolute;top:15px;transform:rotate(-45deg);width:3px}.story-lightbox__close-button--stick:first-child{transform:rotate(45deg)}html:not([amp]) .web-stories-list .web-stories-list__lightbox amp-story-player a{position:absolute}@media (min-width:676px){.admin-bar .web-stories-list__lightbox{top:46px}.story-lightbox__close-button{right:10px}.story-lightbox__close-button--stick{height:25px;right:20px;top:5px}}@media (min-width:783px){.admin-bar .web-stories-list__lightbox{top:32px}}.web-stories-list.is-view-type-grid .web-stories-list__inner-wrapper{display:flex;flex-wrap:wrap}.web-stories-list.is-view-type-grid .web-stories-list__story{flex-basis:calc(100% - 8px);margin:4px}@media (min-width:415px){.web-stories-list.is-view-type-grid.columns-1 .web-stories-list__story{flex-basis:calc(100% - 8px)}.web-stories-list.is-view-type-grid.columns-2 .web-stories-list__story{flex-basis:calc(50% - 8px)}.web-stories-list.is-view-type-grid.columns-3 .web-stories-list__story{flex-basis:calc(33.33333% - 8px)}.web-stories-list.is-view-type-grid.columns-4 .web-stories-list__story{flex-basis:calc(25% - 8px)}.web-stories-list.is-view-type-grid.columns-5 .web-stories-list__story{flex-basis:calc(20% - 8px)}}.web-stories-theme-header-section .web-stories-list.is-view-type-circles{border-bottom:1px solid #ccc;padding:12px 0}.web-stories-list.is-view-type-circles .amp-carousel-slide{vertical-align:top}.web-stories-list.is-view-type-circles .glider-track{justify-content:center;margin:0 auto}.web-stories-list.is-view-type-circles .web-stories-list__story{display:inline-block;margin:0 5px;max-width:var(--ws-circle-size);min-width:var(--ws-circle-size);text-align:center}.web-stories-list.is-view-type-circles .web-stories-list__story-poster,.web-stories-list.is-view-type-circles .web-stories-list__story-poster a{aspect-ratio:1}.web-stories-list.is-view-type-circles .web-stories-list__story-poster>img{border-radius:50%}.web-stories-list.is-view-type-circles .web-stories-list__story-poster .web-stories-list__story-poster-placeholder,.web-stories-list.is-view-type-circles .web-stories-list__story-poster a>img,.web-stories-list.is-view-type-circles .web-stories-list__story-poster>img{background-clip:content-box;border:2px solid var(--ws-circle-border-color);border-radius:50%;height:var(--ws-circle-size);right:0;max-width:none;padding:2px;position:absolute;top:0;width:var(--ws-circle-size)}.web-stories-list.is-view-type-circles .web-stories-list__story-poster a>img{border-radius:50%}.web-stories-list.is-view-type-circles .web-stories-list__story-poster:after{display:none}.web-stories-list.is-view-type-circles .web-stories-list__story-poster-placeholder:after{background:linear-gradient(-180deg,#fff0,#000c);border-radius:50%;content:"";display:block;height:100%;right:0;position:absolute;top:0;width:100%}.web-stories-list.is-view-type-circles .web-stories-list__story-content-overlay{padding-bottom:0}.web-stories-list.is-view-type-circles .story-content-overlay__title{font-size:var(--ws-font-size-circle-title)}.web-stories-list.is-view-type-circles.has-title .glider-next,.web-stories-list.is-view-type-circles.has-title .glider-prev{top:35%}.web-stories-list.is-view-type-list .web-stories-list__story{margin-bottom:12px}.web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{bottom:0;color:var(--ws-overlay-text-color);position:absolute;z-index:1}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story{align-items:center;display:flex;flex-wrap:nowrap}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster{aspect-ratio:var(--ws-list-aspect-ratio);flex-basis:40%}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster:after{display:none}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{color:inherit;flex-basis:60%;padding:10px 15px;position:relative}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-poster{order:2}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-content-overlay{order:1}.ws-legacy-widget-preview .web-stories-list.is-view-type-list.is-style-default .web-stories-list__story-poster{border-radius:8px;overflow:hidden}@media (min-width:676px){.web-stories-list.is-view-type-list .web-stories-list__story{align-items:center;display:flex;flex-wrap:nowrap}.web-stories-list.is-view-type-list .web-stories-list__story-poster{aspect-ratio:var(--ws-list-aspect-ratio);flex-basis:40%}.web-stories-list.is-view-type-list .web-stories-list__story-poster:after{display:none}.web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{color:inherit;flex-basis:60%;padding:10px 15px;position:relative}.web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-poster{order:2}.web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-content-overlay{order:1}.web-stories-list.is-view-type-list.is-style-default .web-stories-list__story-poster{border-radius:8px;overflow:hidden}.web-stories-list.is-view-type-carousel .web-stories-list__story{margin:0 5px;max-width:var(--ws-story-max-width)}}.ws-legacy-widget-preview .web-stories-list.is-view-type-carousel .web-stories-list__story{margin:0 5px;max-width:var(--ws-story-max-width)}.web-stories-list.is-carousel.has-archive-link{margin-top:59px}.web-stories-theme-header-section .web-stories-list.is-carousel.has-archive-link{margin-top:24px;padding-top:59px;position:relative}.web-stories-list.is-carousel .web-stories-list__archive-link{position:absolute;left:0;top:-35px}.web-stories-theme-header-section .web-stories-list.is-carousel .web-stories-list__archive-link{left:10px}.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{padding:10px;top:50%;transform:translateY(-50%)}.web-stories-list.is-carousel .glider-prev{transform:translateY(-50%) rotate(-180deg)}.web-stories-list.is-carousel .amp-carousel-button-next,.web-stories-list.is-carousel .amp-carousel-button-prev,.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSIxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMS41MzIgMS4zODMgNS41MSA1LjUxLTUuNTEgNS41MTEiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSIyIi8+PC9zdmc+)}.web-stories-list.is-carousel .amp-carousel-button-next,.web-stories-list.is-carousel .glider-next{left:0}.web-stories-list.is-carousel .amp-carousel-button-prev,.web-stories-list.is-carousel .glider-prev{right:0}.web-stories-list.is-carousel .amp-carousel-button-prev{transform:rotate(-180deg)}html[dir=rtl] .web-stories-list.is-carousel .amp-carousel-button-next{transform:rotate(-180deg)}.web-stories-list.is-carousel .amp-carousel-button,.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{background-color:#eaeaea;background-position:50%;background-repeat:no-repeat;background-size:30%;border-radius:50%;border-style:none;box-sizing:border-box;cursor:pointer;height:34px;pointer-events:all;width:34px;z-index:10}html[dir=rtl] .web-stories-list.is-carousel .glider-next{transform:translateY(-50%) rotate(-180deg)}.glider-next.disabled,.glider-prev.disabled,.web-stories-list.is-carousel .amp-carousel-button.amp-disabled{opacity:0}html[dir=rtl] .glider-next.disabled,html[dir=rtl] .glider-prev.disabled{cursor:pointer;opacity:1}.web-stories-list.is-carousel .amp-carousel-button:not(.amp-disabled):hover,.web-stories-list.is-carousel .glider-next:not(.disabled):focus,.web-stories-list.is-carousel .glider-next:not(.disabled):hover,.web-stories-list.is-carousel .glider-prev:not(.disabled):focus,.web-stories-list.is-carousel .glider-prev:not(.disabled):hover,html[dir=rtl] .glider-next.disabled:hover,html[dir=rtl] .glider-prev.disabled:hover{filter:invert(1)}.web-stories-list.is-carousel .web-stories-list__carousel{scrollbar-width:none}.web-stories-list.is-carousel .glider-track::-webkit-scrollbar{display:none}.web-stories-list__story{cursor:default}.web-stories-list.is-view-type-carousel .web-stories-list__story{flex-shrink:0;margin-left:10px;min-width:235px}.web-stories-list .web-stories-list__story-poster img{height:100%}.web-stories-list .story-content-overlay__excerpt p{margin:0}.web-stories-list.is-carousel.has-archive-link{margin-top:0;padding-top:59px}.web-stories-list.is-carousel.has-archive-link .web-stories-list__archive-link{top:0}.is-pressed .web-stories-block__toolbar-icon.icon__circles-carousel circle{stroke:#000}.web-stories-block-configuration-panel .components-placeholder__instructions{margin:0}.web-stories-block-configuration-panel .web-stories-block-configuration-panel__options{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;list-style:none;margin:16px 0 0;padding:0;width:100%}.web-stories-block-configuration-panel .web-stories-block-configuration-panel__options>li{align-items:center;display:flex;flex-direction:column;margin:8px 0 0 20px}.web-stories-block-configuration-panel .web-stories-block-configuration-panel__options .components-button{height:70px;justify-content:center;margin:0 0 12px;padding:0;width:70px}.web-stories-block-configuration-panel .web-stories-block-configuration-panel__options .components-button svg{fill:none;color:var(--wp-admin-theme-color,#007cba)}.web-stories-block__loader-container{align-items:center;display:flex;height:100%;justify-content:center}.web-stories-block__loader-container .components-spinner{margin-top:0}.web-stories-story-picker-modal{height:100%;overflow:hidden;position:relative;width:100%}@media screen and (min-width:768px){.web-stories-story-picker-modal{height:calc(100% - 120px);width:calc(100% - 32px)}}.web-stories-story-picker-modal .components-modal__header{margin-bottom:0}.web-stories-story-picker-modal__content{height:calc(100% - 110px);margin:0;overflow-x:hidden;overflow-y:scroll;padding:20px 0;position:relative}.web-stories-story-picker-modal__footer{align-items:center;background:#fff;bottom:0;display:flex;justify-content:space-between;margin:0;padding:10px 0;position:fixed;width:calc(100% - 64px);z-index:2}.web-stories-story-picker-modal__footer .components-button{margin-right:8px}.web-stories-story-picker-modal__footer--left{min-width:1px}.web-stories-story-picker-modal__footer--right{display:flex;flex-direction:row}@media screen and (min-width:768px){.web-stories-story-picker-modal__footer--right{display:block}}.web-stories-story-picker-filter{display:flex;justify-content:flex-end;margin-top:-12px;padding:0;z-index:2}@media screen and (min-height:768px) and (min-width:768px){.web-stories-story-picker-filter{position:sticky;top:0}}.web-stories-story-picker-filter__search-container{background:#fff;display:block;position:relative;width:100%}@media screen and (min-width:768px){.web-stories-story-picker-filter__search-container{grid-column-gap:1%;display:grid;grid-template-columns:0 32% 32% 32%}}@media screen and (min-width:1200px){.web-stories-story-picker-filter__search-container{grid-template-columns:57% 15% 15% 10%}}.web-stories-story-picker-filter .web-stories-story-picker-filter__search-container .components-base-control .components-input-control__label{margin-bottom:7px}.web-stories-story-picker-filter .web-stories-story-picker-filter__search-container .components-base-control .components-select-control__input{height:34px}.web-stories-story-picker-filter__search-inner{grid-column:2}.web-stories-story-picker-filter__combobox .components-combobox-control__suggestions-container{position:relative}.web-stories-story-picker-filter__combobox .components-form-token-field__suggestions-list{background:#fff;border:1px solid #757575;position:absolute;top:28px}.web-stories-story-picker-filter__combobox .components-combobox-control__suggestions-container:focus-within .components-form-token-field__suggestions-list{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.web-stories-story-picker-filter__grid{grid-column-gap:24px;grid-row-gap:80px;display:grid;grid-auto-rows:minmax(min-content,max-content);grid-template-columns:repeat(auto-fill,minmax(100px,1fr));overflow:auto;padding:30px 20px 0;scroll-margin-top:30vh;width:100%}@media screen and (min-height:768px) and (min-width:768px){.web-stories-story-picker-filter__grid{height:calc(100% - 125px)}}@media screen and (min-width:768px){.web-stories-story-picker-filter__grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}}.web-stories-story-picker-filter__grid .droppable{position:relative}.web-stories-story-picker-filter__grid .droppable.web-stories-story-picker-show-drag-inserter:before{background:var(--wp-admin-theme-color,#007cba);bottom:0;content:"";right:-14px;position:absolute;top:0;width:4px}.web-stories-story-picker-filter__grid .droppable.web-stories-story-picker-show-drag-inserter.web-stories-story-picker-show-drag-inserter-right:before{right:auto;left:-14px}.web-stories-story-picker-filter__grid_item{display:flex;flex-direction:column;margin:0;width:100%}.web-stories-story-picker-filter__load_more{display:flex;flex-direction:row;justify-content:center}.web-stories-story-preview-card__poster{border:1px solid #adb1b3;border-radius:4px;position:relative}.web-stories-story-preview-card__poster img{border-radius:4px;height:auto;position:absolute;width:100%}.web-stories-story-preview-card__poster:before{background:linear-gradient(-180deg,#fff0,#000c);content:"";display:block;height:100%;right:0;position:absolute;top:0;width:100%;z-index:1}.web-stories-story-preview-card__poster:after{content:"";display:block;padding-bottom:133.28125%}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay{background:#0000;border:none;bottom:0;box-shadow:none;display:block;height:100%;right:0;margin:0;padding:0;position:absolute;left:0;top:0;width:100%;z-index:2}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay:focus{box-shadow:0 0 3px 3px #5b9dd9,0 0 2px 1px #1e8cbecc}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon{position:absolute;left:-7px;top:-7px;z-index:1}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon span,.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon svg{background-color:#ccc;box-shadow:0 0 0 1px #fff,0 0 0 2px #00000026;color:#000;cursor:pointer;padding:3px}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected:focus .item-selected-icon span{color:#fff}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon svg{stroke:#000;stroke-width:2px}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected:focus .item-selected-icon svg{stroke:#fff;background-color:#0073aa}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon span:before{right:0;position:absolute;top:0}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon .item-selected-icon-minus{display:none}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon:hover .item-selected-icon-minus{display:block}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon:hover .item-selected-icon-check{display:none}.web-stories-story-preview-card__label>div{margin-bottom:8px}.web-stories-story-preview-card__title{font-size:16px;font-weight:700;margin-top:8px}.web-stories-settings .components-toggle-control .components-base-control__help,.web-stories-settings .web-stories-settings-archive-link{margin-right:auto;width:80%}
|
assets/css/web-stories-block.css
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
.glider-contain{width:100%}.glider,.glider-contain{margin:0 auto;position:relative}.glider{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;overflow-y:hidden}.glider,.glider-track{transform:translateZ(0)}.glider-track{display:flex;margin:0;padding:0;width:100%;z-index:1}.glider.draggable{cursor:-webkit-grab;cursor:grab;user-select:none}.glider.draggable .glider-slide img{pointer-events:none;user-select:none}.glider.drag{cursor:-webkit-grabbing;cursor:grabbing}.glider-slide{align-content:center;justify-content:center;user-select:none;width:100%}.glider-slide img{max-width:100%}.glider::-webkit-scrollbar{height:0;opacity:0}.glider-next,.glider-prev{background:none;border:0;color:#666;cursor:pointer;font-size:40px;left:-23px;line-height:1;opacity:1;outline:none;padding:0;position:absolute;text-decoration:none;top:30%;transition:opacity .5s cubic-bezier(.17,.67,.83,.67),color .5s cubic-bezier(.17,.67,.83,.67);user-select:none;z-index:2}.glider-next:focus,.glider-next:hover,.glider-prev:focus,.glider-prev:hover{color:#a89cc8}.glider-next{left:auto;right:-23px}.glider-next.disabled,.glider-prev.disabled{color:#666;cursor:default;opacity:.25}.glider-slide{min-width:150px}.glider-hide{opacity:0}.glider-dots{display:flex;flex-wrap:wrap;justify-content:center;margin:0 auto}.glider-dot,.glider-dots{padding:0;user-select:none}.glider-dot{background:#ccc;border:0;border-radius:999px;color:#ccc;cursor:pointer;display:block;height:12px;margin:7px;outline:none;width:12px}.glider-dot.active,.glider-dot:focus,.glider-dot:hover{background:#a89cc8}@media(max-width:36em){.glider::-webkit-scrollbar{-webkit-appearance:none;height:3px;opacity:1;width:7px}.glider::-webkit-scrollbar-thumb{background-color:#9c9c9c40;border-radius:99px;box-shadow:0 0 1px #ffffff40;opacity:1}}.block-editor-block-list__block[data-type="web-stories/embed"] .wp-block{height:auto;overflow:hidden}.wp-block-web-stories-embed.is-loading{align-items:center;background:#f8f9f9;display:flex;flex-direction:column;justify-content:center;min-height:200px;padding:1em;text-align:center}.wp-block-web-stories-embed.is-loading p{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.wp-block-web-stories-embed .components-placeholder__learn-more{margin-top:1em}.wp-block-web-stories-embed .components-resizable-box__container amp-story-player{height:inherit;width:inherit}.wp-block-web-stories-embed.alignleft .components-resizable-box__container{
|
2 |
/*!rtl:ignore*/margin-right:auto}.wp-block-web-stories-embed.alignright .components-resizable-box__container{
|
3 |
-
/*!rtl:ignore*/margin-left:auto}.wp-block-web-stories-embed.aligncenter .components-resizable-box__container{margin:auto}.wp-block-web-stories-embed .components-resizable-box__container.hide-resize-handle .components-resizable-box__handle{display:none}.wp-block-web-stories-embed .components-resizable-box__container.show-resize-handle .components-resizable-box__handle{display:block}.web-stories-embed-preview{height:inherit;position:relative;width:inherit}.web-stories-embed-preview-overlay{bottom:0;left:0;opacity:0;position:absolute;right:0;top:0}.web-stories-embed-poster-label{display:block!important}.web-stories-embed-size-control{margin-bottom:1em}.web-stories-embed-size-control__row{display:flex;justify-content:space-between}.web-stories-embed-size-control__height input,.web-stories-embed-size-control__width input{line-height:1.25}.web-stories-embed-size-control__width{margin-right:5px}.web-stories-embed-size-control__height{margin-left:5px}:root{--ws-font-size-title:18px;--ws-font-size-circle-title:14px;--ws-font-size-excerpt:16px;--ws-font-size-author-date:14px;--ws-aspect-ratio:176.2%;--ws-list-aspect-ratio:75%;--ws-overlay-text-color:#fff;--ws-overlay-text-lh:1.3;--ws-story-min-width:160px;--ws-story-max-width:285px;--ws-circle-size:96px;--ws-circle-border-color:#ccc}.web-stories-list{margin-bottom:24px;margin-top:24px}.web-stories-theme-header-section .web-stories-list{margin-bottom:0;margin-top:0}.web-stories-list.is-carousel .web-stories-list__inner-wrapper{margin:0 auto;max-width:max-content;position:relative}.web-stories-list__story{cursor:pointer;position:relative}.web-stories-list.is-view-type-carousel .web-stories-list__story,.web-stories-list.is-view-type-grid .web-stories-list__story{min-width:var(--ws-story-min-width)}.web-stories-list.is-style-default.is-view-type-carousel .web-stories-list__story,.web-stories-list.is-style-default.is-view-type-grid .web-stories-list__story{border-radius:8px;overflow:hidden}.web-stories-list__story-poster{position:relative}.web-stories-list__story-poster a{display:block;margin:0}.web-stories-list__story-poster .web-stories-list__story-poster-placeholder{box-sizing:border-box}.web-stories-list__story-poster .web-stories-list__story-poster-placeholder a,.web-stories-list__story-poster .web-stories-list__story-poster-placeholder span{clip:rect(1px,1px,1px,1px);word-wrap:normal!important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-break:normal}.web-stories-list__story.web-stories-list__story--amp .web-stories-list__story-poster a{pointer-events:none}.web-stories-list__story-poster img{box-sizing:border-box;height:100%;object-fit:cover;position:absolute;width:100%}.web-stories-list__story-poster:before{background:linear-gradient(180deg,#fff0,#000c);content:"";display:block;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.web-stories-list__story-poster:after{content:"";display:block;padding-bottom:var(--ws-aspect-ratio)}.web-stories-list__story-content-overlay{line-height:var(--ws-overlay-text-lh);padding:10px}html[amp] .web-stories-list__story-content-overlay{white-space:normal}.web-stories-list.is-view-type-carousel .web-stories-list__story-content-overlay,.web-stories-list.is-view-type-grid .web-stories-list__story-content-overlay{bottom:0;color:var(--ws-overlay-text-color);position:absolute;z-index:1}.web-stories-list .story-content-overlay__title{font-size:var(--ws-font-size-title);font-weight:700}.web-stories-list .story-content-overlay__author,.web-stories-list .story-content-overlay__date{font-size:var(--ws-font-size-author-date)}.web-stories-list .story-content-overlay__excerpt,.web-stories-list .story-content-overlay__title{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.web-stories-list .story-content-overlay__title:not(:last-child){margin-bottom:15px}.web-stories-list .story-content-overlay__excerpt{-webkit-line-clamp:3;font-size:var(--ws-font-size-excerpt);margin-bottom:8px}.web-stories-list.alignfull .web-stories-list__archive-link{right:10px}.web-stories-list.is-view-type-grid .web-stories-list__archive-link,.web-stories-list.is-view-type-list .web-stories-list__archive-link{display:block;flex-basis:100%;margin:32px auto 0;text-align:center}.web-stories-list.is-view-type-grid .web-stories-list__archive-link a,.web-stories-list.is-view-type-list .web-stories-list__archive-link a{border:1px solid;border-radius:100px;padding:7px 53px}.web-stories-lightbox-open{overflow-y:hidden}.web-stories-list__lightbox{align-items:center;background:#000;display:none;height:100%;justify-content:center;left:0;opacity:0;position:fixed;top:0;transform:translateY(-100vh);width:100%}.web-stories-list__lightbox-wrapper amp-lightbox,.web-stories-list__lightbox.show{z-index:999999999}.web-stories-list__lightbox.show{display:block;opacity:1;transform:translate(0)}.web-stories-list__lightbox amp-story-player{height:100%;width:100%}.story-lightbox__close-button{background:none!important;border:none;border-radius:0;cursor:pointer;display:inline-block;height:40px;left:0;position:absolute;top:8px;width:40px;z-index:1}.story-lightbox__close-button--stick{background-color:#fff;display:inline-block;height:20px;left:20px;position:absolute;top:15px;transform:rotate(45deg);width:3px}.story-lightbox__close-button--stick:first-child{transform:rotate(-45deg)}html:not([amp]) .web-stories-list .web-stories-list__lightbox amp-story-player a{position:absolute}@media (min-width:676px){.admin-bar .web-stories-list__lightbox{top:46px}.story-lightbox__close-button{left:10px}.story-lightbox__close-button--stick{height:25px;left:20px;top:5px}}@media (min-width:783px){.admin-bar .web-stories-list__lightbox{top:32px}}.web-stories-list.is-view-type-grid .web-stories-list__inner-wrapper{display:flex;flex-wrap:wrap}.web-stories-list.is-view-type-grid .web-stories-list__story{flex-basis:calc(100% - 8px);margin:4px}@media (min-width:415px){.web-stories-list.is-view-type-grid.columns-1 .web-stories-list__story{flex-basis:calc(100% - 8px)}.web-stories-list.is-view-type-grid.columns-2 .web-stories-list__story{flex-basis:calc(50% - 8px)}.web-stories-list.is-view-type-grid.columns-3 .web-stories-list__story{flex-basis:calc(33.33333% - 8px)}.web-stories-list.is-view-type-grid.columns-4 .web-stories-list__story{flex-basis:calc(25% - 8px)}.web-stories-list.is-view-type-grid.columns-5 .web-stories-list__story{flex-basis:calc(20% - 8px)}}.web-stories-theme-header-section .web-stories-list.is-view-type-circles{border-bottom:1px solid #ccc;padding:12px 0}.web-stories-list.is-view-type-circles .amp-carousel-slide{vertical-align:top}.web-stories-list.is-view-type-circles .glider-track{justify-content:center;margin:0 auto}.web-stories-list.is-view-type-circles .web-stories-list__story{display:inline-block;margin:0 5px;max-width:var(--ws-circle-size);min-width:var(--ws-circle-size);text-align:center}.web-stories-list.is-view-type-circles .web-stories-list__story-poster>img{border-radius:50%}.web-stories-list.is-view-type-circles .web-stories-list__story-poster .web-stories-list__story-poster-placeholder,.web-stories-list.is-view-type-circles .web-stories-list__story-poster>img,.web-stories-list.is-view-type-circles .web-stories-list__story-poster a>img{background-clip:content-box;border:2px solid var(--ws-circle-border-color);border-radius:50%;height:var(--ws-circle-size);left:0;max-width:none;padding:2px;position:absolute;top:0;width:var(--ws-circle-size)}.web-stories-list.is-view-type-circles .web-stories-list__story-poster a>img{border-radius:50%}.web-stories-list.is-view-type-circles .web-stories-list__story-poster:after{padding-bottom:var(--ws-circle-size)}.web-stories-list.is-view-type-circles .web-stories-list__story-poster:before{display:none}.web-stories-list.is-view-type-circles .web-stories-list__story-content-overlay{padding-bottom:0}.web-stories-list.is-view-type-circles .story-content-overlay__title{font-size:var(--ws-font-size-circle-title)}.web-stories-list.is-view-type-circles.has-title .glider-next,.web-stories-list.is-view-type-circles.has-title .glider-prev{top:35%}.web-stories-list.is-view-type-list .web-stories-list__story{margin-bottom:12px}.web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{bottom:0;color:var(--ws-overlay-text-color);position:absolute;z-index:1}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story{align-items:center;display:flex;flex-wrap:nowrap}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster{flex-basis:40%}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster:before{display:none}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster:after{padding-bottom:var(--ws-list-aspect-ratio)}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{color:inherit;flex-basis:60%;padding:10px 15px;position:relative}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-poster{order:2}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-content-overlay{order:1}.ws-legacy-widget-preview .web-stories-list.is-view-type-list.is-style-default .web-stories-list__story-poster{border-radius:8px;overflow:hidden}@media (min-width:676px){.web-stories-list.is-view-type-list .web-stories-list__story{align-items:center;display:flex;flex-wrap:nowrap}.web-stories-list.is-view-type-list .web-stories-list__story-poster{flex-basis:40%}.web-stories-list.is-view-type-list .web-stories-list__story-poster:before{display:none}.web-stories-list.is-view-type-list .web-stories-list__story-poster:after{padding-bottom:var(--ws-list-aspect-ratio)}.web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{color:inherit;flex-basis:60%;padding:10px 15px;position:relative}.web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-poster{order:2}.web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-content-overlay{order:1}.web-stories-list.is-view-type-list.is-style-default .web-stories-list__story-poster{border-radius:8px;overflow:hidden}.web-stories-list.is-view-type-carousel .web-stories-list__story{margin:0 5px;max-width:var(--ws-story-max-width)}}.ws-legacy-widget-preview .web-stories-list.is-view-type-carousel .web-stories-list__story{margin:0 5px;max-width:var(--ws-story-max-width)}.web-stories-list.is-carousel.has-archive-link{margin-top:59px}.web-stories-theme-header-section .web-stories-list.is-carousel.has-archive-link{margin-top:24px;padding-top:59px;position:relative}.web-stories-list.is-carousel .web-stories-list__archive-link{position:absolute;right:0;top:-35px}.web-stories-theme-header-section .web-stories-list.is-carousel .web-stories-list__archive-link{right:10px}.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{padding:10px;top:50%;transform:translateY(-50%)}.web-stories-list.is-carousel .glider-prev{transform:translateY(-50%) rotate(180deg) /*!rtl:translateY(-50%)*/}.web-stories-list.is-carousel .amp-carousel-button-next,.web-stories-list.is-carousel .amp-carousel-button-prev,.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSIxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMS41MzIgMS4zODMgNS41MSA1LjUxLTUuNTEgNS41MTEiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSIyIi8+PC9zdmc+)}.web-stories-list.is-carousel .amp-carousel-button-next,.web-stories-list.is-carousel .glider-next{right:0}.web-stories-list.is-carousel .amp-carousel-button-prev,.web-stories-list.is-carousel .glider-prev{left:0}.web-stories-list.is-carousel .amp-carousel-button-prev{transform:rotate(180deg) /*!rtl:none*/}html[dir=rtl] .web-stories-list.is-carousel .amp-carousel-button-next{transform:rotate(180deg)}.web-stories-list.is-carousel .amp-carousel-button,.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{background-color:#eaeaea;background-position:50%;background-repeat:no-repeat;background-size:30%;border-radius:50%;border-style:none;box-sizing:border-box;cursor:pointer;height:34px;pointer-events:all;width:34px;z-index:10}html[dir=rtl] .web-stories-list.is-carousel .glider-next{transform:translateY(-50%) rotate(180deg)}.glider-next.disabled,.glider-prev.disabled,.web-stories-list.is-carousel .amp-carousel-button.amp-disabled{opacity:0}html[dir=rtl] .glider-next.disabled,html[dir=rtl] .glider-prev.disabled{cursor:pointer;opacity:1}.web-stories-list.is-carousel .amp-carousel-button:not(.amp-disabled):hover,.web-stories-list.is-carousel .glider-next:not(.disabled):focus,.web-stories-list.is-carousel .glider-next:not(.disabled):hover,.web-stories-list.is-carousel .glider-prev:not(.disabled):focus,.web-stories-list.is-carousel .glider-prev:not(.disabled):hover,html[dir=rtl] .glider-next.disabled:hover,html[dir=rtl] .glider-prev.disabled:hover{filter:invert(1)}.web-stories-list.is-carousel .web-stories-list__carousel{scrollbar-width:none}.web-stories-list.is-carousel .glider-track::-webkit-scrollbar{display:none}.web-stories-list__story{cursor:default}.web-stories-list.is-view-type-carousel .web-stories-list__story{flex-shrink:0;margin-right:10px;min-width:235px}.web-stories-list .web-stories-list__story-poster img{height:100%}.web-stories-list .story-content-overlay__excerpt p{margin:0}.web-stories-list.is-carousel.has-archive-link{margin-top:0;padding-top:59px}.web-stories-list.is-carousel.has-archive-link .web-stories-list__archive-link{top:0}.is-pressed .web-stories-block__toolbar-icon.icon__circles-carousel circle{stroke:#000}.web-stories-block-configuration-panel .components-placeholder__instructions{margin:0}.web-stories-block-configuration-panel .web-stories-block-configuration-panel__options{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;list-style:none;margin:16px 0 0;padding:0;width:100%}.web-stories-block-configuration-panel .web-stories-block-configuration-panel__options>li{align-items:center;display:flex;flex-direction:column;margin:8px 20px 0 0}.web-stories-block-configuration-panel .web-stories-block-configuration-panel__options .components-button{height:70px;justify-content:center;margin:0 0 12px;padding:0;width:70px}.web-stories-block-configuration-panel .web-stories-block-configuration-panel__options .components-button svg{fill:none;color:var(--wp-admin-theme-color,#007cba)}.web-stories-block__loader-container{align-items:center;display:flex;height:100%;justify-content:center}.web-stories-block__loader-container .components-spinner{margin-top:0}.web-stories-story-picker-modal{height:100%;overflow:hidden;position:relative;width:100%}@media screen and (min-width:768px){.web-stories-story-picker-modal{height:calc(100% - 120px);width:calc(100% - 32px)}}.web-stories-story-picker-modal .components-modal__header{margin-bottom:0}.web-stories-story-picker-modal__content{height:calc(100% - 110px);margin:0;overflow-x:hidden;overflow-y:scroll;padding:20px 0;position:relative}.web-stories-story-picker-modal__footer{align-items:center;background:#fff;bottom:0;display:flex;justify-content:space-between;margin:0;padding:10px 0;position:fixed;width:calc(100% - 64px);z-index:2}.web-stories-story-picker-modal__footer .components-button{margin-left:8px}.web-stories-story-picker-modal__footer--left{min-width:1px}.web-stories-story-picker-modal__footer--right{display:flex;flex-direction:row}@media screen and (min-width:768px){.web-stories-story-picker-modal__footer--right{display:block}}.web-stories-story-picker-filter{display:flex;justify-content:flex-end;margin-top:-12px;padding:0;z-index:2}@media screen and (min-height:768px) and (min-width:768px){.web-stories-story-picker-filter{position:sticky;top:0}}.web-stories-story-picker-filter__search-container{background:#fff;display:block;position:relative;width:100%}@media screen and (min-width:768px){.web-stories-story-picker-filter__search-container{grid-column-gap:1%;display:grid;grid-template-columns:0 32% 32% 32%}}@media screen and (min-width:1200px){.web-stories-story-picker-filter__search-container{grid-template-columns:57% 15% 15% 10%}}.web-stories-story-picker-filter .web-stories-story-picker-filter__search-container .components-base-control .components-input-control__label{margin-bottom:7px}.web-stories-story-picker-filter .web-stories-story-picker-filter__search-container .components-base-control .components-select-control__input{height:34px}.web-stories-story-picker-filter__search-inner{grid-column:2}.web-stories-story-picker-filter__combobox .components-combobox-control__suggestions-container{position:relative}.web-stories-story-picker-filter__combobox .components-form-token-field__suggestions-list{background:#fff;border:1px solid #757575;position:absolute;top:28px}.web-stories-story-picker-filter__combobox .components-combobox-control__suggestions-container:focus-within .components-form-token-field__suggestions-list{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.web-stories-story-picker-filter__grid{grid-column-gap:24px;grid-row-gap:80px;display:grid;grid-auto-rows:minmax(min-content,max-content);grid-template-columns:repeat(auto-fill,minmax(100px,1fr));overflow:auto;padding:30px 20px 0;scroll-margin-top:30vh;width:100%}@media screen and (min-height:768px) and (min-width:768px){.web-stories-story-picker-filter__grid{height:calc(100% - 125px)}}@media screen and (min-width:768px){.web-stories-story-picker-filter__grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}}.web-stories-story-picker-filter__grid .droppable{position:relative}.web-stories-story-picker-filter__grid .droppable.web-stories-story-picker-show-drag-inserter:before{background:var(--wp-admin-theme-color,#007cba);bottom:0;content:"";left:-14px;position:absolute;top:0;width:4px}.web-stories-story-picker-filter__grid .droppable.web-stories-story-picker-show-drag-inserter.web-stories-story-picker-show-drag-inserter-right:before{left:auto;right:-14px}.web-stories-story-picker-filter__grid_item{display:flex;flex-direction:column;margin:0;width:100%}.web-stories-story-picker-filter__load_more{display:flex;flex-direction:row;justify-content:center}.web-stories-story-preview-card__poster{border:1px solid #adb1b3;border-radius:4px;position:relative}.web-stories-story-preview-card__poster img{border-radius:4px;height:auto;position:absolute;width:100%}.web-stories-story-preview-card__poster:before{background:linear-gradient(180deg,#fff0,#000c);content:"";display:block;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.web-stories-story-preview-card__poster:after{content:"";display:block;padding-bottom:133.28125%}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay{background:#0000;border:none;bottom:0;box-shadow:none;display:block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;width:100%;z-index:2}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay:focus{box-shadow:0 0 3px 3px #5b9dd9,0 0 2px 1px #1e8cbecc}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon{position:absolute;right:-7px;top:-7px;z-index:1}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon span,.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon svg{background-color:#ccc;box-shadow:0 0 0 1px #fff,0 0 0 2px #00000026;color:#000;cursor:pointer;padding:3px}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected:focus .item-selected-icon span{color:#fff}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon svg{stroke:#000;stroke-width:2px}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected:focus .item-selected-icon svg{stroke:#fff;background-color:#0073aa}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon span:before{left:0;position:absolute;top:0}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon .item-selected-icon-minus{display:none}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon:hover .item-selected-icon-minus{display:block}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon:hover .item-selected-icon-check{display:none}.web-stories-story-preview-card__label>div{margin-bottom:8px}.web-stories-story-preview-card__title{font-size:16px;font-weight:700;margin-top:8px}.web-stories-settings .components-toggle-control .components-base-control__help,.web-stories-settings .web-stories-settings-archive-link{margin-left:auto;width:80%}
|
1 |
.glider-contain{width:100%}.glider,.glider-contain{margin:0 auto;position:relative}.glider{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;overflow-y:hidden}.glider,.glider-track{transform:translateZ(0)}.glider-track{display:flex;margin:0;padding:0;width:100%;z-index:1}.glider.draggable{cursor:-webkit-grab;cursor:grab;user-select:none}.glider.draggable .glider-slide img{pointer-events:none;user-select:none}.glider.drag{cursor:-webkit-grabbing;cursor:grabbing}.glider-slide{align-content:center;justify-content:center;user-select:none;width:100%}.glider-slide img{max-width:100%}.glider::-webkit-scrollbar{height:0;opacity:0}.glider-next,.glider-prev{background:none;border:0;color:#666;cursor:pointer;font-size:40px;left:-23px;line-height:1;opacity:1;outline:none;padding:0;position:absolute;text-decoration:none;top:30%;transition:opacity .5s cubic-bezier(.17,.67,.83,.67),color .5s cubic-bezier(.17,.67,.83,.67);user-select:none;z-index:2}.glider-next:focus,.glider-next:hover,.glider-prev:focus,.glider-prev:hover{color:#a89cc8}.glider-next{left:auto;right:-23px}.glider-next.disabled,.glider-prev.disabled{color:#666;cursor:default;opacity:.25}.glider-slide{min-width:150px}.glider-hide{opacity:0}.glider-dots{display:flex;flex-wrap:wrap;justify-content:center;margin:0 auto}.glider-dot,.glider-dots{padding:0;user-select:none}.glider-dot{background:#ccc;border:0;border-radius:999px;color:#ccc;cursor:pointer;display:block;height:12px;margin:7px;outline:none;width:12px}.glider-dot.active,.glider-dot:focus,.glider-dot:hover{background:#a89cc8}@media(max-width:36em){.glider::-webkit-scrollbar{-webkit-appearance:none;height:3px;opacity:1;width:7px}.glider::-webkit-scrollbar-thumb{background-color:#9c9c9c40;border-radius:99px;box-shadow:0 0 1px #ffffff40;opacity:1}}.block-editor-block-list__block[data-type="web-stories/embed"] .wp-block{height:auto;overflow:hidden}.wp-block-web-stories-embed.is-loading{align-items:center;background:#f8f9f9;display:flex;flex-direction:column;justify-content:center;min-height:200px;padding:1em;text-align:center}.wp-block-web-stories-embed.is-loading p{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.wp-block-web-stories-embed .components-placeholder__learn-more{margin-top:1em}.wp-block-web-stories-embed .components-resizable-box__container amp-story-player{height:inherit;width:inherit}.wp-block-web-stories-embed.alignleft .components-resizable-box__container{
|
2 |
/*!rtl:ignore*/margin-right:auto}.wp-block-web-stories-embed.alignright .components-resizable-box__container{
|
3 |
+
/*!rtl:ignore*/margin-left:auto}.wp-block-web-stories-embed.aligncenter .components-resizable-box__container{margin:auto}.wp-block-web-stories-embed .components-resizable-box__container.hide-resize-handle .components-resizable-box__handle{display:none}.wp-block-web-stories-embed .components-resizable-box__container.show-resize-handle .components-resizable-box__handle{display:block}.web-stories-embed-preview{height:inherit;position:relative;width:inherit}.web-stories-embed-preview-overlay{bottom:0;left:0;opacity:0;position:absolute;right:0;top:0}.web-stories-embed-poster-label{display:block!important}.web-stories-embed-size-control{margin-bottom:1em}.web-stories-embed-size-control__row{display:flex;justify-content:space-between}.web-stories-embed-size-control__height input,.web-stories-embed-size-control__width input{line-height:1.25}.web-stories-embed-size-control__width{margin-right:5px}.web-stories-embed-size-control__height{margin-left:5px}:root{--ws-font-size-title:18px;--ws-font-size-circle-title:14px;--ws-font-size-excerpt:16px;--ws-font-size-author-date:14px;--ws-aspect-ratio:4/6;--ws-list-aspect-ratio:4/6;--ws-overlay-text-color:#fff;--ws-overlay-text-lh:1.3;--ws-story-min-width:160px;--ws-story-max-width:285px;--ws-circle-size:96px;--ws-circle-border-color:#ccc}.web-stories-list{margin-bottom:24px;margin-top:24px}.web-stories-theme-header-section .web-stories-list{margin-bottom:0;margin-top:0}.web-stories-list.is-carousel .web-stories-list__inner-wrapper{margin:0 auto;max-width:max-content;position:relative}.web-stories-list__story{cursor:pointer;position:relative}.web-stories-list.is-view-type-carousel .web-stories-list__story,.web-stories-list.is-view-type-grid .web-stories-list__story{min-width:var(--ws-story-min-width)}.web-stories-list.is-style-default.is-view-type-carousel .web-stories-list__story,.web-stories-list.is-style-default.is-view-type-grid .web-stories-list__story{border-radius:8px;overflow:hidden}.web-stories-list__story-poster{aspect-ratio:var(--ws-aspect-ratio);position:relative}.web-stories-list__story-poster a{aspect-ratio:var(--ws-aspect-ratio);display:block;margin:0}.web-stories-list__story-poster .web-stories-list__story-poster-placeholder{box-sizing:border-box}.web-stories-list__story-poster .web-stories-list__story-poster-placeholder a,.web-stories-list__story-poster .web-stories-list__story-poster-placeholder span{clip:rect(1px,1px,1px,1px);word-wrap:normal!important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-break:normal}.web-stories-list__story.web-stories-list__story--amp .web-stories-list__story-poster a{pointer-events:none}.web-stories-list__story-poster img{box-sizing:border-box;height:100%;object-fit:cover;position:absolute;width:100%}.web-stories-list__story-poster:after{background:linear-gradient(180deg,#fff0,#000c);content:"";display:block;height:100%;left:0;position:absolute;top:0;width:100%}.web-stories-list__story-content-overlay{line-height:var(--ws-overlay-text-lh);padding:10px}html[amp] .web-stories-list__story-content-overlay{white-space:normal}.web-stories-list.is-view-type-carousel .web-stories-list__story-content-overlay,.web-stories-list.is-view-type-grid .web-stories-list__story-content-overlay{bottom:0;color:var(--ws-overlay-text-color);position:absolute;z-index:1}.web-stories-list .story-content-overlay__title{font-size:var(--ws-font-size-title);font-weight:700}.web-stories-list .story-content-overlay__author,.web-stories-list .story-content-overlay__date{font-size:var(--ws-font-size-author-date)}.web-stories-list .story-content-overlay__excerpt,.web-stories-list .story-content-overlay__title{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.web-stories-list .story-content-overlay__title:not(:last-child){margin-bottom:15px}.web-stories-list .story-content-overlay__excerpt{-webkit-line-clamp:3;font-size:var(--ws-font-size-excerpt);margin-bottom:8px}.web-stories-list.alignfull .web-stories-list__archive-link{right:10px}.web-stories-list.is-view-type-grid .web-stories-list__archive-link,.web-stories-list.is-view-type-list .web-stories-list__archive-link{display:block;flex-basis:100%;margin:32px auto 0;text-align:center}.web-stories-list.is-view-type-grid .web-stories-list__archive-link a,.web-stories-list.is-view-type-list .web-stories-list__archive-link a{border:1px solid;border-radius:100px;padding:7px 53px}.web-stories-lightbox-open{overflow-y:hidden}.web-stories-list__lightbox{align-items:center;background:#000;display:none;height:100%;justify-content:center;left:0;opacity:0;position:fixed;top:0;transform:translateY(-100vh);width:100%}.web-stories-list__lightbox-wrapper amp-lightbox,.web-stories-list__lightbox.show{z-index:999999999}.web-stories-list__lightbox.show{display:block;opacity:1;transform:translate(0)}.web-stories-list__lightbox amp-story-player{height:100%;width:100%}.story-lightbox__close-button{background:none!important;border:none;border-radius:0;cursor:pointer;display:inline-block;height:40px;left:0;position:absolute;top:8px;width:40px;z-index:1}.story-lightbox__close-button--stick{background-color:#fff;display:inline-block;height:20px;left:20px;position:absolute;top:15px;transform:rotate(45deg);width:3px}.story-lightbox__close-button--stick:first-child{transform:rotate(-45deg)}html:not([amp]) .web-stories-list .web-stories-list__lightbox amp-story-player a{position:absolute}@media (min-width:676px){.admin-bar .web-stories-list__lightbox{top:46px}.story-lightbox__close-button{left:10px}.story-lightbox__close-button--stick{height:25px;left:20px;top:5px}}@media (min-width:783px){.admin-bar .web-stories-list__lightbox{top:32px}}.web-stories-list.is-view-type-grid .web-stories-list__inner-wrapper{display:flex;flex-wrap:wrap}.web-stories-list.is-view-type-grid .web-stories-list__story{flex-basis:calc(100% - 8px);margin:4px}@media (min-width:415px){.web-stories-list.is-view-type-grid.columns-1 .web-stories-list__story{flex-basis:calc(100% - 8px)}.web-stories-list.is-view-type-grid.columns-2 .web-stories-list__story{flex-basis:calc(50% - 8px)}.web-stories-list.is-view-type-grid.columns-3 .web-stories-list__story{flex-basis:calc(33.33333% - 8px)}.web-stories-list.is-view-type-grid.columns-4 .web-stories-list__story{flex-basis:calc(25% - 8px)}.web-stories-list.is-view-type-grid.columns-5 .web-stories-list__story{flex-basis:calc(20% - 8px)}}.web-stories-theme-header-section .web-stories-list.is-view-type-circles{border-bottom:1px solid #ccc;padding:12px 0}.web-stories-list.is-view-type-circles .amp-carousel-slide{vertical-align:top}.web-stories-list.is-view-type-circles .glider-track{justify-content:center;margin:0 auto}.web-stories-list.is-view-type-circles .web-stories-list__story{display:inline-block;margin:0 5px;max-width:var(--ws-circle-size);min-width:var(--ws-circle-size);text-align:center}.web-stories-list.is-view-type-circles .web-stories-list__story-poster,.web-stories-list.is-view-type-circles .web-stories-list__story-poster a{aspect-ratio:1}.web-stories-list.is-view-type-circles .web-stories-list__story-poster>img{border-radius:50%}.web-stories-list.is-view-type-circles .web-stories-list__story-poster .web-stories-list__story-poster-placeholder,.web-stories-list.is-view-type-circles .web-stories-list__story-poster a>img,.web-stories-list.is-view-type-circles .web-stories-list__story-poster>img{background-clip:content-box;border:2px solid var(--ws-circle-border-color);border-radius:50%;height:var(--ws-circle-size);left:0;max-width:none;padding:2px;position:absolute;top:0;width:var(--ws-circle-size)}.web-stories-list.is-view-type-circles .web-stories-list__story-poster a>img{border-radius:50%}.web-stories-list.is-view-type-circles .web-stories-list__story-poster:after{display:none}.web-stories-list.is-view-type-circles .web-stories-list__story-poster-placeholder:after{background:linear-gradient(180deg,#fff0,#000c);border-radius:50%;content:"";display:block;height:100%;left:0;position:absolute;top:0;width:100%}.web-stories-list.is-view-type-circles .web-stories-list__story-content-overlay{padding-bottom:0}.web-stories-list.is-view-type-circles .story-content-overlay__title{font-size:var(--ws-font-size-circle-title)}.web-stories-list.is-view-type-circles.has-title .glider-next,.web-stories-list.is-view-type-circles.has-title .glider-prev{top:35%}.web-stories-list.is-view-type-list .web-stories-list__story{margin-bottom:12px}.web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{bottom:0;color:var(--ws-overlay-text-color);position:absolute;z-index:1}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story{align-items:center;display:flex;flex-wrap:nowrap}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster{aspect-ratio:var(--ws-list-aspect-ratio);flex-basis:40%}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster:after{display:none}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{color:inherit;flex-basis:60%;padding:10px 15px;position:relative}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-poster{order:2}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-content-overlay{order:1}.ws-legacy-widget-preview .web-stories-list.is-view-type-list.is-style-default .web-stories-list__story-poster{border-radius:8px;overflow:hidden}@media (min-width:676px){.web-stories-list.is-view-type-list .web-stories-list__story{align-items:center;display:flex;flex-wrap:nowrap}.web-stories-list.is-view-type-list .web-stories-list__story-poster{aspect-ratio:var(--ws-list-aspect-ratio);flex-basis:40%}.web-stories-list.is-view-type-list .web-stories-list__story-poster:after{display:none}.web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{color:inherit;flex-basis:60%;padding:10px 15px;position:relative}.web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-poster{order:2}.web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-content-overlay{order:1}.web-stories-list.is-view-type-list.is-style-default .web-stories-list__story-poster{border-radius:8px;overflow:hidden}.web-stories-list.is-view-type-carousel .web-stories-list__story{margin:0 5px;max-width:var(--ws-story-max-width)}}.ws-legacy-widget-preview .web-stories-list.is-view-type-carousel .web-stories-list__story{margin:0 5px;max-width:var(--ws-story-max-width)}.web-stories-list.is-carousel.has-archive-link{margin-top:59px}.web-stories-theme-header-section .web-stories-list.is-carousel.has-archive-link{margin-top:24px;padding-top:59px;position:relative}.web-stories-list.is-carousel .web-stories-list__archive-link{position:absolute;right:0;top:-35px}.web-stories-theme-header-section .web-stories-list.is-carousel .web-stories-list__archive-link{right:10px}.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{padding:10px;top:50%;transform:translateY(-50%)}.web-stories-list.is-carousel .glider-prev{transform:translateY(-50%) rotate(180deg) /*!rtl:translateY(-50%)*/}.web-stories-list.is-carousel .amp-carousel-button-next,.web-stories-list.is-carousel .amp-carousel-button-prev,.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSIxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMS41MzIgMS4zODMgNS41MSA1LjUxLTUuNTEgNS41MTEiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSIyIi8+PC9zdmc+)}.web-stories-list.is-carousel .amp-carousel-button-next,.web-stories-list.is-carousel .glider-next{right:0}.web-stories-list.is-carousel .amp-carousel-button-prev,.web-stories-list.is-carousel .glider-prev{left:0}.web-stories-list.is-carousel .amp-carousel-button-prev{transform:rotate(180deg) /*!rtl:none*/}html[dir=rtl] .web-stories-list.is-carousel .amp-carousel-button-next{transform:rotate(180deg)}.web-stories-list.is-carousel .amp-carousel-button,.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{background-color:#eaeaea;background-position:50%;background-repeat:no-repeat;background-size:30%;border-radius:50%;border-style:none;box-sizing:border-box;cursor:pointer;height:34px;pointer-events:all;width:34px;z-index:10}html[dir=rtl] .web-stories-list.is-carousel .glider-next{transform:translateY(-50%) rotate(180deg)}.glider-next.disabled,.glider-prev.disabled,.web-stories-list.is-carousel .amp-carousel-button.amp-disabled{opacity:0}html[dir=rtl] .glider-next.disabled,html[dir=rtl] .glider-prev.disabled{cursor:pointer;opacity:1}.web-stories-list.is-carousel .amp-carousel-button:not(.amp-disabled):hover,.web-stories-list.is-carousel .glider-next:not(.disabled):focus,.web-stories-list.is-carousel .glider-next:not(.disabled):hover,.web-stories-list.is-carousel .glider-prev:not(.disabled):focus,.web-stories-list.is-carousel .glider-prev:not(.disabled):hover,html[dir=rtl] .glider-next.disabled:hover,html[dir=rtl] .glider-prev.disabled:hover{filter:invert(1)}.web-stories-list.is-carousel .web-stories-list__carousel{scrollbar-width:none}.web-stories-list.is-carousel .glider-track::-webkit-scrollbar{display:none}.web-stories-list__story{cursor:default}.web-stories-list.is-view-type-carousel .web-stories-list__story{flex-shrink:0;margin-right:10px;min-width:235px}.web-stories-list .web-stories-list__story-poster img{height:100%}.web-stories-list .story-content-overlay__excerpt p{margin:0}.web-stories-list.is-carousel.has-archive-link{margin-top:0;padding-top:59px}.web-stories-list.is-carousel.has-archive-link .web-stories-list__archive-link{top:0}.is-pressed .web-stories-block__toolbar-icon.icon__circles-carousel circle{stroke:#000}.web-stories-block-configuration-panel .components-placeholder__instructions{margin:0}.web-stories-block-configuration-panel .web-stories-block-configuration-panel__options{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;list-style:none;margin:16px 0 0;padding:0;width:100%}.web-stories-block-configuration-panel .web-stories-block-configuration-panel__options>li{align-items:center;display:flex;flex-direction:column;margin:8px 20px 0 0}.web-stories-block-configuration-panel .web-stories-block-configuration-panel__options .components-button{height:70px;justify-content:center;margin:0 0 12px;padding:0;width:70px}.web-stories-block-configuration-panel .web-stories-block-configuration-panel__options .components-button svg{fill:none;color:var(--wp-admin-theme-color,#007cba)}.web-stories-block__loader-container{align-items:center;display:flex;height:100%;justify-content:center}.web-stories-block__loader-container .components-spinner{margin-top:0}.web-stories-story-picker-modal{height:100%;overflow:hidden;position:relative;width:100%}@media screen and (min-width:768px){.web-stories-story-picker-modal{height:calc(100% - 120px);width:calc(100% - 32px)}}.web-stories-story-picker-modal .components-modal__header{margin-bottom:0}.web-stories-story-picker-modal__content{height:calc(100% - 110px);margin:0;overflow-x:hidden;overflow-y:scroll;padding:20px 0;position:relative}.web-stories-story-picker-modal__footer{align-items:center;background:#fff;bottom:0;display:flex;justify-content:space-between;margin:0;padding:10px 0;position:fixed;width:calc(100% - 64px);z-index:2}.web-stories-story-picker-modal__footer .components-button{margin-left:8px}.web-stories-story-picker-modal__footer--left{min-width:1px}.web-stories-story-picker-modal__footer--right{display:flex;flex-direction:row}@media screen and (min-width:768px){.web-stories-story-picker-modal__footer--right{display:block}}.web-stories-story-picker-filter{display:flex;justify-content:flex-end;margin-top:-12px;padding:0;z-index:2}@media screen and (min-height:768px) and (min-width:768px){.web-stories-story-picker-filter{position:sticky;top:0}}.web-stories-story-picker-filter__search-container{background:#fff;display:block;position:relative;width:100%}@media screen and (min-width:768px){.web-stories-story-picker-filter__search-container{grid-column-gap:1%;display:grid;grid-template-columns:0 32% 32% 32%}}@media screen and (min-width:1200px){.web-stories-story-picker-filter__search-container{grid-template-columns:57% 15% 15% 10%}}.web-stories-story-picker-filter .web-stories-story-picker-filter__search-container .components-base-control .components-input-control__label{margin-bottom:7px}.web-stories-story-picker-filter .web-stories-story-picker-filter__search-container .components-base-control .components-select-control__input{height:34px}.web-stories-story-picker-filter__search-inner{grid-column:2}.web-stories-story-picker-filter__combobox .components-combobox-control__suggestions-container{position:relative}.web-stories-story-picker-filter__combobox .components-form-token-field__suggestions-list{background:#fff;border:1px solid #757575;position:absolute;top:28px}.web-stories-story-picker-filter__combobox .components-combobox-control__suggestions-container:focus-within .components-form-token-field__suggestions-list{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.web-stories-story-picker-filter__grid{grid-column-gap:24px;grid-row-gap:80px;display:grid;grid-auto-rows:minmax(min-content,max-content);grid-template-columns:repeat(auto-fill,minmax(100px,1fr));overflow:auto;padding:30px 20px 0;scroll-margin-top:30vh;width:100%}@media screen and (min-height:768px) and (min-width:768px){.web-stories-story-picker-filter__grid{height:calc(100% - 125px)}}@media screen and (min-width:768px){.web-stories-story-picker-filter__grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}}.web-stories-story-picker-filter__grid .droppable{position:relative}.web-stories-story-picker-filter__grid .droppable.web-stories-story-picker-show-drag-inserter:before{background:var(--wp-admin-theme-color,#007cba);bottom:0;content:"";left:-14px;position:absolute;top:0;width:4px}.web-stories-story-picker-filter__grid .droppable.web-stories-story-picker-show-drag-inserter.web-stories-story-picker-show-drag-inserter-right:before{left:auto;right:-14px}.web-stories-story-picker-filter__grid_item{display:flex;flex-direction:column;margin:0;width:100%}.web-stories-story-picker-filter__load_more{display:flex;flex-direction:row;justify-content:center}.web-stories-story-preview-card__poster{border:1px solid #adb1b3;border-radius:4px;position:relative}.web-stories-story-preview-card__poster img{border-radius:4px;height:auto;position:absolute;width:100%}.web-stories-story-preview-card__poster:before{background:linear-gradient(180deg,#fff0,#000c);content:"";display:block;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.web-stories-story-preview-card__poster:after{content:"";display:block;padding-bottom:133.28125%}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay{background:#0000;border:none;bottom:0;box-shadow:none;display:block;height:100%;left:0;margin:0;padding:0;position:absolute;right:0;top:0;width:100%;z-index:2}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay:focus{box-shadow:0 0 3px 3px #5b9dd9,0 0 2px 1px #1e8cbecc}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon{position:absolute;right:-7px;top:-7px;z-index:1}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon span,.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon svg{background-color:#ccc;box-shadow:0 0 0 1px #fff,0 0 0 2px #00000026;color:#000;cursor:pointer;padding:3px}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected:focus .item-selected-icon span{color:#fff}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon svg{stroke:#000;stroke-width:2px}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected:focus .item-selected-icon svg{stroke:#fff;background-color:#0073aa}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon span:before{left:0;position:absolute;top:0}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon .item-selected-icon-minus{display:none}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon:hover .item-selected-icon-minus{display:block}.web-stories-story-preview-card__poster .web-stories-story-preview-card__overlay.item-selected .item-selected-icon:hover .item-selected-icon-check{display:none}.web-stories-story-preview-card__label>div{margin-bottom:8px}.web-stories-story-preview-card__title{font-size:16px;font-weight:700;margin-top:8px}.web-stories-settings .components-toggle-control .components-base-control__help,.web-stories-settings .web-stories-settings-archive-link{margin-left:auto;width:80%}
|
assets/css/web-stories-list-styles-rtl.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
:root{--ws-font-size-title:18px;--ws-font-size-circle-title:14px;--ws-font-size-excerpt:16px;--ws-font-size-author-date:14px;--ws-aspect-ratio:176.2%;--ws-list-aspect-ratio:75%;--ws-overlay-text-color:#fff;--ws-overlay-text-lh:1.3;--ws-story-min-width:160px;--ws-story-max-width:285px;--ws-circle-size:96px;--ws-circle-border-color:#ccc}.web-stories-list{margin-bottom:24px;margin-top:24px}.web-stories-theme-header-section .web-stories-list{margin-bottom:0;margin-top:0}.web-stories-list.is-carousel .web-stories-list__inner-wrapper{margin:0 auto;max-width:max-content;position:relative}.web-stories-list__story{cursor:pointer;position:relative}.web-stories-list.is-view-type-carousel .web-stories-list__story,.web-stories-list.is-view-type-grid .web-stories-list__story{min-width:var(--ws-story-min-width)}.web-stories-list.is-style-default.is-view-type-carousel .web-stories-list__story,.web-stories-list.is-style-default.is-view-type-grid .web-stories-list__story{border-radius:8px;overflow:hidden}.web-stories-list__story-poster{position:relative}.web-stories-list__story-poster a{display:block;margin:0}.web-stories-list__story-poster .web-stories-list__story-poster-placeholder{box-sizing:border-box}.web-stories-list__story-poster .web-stories-list__story-poster-placeholder a,.web-stories-list__story-poster .web-stories-list__story-poster-placeholder span{clip:rect(1px,1px,1px,1px);word-wrap:normal!important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-break:normal}.web-stories-list__story.web-stories-list__story--amp .web-stories-list__story-poster a{pointer-events:none}.web-stories-list__story-poster img{box-sizing:border-box;height:100%;object-fit:cover;position:absolute;width:100%}.web-stories-list__story-poster:before{background:linear-gradient(-180deg,#fff0,#000c);content:"";display:block;height:100%;right:0;position:absolute;top:0;width:100%;z-index:1}.web-stories-list__story-poster:after{content:"";display:block;padding-bottom:var(--ws-aspect-ratio)}.web-stories-list__story-content-overlay{line-height:var(--ws-overlay-text-lh);padding:10px}html[amp] .web-stories-list__story-content-overlay{white-space:normal}.web-stories-list.is-view-type-carousel .web-stories-list__story-content-overlay,.web-stories-list.is-view-type-grid .web-stories-list__story-content-overlay{bottom:0;color:var(--ws-overlay-text-color);position:absolute;z-index:1}.web-stories-list .story-content-overlay__title{font-size:var(--ws-font-size-title);font-weight:700}.web-stories-list .story-content-overlay__author,.web-stories-list .story-content-overlay__date{font-size:var(--ws-font-size-author-date)}.web-stories-list .story-content-overlay__excerpt,.web-stories-list .story-content-overlay__title{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.web-stories-list .story-content-overlay__title:not(:last-child){margin-bottom:15px}.web-stories-list .story-content-overlay__excerpt{-webkit-line-clamp:3;font-size:var(--ws-font-size-excerpt);margin-bottom:8px}.web-stories-list.alignfull .web-stories-list__archive-link{left:10px}.web-stories-list.is-view-type-grid .web-stories-list__archive-link,.web-stories-list.is-view-type-list .web-stories-list__archive-link{display:block;flex-basis:100%;margin:32px auto 0;text-align:center}.web-stories-list.is-view-type-grid .web-stories-list__archive-link a,.web-stories-list.is-view-type-list .web-stories-list__archive-link a{border:1px solid;border-radius:100px;padding:7px 53px}.web-stories-lightbox-open{overflow-y:hidden}.web-stories-list__lightbox{align-items:center;background:#000;display:none;height:100%;justify-content:center;right:0;opacity:0;position:fixed;top:0;transform:translateY(-100vh);width:100%}.web-stories-list__lightbox-wrapper amp-lightbox,.web-stories-list__lightbox.show{z-index:999999999}.web-stories-list__lightbox.show{display:block;opacity:1;transform:translate(0)}.web-stories-list__lightbox amp-story-player{height:100%;width:100%}.story-lightbox__close-button{background:none!important;border:none;border-radius:0;cursor:pointer;display:inline-block;height:40px;right:0;position:absolute;top:8px;width:40px;z-index:1}.story-lightbox__close-button--stick{background-color:#fff;display:inline-block;height:20px;right:20px;position:absolute;top:15px;transform:rotate(-45deg);width:3px}.story-lightbox__close-button--stick:first-child{transform:rotate(45deg)}html:not([amp]) .web-stories-list .web-stories-list__lightbox amp-story-player a{position:absolute}@media (min-width:676px){.admin-bar .web-stories-list__lightbox{top:46px}.story-lightbox__close-button{right:10px}.story-lightbox__close-button--stick{height:25px;right:20px;top:5px}}@media (min-width:783px){.admin-bar .web-stories-list__lightbox{top:32px}}.web-stories-list.is-view-type-grid .web-stories-list__inner-wrapper{display:flex;flex-wrap:wrap}.web-stories-list.is-view-type-grid .web-stories-list__story{flex-basis:calc(100% - 8px);margin:4px}@media (min-width:415px){.web-stories-list.is-view-type-grid.columns-1 .web-stories-list__story{flex-basis:calc(100% - 8px)}.web-stories-list.is-view-type-grid.columns-2 .web-stories-list__story{flex-basis:calc(50% - 8px)}.web-stories-list.is-view-type-grid.columns-3 .web-stories-list__story{flex-basis:calc(33.33333% - 8px)}.web-stories-list.is-view-type-grid.columns-4 .web-stories-list__story{flex-basis:calc(25% - 8px)}.web-stories-list.is-view-type-grid.columns-5 .web-stories-list__story{flex-basis:calc(20% - 8px)}}.web-stories-theme-header-section .web-stories-list.is-view-type-circles{border-bottom:1px solid #ccc;padding:12px 0}.web-stories-list.is-view-type-circles .amp-carousel-slide{vertical-align:top}.web-stories-list.is-view-type-circles .glider-track{justify-content:center;margin:0 auto}.web-stories-list.is-view-type-circles .web-stories-list__story{display:inline-block;margin:0 5px;max-width:var(--ws-circle-size);min-width:var(--ws-circle-size);text-align:center}.web-stories-list.is-view-type-circles .web-stories-list__story-poster>img{border-radius:50%}.web-stories-list.is-view-type-circles .web-stories-list__story-poster .web-stories-list__story-poster-placeholder,.web-stories-list.is-view-type-circles .web-stories-list__story-poster>img,.web-stories-list.is-view-type-circles .web-stories-list__story-poster a>img{background-clip:content-box;border:2px solid var(--ws-circle-border-color);border-radius:50%;height:var(--ws-circle-size);right:0;max-width:none;padding:2px;position:absolute;top:0;width:var(--ws-circle-size)}.web-stories-list.is-view-type-circles .web-stories-list__story-poster a>img{border-radius:50%}.web-stories-list.is-view-type-circles .web-stories-list__story-poster:after{padding-bottom:var(--ws-circle-size)}.web-stories-list.is-view-type-circles .web-stories-list__story-poster:before{display:none}.web-stories-list.is-view-type-circles .web-stories-list__story-content-overlay{padding-bottom:0}.web-stories-list.is-view-type-circles .story-content-overlay__title{font-size:var(--ws-font-size-circle-title)}.web-stories-list.is-view-type-circles.has-title .glider-next,.web-stories-list.is-view-type-circles.has-title .glider-prev{top:35%}.web-stories-list.is-view-type-list .web-stories-list__story{margin-bottom:12px}.web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{bottom:0;color:var(--ws-overlay-text-color);position:absolute;z-index:1}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story{align-items:center;display:flex;flex-wrap:nowrap}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster{flex-basis:40%}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster:before{display:none}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster:after{padding-bottom:var(--ws-list-aspect-ratio)}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{color:inherit;flex-basis:60%;padding:10px 15px;position:relative}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-poster{order:2}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-content-overlay{order:1}.ws-legacy-widget-preview .web-stories-list.is-view-type-list.is-style-default .web-stories-list__story-poster{border-radius:8px;overflow:hidden}@media (min-width:676px){.web-stories-list.is-view-type-list .web-stories-list__story{align-items:center;display:flex;flex-wrap:nowrap}.web-stories-list.is-view-type-list .web-stories-list__story-poster{flex-basis:40%}.web-stories-list.is-view-type-list .web-stories-list__story-poster:before{display:none}.web-stories-list.is-view-type-list .web-stories-list__story-poster:after{padding-bottom:var(--ws-list-aspect-ratio)}.web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{color:inherit;flex-basis:60%;padding:10px 15px;position:relative}.web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-poster{order:2}.web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-content-overlay{order:1}.web-stories-list.is-view-type-list.is-style-default .web-stories-list__story-poster{border-radius:8px;overflow:hidden}.web-stories-list.is-view-type-carousel .web-stories-list__story{margin:0 5px;max-width:var(--ws-story-max-width)}}.ws-legacy-widget-preview .web-stories-list.is-view-type-carousel .web-stories-list__story{margin:0 5px;max-width:var(--ws-story-max-width)}.web-stories-list.is-carousel.has-archive-link{margin-top:59px}.web-stories-theme-header-section .web-stories-list.is-carousel.has-archive-link{margin-top:24px;padding-top:59px;position:relative}.web-stories-list.is-carousel .web-stories-list__archive-link{position:absolute;left:0;top:-35px}.web-stories-theme-header-section .web-stories-list.is-carousel .web-stories-list__archive-link{left:10px}.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{padding:10px;top:50%;transform:translateY(-50%)}.web-stories-list.is-carousel .glider-prev{transform:translateY(-50%) rotate(-180deg)}.web-stories-list.is-carousel .amp-carousel-button-next,.web-stories-list.is-carousel .amp-carousel-button-prev,.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSIxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMS41MzIgMS4zODMgNS41MSA1LjUxLTUuNTEgNS41MTEiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSIyIi8+PC9zdmc+)}.web-stories-list.is-carousel .amp-carousel-button-next,.web-stories-list.is-carousel .glider-next{left:0}.web-stories-list.is-carousel .amp-carousel-button-prev,.web-stories-list.is-carousel .glider-prev{right:0}.web-stories-list.is-carousel .amp-carousel-button-prev{transform:rotate(-180deg)}html[dir=rtl] .web-stories-list.is-carousel .amp-carousel-button-next{transform:rotate(-180deg)}.web-stories-list.is-carousel .amp-carousel-button,.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{background-color:#eaeaea;background-position:50%;background-repeat:no-repeat;background-size:30%;border-radius:50%;border-style:none;box-sizing:border-box;cursor:pointer;height:34px;pointer-events:all;width:34px;z-index:10}html[dir=rtl] .web-stories-list.is-carousel .glider-next{transform:translateY(-50%) rotate(-180deg)}.glider-next.disabled,.glider-prev.disabled,.web-stories-list.is-carousel .amp-carousel-button.amp-disabled{opacity:0}html[dir=rtl] .glider-next.disabled,html[dir=rtl] .glider-prev.disabled{cursor:pointer;opacity:1}.web-stories-list.is-carousel .amp-carousel-button:not(.amp-disabled):hover,.web-stories-list.is-carousel .glider-next:not(.disabled):focus,.web-stories-list.is-carousel .glider-next:not(.disabled):hover,.web-stories-list.is-carousel .glider-prev:not(.disabled):focus,.web-stories-list.is-carousel .glider-prev:not(.disabled):hover,html[dir=rtl] .glider-next.disabled:hover,html[dir=rtl] .glider-prev.disabled:hover{filter:invert(1)}.web-stories-list.is-carousel .web-stories-list__carousel{scrollbar-width:none}.web-stories-list.is-carousel .glider-track::-webkit-scrollbar{display:none}
|
1 |
+
:root{--ws-font-size-title:18px;--ws-font-size-circle-title:14px;--ws-font-size-excerpt:16px;--ws-font-size-author-date:14px;--ws-aspect-ratio:4/6;--ws-list-aspect-ratio:4/6;--ws-overlay-text-color:#fff;--ws-overlay-text-lh:1.3;--ws-story-min-width:160px;--ws-story-max-width:285px;--ws-circle-size:96px;--ws-circle-border-color:#ccc}.web-stories-list{margin-bottom:24px;margin-top:24px}.web-stories-theme-header-section .web-stories-list{margin-bottom:0;margin-top:0}.web-stories-list.is-carousel .web-stories-list__inner-wrapper{margin:0 auto;max-width:max-content;position:relative}.web-stories-list__story{cursor:pointer;position:relative}.web-stories-list.is-view-type-carousel .web-stories-list__story,.web-stories-list.is-view-type-grid .web-stories-list__story{min-width:var(--ws-story-min-width)}.web-stories-list.is-style-default.is-view-type-carousel .web-stories-list__story,.web-stories-list.is-style-default.is-view-type-grid .web-stories-list__story{border-radius:8px;overflow:hidden}.web-stories-list__story-poster{aspect-ratio:var(--ws-aspect-ratio);position:relative}.web-stories-list__story-poster a{aspect-ratio:var(--ws-aspect-ratio);display:block;margin:0}.web-stories-list__story-poster .web-stories-list__story-poster-placeholder{box-sizing:border-box}.web-stories-list__story-poster .web-stories-list__story-poster-placeholder a,.web-stories-list__story-poster .web-stories-list__story-poster-placeholder span{clip:rect(1px,1px,1px,1px);word-wrap:normal!important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-break:normal}.web-stories-list__story.web-stories-list__story--amp .web-stories-list__story-poster a{pointer-events:none}.web-stories-list__story-poster img{box-sizing:border-box;height:100%;object-fit:cover;position:absolute;width:100%}.web-stories-list__story-poster:after{background:linear-gradient(-180deg,#fff0,#000c);content:"";display:block;height:100%;right:0;position:absolute;top:0;width:100%}.web-stories-list__story-content-overlay{line-height:var(--ws-overlay-text-lh);padding:10px}html[amp] .web-stories-list__story-content-overlay{white-space:normal}.web-stories-list.is-view-type-carousel .web-stories-list__story-content-overlay,.web-stories-list.is-view-type-grid .web-stories-list__story-content-overlay{bottom:0;color:var(--ws-overlay-text-color);position:absolute;z-index:1}.web-stories-list .story-content-overlay__title{font-size:var(--ws-font-size-title);font-weight:700}.web-stories-list .story-content-overlay__author,.web-stories-list .story-content-overlay__date{font-size:var(--ws-font-size-author-date)}.web-stories-list .story-content-overlay__excerpt,.web-stories-list .story-content-overlay__title{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.web-stories-list .story-content-overlay__title:not(:last-child){margin-bottom:15px}.web-stories-list .story-content-overlay__excerpt{-webkit-line-clamp:3;font-size:var(--ws-font-size-excerpt);margin-bottom:8px}.web-stories-list.alignfull .web-stories-list__archive-link{left:10px}.web-stories-list.is-view-type-grid .web-stories-list__archive-link,.web-stories-list.is-view-type-list .web-stories-list__archive-link{display:block;flex-basis:100%;margin:32px auto 0;text-align:center}.web-stories-list.is-view-type-grid .web-stories-list__archive-link a,.web-stories-list.is-view-type-list .web-stories-list__archive-link a{border:1px solid;border-radius:100px;padding:7px 53px}.web-stories-lightbox-open{overflow-y:hidden}.web-stories-list__lightbox{align-items:center;background:#000;display:none;height:100%;justify-content:center;right:0;opacity:0;position:fixed;top:0;transform:translateY(-100vh);width:100%}.web-stories-list__lightbox-wrapper amp-lightbox,.web-stories-list__lightbox.show{z-index:999999999}.web-stories-list__lightbox.show{display:block;opacity:1;transform:translate(0)}.web-stories-list__lightbox amp-story-player{height:100%;width:100%}.story-lightbox__close-button{background:none!important;border:none;border-radius:0;cursor:pointer;display:inline-block;height:40px;right:0;position:absolute;top:8px;width:40px;z-index:1}.story-lightbox__close-button--stick{background-color:#fff;display:inline-block;height:20px;right:20px;position:absolute;top:15px;transform:rotate(-45deg);width:3px}.story-lightbox__close-button--stick:first-child{transform:rotate(45deg)}html:not([amp]) .web-stories-list .web-stories-list__lightbox amp-story-player a{position:absolute}@media (min-width:676px){.admin-bar .web-stories-list__lightbox{top:46px}.story-lightbox__close-button{right:10px}.story-lightbox__close-button--stick{height:25px;right:20px;top:5px}}@media (min-width:783px){.admin-bar .web-stories-list__lightbox{top:32px}}.web-stories-list.is-view-type-grid .web-stories-list__inner-wrapper{display:flex;flex-wrap:wrap}.web-stories-list.is-view-type-grid .web-stories-list__story{flex-basis:calc(100% - 8px);margin:4px}@media (min-width:415px){.web-stories-list.is-view-type-grid.columns-1 .web-stories-list__story{flex-basis:calc(100% - 8px)}.web-stories-list.is-view-type-grid.columns-2 .web-stories-list__story{flex-basis:calc(50% - 8px)}.web-stories-list.is-view-type-grid.columns-3 .web-stories-list__story{flex-basis:calc(33.33333% - 8px)}.web-stories-list.is-view-type-grid.columns-4 .web-stories-list__story{flex-basis:calc(25% - 8px)}.web-stories-list.is-view-type-grid.columns-5 .web-stories-list__story{flex-basis:calc(20% - 8px)}}.web-stories-theme-header-section .web-stories-list.is-view-type-circles{border-bottom:1px solid #ccc;padding:12px 0}.web-stories-list.is-view-type-circles .amp-carousel-slide{vertical-align:top}.web-stories-list.is-view-type-circles .glider-track{justify-content:center;margin:0 auto}.web-stories-list.is-view-type-circles .web-stories-list__story{display:inline-block;margin:0 5px;max-width:var(--ws-circle-size);min-width:var(--ws-circle-size);text-align:center}.web-stories-list.is-view-type-circles .web-stories-list__story-poster,.web-stories-list.is-view-type-circles .web-stories-list__story-poster a{aspect-ratio:1}.web-stories-list.is-view-type-circles .web-stories-list__story-poster>img{border-radius:50%}.web-stories-list.is-view-type-circles .web-stories-list__story-poster .web-stories-list__story-poster-placeholder,.web-stories-list.is-view-type-circles .web-stories-list__story-poster a>img,.web-stories-list.is-view-type-circles .web-stories-list__story-poster>img{background-clip:content-box;border:2px solid var(--ws-circle-border-color);border-radius:50%;height:var(--ws-circle-size);right:0;max-width:none;padding:2px;position:absolute;top:0;width:var(--ws-circle-size)}.web-stories-list.is-view-type-circles .web-stories-list__story-poster a>img{border-radius:50%}.web-stories-list.is-view-type-circles .web-stories-list__story-poster:after{display:none}.web-stories-list.is-view-type-circles .web-stories-list__story-poster-placeholder:after{background:linear-gradient(-180deg,#fff0,#000c);border-radius:50%;content:"";display:block;height:100%;right:0;position:absolute;top:0;width:100%}.web-stories-list.is-view-type-circles .web-stories-list__story-content-overlay{padding-bottom:0}.web-stories-list.is-view-type-circles .story-content-overlay__title{font-size:var(--ws-font-size-circle-title)}.web-stories-list.is-view-type-circles.has-title .glider-next,.web-stories-list.is-view-type-circles.has-title .glider-prev{top:35%}.web-stories-list.is-view-type-list .web-stories-list__story{margin-bottom:12px}.web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{bottom:0;color:var(--ws-overlay-text-color);position:absolute;z-index:1}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story{align-items:center;display:flex;flex-wrap:nowrap}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster{aspect-ratio:var(--ws-list-aspect-ratio);flex-basis:40%}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster:after{display:none}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{color:inherit;flex-basis:60%;padding:10px 15px;position:relative}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-poster{order:2}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-content-overlay{order:1}.ws-legacy-widget-preview .web-stories-list.is-view-type-list.is-style-default .web-stories-list__story-poster{border-radius:8px;overflow:hidden}@media (min-width:676px){.web-stories-list.is-view-type-list .web-stories-list__story{align-items:center;display:flex;flex-wrap:nowrap}.web-stories-list.is-view-type-list .web-stories-list__story-poster{aspect-ratio:var(--ws-list-aspect-ratio);flex-basis:40%}.web-stories-list.is-view-type-list .web-stories-list__story-poster:after{display:none}.web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{color:inherit;flex-basis:60%;padding:10px 15px;position:relative}.web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-poster{order:2}.web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-content-overlay{order:1}.web-stories-list.is-view-type-list.is-style-default .web-stories-list__story-poster{border-radius:8px;overflow:hidden}.web-stories-list.is-view-type-carousel .web-stories-list__story{margin:0 5px;max-width:var(--ws-story-max-width)}}.ws-legacy-widget-preview .web-stories-list.is-view-type-carousel .web-stories-list__story{margin:0 5px;max-width:var(--ws-story-max-width)}.web-stories-list.is-carousel.has-archive-link{margin-top:59px}.web-stories-theme-header-section .web-stories-list.is-carousel.has-archive-link{margin-top:24px;padding-top:59px;position:relative}.web-stories-list.is-carousel .web-stories-list__archive-link{position:absolute;left:0;top:-35px}.web-stories-theme-header-section .web-stories-list.is-carousel .web-stories-list__archive-link{left:10px}.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{padding:10px;top:50%;transform:translateY(-50%)}.web-stories-list.is-carousel .glider-prev{transform:translateY(-50%) rotate(-180deg)}.web-stories-list.is-carousel .amp-carousel-button-next,.web-stories-list.is-carousel .amp-carousel-button-prev,.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSIxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMS41MzIgMS4zODMgNS41MSA1LjUxLTUuNTEgNS41MTEiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSIyIi8+PC9zdmc+)}.web-stories-list.is-carousel .amp-carousel-button-next,.web-stories-list.is-carousel .glider-next{left:0}.web-stories-list.is-carousel .amp-carousel-button-prev,.web-stories-list.is-carousel .glider-prev{right:0}.web-stories-list.is-carousel .amp-carousel-button-prev{transform:rotate(-180deg)}html[dir=rtl] .web-stories-list.is-carousel .amp-carousel-button-next{transform:rotate(-180deg)}.web-stories-list.is-carousel .amp-carousel-button,.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{background-color:#eaeaea;background-position:50%;background-repeat:no-repeat;background-size:30%;border-radius:50%;border-style:none;box-sizing:border-box;cursor:pointer;height:34px;pointer-events:all;width:34px;z-index:10}html[dir=rtl] .web-stories-list.is-carousel .glider-next{transform:translateY(-50%) rotate(-180deg)}.glider-next.disabled,.glider-prev.disabled,.web-stories-list.is-carousel .amp-carousel-button.amp-disabled{opacity:0}html[dir=rtl] .glider-next.disabled,html[dir=rtl] .glider-prev.disabled{cursor:pointer;opacity:1}.web-stories-list.is-carousel .amp-carousel-button:not(.amp-disabled):hover,.web-stories-list.is-carousel .glider-next:not(.disabled):focus,.web-stories-list.is-carousel .glider-next:not(.disabled):hover,.web-stories-list.is-carousel .glider-prev:not(.disabled):focus,.web-stories-list.is-carousel .glider-prev:not(.disabled):hover,html[dir=rtl] .glider-next.disabled:hover,html[dir=rtl] .glider-prev.disabled:hover{filter:invert(1)}.web-stories-list.is-carousel .web-stories-list__carousel{scrollbar-width:none}.web-stories-list.is-carousel .glider-track::-webkit-scrollbar{display:none}
|
assets/css/web-stories-list-styles.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
:root{--ws-font-size-title:18px;--ws-font-size-circle-title:14px;--ws-font-size-excerpt:16px;--ws-font-size-author-date:14px;--ws-aspect-ratio:176.2%;--ws-list-aspect-ratio:75%;--ws-overlay-text-color:#fff;--ws-overlay-text-lh:1.3;--ws-story-min-width:160px;--ws-story-max-width:285px;--ws-circle-size:96px;--ws-circle-border-color:#ccc}.web-stories-list{margin-bottom:24px;margin-top:24px}.web-stories-theme-header-section .web-stories-list{margin-bottom:0;margin-top:0}.web-stories-list.is-carousel .web-stories-list__inner-wrapper{margin:0 auto;max-width:max-content;position:relative}.web-stories-list__story{cursor:pointer;position:relative}.web-stories-list.is-view-type-carousel .web-stories-list__story,.web-stories-list.is-view-type-grid .web-stories-list__story{min-width:var(--ws-story-min-width)}.web-stories-list.is-style-default.is-view-type-carousel .web-stories-list__story,.web-stories-list.is-style-default.is-view-type-grid .web-stories-list__story{border-radius:8px;overflow:hidden}.web-stories-list__story-poster{position:relative}.web-stories-list__story-poster a{display:block;margin:0}.web-stories-list__story-poster .web-stories-list__story-poster-placeholder{box-sizing:border-box}.web-stories-list__story-poster .web-stories-list__story-poster-placeholder a,.web-stories-list__story-poster .web-stories-list__story-poster-placeholder span{clip:rect(1px,1px,1px,1px);word-wrap:normal!important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-break:normal}.web-stories-list__story.web-stories-list__story--amp .web-stories-list__story-poster a{pointer-events:none}.web-stories-list__story-poster img{box-sizing:border-box;height:100%;object-fit:cover;position:absolute;width:100%}.web-stories-list__story-poster:before{background:linear-gradient(180deg,#fff0,#000c);content:"";display:block;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.web-stories-list__story-poster:after{content:"";display:block;padding-bottom:var(--ws-aspect-ratio)}.web-stories-list__story-content-overlay{line-height:var(--ws-overlay-text-lh);padding:10px}html[amp] .web-stories-list__story-content-overlay{white-space:normal}.web-stories-list.is-view-type-carousel .web-stories-list__story-content-overlay,.web-stories-list.is-view-type-grid .web-stories-list__story-content-overlay{bottom:0;color:var(--ws-overlay-text-color);position:absolute;z-index:1}.web-stories-list .story-content-overlay__title{font-size:var(--ws-font-size-title);font-weight:700}.web-stories-list .story-content-overlay__author,.web-stories-list .story-content-overlay__date{font-size:var(--ws-font-size-author-date)}.web-stories-list .story-content-overlay__excerpt,.web-stories-list .story-content-overlay__title{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.web-stories-list .story-content-overlay__title:not(:last-child){margin-bottom:15px}.web-stories-list .story-content-overlay__excerpt{-webkit-line-clamp:3;font-size:var(--ws-font-size-excerpt);margin-bottom:8px}.web-stories-list.alignfull .web-stories-list__archive-link{right:10px}.web-stories-list.is-view-type-grid .web-stories-list__archive-link,.web-stories-list.is-view-type-list .web-stories-list__archive-link{display:block;flex-basis:100%;margin:32px auto 0;text-align:center}.web-stories-list.is-view-type-grid .web-stories-list__archive-link a,.web-stories-list.is-view-type-list .web-stories-list__archive-link a{border:1px solid;border-radius:100px;padding:7px 53px}.web-stories-lightbox-open{overflow-y:hidden}.web-stories-list__lightbox{align-items:center;background:#000;display:none;height:100%;justify-content:center;left:0;opacity:0;position:fixed;top:0;transform:translateY(-100vh);width:100%}.web-stories-list__lightbox-wrapper amp-lightbox,.web-stories-list__lightbox.show{z-index:999999999}.web-stories-list__lightbox.show{display:block;opacity:1;transform:translate(0)}.web-stories-list__lightbox amp-story-player{height:100%;width:100%}.story-lightbox__close-button{background:none!important;border:none;border-radius:0;cursor:pointer;display:inline-block;height:40px;left:0;position:absolute;top:8px;width:40px;z-index:1}.story-lightbox__close-button--stick{background-color:#fff;display:inline-block;height:20px;left:20px;position:absolute;top:15px;transform:rotate(45deg);width:3px}.story-lightbox__close-button--stick:first-child{transform:rotate(-45deg)}html:not([amp]) .web-stories-list .web-stories-list__lightbox amp-story-player a{position:absolute}@media (min-width:676px){.admin-bar .web-stories-list__lightbox{top:46px}.story-lightbox__close-button{left:10px}.story-lightbox__close-button--stick{height:25px;left:20px;top:5px}}@media (min-width:783px){.admin-bar .web-stories-list__lightbox{top:32px}}.web-stories-list.is-view-type-grid .web-stories-list__inner-wrapper{display:flex;flex-wrap:wrap}.web-stories-list.is-view-type-grid .web-stories-list__story{flex-basis:calc(100% - 8px);margin:4px}@media (min-width:415px){.web-stories-list.is-view-type-grid.columns-1 .web-stories-list__story{flex-basis:calc(100% - 8px)}.web-stories-list.is-view-type-grid.columns-2 .web-stories-list__story{flex-basis:calc(50% - 8px)}.web-stories-list.is-view-type-grid.columns-3 .web-stories-list__story{flex-basis:calc(33.33333% - 8px)}.web-stories-list.is-view-type-grid.columns-4 .web-stories-list__story{flex-basis:calc(25% - 8px)}.web-stories-list.is-view-type-grid.columns-5 .web-stories-list__story{flex-basis:calc(20% - 8px)}}.web-stories-theme-header-section .web-stories-list.is-view-type-circles{border-bottom:1px solid #ccc;padding:12px 0}.web-stories-list.is-view-type-circles .amp-carousel-slide{vertical-align:top}.web-stories-list.is-view-type-circles .glider-track{justify-content:center;margin:0 auto}.web-stories-list.is-view-type-circles .web-stories-list__story{display:inline-block;margin:0 5px;max-width:var(--ws-circle-size);min-width:var(--ws-circle-size);text-align:center}.web-stories-list.is-view-type-circles .web-stories-list__story-poster>img{border-radius:50%}.web-stories-list.is-view-type-circles .web-stories-list__story-poster .web-stories-list__story-poster-placeholder,.web-stories-list.is-view-type-circles .web-stories-list__story-poster>img,.web-stories-list.is-view-type-circles .web-stories-list__story-poster a>img{background-clip:content-box;border:2px solid var(--ws-circle-border-color);border-radius:50%;height:var(--ws-circle-size);left:0;max-width:none;padding:2px;position:absolute;top:0;width:var(--ws-circle-size)}.web-stories-list.is-view-type-circles .web-stories-list__story-poster a>img{border-radius:50%}.web-stories-list.is-view-type-circles .web-stories-list__story-poster:after{padding-bottom:var(--ws-circle-size)}.web-stories-list.is-view-type-circles .web-stories-list__story-poster:before{display:none}.web-stories-list.is-view-type-circles .web-stories-list__story-content-overlay{padding-bottom:0}.web-stories-list.is-view-type-circles .story-content-overlay__title{font-size:var(--ws-font-size-circle-title)}.web-stories-list.is-view-type-circles.has-title .glider-next,.web-stories-list.is-view-type-circles.has-title .glider-prev{top:35%}.web-stories-list.is-view-type-list .web-stories-list__story{margin-bottom:12px}.web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{bottom:0;color:var(--ws-overlay-text-color);position:absolute;z-index:1}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story{align-items:center;display:flex;flex-wrap:nowrap}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster{flex-basis:40%}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster:before{display:none}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster:after{padding-bottom:var(--ws-list-aspect-ratio)}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{color:inherit;flex-basis:60%;padding:10px 15px;position:relative}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-poster{order:2}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-content-overlay{order:1}.ws-legacy-widget-preview .web-stories-list.is-view-type-list.is-style-default .web-stories-list__story-poster{border-radius:8px;overflow:hidden}@media (min-width:676px){.web-stories-list.is-view-type-list .web-stories-list__story{align-items:center;display:flex;flex-wrap:nowrap}.web-stories-list.is-view-type-list .web-stories-list__story-poster{flex-basis:40%}.web-stories-list.is-view-type-list .web-stories-list__story-poster:before{display:none}.web-stories-list.is-view-type-list .web-stories-list__story-poster:after{padding-bottom:var(--ws-list-aspect-ratio)}.web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{color:inherit;flex-basis:60%;padding:10px 15px;position:relative}.web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-poster{order:2}.web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-content-overlay{order:1}.web-stories-list.is-view-type-list.is-style-default .web-stories-list__story-poster{border-radius:8px;overflow:hidden}.web-stories-list.is-view-type-carousel .web-stories-list__story{margin:0 5px;max-width:var(--ws-story-max-width)}}.ws-legacy-widget-preview .web-stories-list.is-view-type-carousel .web-stories-list__story{margin:0 5px;max-width:var(--ws-story-max-width)}.web-stories-list.is-carousel.has-archive-link{margin-top:59px}.web-stories-theme-header-section .web-stories-list.is-carousel.has-archive-link{margin-top:24px;padding-top:59px;position:relative}.web-stories-list.is-carousel .web-stories-list__archive-link{position:absolute;right:0;top:-35px}.web-stories-theme-header-section .web-stories-list.is-carousel .web-stories-list__archive-link{right:10px}.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{padding:10px;top:50%;transform:translateY(-50%)}.web-stories-list.is-carousel .glider-prev{transform:translateY(-50%) rotate(180deg) /*!rtl:translateY(-50%)*/}.web-stories-list.is-carousel .amp-carousel-button-next,.web-stories-list.is-carousel .amp-carousel-button-prev,.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSIxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMS41MzIgMS4zODMgNS41MSA1LjUxLTUuNTEgNS41MTEiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSIyIi8+PC9zdmc+)}.web-stories-list.is-carousel .amp-carousel-button-next,.web-stories-list.is-carousel .glider-next{right:0}.web-stories-list.is-carousel .amp-carousel-button-prev,.web-stories-list.is-carousel .glider-prev{left:0}.web-stories-list.is-carousel .amp-carousel-button-prev{transform:rotate(180deg) /*!rtl:none*/}html[dir=rtl] .web-stories-list.is-carousel .amp-carousel-button-next{transform:rotate(180deg)}.web-stories-list.is-carousel .amp-carousel-button,.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{background-color:#eaeaea;background-position:50%;background-repeat:no-repeat;background-size:30%;border-radius:50%;border-style:none;box-sizing:border-box;cursor:pointer;height:34px;pointer-events:all;width:34px;z-index:10}html[dir=rtl] .web-stories-list.is-carousel .glider-next{transform:translateY(-50%) rotate(180deg)}.glider-next.disabled,.glider-prev.disabled,.web-stories-list.is-carousel .amp-carousel-button.amp-disabled{opacity:0}html[dir=rtl] .glider-next.disabled,html[dir=rtl] .glider-prev.disabled{cursor:pointer;opacity:1}.web-stories-list.is-carousel .amp-carousel-button:not(.amp-disabled):hover,.web-stories-list.is-carousel .glider-next:not(.disabled):focus,.web-stories-list.is-carousel .glider-next:not(.disabled):hover,.web-stories-list.is-carousel .glider-prev:not(.disabled):focus,.web-stories-list.is-carousel .glider-prev:not(.disabled):hover,html[dir=rtl] .glider-next.disabled:hover,html[dir=rtl] .glider-prev.disabled:hover{filter:invert(1)}.web-stories-list.is-carousel .web-stories-list__carousel{scrollbar-width:none}.web-stories-list.is-carousel .glider-track::-webkit-scrollbar{display:none}
|
1 |
+
:root{--ws-font-size-title:18px;--ws-font-size-circle-title:14px;--ws-font-size-excerpt:16px;--ws-font-size-author-date:14px;--ws-aspect-ratio:4/6;--ws-list-aspect-ratio:4/6;--ws-overlay-text-color:#fff;--ws-overlay-text-lh:1.3;--ws-story-min-width:160px;--ws-story-max-width:285px;--ws-circle-size:96px;--ws-circle-border-color:#ccc}.web-stories-list{margin-bottom:24px;margin-top:24px}.web-stories-theme-header-section .web-stories-list{margin-bottom:0;margin-top:0}.web-stories-list.is-carousel .web-stories-list__inner-wrapper{margin:0 auto;max-width:max-content;position:relative}.web-stories-list__story{cursor:pointer;position:relative}.web-stories-list.is-view-type-carousel .web-stories-list__story,.web-stories-list.is-view-type-grid .web-stories-list__story{min-width:var(--ws-story-min-width)}.web-stories-list.is-style-default.is-view-type-carousel .web-stories-list__story,.web-stories-list.is-style-default.is-view-type-grid .web-stories-list__story{border-radius:8px;overflow:hidden}.web-stories-list__story-poster{aspect-ratio:var(--ws-aspect-ratio);position:relative}.web-stories-list__story-poster a{aspect-ratio:var(--ws-aspect-ratio);display:block;margin:0}.web-stories-list__story-poster .web-stories-list__story-poster-placeholder{box-sizing:border-box}.web-stories-list__story-poster .web-stories-list__story-poster-placeholder a,.web-stories-list__story-poster .web-stories-list__story-poster-placeholder span{clip:rect(1px,1px,1px,1px);word-wrap:normal!important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-break:normal}.web-stories-list__story.web-stories-list__story--amp .web-stories-list__story-poster a{pointer-events:none}.web-stories-list__story-poster img{box-sizing:border-box;height:100%;object-fit:cover;position:absolute;width:100%}.web-stories-list__story-poster:after{background:linear-gradient(180deg,#fff0,#000c);content:"";display:block;height:100%;left:0;position:absolute;top:0;width:100%}.web-stories-list__story-content-overlay{line-height:var(--ws-overlay-text-lh);padding:10px}html[amp] .web-stories-list__story-content-overlay{white-space:normal}.web-stories-list.is-view-type-carousel .web-stories-list__story-content-overlay,.web-stories-list.is-view-type-grid .web-stories-list__story-content-overlay{bottom:0;color:var(--ws-overlay-text-color);position:absolute;z-index:1}.web-stories-list .story-content-overlay__title{font-size:var(--ws-font-size-title);font-weight:700}.web-stories-list .story-content-overlay__author,.web-stories-list .story-content-overlay__date{font-size:var(--ws-font-size-author-date)}.web-stories-list .story-content-overlay__excerpt,.web-stories-list .story-content-overlay__title{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.web-stories-list .story-content-overlay__title:not(:last-child){margin-bottom:15px}.web-stories-list .story-content-overlay__excerpt{-webkit-line-clamp:3;font-size:var(--ws-font-size-excerpt);margin-bottom:8px}.web-stories-list.alignfull .web-stories-list__archive-link{right:10px}.web-stories-list.is-view-type-grid .web-stories-list__archive-link,.web-stories-list.is-view-type-list .web-stories-list__archive-link{display:block;flex-basis:100%;margin:32px auto 0;text-align:center}.web-stories-list.is-view-type-grid .web-stories-list__archive-link a,.web-stories-list.is-view-type-list .web-stories-list__archive-link a{border:1px solid;border-radius:100px;padding:7px 53px}.web-stories-lightbox-open{overflow-y:hidden}.web-stories-list__lightbox{align-items:center;background:#000;display:none;height:100%;justify-content:center;left:0;opacity:0;position:fixed;top:0;transform:translateY(-100vh);width:100%}.web-stories-list__lightbox-wrapper amp-lightbox,.web-stories-list__lightbox.show{z-index:999999999}.web-stories-list__lightbox.show{display:block;opacity:1;transform:translate(0)}.web-stories-list__lightbox amp-story-player{height:100%;width:100%}.story-lightbox__close-button{background:none!important;border:none;border-radius:0;cursor:pointer;display:inline-block;height:40px;left:0;position:absolute;top:8px;width:40px;z-index:1}.story-lightbox__close-button--stick{background-color:#fff;display:inline-block;height:20px;left:20px;position:absolute;top:15px;transform:rotate(45deg);width:3px}.story-lightbox__close-button--stick:first-child{transform:rotate(-45deg)}html:not([amp]) .web-stories-list .web-stories-list__lightbox amp-story-player a{position:absolute}@media (min-width:676px){.admin-bar .web-stories-list__lightbox{top:46px}.story-lightbox__close-button{left:10px}.story-lightbox__close-button--stick{height:25px;left:20px;top:5px}}@media (min-width:783px){.admin-bar .web-stories-list__lightbox{top:32px}}.web-stories-list.is-view-type-grid .web-stories-list__inner-wrapper{display:flex;flex-wrap:wrap}.web-stories-list.is-view-type-grid .web-stories-list__story{flex-basis:calc(100% - 8px);margin:4px}@media (min-width:415px){.web-stories-list.is-view-type-grid.columns-1 .web-stories-list__story{flex-basis:calc(100% - 8px)}.web-stories-list.is-view-type-grid.columns-2 .web-stories-list__story{flex-basis:calc(50% - 8px)}.web-stories-list.is-view-type-grid.columns-3 .web-stories-list__story{flex-basis:calc(33.33333% - 8px)}.web-stories-list.is-view-type-grid.columns-4 .web-stories-list__story{flex-basis:calc(25% - 8px)}.web-stories-list.is-view-type-grid.columns-5 .web-stories-list__story{flex-basis:calc(20% - 8px)}}.web-stories-theme-header-section .web-stories-list.is-view-type-circles{border-bottom:1px solid #ccc;padding:12px 0}.web-stories-list.is-view-type-circles .amp-carousel-slide{vertical-align:top}.web-stories-list.is-view-type-circles .glider-track{justify-content:center;margin:0 auto}.web-stories-list.is-view-type-circles .web-stories-list__story{display:inline-block;margin:0 5px;max-width:var(--ws-circle-size);min-width:var(--ws-circle-size);text-align:center}.web-stories-list.is-view-type-circles .web-stories-list__story-poster,.web-stories-list.is-view-type-circles .web-stories-list__story-poster a{aspect-ratio:1}.web-stories-list.is-view-type-circles .web-stories-list__story-poster>img{border-radius:50%}.web-stories-list.is-view-type-circles .web-stories-list__story-poster .web-stories-list__story-poster-placeholder,.web-stories-list.is-view-type-circles .web-stories-list__story-poster a>img,.web-stories-list.is-view-type-circles .web-stories-list__story-poster>img{background-clip:content-box;border:2px solid var(--ws-circle-border-color);border-radius:50%;height:var(--ws-circle-size);left:0;max-width:none;padding:2px;position:absolute;top:0;width:var(--ws-circle-size)}.web-stories-list.is-view-type-circles .web-stories-list__story-poster a>img{border-radius:50%}.web-stories-list.is-view-type-circles .web-stories-list__story-poster:after{display:none}.web-stories-list.is-view-type-circles .web-stories-list__story-poster-placeholder:after{background:linear-gradient(180deg,#fff0,#000c);border-radius:50%;content:"";display:block;height:100%;left:0;position:absolute;top:0;width:100%}.web-stories-list.is-view-type-circles .web-stories-list__story-content-overlay{padding-bottom:0}.web-stories-list.is-view-type-circles .story-content-overlay__title{font-size:var(--ws-font-size-circle-title)}.web-stories-list.is-view-type-circles.has-title .glider-next,.web-stories-list.is-view-type-circles.has-title .glider-prev{top:35%}.web-stories-list.is-view-type-list .web-stories-list__story{margin-bottom:12px}.web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{bottom:0;color:var(--ws-overlay-text-color);position:absolute;z-index:1}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story{align-items:center;display:flex;flex-wrap:nowrap}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster{aspect-ratio:var(--ws-list-aspect-ratio);flex-basis:40%}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-poster:after{display:none}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{color:inherit;flex-basis:60%;padding:10px 15px;position:relative}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-poster{order:2}.ws-legacy-widget-preview .web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-content-overlay{order:1}.ws-legacy-widget-preview .web-stories-list.is-view-type-list.is-style-default .web-stories-list__story-poster{border-radius:8px;overflow:hidden}@media (min-width:676px){.web-stories-list.is-view-type-list .web-stories-list__story{align-items:center;display:flex;flex-wrap:nowrap}.web-stories-list.is-view-type-list .web-stories-list__story-poster{aspect-ratio:var(--ws-list-aspect-ratio);flex-basis:40%}.web-stories-list.is-view-type-list .web-stories-list__story-poster:after{display:none}.web-stories-list.is-view-type-list .web-stories-list__story-content-overlay{color:inherit;flex-basis:60%;padding:10px 15px;position:relative}.web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-poster{order:2}.web-stories-list.is-view-type-list .image-align-right .web-stories-list__story-content-overlay{order:1}.web-stories-list.is-view-type-list.is-style-default .web-stories-list__story-poster{border-radius:8px;overflow:hidden}.web-stories-list.is-view-type-carousel .web-stories-list__story{margin:0 5px;max-width:var(--ws-story-max-width)}}.ws-legacy-widget-preview .web-stories-list.is-view-type-carousel .web-stories-list__story{margin:0 5px;max-width:var(--ws-story-max-width)}.web-stories-list.is-carousel.has-archive-link{margin-top:59px}.web-stories-theme-header-section .web-stories-list.is-carousel.has-archive-link{margin-top:24px;padding-top:59px;position:relative}.web-stories-list.is-carousel .web-stories-list__archive-link{position:absolute;right:0;top:-35px}.web-stories-theme-header-section .web-stories-list.is-carousel .web-stories-list__archive-link{right:10px}.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{padding:10px;top:50%;transform:translateY(-50%)}.web-stories-list.is-carousel .glider-prev{transform:translateY(-50%) rotate(180deg) /*!rtl:translateY(-50%)*/}.web-stories-list.is-carousel .amp-carousel-button-next,.web-stories-list.is-carousel .amp-carousel-button-prev,.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSIxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMS41MzIgMS4zODMgNS41MSA1LjUxLTUuNTEgNS41MTEiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSIyIi8+PC9zdmc+)}.web-stories-list.is-carousel .amp-carousel-button-next,.web-stories-list.is-carousel .glider-next{right:0}.web-stories-list.is-carousel .amp-carousel-button-prev,.web-stories-list.is-carousel .glider-prev{left:0}.web-stories-list.is-carousel .amp-carousel-button-prev{transform:rotate(180deg) /*!rtl:none*/}html[dir=rtl] .web-stories-list.is-carousel .amp-carousel-button-next{transform:rotate(180deg)}.web-stories-list.is-carousel .amp-carousel-button,.web-stories-list.is-carousel .glider-next,.web-stories-list.is-carousel .glider-prev{background-color:#eaeaea;background-position:50%;background-repeat:no-repeat;background-size:30%;border-radius:50%;border-style:none;box-sizing:border-box;cursor:pointer;height:34px;pointer-events:all;width:34px;z-index:10}html[dir=rtl] .web-stories-list.is-carousel .glider-next{transform:translateY(-50%) rotate(180deg)}.glider-next.disabled,.glider-prev.disabled,.web-stories-list.is-carousel .amp-carousel-button.amp-disabled{opacity:0}html[dir=rtl] .glider-next.disabled,html[dir=rtl] .glider-prev.disabled{cursor:pointer;opacity:1}.web-stories-list.is-carousel .amp-carousel-button:not(.amp-disabled):hover,.web-stories-list.is-carousel .glider-next:not(.disabled):focus,.web-stories-list.is-carousel .glider-next:not(.disabled):hover,.web-stories-list.is-carousel .glider-prev:not(.disabled):focus,.web-stories-list.is-carousel .glider-prev:not(.disabled):hover,html[dir=rtl] .glider-next.disabled:hover,html[dir=rtl] .glider-prev.disabled:hover{filter:invert(1)}.web-stories-list.is-carousel .web-stories-list__carousel{scrollbar-width:none}.web-stories-list.is-carousel .glider-track::-webkit-scrollbar{display:none}
|
assets/js/chunk-colorthief.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.__webStories_webpackJsonp=window.__webStories_webpackJsonp||[]).push([[185],{
|
1 |
+
(window.__webStories_webpackJsonp=window.__webStories_webpackJsonp||[]).push([[185],{1052:function(t,r,n){"use strict";if(n.r(r),!o)var o={map:function(t,r){var n={};return r?t.map((function(t,o){return n.index=o,r.call(n,t)})):t.slice()},naturalOrder:function(t,r){return t<r?-1:t>r?1:0},sum:function(t,r){var n={};return t.reduce(r?function(t,o,e){return n.index=e,t+r.call(n,o)}:function(t,r){return t+r},0)},max:function(t,r){return Math.max.apply(null,r?o.map(t,r):t)}};var e=function(){function t(t,r,n){return(t<<10)+(r<<5)+n}function r(t){var r=[],n=!1;function o(){r.sort(t),n=!0}return{push:function(t){r.push(t),n=!1},peek:function(t){return n||o(),void 0===t&&(t=r.length-1),r[t]},pop:function(){return n||o(),r.pop()},size:function(){return r.length},map:function(t){return r.map(t)},debug:function(){return n||o(),r}}}function n(t,r,n,o,e,i,u){this.r1=t,this.r2=r,this.g1=n,this.g2=o,this.b1=e,this.b2=i,this.histo=u}function e(){this.vboxes=new r((function(t,r){return o.naturalOrder(t.vbox.count()*t.vbox.volume(),r.vbox.count()*r.vbox.volume())}))}function i(r,n){if(n.count()){var e=n.r2-n.r1+1,i=n.g2-n.g1+1,u=o.max([e,i,n.b2-n.b1+1]);if(1==n.count())return[n.copy()];var a,s,h,c,f=0,v=[],l=[];if(u==e)for(a=n.r1;a<=n.r2;a++){for(c=0,s=n.g1;s<=n.g2;s++)for(h=n.b1;h<=n.b2;h++)c+=r[t(a,s,h)]||0;v[a]=f+=c}else if(u==i)for(a=n.g1;a<=n.g2;a++){for(c=0,s=n.r1;s<=n.r2;s++)for(h=n.b1;h<=n.b2;h++)c+=r[t(s,a,h)]||0;v[a]=f+=c}else for(a=n.b1;a<=n.b2;a++){for(c=0,s=n.r1;s<=n.r2;s++)for(h=n.g1;h<=n.g2;h++)c+=r[t(s,h,a)]||0;v[a]=f+=c}return v.forEach((function(t,r){l[r]=f-t})),function(t){var r,o,e,i,u,s=t+"1",h=t+"2",c=0;for(a=n[s];a<=n[h];a++)if(v[a]>f/2){for(e=n.copy(),i=n.copy(),u=(r=a-n[s])<=(o=n[h]-a)?Math.min(n[h]-1,~~(a+o/2)):Math.max(n[s],~~(a-1-r/2));!v[u];)u++;for(c=l[u];!c&&v[u-1];)c=l[--u];return e[h]=u,i[s]=e[h]+1,[e,i]}}(u==e?"r":u==i?"g":"b")}}return n.prototype={volume:function(t){return this._volume&&!t||(this._volume=(this.r2-this.r1+1)*(this.g2-this.g1+1)*(this.b2-this.b1+1)),this._volume},count:function(r){var n=this.histo;if(!this._count_set||r){var o,e,i,u=0;for(o=this.r1;o<=this.r2;o++)for(e=this.g1;e<=this.g2;e++)for(i=this.b1;i<=this.b2;i++)u+=n[t(o,e,i)]||0;this._count=u,this._count_set=!0}return this._count},copy:function(){return new n(this.r1,this.r2,this.g1,this.g2,this.b1,this.b2,this.histo)},avg:function(r){var n=this.histo;if(!this._avg||r){var o,e,i,u,a=0,s=0,h=0,c=0;for(e=this.r1;e<=this.r2;e++)for(i=this.g1;i<=this.g2;i++)for(u=this.b1;u<=this.b2;u++)a+=o=n[t(e,i,u)]||0,s+=o*(e+.5)*8,h+=o*(i+.5)*8,c+=o*(u+.5)*8;this._avg=a?[~~(s/a),~~(h/a),~~(c/a)]:[~~(8*(this.r1+this.r2+1)/2),~~(8*(this.g1+this.g2+1)/2),~~(8*(this.b1+this.b2+1)/2)]}return this._avg},contains:function(t){var r=t[0]>>3;return gval=t[1]>>3,bval=t[2]>>3,r>=this.r1&&r<=this.r2&&gval>=this.g1&&gval<=this.g2&&bval>=this.b1&&bval<=this.b2}},e.prototype={push:function(t){this.vboxes.push({vbox:t,color:t.avg()})},palette:function(){return this.vboxes.map((function(t){return t.color}))},size:function(){return this.vboxes.size()},map:function(t){for(var r=this.vboxes,n=0;n<r.size();n++)if(r.peek(n).vbox.contains(t))return r.peek(n).color;return this.nearest(t)},nearest:function(t){for(var r,n,o,e=this.vboxes,i=0;i<e.size();i++)((n=Math.sqrt(Math.pow(t[0]-e.peek(i).color[0],2)+Math.pow(t[1]-e.peek(i).color[1],2)+Math.pow(t[2]-e.peek(i).color[2],2)))<r||void 0===r)&&(r=n,o=e.peek(i).color);return o},forcebw:function(){var t=this.vboxes;t.sort((function(t,r){return o.naturalOrder(o.sum(t.color),o.sum(r.color))}));var r=t[0].color;r[0]<5&&r[1]<5&&r[2]<5&&(t[0].color=[0,0,0]);var n=t.length-1,e=t[n].color;e[0]>251&&e[1]>251&&e[2]>251&&(t[n].color=[255,255,255])}},{quantize:function(u,a){if(!u.length||a<2||a>256)return!1;var s=function(r){var n,o=new Array(32768);return r.forEach((function(r){n=t(r[0]>>3,r[1]>>3,r[2]>>3),o[n]=(o[n]||0)+1})),o}(u);s.forEach((function(){}));var h=function(t,r){var o,e,i,u=1e6,a=0,s=1e6,h=0,c=1e6,f=0;return t.forEach((function(t){(o=t[0]>>3)<u?u=o:o>a&&(a=o),(e=t[1]>>3)<s?s=e:e>h&&(h=e),(i=t[2]>>3)<c?c=i:i>f&&(f=i)})),new n(u,a,s,h,c,f,r)}(u,s),c=new r((function(t,r){return o.naturalOrder(t.count(),r.count())}));function f(t,r){for(var n,o=t.size(),e=0;e<1e3;){if(o>=r)return;if(e++>1e3)return;if((n=t.pop()).count()){var u=i(s,n),a=u[0],h=u[1];if(!a)return;t.push(a),h&&(t.push(h),o++)}else t.push(n),e++}}c.push(h),f(c,.75*a);for(var v=new r((function(t,r){return o.naturalOrder(t.count()*t.volume(),r.count()*r.volume())}));c.size();)v.push(c.pop());f(v,a);for(var l=new e;v.size();)l.push(v.pop());return l}}}().quantize,u=function(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.width=this.canvas.width=t.naturalWidth,this.height=this.canvas.height=t.naturalHeight,this.context.drawImage(t,0,0,this.width,this.height)};u.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)};var a=function(){};a.prototype.getColor=function(t,r){return void 0===r&&(r=10),this.getPalette(t,5,r)[0]},a.prototype.getPalette=function(t,r,n){var o=function(t){var r=t.colorCount,n=t.quality;if(void 0!==r&&Number.isInteger(r)){if(1===r)throw new Error("colorCount should be between 2 and 20. To get one color, call getColor() instead of getPalette()");r=Math.max(r,2),r=Math.min(r,20)}else r=10;return(void 0===n||!Number.isInteger(n)||n<1)&&(n=10),{colorCount:r,quality:n}}({colorCount:r,quality:n}),i=new u(t),a=function(t,r,n){for(var o=t,e=[],i=0,u=void 0,a=void 0,s=void 0,h=void 0,c=void 0;i<r;i+=n)a=o[0+(u=4*i)],s=o[u+1],h=o[u+2],(void 0===(c=o[u+3])||c>=125)&&(a>250&&s>250&&h>250||e.push([a,s,h]));return e}(i.getImageData().data,i.width*i.height,o.quality),s=e(a,o.colorCount);return s?s.palette():null},a.prototype.getColorFromUrl=function(t,r,n){var o=this,e=document.createElement("img");e.addEventListener("load",(function(){var i=o.getPalette(e,5,n);r(i[0],t)})),e.src=t},a.prototype.getImageData=function(t,r){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){if(200==this.status){var t=new Uint8Array(this.response);i=t.length;for(var n=new Array(i),o=0;o<t.length;o++)n[o]=String.fromCharCode(t[o]);var e=n.join(""),u=window.btoa(e);r("data:image/png;base64,"+u)}},n.send()},a.prototype.getColorAsync=function(t,r,n){var o=this;this.getImageData(t,(function(t){var e=document.createElement("img");e.addEventListener("load",(function(){var t=o.getPalette(e,5,n);r(t[0],this)})),e.src=t}))},r.default=a}}]);
|
assets/js/chunk-focus-visible.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.__webStories_webpackJsonp=window.__webStories_webpackJsonp||[]).push([[186],{
|
1 |
+
(window.__webStories_webpackJsonp=window.__webStories_webpackJsonp||[]).push([[186],{645:function(e,t,n){!function(){"use strict";function e(e){var t=!0,n=!1,o=null,i={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function d(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function s(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!i[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}function u(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function c(e){e.hasAttribute("data-focus-visible-added")&&(e.classList.remove("focus-visible"),e.removeAttribute("data-focus-visible-added"))}function a(n){n.metaKey||n.altKey||n.ctrlKey||(d(e.activeElement)&&u(e.activeElement),t=!0)}function r(e){t=!1}function m(e){d(e.target)&&(t||s(e.target))&&u(e.target)}function v(e){d(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(o),o=window.setTimeout((function(){n=!1}),100),c(e.target))}function l(e){"hidden"===document.visibilityState&&(n&&(t=!0),E())}function E(){document.addEventListener("mousemove",L),document.addEventListener("mousedown",L),document.addEventListener("mouseup",L),document.addEventListener("pointermove",L),document.addEventListener("pointerdown",L),document.addEventListener("pointerup",L),document.addEventListener("touchmove",L),document.addEventListener("touchstart",L),document.addEventListener("touchend",L)}function f(){document.removeEventListener("mousemove",L),document.removeEventListener("mousedown",L),document.removeEventListener("mouseup",L),document.removeEventListener("pointermove",L),document.removeEventListener("pointerdown",L),document.removeEventListener("pointerup",L),document.removeEventListener("touchmove",L),document.removeEventListener("touchstart",L),document.removeEventListener("touchend",L)}function L(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,f())}document.addEventListener("keydown",a,!0),document.addEventListener("mousedown",r,!0),document.addEventListener("pointerdown",r,!0),document.addEventListener("touchstart",r,!0),document.addEventListener("visibilitychange",l,!0),E(),e.addEventListener("focus",m,!0),e.addEventListener("blur",v,!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!=typeof document&&e(document)}()}}]);
|
assets/js/chunk-getStoryPropsToSave.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
(window.__webStories_webpackJsonp=window.__webStories_webpackJsonp||[]).push([[187],{101:function(e,t,C){"use strict";C.d(t,"a",(function(){return LayerText}));var a=C(0),n=C.n(a),r=C(3),l=C(129),i=C(36);const o=Object(r.f)(l.a).withConfig({displayName:"layerText__StyledText",componentId:"sc-1525d8w-0"})(["color:inherit;white-space:nowrap;text-overflow:' ';overflow:hidden;max-width:100%;"]);function LayerText({children:e}){return n.a.createElement(o,{forwardedAs:"span",size:i.b.TYPOGRAPHY.PRESET_SIZES.SMALL},e)}},102:function(e,t,C){"use strict";t.a=function(e){return e&&(e.horizontal||e.vertical)?`scale3d(${e.horizontal?"-":""}1, ${e.vertical?"-":""}1, 1)`:null}},103:function(e,t,C){"use strict";var a=C(1),n=C(420);t.a=function(e){return Object(a.w)(n.a,null!=e?e:a.k)}},104:function(e,t,C){"use strict";var a=C(288),n=C(1),r=C(10),l=C(804),i=C(572),o=C(575),c=C.n(o);function s(e){return c.a.getExtension(e)}var d=C(31),u=C(118),p=C(6),m=C(266);const f=({size:e})=>e>=p.u,h={CODEC:["-vcodec","libx264"],SCALE:["-vf",`scale='min(${p.v.WIDTH},iw)':'min(${p.v.HEIGHT},ih)':'force_original_aspect_ratio=decrease',pad='width=ceil(iw/2)*2:height=ceil(ih/2)*2'`],FPS:["-r","24"],FASTSTART:["-movflags","+faststart"],COLOR_PROFILE:["-pix_fmt","yuv420p"],PRESET:["-preset","fast"],SEEK_TO_START:["-ss","00:00:01.000"],SINGLE_FRAME:["-frames:v","1"]},b=[...h.CODEC,...h.SCALE,...h.FPS,...h.FASTSTART,...h.COLOR_PROFILE,...h.PRESET];t.a=function(){var e,t;const{ffmpegCoreUrl:o,allowedTranscodableMimeTypes:c,capabilities:{hasUploadMediaAction:g}}=Object(d.c)(),{currentUser:E}=Object(u.c)((({state:e})=>({currentUser:e.currentUser}))),v=Boolean(null===(e=window)||void 0===e?void 0:e.crossOriginIsolated),y=Object(n.s)((async e=>{const{createFFmpeg:t,fetchFile:a}=await C.e(196).then(C.t.bind(null,1047,7)),n=t({corePath:o,log:false});return await n.load(),n.FS("writeFile",e.name,await a(e)),n}),[o]),O=Object(n.s)((async e=>{const t=Object(r.c)("load_video_poster_ffmpeg");let C;try{C=await y(e);const n=Object(a.a)()+"."+p.q,r=Object(l.a)(e),o=Object(m.a)(r);await C.run(...h.SEEK_TO_START,"-i",e.name,...h.SINGLE_FRAME,...h.SCALE,...h.COLOR_PROFILE,...h.PRESET,n);const c=C.FS("readFile",n);return Object(i.a)(new Blob([c.buffer],{type:p.r}),o,p.r)}catch(e){throw console.error(e),Object(r.f)("video_poster_generation_ffmpeg",e.message),e}finally{try{C.exit()}catch(e){}t()}}),[y]),M=Object(n.s)((async e=>{const t=Object(r.c)("load_video_transcoding");let C;try{C=await y(e);const n=Object(a.a)()+"."+p.s,r=Object(l.a)(e)+"."+p.s;await C.run("-i",e.name,...b,n);const o=C.FS("readFile",n);return Object(i.a)(new Blob([o.buffer],{type:p.t}),r,p.t)}catch(e){throw console.error(e),Object(r.f)("video_transcoding",e.message),e}finally{try{C.exit()}catch(e){}t()}}),[y]),w=Object(n.s)((async(e,t,C)=>{const n=Object(r.c)("load_trim_video_transcoding");let o;try{o=await y(e);const r=(null==e?void 0:e.type)||p.t,c=s(r),d=Object(a.a)()+"."+c,u=Object(l.a)(e)+"-trimmed."+c;await o.run("-i",e.name,"-ss",t,"-to",C,d);const m=o.FS("readFile",d);return Object(i.a)(new Blob([m.buffer],{type:r}),u,r)}catch(e){throw console.log(e),Object(r.f)("trim_video_transcoding",e.message),e}finally{try{o.exit()}catch(e){}n()}}),[y]),L=Object(n.s)((async e=>{const t=Object(r.c)("load_mute_video_transcoding");let C;try{C=await y(e);const n=(null==e?void 0:e.type)||p.t,r=s(n),o=Object(a.a)()+"."+r,c=Object(l.a)(e)+"-muted."+r;await C.run("-i",e.name,"-vcodec","copy","-an",o);const d=C.FS("readFile",o);return Object(i.a)(new Blob([d.buffer],{type:n}),c,n)}catch(e){throw console.log(e),Object(r.f)("mute_video_transcoding",e.message),e}finally{try{C.exit()}catch(e){}t()}}),[y]),_=Object(n.s)((async e=>{const t=Object(r.c)("load_gif_conversion");let C;try{C=await y(e);const n=Object(a.a)()+"."+p.s,r=Object(l.a)(e)+"."+p.s;await C.run("-i",e.name,...b,n);const o=C.FS("readFile",n);return new i.a(new Blob([o.buffer],{type:p.t}),r,p.t)}catch(e){throw console.error(e),Object(r.f)("gif_conversion",e.message),e}finally{try{C.exit()}catch(e){}t()}}),[y]),j=Object(n.s)((e=>c.includes(e.type)),[c]),x=Boolean(null==E||null===(t=E.meta)||void 0===t?void 0:t.web_stories_media_optimization),Z=g&&x&&v;return Object(n.C)((()=>({isTranscodingEnabled:Z,canTranscodeFile:j,isFileTooLarge:f,transcodeVideo:M,stripAudioFromVideo:L,getFirstFrameOfVideo:O,convertGifToVideo:_,trimVideo:w})),[Z,j,M,L,O,_,w])}},109:function(e,t,C){"use strict";var a=C(384),n=C(259),r=C(53);t.a=function({id:e,targetRef:t,expectedStyle:C,resetOnNullTransform:l=!0}){Object(r.c)(e,(e=>{const r=void 0!==(null==t?void 0:t.current)?t.current:t;if(r)if(null===e)l&&(r.style.cssText="");else{const{color:t,style:l}=e;if(C&&C!==l)return;var i;if(t&&l)if("color"===l&&(null===(i=r.children)||void 0===i?void 0:i.length)>0){const e=Object(a.a)(Object(n.a)(t,l));for(const t of r.children)t.style.cssText=e}else r.style.cssText=Object(a.a)(Object(n.a)(t,l))}}))}},110:function(e,t,C){"use strict";C.d(t,"b",(function(){return a})),C.d(t,"a",(function(){return n})),C.d(t,"c",(function(){return r})),C.d(t,"d",(function(){return l}));const a=(e,t)=>"string"==typeof e&&e.startsWith(t),n=(e,t)=>e.slice(t.length+1),r=(e,t)=>`${e}-${t<0?"N":""}${Math.abs(t)}`,l=(e,t)=>{const C=n(t,e);return"N"===C.charAt(0)?-parseInt(C.slice(1)):parseInt(C)}},118:function(e,t,C){"use strict";C.d(t,"b",(function(){return o})),C.d(t,"a",(function(){return i})),C.d(t,"c",(function(){return c}));var a=C(0),n=C.n(a),r=C(1),l=C(42),i=Object(r.f)({state:{},actions:{}});var o=function CurrentUserProvider({children:e}){const[t,C]=Object(r.I)({}),{actions:{getCurrentUser:a,updateCurrentUser:o}}=Object(l.c)();Object(r.y)((()=>{a&&!Object.keys(t).length&&a().then(C)}),[t,a]);const c=Object(r.s)((e=>o?o(e).then(C):null),[o]),s=Object(r.s)((()=>c({meta:{web_stories_media_optimization:!t.meta.web_stories_media_optimization}})),[t,c]),d={state:{currentUser:t},actions:{toggleWebStoriesMediaOptimization:s,updateCurrentUser:c}};return n.a.createElement(i.Provider,{value:d},e)};var c=function(e){return Object(r.w)(i,null!=e?e:r.k)}},119:function(e,t,C){"use strict";var a=C(1),n=C(18),r=C(20),l=C(98),i=C(6),o=C(132),c=C(237);t.a=function(){const{addElement:e}=Object(r.e)((({actions:e})=>({addElement:e.addElement}))),{setZoomSetting:t}=Object(l.a)((({actions:{setZoomSetting:e}})=>({setZoomSetting:e}))),C=Object(o.a)();return Object(a.s)(((a,r)=>{t(i.G.FIT);const l=function(e,t){return Object(n.b)(e,Object(c.a)(e,t))}(a,r),{id:o,resource:s}=l;return e({element:l}),"video"===a&&null!=s&&s.src&&!s.isPlaceholder&&setTimeout((()=>{const e=document.getElementById(`video-${o}`);e&&e.play().catch((()=>{}))})),C(),l}),[e,C,t])}},120:function(e,t,C){"use strict";var a=C(0),n=C.n(a),r=C(3),l=C(635),i=C(1);const o=Object(r.g)(["100%{transform:rotate(360deg)}"]),c=Object(r.g)(["0%{stroke-dasharray:1,200;stroke-dashoffset:0;}50%{stroke-dasharray:100,200;stroke-dashoffset:-15;}100%{stroke-dasharray:100,200;stroke-dashoffset:-125;}"]),s=r.f.div.attrs({role:"progressbar"}).withConfig({displayName:"circularProgress__Wrapper",componentId:"sc-18ucb7v-0"})(["width:",";height:",";animation:"," 1.4s linear infinite;"],(({size:e})=>`${e}px`),(({size:e})=>`${e}px`),o),d=r.f.svg.withConfig({displayName:"circularProgress__StyledSpinner",componentId:"sc-18ucb7v-1"})(["display:block;"]),u=r.f.circle.withConfig({displayName:"circularProgress__StyledCircle",componentId:"sc-18ucb7v-2"})(["animation:"," 1.4s ease-in-out infinite;stroke:",";"],c,(({theme:e})=>`${e.colors.accent.secondary}`));function CircularProgress({size:e,thickness:t}){const C=Object(i.G)();return n.a.createElement(l.a,{nodeRef:C,in:!0,appear:!0,timeout:0},n.a.createElement(s,{ref:C,size:e},n.a.createElement(d,{viewBox:`${e/2} ${e/2} ${e} ${e}`},n.a.createElement(u,{cx:e,cy:e,r:(e-t)/2,fill:"none",strokeWidth:t,stroke:"currentColor"}))))}CircularProgress.defaultProps={size:24,thickness:2},t.a=CircularProgress},121:function(e,t,C){"use strict";C.d(t,"a",(function(){return m})),C.d(t,"b",(function(){return f}));var a=C(0),n=C.n(a),r=C(1),l=C(145),i=C(50),o=C(10),c=C(404),s=C(6),d=C(42),u=C(264),p=C(401);var m=function FontProvider({children:e}){const t=Object(i.b)("customFonts"),[C,a]=Object(r.I)([]),[m,f]=Object(r.I)([]),[h,b]=Object(r.I)([]),[g,E]=Object(r.I)(null),{actions:{getFonts:v}}=Object(d.c)(),y=C.length>0?C:m;Object(r.y)((()=>{let e=!0;if(!g&&v&&t)try{(async()=>{const t=await v({service:"custom"});if(!e)return;const C=t.map((e=>({id:e.family,name:e.family,value:e.family,...e})));E(C)})()}catch(e){Object(o.f)("font_provider",e.message)}return()=>{e=!1}})),Object(r.y)((()=>{let e=!0;if(!m.length&&v)try{(async()=>{const t=await v({include:l.a.join(",")});if(!e)return;const C=t.map((e=>({id:e.family,name:e.family,value:e.family,...e})));f(C)})()}catch(e){Object(o.f)("font_provider",e.message)}return()=>{e=!1}}),[m,v]);const{maybeEnqueueFontStyle:O,maybeLoadFont:M}=Object(p.a)(),w=Object(r.s)((e=>{const t=y.find((t=>t.family===e));return t||{}}),[y]),L=Object(r.s)((async e=>{if(e.length<2)return a([]),[];const C=(await v({search:e,service:t?null:"builtin"})).map((e=>({...e,id:e.family,name:e.family,value:e.family})));return a(C),C}),[v,t]),_=Object(r.s)((e=>{const t=[{name:s.i[400],value:400}],C=w(e);let a=t;if(C){const{weights:e}=C;e&&(a=e.map((e=>({name:s.i[e],value:e}))))}return a}),[w]),j=Object(r.s)((e=>{const t=w(e);return null!=t&&t.fallbacks?t.fallbacks:[]}),[w]),x=Object(r.s)((e=>{const t=[e];h.forEach((C=>{e.family!==C.family&&t.push(C)})),b(t.slice(0,5))}),[h]),Z=Object(r.G)([]),A=Object(r.s)((e=>{const t=e.filter((e=>!Z.current.includes(e)));if(null==t||!t.length)return;Z.current=Z.current.concat(t);const C=`https://fonts.googleapis.com/css?family=${encodeURIComponent(t.join("|"))}&subset=menu&display=swap`;Object(c.a)(C,"web-stories-google-fonts-menu-css").catch((()=>{Z.current=Z.current.filter((e=>!t.includes(e)))}))}),[]),I=Object(r.s)((e=>{for(const t of e){const e=y.find((({family:e})=>e===t));e&&M(e)}}),[y,M]),T={state:{fonts:C.length>0?C:m,curatedFonts:m,customFonts:g,recentFonts:h},actions:{getFontsBySearch:L,getFontByName:w,maybeEnqueueFontStyle:O,getFontWeight:_,getFontFallback:j,ensureMenuFontsLoaded:A,ensureCustomFontsLoaded:I,addRecentFont:x}};return n.a.createElement(u.a.Provider,{value:T},e)};var f=function(e){return Object(r.w)(u.a,null!=e?e:r.k)}},122:function(e,t,C){"use strict";var a=C(273),n=C(409),r=C(410),l=C(811);var i=function(e){const{color:{r:t,g:C,b:a,a:n=1}}=e;return[t,C,a,Math.round(100*n)].map((e=>e.toString(16))).map((e=>e.padStart(2,"0"))).join("")},o=C(357),c=C(259),s=C(171),d=C(812),u=C(6),p=C(32),m=C(64),f=C(110);const h=e=>Object(l.a)(Object(f.a)(e,p.a)),b=e=>`${p.a}-${i(e)}`;var g={elementToStyle:function(e){const t="span"===e.tagName.toLowerCase(),C=e.style.color,a=Boolean(C);if(t&&a){const e=Object(o.a)(C);return b(e)}return null},stylesToCSS:function(e){const t=e.find((e=>Object(f.b)(e,p.a)));if(!t)return null;let C;try{C=h(t)}catch(e){return null}return Object(c.a)(C,"color")},autoFocus:!1,getters:{color:function(e){const t=Object(m.a)(e,p.a);if(t.length>1)return u.y;const C=t[0];return C===p.d?Object(s.a)(0,0,0):h(C)}},setters:{setColor:function(e,t){const C=Object(d.a)(Object(s.a)(0,0,0),t);return Object(m.b)(e,p.a,(()=>!C),(()=>b(t)))}}};function E(e){return Object(f.c)(p.c,e)}function v(e){return Object(f.d)(p.c,e)}var y={elementToStyle:function(e){const t="span"===e.tagName.toLowerCase(),C=parseFloat(e.style.letterSpacing),a=C&&!isNaN(C);return t&&a?E(100*C):null},stylesToCSS:function(e){const t=e.find((e=>Object(f.b)(e,p.c)));if(!t)return null;const C=v(t);return C?{letterSpacing:C/100+"em"}:null},autoFocus:!1,getters:{letterSpacing:function(e){const t=Object(m.a)(e,p.c);if(t.length>1)return u.y;const C=t[0];return C===p.d?0:v(C)}},setters:{setLetterSpacing:function(e,t){return Object(m.b)(e,p.c,(()=>0!==t),(()=>E(t)))}}},O=C(411);const M=[a.a,n.a,r.a,g,y,O.a];t.a=M},125:function(e,t,C){"use strict";C.d(t,"b",(function(){return A})),C.d(t,"c",(function(){return I})),C.d(t,"a",(function(){return Z})),C.d(t,"e",(function(){return T})),C.d(t,"d",(function(){return S}));var a=C(0),n=C.n(a),r=C(1),l=C(162),i=C.n(l),o=C(813),c=C(98),s=C(20),d=C(520);var u=function(e,t){Object(r.y)((()=>{const C=t=>{var C;const{clipboardData:a}=t;Object(d.a)()||null!=a&&null!==(C=a.types)&&void 0!==C&&C.length||e(t)},a=e=>{Object(d.a)()||t(e)};return document.addEventListener("copy",C),document.addEventListener("cut",C),document.addEventListener("paste",a),()=>{document.removeEventListener("copy",C),document.removeEventListener("cut",C),document.removeEventListener("paste",a)}}),[e,t])},p=C(18);const m="_DOUBLEDASH_";var f=C(29),h=C(272),b=C(426),g=C(274);var E=function(e){return Object(r.s)((t=>{const C=Object(b.a)(t).toArray(),a=f.ContentState.createFromBlockArray(C),n=f.EditorState.createWithContent(a),r=Object(g.a)(n);return!!r&&(e("text",{...h.a,content:r}),!0)}),[e])},v=C(425),y=C(119),O=C(412);var M=function(){const e=Object(O.a)(),{currentPage:t,selectedElements:C,deleteSelectedElements:a,selectedElementAnimations:l}=Object(s.e)((({state:{currentPage:e,selectedElements:t,selectedElementAnimations:C},actions:{deleteSelectedElements:a}})=>({currentPage:e,selectedElements:t,deleteSelectedElements:a,selectedElementAnimations:C}))),i=Object(v.a)(),o=Object(y.a)(),c=E(o),d=Object(r.s)((e=>{const{type:i}=e;0!==C.length&&(!function(e,t,C,a){if(!t.length||!a)return;const{clipboardData:l}=a,i={sentinel:"story-elements",items:t.map((t=>({...t,...t.isDefaultBackground?{backgroundColor:e.backgroundColor}:null,basedOn:t.id,id:void 0}))),animations:C},o=JSON.stringify(i).replace(/--/g,m),c=t.map((e=>{const{type:t}=e,{TextContent:C}=Object(p.g)(t);return C?C(e):t})).join("\n"),s=t.map((e=>{const{type:t,x:C,y:a,rotationAngle:l}=e,{Output:i}=Object(p.g)(t);return Object(r.o)(n.a.createElement(i,{element:e,box:{width:100,height:100,x:C,y:a,rotationAngle:l}}))})).join("\n");l.setData("text/plain",c),l.setData("text/html",`\x3c!-- ${o} --\x3e${s}`)}(t,C,l,e),"cut"===i&&a(),e.preventDefault())}),[t,a,C,l]),f=Object(r.r)((C=>{const{elements:a,animations:n}=function(e,t){let C={animations:[],elements:[]};for(let n=e.firstChild;n;n=n.nextSibling){var a;if(8!==n.nodeType||-1!==(null===(a=n.nodeValue)||void 0===a?void 0:a.indexOf("Fragment")))continue;const e=JSON.parse(n.nodeValue.replace(new RegExp(m,"g"),"--"));if("story-elements"!==e.sentinel)continue;const r=e.items.reduce((({elements:C,animations:a},n)=>{const{element:r,elementAnimations:l}=Object(p.d)({element:{...n,id:n.basedOn},animations:e.animations,existingElements:t.elements});return{elements:[...C,r],animations:[...a,...l]}}),{animations:[],elements:[]});return C={animations:[...C.animations,...r.animations],elements:[...C.elements,...r.elements]},C}return C}(C,t);return e(a,n)}),[e,t]),h=Object(r.s)((e=>{const{clipboardData:t}=e;try{var C;const a=!(null!==(C=t.files)&&void 0!==C&&C.length)&&(t.getData("text/html")||t.getData("text/plain"));if(a){const t=document.createElement("template");t.innerHTML=a.replace(/<meta[^>]+>/g,"").replace(/<\/?html>/g,"").replace(/<\/?body>/g,"");let C=f(t.content);C||(C=c(t.innerHTML)),C&&e.preventDefault()}const{items:n}=t,r=[];for(let e=0;e<n.length;e++){const t=n[e].getAsFile();t&&r.push(t)}r.length>0&&i(r)}catch(e){}}),[f,c,i]);u(d,h)};function w(e,{editingElement:t,editingElementState:C={}}){return{...e,editingElement:t,editingElementState:C}}var L=function(){const[e,t]=Object(r.E)(w,{editingElement:null,editingElementState:{}}),[C,a]=Object(r.I)({}),n=Object(r.s)((()=>{t({editingElement:null})}),[]),l=Object(r.s)((e=>{t({editingElement:e})}),[]),i=Object(r.s)(((e,C)=>{t({editingElement:e,editingElementState:C})}),[]),o=Object(r.s)(((e,t)=>a((C=>({...C,[e]:t})))),[a]),c=Object(r.G)(null);c.current=C;const s=Object(r.s)((e=>c.current[e]),[]),{editingElement:d,editingElementState:u}=e;return Object(r.C)((()=>({nodesById:C,editingElement:d,editingElementState:u,setEditingElementWithState:i,setEditingElementWithoutState:l,clearEditing:n,getNodeForElement:s,setNodeForElement:o})),[C,d,u,i,l,n,s,o])},_=C(747);function j(e,t,C,a,n){const{topLeftPoint:r,topRightPoint:l,bottomRightPoint:o,bottomLeftPoint:c}=Object(_.c)(e,t,C,a,n);return new i.a.Polygon(new i.a.Vector,[new i.a.Vector(r.x,r.y),new i.a.Vector(c.x,c.y),new i.a.Vector(o.x,o.y),new i.a.Vector(l.x,l.y)])}var x=Object(r.f)({actions:{},state:{}});const Z={CANVAS_CONTAINER:"canvasContainer",PAGE_CONTAINER:"pageContainer"};var A=function CanvasProvider({children:e}){const[t,C]=Object(r.I)({}),[a,l]=Object(r.I)(null),d=Object(r.G)(null),[u,p]=Object(r.I)(null),[m,f]=Object(r.I)(null),[h,b]=Object(r.I)(null),[g,E]=Object(r.I)(null),[v,y]=Object(r.I)(null),[O,w]=Object(r.I)(!1),[_,Z]=Object(r.I)(null),[A,I]=Object(r.I)(null),[T,S]=Object(r.I)(null),[R,k]=Object(r.I)(null),[P,N]=Object(r.I)(null),[D,z]=Object(r.I)(null),B=Object(r.C)((()=>new window.IntersectionObserver((e=>{for(const t of e){if(!t.target.dataset.rectObservationKey)return;C((e=>({...e,[t.target.dataset.rectObservationKey]:t.boundingClientRect})))}}))),[]);Object(r.y)((()=>()=>B.disconnect()),[B]);const F=Object(c.a)((({state:{pageWidth:e,pageHeight:t}})=>({width:e,height:t}))),{nodesById:H,editingElement:G,editingElementState:V,setEditingElementWithState:U,setEditingElementWithoutState:W,clearEditing:Y,getNodeForElement:$,setNodeForElement:q}=L(),{currentPage:X,selectedElementIds:K,toggleElementInSelection:Q,setSelectedElementsById:J}=Object(s.e)((({state:{currentPage:e,selectedElementIds:t},actions:{toggleElementInSelection:C,setSelectedElementsById:a}})=>({currentPage:e,selectedElementIds:t,toggleElementInSelection:C,setSelectedElementsById:a}))),ee=Object(r.s)(((e,t)=>{G&&G!==e&&Y(),d.current===e&&"focus"===t.type||(d.current=e,t.shiftKey?Q({elementId:e}):J({elementIds:[e]}),t.currentTarget.focus({preventScroll:!0}),(null==X?void 0:X.elements[0].id)!==e&&t.stopPropagation(),"mousedown"===t.type&&(l(t),t.target.ownerDocument.addEventListener("mouseup",(()=>window.setTimeout(l,0,null)),{once:!0,capture:!0})))}),[G,null==X?void 0:X.elements,Y,Q,J]),te=Object(r.s)((({x:e,y:t,width:C,height:a})=>{const n=j(0,e,t,C,a),r=X.elements.filter((({isBackground:e})=>!e)).map((({id:e,rotationAngle:t,x:C,y:a,width:r,height:l})=>{const o=j(t,C,a,r,l);return i.a.testPolygonPolygon(n,o)?e:null})).filter((e=>e));J({elementIds:r})}),[X,J]);Object(r.y)((()=>{!G||1===K.length&&K[0]===G||Y(),d.current&&!K.includes(d.current)&&(d.current=null)}),[G,K,Y]),M();const Ce=Object(r.C)((()=>({state:{pageContainer:m,canvasContainer:u,fullbleedContainer:h,nodesById:H,editingElement:G,editingElementState:V,isEditing:Boolean(G),lastSelectionEvent:a,displayLinkGuidelines:O,pageAttachmentContainer:v,designSpaceGuideline:g,isEyedropperActive:T,eyedropperCallback:R,eyedropperImg:_,eyedropperPixelData:A,pageCanvasData:P,pageCanvasPromise:D,boundingBoxes:t,clientRectObserver:B},actions:{setPageContainer:f,setFullbleedContainer:b,getNodeForElement:$,setNodeForElement:q,setEditingElement:W,setEditingElementWithState:U,clearEditing:Y,handleSelectElement:ee,selectIntersection:te,setDisplayLinkGuidelines:w,setPageAttachmentContainer:y,setCanvasContainer:p,setDesignSpaceGuideline:E,setIsEyedropperActive:S,setEyedropperCallback:k,setEyedropperImg:Z,setEyedropperPixelData:I,setPageCanvasData:N,setPageCanvasPromise:z}})),[m,u,h,H,G,V,a,O,v,g,T,R,_,A,P,D,t,B,$,q,W,U,Y,ee,te]);return n.a.createElement(x.Provider,{value:Ce},n.a.createElement(o.a,{pageSize:F},e))};var I=function(e){return Object(r.w)(x,null!=e?e:r.k)};function T(e){const t=Object(r.w)(x,(({state:e})=>e.clientRectObserver)),C=Object(r.G)(null);return Object(r.s)((a=>{var n;C.current&&(null===(n=t.unobserve)||void 0===n||n.call(t,C.current));a&&(a.dataset.rectObservationKey=e,t.observe(a)),C.current=a}),[t,e])}function S(e){return Object(r.w)(x,(({state:t})=>{var C;return null===(C=t.boundingBoxes)||void 0===C?void 0:C[e]}))}},130:function(e,t,C){"use strict";var a=C(1),n=C(406);t.a=function(e){return Object(a.w)(n.a,null!=e?e:a.k)}},131:function(e,t,C){"use strict";var a=C(0),n=C.n(a),r=C(3),l=C(1),i=C(36),o=C(31),c=C(97),s=C(55);function d(e,t){return e.startsWith("left")?t?0:-1:e.startsWith("right")||e.endsWith("-start")?t?-1:0:e.endsWith("-end")?t?0:-1:-.5}function u(e){return e.startsWith("top")||e===s.a.RIGHT_END||e===s.a.LEFT_END?-1:e===s.a.RIGHT||e===s.a.LEFT?-.5:null}function p(e,t){const C=d(e,t),a=u(e);if(!C&&!a)return"";return`translate(${100*(C||0)}%, ${100*(a||0)}%)`}function m(e,t,C,a,n,r){var l,o;const c=C.current.getBoundingClientRect(),p=document.body.getBoundingClientRect(),m=null===(l=n.current)||void 0===l?void 0:l.getBoundingClientRect(),f=null==a||null===(o=a.current)||void 0===o?void 0:o.getBoundingClientRect();var h,b;m&&(m.height=Math.max(m.height,null===(h=n.current)||void 0===h?void 0:h.scrollHeight),m.width=Math.max(m.width,null===(b=n.current)||void 0===b?void 0:b.scrollWidth));const{height:g=0,width:E=0}=m||{},{x:v=0,y:y=0}=t||{},O=function(e,t=0,C,a,n,r){const l=n.left+((null==a?void 0:a.left)||C.left)-t,i=n.left+((null==a?void 0:a.left)||C.left)+C.width+t,o=n.left+((null==a?void 0:a.left)||C.left)+C.width/2;switch(e){case s.a.BOTTOM_START:case s.a.TOP_START:case s.a.LEFT:case s.a.LEFT_END:case s.a.LEFT_START:return r?i:l;case s.a.BOTTOM_END:case s.a.TOP_END:case s.a.RIGHT:case s.a.RIGHT_END:case s.a.RIGHT_START:return r?l:i;case s.a.BOTTOM:case s.a.TOP:return o;default:return 0}}(e,v,c,f,p,r),M=p.width-E-d(e)*E,w=function(e,t=0,C){switch(e){case s.a.BOTTOM:case s.a.BOTTOM_START:case s.a.BOTTOM_END:case s.a.LEFT_END:case s.a.RIGHT_END:return C.top+C.height+t;case s.a.TOP:case s.a.TOP_START:case s.a.TOP_END:case s.a.LEFT_START:case s.a.RIGHT_START:return C.top-t;case s.a.RIGHT:case s.a.LEFT:return C.top+C.height/2;default:return 0}}(e,y,c),L=p.height+p.y-g-u(e)*g;return{x:Math.max(0,Math.min(O,M)),y:Math.max(i.b.WP_ADMIN.TOOLBAR_HEIGHT,Math.min(w,L)),width:c.width,height:c.height}}const f=r.f.div.attrs((({$offset:{x:e,y:t,width:C,height:a},fillWidth:n,fillHeight:r,placement:l,isRTL:i,invisible:o})=>({style:{transform:`translate(${e}px, ${t}px) ${p(l,i)}`,...n?{width:`${C}px`}:{},...r?{height:`${a}px`}:{},...o?{visibility:"hidden"}:{}}}))).withConfig({displayName:"popup__Container",componentId:"sc-ldpe7d-0"})(["/*! @noflip */ left:0px;top:0px;position:fixed;z-index:2;overflow-y:auto;max-height:calc(100vh - ","px);"],i.b.WP_ADMIN.TOOLBAR_HEIGHT);t.a=function Popup({anchor:e,dock:t,children:C,renderContents:a,placement:r=s.a.BOTTOM,spacing:i,isOpen:d,invisible:u,fillWidth:p=!1,fillHeight:h=!1,onPositionUpdate:b=c.a}){const[g,E]=Object(l.I)(null),[v,y]=Object(l.I)(!1),O=Object(l.G)(null),{isRTL:M}=Object(o.c)(),w=Object(l.s)((C=>{var a,n,l,o;v&&(null!=C&&null!==(a=C.target)&&void 0!==a&&a.nodeType&&null!==(n=O.current)&&void 0!==n&&n.contains(C.target)||E({offset:(null==e?void 0:e.current)&&m(r,i,e,t,O,M),height:null===(l=O.current)||void 0===l||null===(o=l.getBoundingClientRect())||void 0===o?void 0:o.height}))}),[e,t,r,i,v,M]);return Object(l.y)((()=>{var e,t;null!=g&&g.height&&g.height!==(null===(e=O.current)||void 0===e||null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.height)&&w()}),[null==g?void 0:g.height,w]),Object(l.B)((()=>{if(y(!0),d)return w(),document.addEventListener("scroll",w,!0),()=>document.removeEventListener("scroll",w,!0)}),[d,w]),Object(l.B)(b,[g,b]),Object(l.H)({current:document.body},w,[w]),g&&d?Object(l.h)(n.a.createElement(f,{ref:O,fillWidth:p,fillHeight:h,placement:r,isRTL:M,$offset:g.offset,invisible:u},a?a({propagateDimensionChange:w}):C),document.body):null}},132:function(e,t,C){"use strict";var a=C(1),n=C(48);t.a=function(){const e=Object(a.s)(((e=!0)=>{setTimeout((()=>{const t=window.document;e&&t.activeElement&&t.activeElement!==t.body&&t.activeElement.blur();const C=new window.FocusEvent("focusout");t.dispatchEvent(C)}))}),[]);return Object(n.g)({key:"mod+option+2",editable:!0},(()=>e(!0)),[e]),e}},133:function(e,t,C){"use strict";var a=C(0),n=C.n(a),r=C(1),l=C(620),i=C(166);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}t.a=Object(r.j)((function MoveableWithRef({onContextMenu:e,...t},C){return n.a.createElement(i.a,{onContextMenu:e,zIndex:10,pointerEvents:"initial",render:({container:e})=>n.a.createElement(l.a,o({ref:C,container:e},t))})}))},135:function(e,t,C){"use strict";t.a=function(e){const t=e.map((e=>JSON.stringify(e)));return Array.from(new Set(t)).map((e=>JSON.parse(e)))}},137:function(e,t,C){"use strict";C.d(t,"a",(function(){return a}));const a={family:"Roboto",weights:[100,300,400,500,700,900],styles:["italic","regular"],variants:[[0,100],[1,100],[0,300],[1,300],[0,400],[1,400],[0,500],[1,500],[0,700],[1,700],[0,900],[1,900]],fallbacks:["Helvetica Neue","Helvetica","sans-serif"],service:"fonts.google.com",metrics:{upm:2048,asc:1900,des:-500,tAsc:1536,tDes:-512,tLGap:102,wAsc:1946,wDes:512,xH:1082,capH:1456,yMin:-555,yMax:2163,hAsc:1900,hDes:-500,lGap:0}}},142:function(e,t,C){"use strict";function a(e,t=[]){return e&&"object"==typeof e?Object.assign({},...t.map((t=>e&&t in e?{[t]:e&&e[t]}:{}))):{}}C.d(t,"a",(function(){return a}))},144:function(e,t,C){"use strict";C.d(t,"b",(function(){return f})),C.d(t,"a",(function(){return h}));var a=C(0),n=C.n(a),r=C(1),l=C(57),i=C(59),o=C(396),c=C(79);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const d={boxSizing:"border-box",visibility:"hidden",position:"fixed",contain:"layout paint",top:"-9999px",left:"-9999px",zIndex:-1,overflowWrap:"break-word",...!1},u={dataToStyleX:e=>`${e}px`,dataToStyleY:e=>`${e}px`},p="__WEB_STORIES_MEASURER__",m="__WEB_STORIES_LASTEL__";function f(e,t){const C=b(e);return g(C,{width:`${t}px`,height:null}),C.parentNode.offsetHeight}function h(e,t,C){const a=b(e);g(a,{width:`${t}px`,height:null,fontSize:null});let n,r=1,o=l.f;for(;o-r>1;){const t=Object(i.b)((r+o)/2),{marginOffset:l}=Object(c.a)({...e,fontSize:t});n=l,g(a,{fontSize:`${t}px`,margin:-l/2+"px 0"});a.offsetHeight-l>C?o=t:r=t}return g(a,{fontSize:`${r}px`,margin:-n/2+"px 0"}),{fontSize:r,marginOffset:n}}function b(e){let t=document.body[p];return t||(t=document.createElement("div"),t.id="__web-stories-text-measurer",t.className="web-stories-content",g(t,d),document.body.appendChild(t),document.body[p]=t),function(e,t){const C=e[m];if(e[m]=t,!e.firstElementChild||!C)return!0;return C!==t}(t,e)&&(t.innerHTML=Object(r.o)(n.a.createElement(o.a,s({element:e},u)),t)),t.firstElementChild}function g(e,t){for(const C in t)if(Object.prototype.hasOwnProperty.call(t,C)){const a=t[C];e.style[C]=null===a?"":a}}},145:function(e,t,C){"use strict";C.d(t,"a",(function(){return a})),C.d(t,"b",(function(){return n})),C.d(t,"c",(function(){return r}));const a=["Karla","Lato","Lora","Merriweather","Montserrat","Nunito","Oswald","Playfair Display","Poppins","Raleway","Roboto","Roboto Condensed","Source Serif Pro","Titillium Web","Work Sans","Alegreya","Arimo","EB Garamond","IBM Plex Mono","IBM Plex Serif","Inconsolata","Mulish","Noto Sans","Noto Serif","Open Sans","Open Sans Condensed","PT Mono","PT Sans","PT Serif","Roboto Mono","Source Sans Pro","Ubuntu","Anton","BioRhyme","Bungee","Bungee Shade","Cookie","Dancing Script","Monoton","Nothing You Could Do","Parisienne","Rock Salt","UnifrakturMaguntia"];var n=function(e,t){const C=function(e){const t=e.split(/[#?]/)[0].split(".").pop().trim();switch(t){case"woff":case"woff2":return t;case"ttf":return"truetype";case"otf":return"opentype";default:return null}}(t);return C?`@font-face {\n font-family: "${e}";\n src: url('${t}') format('${C}');\n font-weight: normal;\n font-display:swap;\n }`:null};var r=function(e,t="swap"){const C=new URL("https://fonts.googleapis.com/css2");C.searchParams.append("display",t);for(const{family:t,variants:a=[]}of e){const e=a.reduce(((e,[t,C])=>(1!==t||e.includes("ital")||e.push("ital"),C&&400!==C&&!e.includes("wght")&&e.push("wght"),e)),[]).sort();let n=t;const r=e.join(",");r&&(n+=":"+r);const l=a.sort(((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:e[1]-t[1])).map((([t,C])=>{const a=[];return e.includes("ital")&&a.push(t),e.includes("wght")&&a.push(C),a})).join(";"),i="400"===l;l&&!i&&(n+="@"+l),C.searchParams.append("family",n)}return decodeURI(C.toString())}},16:function(e,t,C){"use strict";C.r(t),C.d(t,"TransformProvider",(function(){return G.a})),C.d(t,"useTransform",(function(){return G.b})),C.d(t,"useTransformHandler",(function(){return G.c})),C.d(t,"PreviewPage",(function(){return $e})),C.d(t,"PreviewErrorBoundary",(function(){return qe})),C.d(t,"ConfigProvider",(function(){return L.b})),C.d(t,"ConfigContext",(function(){return L.a})),C.d(t,"useConfig",(function(){return L.c})),C.d(t,"StoryProvider",(function(){return Z.c})),C.d(t,"StoryContext",(function(){return Z.b})),C.d(t,"useStory",(function(){return Z.e})),C.d(t,"useStoryTriggers",(function(){return Z.g})),C.d(t,"useStoryTriggerListener",(function(){return Z.f})),C.d(t,"useStoryTriggersDispatch",(function(){return Z.h})),C.d(t,"STORY_EVENTS",(function(){return Z.a})),C.d(t,"storyReducers",(function(){return Z.d})),C.d(t,"APIProvider",(function(){return _.b})),C.d(t,"APIContext",(function(){return _.a})),C.d(t,"useAPI",(function(){return _.c})),C.d(t,"RedoButton",(function(){return Redo})),C.d(t,"UndoButton",(function(){return Undo})),C.d(t,"PreviewButton",(function(){return Je.a})),C.d(t,"PublishButton",(function(){return JA})),C.d(t,"SwitchToDraftButton",(function(){return eI})),C.d(t,"UpdateButton",(function(){return tI})),C.d(t,"HeaderTitle",(function(){return aI})),C.d(t,"ExcerptPanel",(function(){return rI})),C.d(t,"PageAdvancementPanel",(function(){return dI})),C.d(t,"SlugPanel",(function(){return hI})),C.d(t,"BackgroundAudioPanel",(function(){return gI})),C.d(t,"TaxonomiesPanel",(function(){return CT})),C.d(t,"Color",(function(){return Mr})),C.d(t,"FilterToggle",(function(){return Ir})),C.d(t,"LinkIcon",(function(){return ll})),C.d(t,"LinkInput",(function(){return dl})),C.d(t,"Media",(function(){return al})),C.d(t,"MediaUploadButton",(function(){return pl})),C.d(t,"Row",(function(){return ol})),C.d(t,"Switch",(function(){return jl})),C.d(t,"TextArea",(function(){return Bl})),C.d(t,"usePresubmitHandler",(function(){return Gl})),C.d(t,"DateTime",(function(){return di})),C.d(t,"Required",(function(){return mi})),C.d(t,"RadioGroup",(function(){return Ai})),C.d(t,"Select",(function(){return Di})),C.d(t,"HierarchicalInput",(function(){return Qi})),C.d(t,"makeFlatOptionTree",(function(){return Gi})),C.d(t,"Panel",(function(){return Xc})),C.d(t,"MAX_HEIGHT_DEFAULT",(function(){return $c})),C.d(t,"panelContext",(function(){return Wc})),C.d(t,"PanelTitle",(function(){return us})),C.d(t,"PanelContent",(function(){return hs})),C.d(t,"SimplePanel",(function(){return gs})),C.d(t,"focusStyle",(function(){return Qt})),C.d(t,"inputContainerStyleOverride",(function(){return Jt})),C.d(t,"FlipControls",(function(){return lC})),C.d(t,"LinkRelations",(function(){return ao})),C.d(t,"getCommonValue",(function(){return ro})),C.d(t,"getCommonObjectValue",(function(){return lo})),C.d(t,"useCommonColorValue",(function(){return io})),C.d(t,"useCommonObjectValue",(function(){return oo})),C.d(t,"ChecklistProvider",(function(){return at})),C.d(t,"useChecklist",(function(){return nt})),C.d(t,"ChecklistCheckpointProvider",(function(){return ChecklistCheckpointProvider})),C.d(t,"useCheckpoint",(function(){return At})),C.d(t,"CheckpointContext",(function(){return Zt})),C.d(t,"ChecklistCountProvider",(function(){return ChecklistCountProvider})),C.d(t,"ChecklistCategoryProvider",(function(){return ChecklistCategoryProvider})),C.d(t,"useRegisterCheck",(function(){return Rt})),C.d(t,"useIsChecklistEmpty",(function(){return kt})),C.d(t,"useCategoryCount",(function(){return Pt})),C.d(t,"Checklist",(function(){return Checklist})),C.d(t,"ElementLinkTappableRegionTooBig",(function(){return UZ})),C.d(t,"ElementLinkTappableRegionTooSmall",(function(){return YZ})),C.d(t,"ImageElementMissingAlt",(function(){return qZ})),C.d(t,"ImageElementResolution",(function(){return JZ})),C.d(t,"PageBackgroundTextLowContrast",(function(){return dA})),C.d(t,"PageTooLittleText",(function(){return pA})),C.d(t,"PageTooManyLinks",(function(){return fA})),C.d(t,"PageTooMuchText",(function(){return bA})),C.d(t,"PublisherLogoMissing",(function(){return gA})),C.d(t,"PublisherLogoSize",(function(){return EA})),C.d(t,"StoryAmpValidationErrors",(function(){return vA})),C.d(t,"StoryMissingExcerpt",(function(){return yA})),C.d(t,"StoryMissingTitle",(function(){return OA})),C.d(t,"StoryPagesCount",(function(){return MA})),C.d(t,"StoryPosterAttached",(function(){return StoryPosterAttached})),C.d(t,"StoryPosterSize",(function(){return wA})),C.d(t,"StoryTitleLength",(function(){return LA})),C.d(t,"TextElementFontSizeTooSmall",(function(){return jA})),C.d(t,"VideoElementLength",(function(){return ZA})),C.d(t,"VideoElementMissingCaptions",(function(){return IA})),C.d(t,"VideoElementMissingDescription",(function(){return SA})),C.d(t,"VideoElementMissingPoster",(function(){return kA})),C.d(t,"VideoElementResolution",(function(){return NA})),C.d(t,"VideoOptimization",(function(){return UA})),C.d(t,"ReviewChecklistDialog",(function(){return YA})),C.d(t,"ChecklistIcon",(function(){return $A})),C.d(t,"PPC_CHECKPOINT_STATE",(function(){return Et})),C.d(t,"CHECKLIST_PRIORITY_COPY",(function(){return gt})),C.d(t,"useIsChecklistMounted",(function(){return hc})),C.d(t,"ChecklistCard",(function(){return HZ})),C.d(t,"CARD_TYPE",(function(){return pZ})),C.d(t,"GRID_VARIANT",(function(){return mZ})),C.d(t,"GRID_TEMPLATE_AREA",(function(){return fZ})),C.d(t,"MAX_THUMBNAILS_DISPLAYED",(function(){return hZ})),C.d(t,"ChecklistCardStyles",(function(){return a})),C.d(t,"DefaultCtaButton",(function(){return DefaultCtaButton})),C.d(t,"DefaultFooterText",(function(){return DefaultFooterText})),C.d(t,"CurrentUserProvider",(function(){return T.b})),C.d(t,"CurrentUserContext",(function(){return T.a})),C.d(t,"useCurrentUser",(function(){return T.c})),C.d(t,"OutputStory",(function(){return aT.a})),C.d(t,"getStoryMarkup",(function(){return nT.a})),C.d(t,"getStoryPropsToSave",(function(){return rT.a})),C.d(t,"useRefreshPostEditURL",(function(){return tt.a})),C.d(t,"FontContext",(function(){return lT.a})),C.d(t,"useLoadFontFiles",(function(){return iT.a})),C.d(t,"StoryPropTypes",(function(){return re.b})),C.d(t,"GlobalStyle",(function(){return m.a})),C.d(t,"theme",(function(){return m.b})),C.d(t,"CropMoveableGlobalStyle",(function(){return Ie})),C.d(t,"CircularProgress",(function(){return VC.a})),C.d(t,"InterfaceSkeleton",(function(){return bS})),C.d(t,"Tooltip",(function(){return Ke.a})),C.d(t,"Popup",(function(){return zC.a})),C.d(t,"useInspector",(function(){return Cr})),C.d(t,"InspectorContext",(function(){return tr})),C.d(t,"highlightStyles",(function(){return Ux})),C.d(t,"highlightStates",(function(){return Ox})),C.d(t,"useHighlights",(function(){return jc})),C.d(t,"EditorConfigProvider",(function(){return L.b})),C.d(t,"Dialog",(function(){return Be.a}));var a={};C.r(a),C.d(a,"Wrapper",(function(){return gZ})),C.d(a,"Container",(function(){return EZ})),C.d(a,"Title",(function(){return vZ})),C.d(a,"Cta",(function(){return yZ})),C.d(a,"CheckboxCtaLabel",(function(){return OZ})),C.d(a,"CheckboxCtaContainer",(function(){return MZ})),C.d(a,"StyledOverflowThumbnail",(function(){return wZ})),C.d(a,"Footer",(function(){return LZ})),C.d(a,"CardListWrapper",(function(){return _Z})),C.d(a,"StyledVideoOptimizationIcon",(function(){return jZ}));var n=C(0),r=C.n(n),l=C(3),i=C(246),o=C.n(i),c=C(758),s=C(759),d=C(385),u=C(1),p=C(50),m=C(164),f=C(10),h=C(2),b=C(285),g=C(40);const E=l.f.div.withConfig({displayName:"errorActions__Message",componentId:"sc-k9tus3-0"})(["color:#fff;font-size:16px;font-weight:300;line-height:1.6;padding:20px;button{margin-right:6px;}"]),v=l.f.p.withConfig({displayName:"errorActions__P",componentId:"sc-k9tus3-1"})(["margin:0 0 8px 0;"]),y=l.f.div.withConfig({displayName:"errorActions__Wrapper",componentId:"sc-k9tus3-2"})(["display:flex;"]);var O=function ErrorActions({error:e,errorInfo:t}){const C=`https://github.com/google/web-stories-wp/issues/new?labels=Type%3A+Bug&template=bug_report.md&title=${e}&body=${encodeURIComponent(`${e}${t.componentStack}`)}`;return r.a.createElement(E,null,r.a.createElement(v,null,Object(h.__)("Something went wrong!","web-stories")),r.a.createElement(v,null,Object(h.__)("The editor has crashed. Please try reloading the page and report the error using the button below.","web-stories")),r.a.createElement(v,null,Object(h.__)("Apologies for the inconvenience.","web-stories")),r.a.createElement(y,null,r.a.createElement(b.a,{variant:g.d.RECTANGLE,type:g.c.QUATERNARY,size:g.a.SMALL,onClick:()=>{window.location.reload(!0)}},Object(h.__)("Reload","web-stories")),r.a.createElement(b.a,{variant:g.d.RECTANGLE,type:g.c.PRIMARY,size:g.a.SMALL,href:C,target:"_blank",rel:"noreferrer"},Object(h.__)("Report Error","web-stories"))))};class M extends u.a{constructor(...e){var t,C,a;super(...e),a={error:null,errorInfo:null},(C="state")in(t=this)?Object.defineProperty(t,C,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[C]=a}componentDidCatch(e,t){this.setState({error:e,errorInfo:t});const C=t?`${e.message}\n\n${t.componentName}\n${t.componentStack}`:e.message;Object(f.f)("editor_error_boundary",C,!0)}render(){const{error:e,errorInfo:t}=this.state;return e?r.a.createElement(O,{error:e,errorInfo:t}):this.props.children}}var w=M,L=C(31),_=C(42),j=C(277),x=C(88),Z=C(20),A=C(121),I=C(49),T=C(118),S=C(91),R=Object(u.f)({state:{},actions:{}});function k(e=[]){return e.reduce(((e,[t,C])=>(e[t]=C,e)),{})}function P(e={},t={}){return Object.entries(e).reduce(((e,[t,C])=>(e[t]={...C,...e[t]},e)),{...t})}function N(e=[],t){return e.reduce(((e,C)=>(e[C[t]]=C,e)),{})}function D(){return(D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var z=function TaxonomyProvider(e){const[t,C]=Object(u.I)([]),[a,n]=Object(u.I)({}),[l,i]=Object(u.I)(!0),{actions:{clearHistory:o}}=Object(x.b)(),{updateStory:c,isStoryLoaded:s,terms:d,hasTaxonomies:p}=Object(Z.e)((({state:{pages:e,story:t},actions:{updateStory:C}})=>{var a;return{updateStory:C,isStoryLoaded:e.length>0,terms:t.terms,hasTaxonomies:(null==t||null===(a=t.taxonomies)||void 0===a?void 0:a.length)>0}})),{getTaxonomyTerm:m,createTaxonomyTerm:f,getTaxonomies:h}=Object(_.c)((({actions:e})=>e));Object(u.y)((()=>{p&&async function(){try{const e=await h();C(e)}catch(e){console.error(e.message)}}()}),[p,h]);const b=Object(u.G)(!1);Object(u.y)((()=>{if(t.length>0&&s&&!b.current){const e=N(t,"slug"),C=function(e={},t=(e=>e)){return k(Object.entries(e).map((([e,C])=>[t(e),C])))}(function(e=[]){return e.reduce(((e,t)=>((t||[]).forEach((t=>{e[t.taxonomy]=e[t.taxonomy]||{},e[t.taxonomy][t.slug]=t})),e)),{})}(d),(t=>{var C;return null===(C=e[t])||void 0===C?void 0:C.restBase})),a=function(e={},t=(e=>e)){return k(Object.entries(e).map((([e,C])=>[e,t(C)])))}(C,(e=>Object.values(e).map((e=>e.id))));n(C),o(),c({properties:{terms:a}}),b.current=!0}}),[d,s,t,n,o,c]);const g=Object(u.s)(((e,t=[])=>{c({properties:C=>{const a="function"==typeof t?t(C.terms[e.restBase]):t;return{...C,terms:{...C.terms,[e.restBase]:a}}}})}),[c]),E=Object(u.s)(((e,t)=>{g(e,((e=[])=>e.includes(t.id)?e:[...e,t.id]))}),[g]),v=Object(u.s)((async(e,t,C=!1)=>{let a=[];const r=null==e?void 0:e.restPath;if(!r)return[];try{a=await m(r,t)}catch(e){console.error(e.message)}if(a.length<1)return a;const l={[e.restBase]:N(a,"slug")};if(n((e=>P(e,l))),C&&t.search){const C=Object(S.a)(t.search),n=a.find((e=>e.slug===C));n&&E(e,n)}return a}),[m,E]),y=Object(u.s)((async(e,t,C,r=!1)=>{var l;const i={name:t};null!=C&&C.id&&(i.parent=C.id,i.slug=`${C.slug}-${Object(S.a)(i.name)}`);const o=(null==i?void 0:i.slug)||Object(S.a)(t),c=null===(l=a[e.restBase])||void 0===l?void 0:l[o];if(c)return void(r&&E(e,c));const s=null==e?void 0:e.restPath;if(s)try{const t=await f(s,i),C={[e.restBase]:{[t.slug]:t}};n((e=>P(e,C))),r&&E(e,t)}catch(C){"term_exists"===C.code&&v(e,{search:t},r)}}),[f,a,v,E]);Object(u.y)((()=>{if(l&&null!=t&&t.length){t.filter((e=>e.hierarchical)).forEach((e=>v(e,{per_page:-1}))),i(!1)}}),[v,l,t]);const O=Object(u.C)((()=>({state:{taxonomies:t,termCache:a,terms:Array.isArray(d)?{}:d},actions:{createTerm:y,addSearchResultsToCache:v,setTerms:g,addTermToSelection:E}})),[a,d,t,y,v,g,E]);return r.a.createElement(R.Provider,D({},e,{value:O}))};var B=function(e){return Object(u.w)(R,null!=e?e:u.k)},F=C(7);var H=function AutoSaveHandler(){const{autoSaveInterval:e}=Object(F.g)(),{state:{hasNewChanges:t}}=Object(F.k)(),{status:C,saveStory:a}=Object(F.o)((({state:{story:{status:e}},actions:{saveStory:t}})=>({status:e,saveStory:t}))),{isUploading:n}=Object(F.m)((({state:{isUploading:e}})=>({isUploading:e}))),r="draft"===C||!C,l=Object(u.G)(a);return Object(u.y)((()=>{l.current=a}),[a]),Object(u.y)((()=>{if(!r||!t||!e||n)return;const C=setTimeout((()=>l.current()),1e3*e);return()=>clearTimeout(C)}),[e,r,t,n]),null},G=C(53),V=C(92),U=C(165),W=Object(u.f)({actions:{},state:{}});var Y=function(e){return Object(u.w)(W,null!=e?e:u.k)};const $=window.requestIdleCallback||function(e,t){const C=(t=t||{}).timeout||1,a=performance.now();return setTimeout((function(){e({get didTimeout(){return!t.timeout&&performance.now()-a-1>C},timeRemaining:function(){return Math.max(0,performance.now()-a+1)}})}),1)},q=window.cancelIdleCallback||function(e){clearTimeout(e)};var X=C(15),K=C(813),Q=C(57),J=C(259),ee=C(814),te=C(8),Ce=C(18),ae=C(37),ne=C(371),re=C(26),le=C(109),ie=C(60);function oe(){return(oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const ce=l.f.div.attrs((({previewMode:e,x:t,y:C,width:a,height:n,rotationAngle:r})=>e?{style:{position:"absolute",zIndex:1,left:`${t}px`,top:`${C}px`,width:`${a}px`,height:`${n}px`,transform:`rotate(${r}deg)`}}:{})).withConfig({displayName:"displayElement__Wrapper",componentId:"sc-uesp27-0"})([""," "," "," contain:layout;transition:opacity 0.15s cubic-bezier(0,0,0.54,1);",""],(({previewMode:e})=>!e&&ae.h),(({previewMode:e})=>!e&&ae.j),(({previewMode:e})=>!e&&ae.i),(({isBackground:e,theme:t})=>e&&Object(l.e)(["border-radius:",";overflow:hidden;"],t.borders.radius.small))),se=l.f.div.withConfig({displayName:"displayElement__BackgroundOverlay",componentId:"sc-uesp27-1"})(["position:absolute;width:100%;height:100%;top:0;left:0;"]),de=l.f.div.withConfig({displayName:"displayElement__ReplacementContainer",componentId:"sc-uesp27-2"})(["transition:opacity 0.25s cubic-bezier(0,0,0.54,1);pointer-events:none;opacity:",";height:100%;"],(({hasReplacement:e})=>e?1:0));function AnimationWrapper({children:e,id:t,isAnimatable:C}){return C?r.a.createElement(te.m.WAAPIWrapper,{target:t},e):e}var ue=Object(u.m)((function DisplayElement({element:e,previewMode:t,isAnimatable:C=!1}){const{getBox:a,dataToEditorX:n}=Object(ee.a)((e=>({getBox:e.actions.getBox,dataToEditorX:e.actions.dataToEditorX}))),[l,i]=Object(u.I)(null),o=Boolean(l),{id:c,opacity:s,type:d,isBackground:p,overlay:m,border:f={},flip:h}=e,b=o?{...e,type:l.resource.type,resource:l.resource,scale:l.scale,focalX:l.focalX,focalY:l.focalY,flip:p?l.flip:h,overlay:p?l.overlay:m}:null,{Display:g}=Object(Ce.g)(d),{Display:E}=Object(Ce.g)(null==l?void 0:l.resource.type)||{},v=Object(u.G)(null),y=a(e);Object(G.c)(c,(e=>{const t=v.current;if(null===e)t.style.transform="",t.style.width="",t.style.height="";else{const{translate:C,rotate:a,resize:n,dropTargets:r}=e;t.style.transform=`translate(${null==C?void 0:C[0]}px, ${null==C?void 0:C[1]}px) rotate(${a}deg)`,n&&0!==n[0]&&0!==n[1]&&(t.style.width=`${n[0]}px`,t.style.height=`${n[1]}px`),void 0!==(null==r?void 0:r.hover)&&(t.style.opacity=r.hover?0:1),void 0!==(null==r?void 0:r.replacement)&&i(r.replacement||null)}}));const O=Object(u.G)(null);return Object(le.a)({id:c,targetRef:O,resetOnNullTransform:!1}),r.a.createElement(ce,oe({ref:v,"data-element-id":c,isBackground:e.isBackground,previewMode:t},y),r.a.createElement(AnimationWrapper,{id:c,isAnimatable:C},r.a.createElement(ne.a,{element:e,fill:!0,box:y,style:{opacity:void 0!==s?s/100:null,...Object(ie.e)(e)?Object(ie.a)({...Object(ie.d)(f,t,n),width:`${y.width}px`,height:`${y.height}px`}):null},previewMode:t},r.a.createElement(g,{element:e,previewMode:t,box:y})),!t&&r.a.createElement(de,{hasReplacement:o},b&&r.a.createElement(ne.a,{element:b,fill:!0,box:y,style:{opacity:s?s/100:null},previewMode:t},r.a.createElement(E,{element:b,box:y}))),p&&m&&!o&&r.a.createElement(se,{ref:O,style:Object(J.a)(m)})))}));const pe=l.f.div.withConfig({displayName:"storyPageToDataUrl__Page",componentId:"sc-gutxak-0"})(["display:block;position:relative;padding:0;border:0;background-color:transparent;height:","px;width:","px;flex:none;outline:0;"],(({height:e})=>e),(({width:e})=>e)),me=l.f.div.withConfig({displayName:"storyPageToDataUrl__PreviewWrapper",componentId:"sc-gutxak-1"})(["height:100%;position:relative;overflow:hidden;background-color:",";border-radius:4px;",""],(({theme:e})=>e.colors.fg.white),(({background:e})=>Object(J.a)(e))),fe=Object(u.j)((function PageWithDependencies({page:e,width:t,height:C},a){return r.a.createElement(l.c,{theme:X.b},r.a.createElement(A.a,null,r.a.createElement(G.a,null,r.a.createElement(K.a,{pageSize:{width:t,height:C}},r.a.createElement(pe,{ref:a,height:C,width:t},r.a.createElement(me,{background:e.backgroundColor},e.elements.map((e=>r.a.createElement(ue,{key:e.id,previewMode:!0,element:e})))))))))}));var he=async function(e,{width:t=400,...a}){const n=await C.e(197).then(C.bind(null,1052)),l=t*(1/Q.g),i=t*(1/Q.e),o=document.createElement("div");o.style.cssText=`\n contain: strict;\n position: absolute;\n top: 0;\n left: 0;\n width: ${t}px;\n height: ${i}px;\n opacity: 0;\n transform: translate(-100%, -100%);\n pointer-events: none;\n `;const c=await new Promise((C=>{Object(u.n)(r.a.createElement(fe,{ref:e=>{e&&C(e)},page:e,width:t,height:l,containerHeight:i}),o)}));document.body.appendChild(o);const s=await n.toJpeg(c,{...a,width:t,height:t*(1/Q.g),canvasHeight:t*(1/Q.g),canvasWidth:t});return Object(u.q)(o),document.body.removeChild(o),s};var be=function PageDataUrlProvider({children:e}){const[t,C]=Object(u.I)({}),a=Object(u.G)([]),n=Object(u.G)(!1),l=Object(u.G)([null,null]),i=Object(u.s)((()=>{if(n.current=!0,!a.current.length)return void(n.current=!1);const[e,t]=a.current.shift(),C=$((async()=>{await t(),l.current=[null,null],i()}));l.current=[e,C]}),[]),o=Object(u.s)((e=>{a.current=a.current.filter((([t])=>t!==e));const[t,C]=l.current;e===t&&(q(C),l.current=[null,null],i())}),[i]),c=Object(u.s)((e=>(o(e.id),a.current.push([e.id,async()=>{const t=await he(e,{});C((C=>({...C,[e.id]:t})))}]),n.current||i(),()=>{o(e.id)})),[i,o]),s=Object(u.C)((()=>({state:{dataUrls:t},actions:{queuePageImageGeneration:c}})),[c,t]);return r.a.createElement(W.Provider,{value:s},e)},ge=C(83),Ee=C(562),ve=C(48);const ye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAGElEQVQYV2NkYGD4////fwZGEMnIyMgAAEvqB/6wfXLSAAAAAElFTkSuQmCC",Oe=l.f.div.withConfig({displayName:"devTools__Container",componentId:"sc-1ebk327-0"})(["position:fixed;z-index:2147483646;bottom:0;left:0;display:flex;flex-direction:column;width:35%;height:50%;border:6px solid ",";background:",";color:",";"],(({theme:e})=>e.colors.bg.secondary),(({theme:e})=>e.colors.bg.primary),(({theme:e})=>e.colors.fg.secondary)),Me=l.f.textarea.withConfig({displayName:"devTools__Textarea",componentId:"sc-1ebk327-1"})(["flex:1;border:0;background:",";color:",";white-space:nowrap;overflow:auto;"],(({theme:e})=>e.colors.bg.primary),(({theme:e})=>e.colors.fg.secondary)),we=l.f.div.withConfig({displayName:"devTools__Options",componentId:"sc-1ebk327-2"})(["display:flex;justify-content:space-between;padding:6px;"]),Le=l.f.label.withConfig({displayName:"devTools__Label",componentId:"sc-1ebk327-3"})(["margin-right:6px;"]),_e=l.f.button.withConfig({displayName:"devTools__Button",componentId:"sc-1ebk327-4"})(["margin-left:6px;"]),je=e=>{const t=[];return[{...e,pages:e.pages.map((e=>({...e,elements:e.elements.map((e=>{const C={...e};return"resource"in e&&(C.resource={...e.resource},"video"===e.type&&(C.resource.mimeType="video/mp4",C.resource.src="data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAPEbW9vdgAAAGxtdmhkAAAAANrF/AXaxfwFAAAD6AAAB9AAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAABhpb2RzAAAAABCAgIAHAE///////wAAAzh0cmFrAAAAXHRraGQAAAAB2sX8BdrF/AUAAAABAAAAAAAAB9AAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAABQAAAAUAAAAAAKwbWRpYQAAACBtZGhkAAAAANrF/AXaxfwFAAAD6AAAB9BVxAAAAAAAIWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAAAAAAACZ21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAq3N0c2QAAAAAAAAAAQAAAJthdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABQAFABIAAAASAAAAAAAAAABDkpWVC9BVkMgQ29kaW5nAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAAM2F2Y0MBTUAK/+EAG2dNQArsxLzzzUBAQZAAAAMAEAAAAwFI8SJZoAEABWjpeyyAAAAAEmNvbHJuY2xjAAEAAQAGAAAAGHN0dHMAAAAAAAAAAQAAABQAAABkAAAAZHN0c3oAAAAAAAAAAAAAABQAAAC1AAAADAAAAAwAAAAMAAAADAAAAGcAAAAOAAAADQAAAAwAAADEAAAADwAAAA4AAAAMAAAAmgAAAA8AAAAMAAAADAAAABEAAAAOAAAADAAAABxzdHNjAAAAAAAAAAEAAAABAAAACgAAAAEAAAAgY282NAAAAAAAAAACAAAAAAAAA/QAAAAAAAAGKwAAAKhjdHRzAAAAAAAAABMAAAABAAAAyAAAAAEAAAH0AAAAAQAAAMgAAAABAAAAAAAAAAEAAABkAAAAAQAAAfQAAAABAAAAyAAAAAEAAAAAAAAAAQAAAGQAAAABAAAB9AAAAAEAAADIAAAAAQAAAAAAAAABAAAAZAAAAAEAAAH0AAAAAQAAAMgAAAABAAAAAAAAAAEAAABkAAAAAQAAAZAAAAACAAAAZAAAABRzdHNzAAAAAAAAAAEAAAABAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAAH0AAAAMgAAQAAAAAAAW1kYXQAAAAAAAADXAAAALFliIQAIf8tERhKDUPN//6tPIlfMgqs2j4bf1chdW+++2VwQdh75gd9Y8UGeNAnhlaisT01Zs49a/0nV0aO/GLhqiGwvWR/s1K9W3zBx2od2cS1bT/kb2rz7FeHrWTqTLX6Gx65Y6i33pdJ/uLJd1nt76ybxnGFuPrIHacdB39MBmZsd4t/m7wPBzhrJIjUCiCUcSaxJPxvEH+6DID5TqxsXtv0RS9+hTuYECGa+YWdx4EAAAAIQZokbEMfi4AAAAAIQZ5COIc/0YEAAAAIAZ5hNEEH1YAAAAAIAZ5jakEH1YEAAABjQZpoSahBaJlMCM/eVhjnGE9A+AdJ7SwN5vlKUC/otPa/5jefanvcx5sQZ4c8/3tiMqvDgQF8rydFoFe3gcpkTP4xG9DP5oXTv1DTSsVi1O/u9fkq6BMYR61X6/n148wbBk3hAAAACkGehi5RMJfxO6sAAAAJAZ6lKRDn87czAAAACAGep25Cn8WAAAAAwEGarDUILakymAT/lvijvmpe6mLGpu6rJNoev4/97f/3/AViMdt7WMTLeGSxGKwsecwmz+Z5NTf4Lgky4aLbYBjw9pUtNg4bov9E4yT+OadpewkQxiWZZozDDf98P4PN72xr+rkQJcODW8z2LOkQVijjHcWSmTAvF7/ANFm8TO5l9vC/tz7FvEis+ba+dTueI87l9hdLXQfWqKN+J9j1fj5cguj08byzEmWnKbLlqG1uTZmu0LDedc3Ugo76bySHIAAAAAtBnspklERc3+sNqQAAAAoBnukpEZ/3fsMPAAAACAGe625N/6+AAAAAlkGa8DUILakymARfBGYe5snAbMic1iEEu9W/yugK09WdqQ1/7ftt/lUz4i6orQg+4cIz2nHYVKTXCJJbyOrz/tGL+TWtNtUBVK2kbTsfCYF8ddhk+qL5Jr82IUEUALXNsKpx1hhGIJnvqqlGTOyyOpmwbHhNUa2TaBkzzVzuaVnuHnaL3sjfLR0XEc/T6ntUXHacPLf94QAAAAtBnw5klERd//FEowAAAAgBny1pFf+ngQAAAAgBny9uf+yhJAAAAA1BmzM1CC2pMpgE/xwwAAAACkGfUWSURFz/kYEAAAAIAZ9ybkv/mIA=",C.resource.poster=ye,t.push(C.id)),"image"===e.type&&(C.resource.mimeType="image/png",C.resource.src=ye)),C}))})))},t]},xe=e=>{if(!e.length)return e;const t=e.match(/\/([^/?#]+)[^/]*$/);return t.length>1?`__WEB_STORIES_TEMPLATE_BASE_URL__/images/templates/%%templateName%%/${t[1]}`:e};var Ze=function DevTools(){const[e,t]=Object(u.I)(!1),[C,a]=Object(u.I)(!1),[n,l]=Object(u.I)(!1),[i,o]=Object(u.I)(!1),{showSnackbar:c}=Object(Ee.a)(),s=Object(u.G)(),{reducerState:d,restore:p}=Object(Z.e)((({internal:e})=>({reducerState:e.reducerState,restore:e.restore}))),{pages:m,current:f,selection:h,story:{globalStoryStyles:b}}=d,g={current:f,selection:h,story:{globalStoryStyles:b},version:ge.a,pages:m},E=n?je(g)[0]:i?(v=g,{...v,current:null,selection:[],story:{},pages:v.pages.map((e=>{var t;return{...e,elements:e.elements.map((e=>{const t={...e};return"resource"in e&&(t.resource={...e.resource},"video"===e.type&&(t.resource.id=0,t.resource.posterId=0,t.resource.src=xe(t.resource.src),t.resource.poster=xe(t.resource.poster)),"image"===e.type&&(t.resource.id=0,t.resource.sizes=[],t.resource.src=xe(t.resource.src))),t})),pageTemplateType:null!==(t=null==e?void 0:e.pageTemplateType)&&void 0!==t?t:""}}))}):g;var v;const y=()=>t((e=>!e));Object(ve.g)({key:"mod+shift+alt+j",editable:!0},y);const O=JSON.stringify(E,null,2),M=C?window.btoa(O):O,[w,L]=Object(u.I)(M);return Object(u.y)((()=>L(M)),[M]),e?r.a.createElement(Oe,null,r.a.createElement(we,null,r.a.createElement("div",null,r.a.createElement(Le,{title:"For easier sharing thru various channels"},r.a.createElement("input",{type:"checkbox",checked:C,onChange:()=>a((e=>!e))}),"Base64"),r.a.createElement(Le,{title:"Replace resources with dummy resources"},r.a.createElement("input",{type:"checkbox",checked:n,onChange:()=>l((e=>!e))}),"Dummy resources"),r.a.createElement(Le,{title:"Export as Template"},r.a.createElement("input",{type:"checkbox",checked:i,onChange:()=>o((e=>!e))}),"Template")),r.a.createElement("div",null,r.a.createElement(_e,{title:"Load data from input",onClick:()=>{let e=w;try{e=window.atob(e)}catch(e){}const t=JSON.parse(e),C={...t,story:{...d.story,...t.story},capabilities:d.capabilities},[a,r]=n?je(C):[C];p(a),r.length>0&&r.forEach((e=>{const t=document.getElementById(`video-${e}`);t&&t.load()})),c({message:"Story restored from input",timeout:1200})}},"Load"),r.a.createElement(_e,{title:"Copy data to clipboard",onClick:()=>{s.current.select(),document.execCommand("copy"),s.current.setSelectionRange(0,0),c({message:"Copied to clipboard",timeout:1200})}},"Copy"),r.a.createElement(_e,{title:"Close DevTools",onClick:y},"X"))),r.a.createElement(Me,{ref:s,className:"mousetrap",value:w,onChange:e=>L(e.target.value)})):null};const Ae=Object(l.d)([".default-moveable .moveable-control,.default-moveable .moveable-line.moveable-rotation-line .moveable-control{background:"," !important;border:1px solid "," !important;}.default-moveable.type-text .moveable-direction.moveable-n,.default-moveable.type-text .moveable-direction.moveable-s{pointer-events:none;}.default-moveable .moveable-control.moveable-n{display:none !important;}.default-moveable .moveable-line{border:0;background:transparent !important;width:1px;height:1px;}.default-moveable .moveable-horizontal{border-bottom:1px dashed "," !important;}.default-moveable .moveable-vertical{border-right:1px dashed "," !important;}.default-moveable .moveable-gap{border-color:"," !important;}.default-moveable .moveable-target{border-style:solid !important;}.default-moveable .moveable-control.moveable-s,.default-moveable .moveable-control.moveable-e,.default-moveable .moveable-control.moveable-w{border-radius:4px;}.default-moveable .moveable-control.moveable-nw,.default-moveable .moveable-control.moveable-ne,.default-moveable .moveable-control.moveable-sw,.default-moveable .moveable-control.moveable-se{border-radius:2px;width:8px;height:8px;margin-left:-4px;margin-top:-4px;}.default-moveable .moveable-control.moveable-s{height:6px !important;width:16px !important;margin-top:-3px !important;}.default-moveable .moveable-control.moveable-e{height:16px !important;width:6px !important;margin-left:-3px !important;}.default-moveable .moveable-control.moveable-w{height:16px !important;width:6px !important;margin-left:-3px !important;}.default-moveable.moveable-control-box .moveable-line.moveable-direction{background:"," !important;width:1px;height:1px;}.default-moveable.moveable-control-box .moveable-line.moveable-rotation-line{background:"," !important;width:1px;height:15px;top:25px;}.default-moveable.moveable-control-box .moveable-control.moveable-rotation-control{border-radius:50px;width:10px;height:10px;margin-left:-5px;top:25px;}.default-moveable.hide-handles .moveable-line.moveable-rotation-line,.default-moveable.hide-handles .moveable-line.moveable-direction{display:none;}.default-moveable.visually-hide-handles .moveable-control.moveable-e,.default-moveable.visually-hide-handles .moveable-control.moveable-w,.default-moveable.visually-hide-handles .moveable-control.moveable-s,.default-moveable.visually-hide-handles .moveable-control.moveable-ne,.default-moveable.visually-hide-handles .moveable-control.moveable-nw,.default-moveable.visually-hide-handles .moveable-control.moveable-sw{opacity:0;}"],(({theme:e})=>e.colors.bg.primary),(({theme:e})=>e.colors.border.selection),(({theme:e})=>e.colors.border.focus),(({theme:e})=>e.colors.border.focus),(({theme:e})=>e.colors.border.negativePress),(({theme:e})=>e.colors.border.selection),(({theme:e})=>e.colors.border.selection)),Ie=Object(l.d)([".crop-moveable .moveable-control{background:"," !important;border:none !important;}.crop-moveable .moveable-control.moveable-n,.crop-moveable .moveable-control.moveable-s,.crop-moveable .moveable-control.moveable-e,.crop-moveable .moveable-control.moveable-w{border:1px solid "," !important;border-radius:4px;}.crop-moveable .moveable-control.moveable-n,.crop-moveable .moveable-control.moveable-s{width:","px !important;height:","px !important;margin-left:-12px !important;}.crop-moveable .moveable-control.moveable-n{margin-top:-8px !important;}.crop-moveable .moveable-control.moveable-s{margin-top:0px !important;}.crop-moveable .moveable-control.moveable-e{margin-left:0 !important;}.crop-moveable .moveable-control.moveable-w{margin-top:0 !important;margin-left:-8px !important;}.crop-moveable .moveable-control.moveable-e,.crop-moveable .moveable-control.moveable-w{width:","px !important;height:","px !important;margin-top:-12px !important;}.crop-moveable .moveable-control.moveable-nw,.crop-moveable .moveable-control.moveable-ne,.crop-moveable .moveable-control.moveable-sw,.crop-moveable .moveable-control.moveable-se,.crop-moveable .moveable-control.moveable-nw::before,.crop-moveable .moveable-control.moveable-ne::before,.crop-moveable .moveable-control.moveable-sw::before,.crop-moveable .moveable-control.moveable-se::before,.crop-moveable .moveable-control.moveable-nw::after,.crop-moveable .moveable-control.moveable-ne::after,.crop-moveable .moveable-control.moveable-sw::after,.crop-moveable .moveable-control.moveable-se::after{left:initial !important;right:initial !important;top:initial !important;bottom:initial !important;background:"," !important;position:absolute !important;border-style:solid !important;border-color:"," !important;}.crop-moveable .moveable-control.moveable-nw::before,.crop-moveable .moveable-control.moveable-ne::before,.crop-moveable .moveable-control.moveable-sw::before,.crop-moveable .moveable-control.moveable-se::before,.crop-moveable .moveable-control.moveable-nw::after,.crop-moveable .moveable-control.moveable-ne::after,.crop-moveable .moveable-control.moveable-sw::after,.crop-moveable .moveable-control.moveable-se::after{content:'';}.crop-moveable .moveable-control.moveable-nw,.crop-moveable .moveable-control.moveable-ne,.crop-moveable .moveable-control.moveable-sw,.crop-moveable .moveable-control.moveable-se{width:","px !important;height:","px !important;}.crop-moveable .moveable-control.moveable-nw{top:-","px !important;left:-","px !important;border-width:1px 0 0 1px !important;border-radius:2px 0 0 0 !important;}.crop-moveable .moveable-control.moveable-ne{top:-","px !important;right:-","px !important;border-width:1px 1px 0 0 !important;border-radius:0 2px 0 0 !important;}.crop-moveable .moveable-control.moveable-sw{left:-","px !important;bottom:-","px !important;border-width:0 0 1px 1px !important;border-radius:0 0 0 2px !important;}.crop-moveable .moveable-control.moveable-se{right:-","px !important;bottom:-","px !important;border-width:0 1px 1px 0 !important;border-radius:0 0 2px 0 !important;}.crop-moveable .moveable-control.moveable-nw::before,.crop-moveable .moveable-control.moveable-ne::before,.crop-moveable .moveable-control.moveable-sw::before,.crop-moveable .moveable-control.moveable-se::before{width:","px !important;height:","px !important;top:0;}.crop-moveable .moveable-control.moveable-nw::before,.crop-moveable .moveable-control.moveable-sw::before{left:","px !important;border-width:1px 1px 1px 0;border-radius:0 2px 2px 0;}.crop-moveable .moveable-control.moveable-ne::before,.crop-moveable .moveable-control.moveable-se::before{right:","px !important;border-width:1px 0 1px 1px;border-radius:2px 0 0 2px;}.crop-moveable .moveable-control.moveable-nw::before,.crop-moveable .moveable-control.moveable-ne::before{top:-","px !important;}.crop-moveable .moveable-control.moveable-sw::before,.crop-moveable .moveable-control.moveable-se::before{bottom:-","px !important;}.crop-moveable .moveable-control.moveable-nw::after,.crop-moveable .moveable-control.moveable-ne::after,.crop-moveable .moveable-control.moveable-sw::after,.crop-moveable .moveable-control.moveable-se::after{width:","px !important;height:","px !important;}.crop-moveable .moveable-control.moveable-nw::after,.crop-moveable .moveable-control.moveable-ne::after{top:","px !important;border-width:0 1px 1px 1px;border-radius:0 0 2px 2px;}.crop-moveable .moveable-control.moveable-sw::after,.crop-moveable .moveable-control.moveable-se::after{bottom:","px !important;border-width:1px 1px 0 1px;border-radius:2px 2px 0 0;}.crop-moveable .moveable-control.moveable-nw::after,.crop-moveable .moveable-control.moveable-sw::after{left:-","px !important;}.crop-moveable .moveable-control.moveable-ne::after,.crop-moveable .moveable-control.moveable-se::after{right:-",'px !important;}.crop-moveable .moveable-line.moveable-direction[data-line-index="0"]{margin-top:-4px;}.crop-moveable .moveable-line.moveable-direction[data-line-index="3"]{margin-top:4px;}.crop-moveable .moveable-line.moveable-direction[data-line-index="1"]{margin-left:4px;}.crop-moveable .moveable-line.moveable-direction[data-line-index="2"]{margin-left:-4px;}.crop-moveable .moveable-direction.moveable-line{background:'," !important;width:2px;height:2px;pointer-events:none;}"],(({theme:e})=>e.colors.bg.primary),(({theme:e})=>e.colors.border.selection),24,8,8,24,(({theme:e})=>e.colors.bg.primary),(({theme:e})=>e.colors.border.selection),7,7,1,1,1,7,1,7,7,7,17,8,6,6,1,1,8,17,6,6,1,1,(({theme:e})=>e.colors.border.selection)),Te=Object(l.d)([".react-calendar__tile--now.react-calendar__month-view__days__day:focus{background-color:#eeeec1;}"]),Se="useskeyboard",Re=".useskeyboard",ke=Object(l.d)(["body:not(",") *:focus{outline:none !important;}"],Re),Pe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Tab","Digit1","Digit2","Digit3"];var Ne=()=>{const[e,t]=Object(u.I)(!1),C=C=>{!e&&Pe.includes(C.code)&&t(!0)},a=()=>{e&&t(!1)};return document.addEventListener("keydown",C,!0),document.addEventListener("mousedown",a,!0),Object(u.y)((()=>function(){document.removeEventListener("keydown",C,!0),document.removeEventListener("mousedown",a,!0)})),Object(u.y)((()=>{document.body.classList.toggle(Se,e)}),[e]),r.a.createElement(ke,null)};var De={locale:{locale:"en-US",dateFormat:"F j, Y",timeFormat:"g:i a",gmtOffset:"0",timezone:"",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysInitials:["S","M","T","W","T","F","S"],weekStartsOn:1},allowedFileTypes:["gif","jpe","jpeg","jpg","m4v","mp4","png","svg","svgz","webm","webp"],allowedTranscodableMimeTypes:["video/3gpp","video/3gpp2","video/MP2T","video/mp4","video/mpeg","video/ogg","video/quicktime","video/webm","video/x-flv","video/x-h261","video/x-h263","video/x-m4v","video/x-matroska","video/x-mjpeg","video/x-ms-asf","video/x-msvideo","video/x-nut"],allowedImageFileTypes:["gif","jpe","jpeg","jpg","png","webp"],allowedImageMimeTypes:["image/webp","image/png","image/jpeg","image/gif"],allowedAudioFileTypes:["aac","m4a","m4b","mp3","oga","ogg","wav"],allowedAudioMimeTypes:["audio/mpeg","audio/aac","audio/wav","audio/ogg"],allowedMimeTypes:{image:["image/webp","image/png","image/jpeg","image/gif","image/svg+xml"],audio:[],video:["video/mp4","video/webm"]},isRTL:!1,storyId:1,cdnURL:"https://wp.stories.google/static/main/",maxUpload:314572800,capabilities:{hasUploadMediaAction:!1,canManageSettings:!1},metadata:{publisher:""},showMedia3p:!0,encodeMarkup:!0,ffmpegCoreUrl:"https://wp.stories.google/static/main/js/@ffmpeg/core@0.10.0/dist/ffmpeg-core.js",apiCallbacks:{},MediaUpload:()=>null};var ze=function StoryEditor({config:e,initialEdits:t,children:C}){const a=Object(u.C)((()=>Object(c.a)(De,e)),[e]),{storyId:n,isRTL:i,flags:f}=a;return r.a.createElement(p.a,{features:f},r.a.createElement(l.a,{stylisPlugins:i?[o.a]:[]},r.a.createElement(l.c,{theme:m.b},r.a.createElement(w,null,r.a.createElement(L.b,{config:a},r.a.createElement(_.b,null,r.a.createElement(j.a,null,r.a.createElement(x.a,{size:50},r.a.createElement(s.a,null,r.a.createElement(Z.c,{storyId:n,initialEdits:t},r.a.createElement(z,null,r.a.createElement(T.b,null,r.a.createElement(A.a,null,r.a.createElement(I.b,null,r.a.createElement(H,null),r.a.createElement(G.a,null,r.a.createElement(V.a,null,r.a.createElement(U.a,null,r.a.createElement(be,null,r.a.createElement(m.a,null),r.a.createElement(Ze,null),r.a.createElement(Ae,null),r.a.createElement(Ie,null),r.a.createElement(d.b,null),r.a.createElement(Te,null),r.a.createElement(Ne,null),C))))))))))))))))))},Be=C(72),Fe=C(5),He=C.n(Fe);var Ge=Object(u.m)((function PreviewPageElements({page:e}){return e.elements.map((t=>r.a.createElement(ue,{previewMode:!0,key:t.id,page:e,element:t,isAnimatable:!0})))}));const Ve=l.f.div.withConfig({displayName:"previewPage__FullBleedPreviewWrapper",componentId:"sc-x79euf-0"})(["height:",";width:100%;overflow:hidden;position:relative;display:flex;align-items:center;background-color:white;",";"],(({pageSize:e})=>`${e.containerHeight}px`),(({background:e})=>Object(J.a)(e))),Ue=l.f.div.withConfig({displayName:"previewPage__PreviewSafeZone",componentId:"sc-x79euf-1"})(["width:100%;height:",";overflow:visible;position:absolute;margin:0;"],(({pageSize:e})=>`${e.height}px`));function PreviewPageAnimationController({animationState:e}){const t=Object(te.t)((({actions:e})=>e.WAAPIAnimationMethods));return Object(u.y)((()=>{switch(e){case te.l.PLAYING:return t.play(),()=>{};case te.l.RESET:return t.reset(),()=>{};case te.l.SCRUBBING:case te.l.PAUSED:return t.pause(),()=>{};default:return()=>{}}}),[e,t]),Object(u.y)((()=>()=>t.reset()),[t]),null}const We=Object(u.m)(Object(u.j)((function PreviewPageDisplay({page:e,pageSize:t},C){return r.a.createElement(Ve,{ref:C,pageSize:t,background:e.backgroundColor},r.a.createElement(Ue,{pageSize:t},r.a.createElement(Ge,{page:e})))}))),Ye=Object(u.j)((function PreviewPage({page:e,pageSize:t,animationState:C=te.l.RESET,onAnimationComplete:a},n){return r.a.createElement(l.a,{stylisPlugins:[]},r.a.createElement(te.m.Provider,{animations:e.animations,elements:e.elements,onWAAPIFinish:a},r.a.createElement(We,{ref:n,page:e,pageSize:t}),r.a.createElement(PreviewPageAnimationController,{animationState:C})))}));PreviewPageAnimationController.propTypes={animationState:He.a.oneOf(Object.values(te.l))};var $e=Ye;class qe extends u.a{constructor(...e){var t,C,a;super(...e),a={hasError:!1},(C="state")in(t=this)?Object.defineProperty(t,C,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[C]=a}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error(e,t)}render(){return this.state.hasError?r.a.createElement("div",null):this.props.children}}var Xe=C(4),Ke=C(34);function Qe(){return(Qe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}function HistoryButton({title:e,shortcut:t,children:C,...a}){return r.a.createElement(Ke.a,{title:e,shortcut:t,hasTail:!0},r.a.createElement(b.a,Qe({variant:g.d.SQUARE,type:g.c.QUATERNARY,size:g.a.SMALL},a),C))}function Redo(){const{state:{canRedo:e},actions:{redo:t}}=Object(F.k)(),{isRTL:C}=Object(F.g)(),a=Object(u.s)((()=>t()),[t]);return r.a.createElement(HistoryButton,{title:Object(h.__)("Redo","web-stories"),shortcut:"shift+mod+z",disabled:!e,onClick:a,"aria-label":Object(h.__)("Redo Changes","web-stories")},C?r.a.createElement(Xe.a.ArrowDownLeftCurved,null):r.a.createElement(Xe.a.ArrowDownRightCurved,null))}function Undo(){const{state:{canUndo:e},actions:{undo:t}}=Object(F.k)(),{isRTL:C}=Object(F.g)(),a=Object(u.s)((()=>t()),[t]);return r.a.createElement(HistoryButton,{title:Object(h.__)("Undo","web-stories"),shortcut:"mod+z",disabled:!e,onClick:a,"aria-label":Object(h.__)("Undo Changes","web-stories")},C?r.a.createElement(Xe.a.ArrowDownRightCurved,null):r.a.createElement(Xe.a.ArrowDownLeftCurved,null))}var Je=C(565),et=C(43),tt=C(267),Ct=Object(u.f)({state:{},actions:{}});var at=({children:e})=>{const[t,C]=Object(u.I)(!1),[a,n]=Object(u.I)(),[l,i]=Object(u.I)(!1),o=Object(u.s)((e=>{n(e)}),[n]),c=Object(u.s)((()=>{Object(f.g)("checklist_toggled",{status:t?"closed":"open"}),C((e=>!e))}),[t]),s=Object(u.s)((()=>{Object(f.g)("checklist_toggled",{status:"closed"}),C(!1)}),[]),d=Object(u.s)((()=>{Object(f.g)("checklist_toggled",{status:"open"}),C(!0)}),[]),p=Object(u.C)((()=>({state:{isOpen:t,isChecklistMounted:l,openPanel:a},actions:{toggle:c,close:s,open:d,setIsChecklistMounted:i,setOpenPanel:o}})),[s,a,t,d,c,o,i,l]);return r.a.createElement(Ct.Provider,{value:p},e)};function nt(e){return Object(u.w)(Ct,null!=e?e:u.k)}var rt=C(386),lt=C(36);const it=70,ot=Math.floor(1),ct=640,st=853,dt=96,ut="checklist_companion",pt=Object(h.__)("Checklist","web-stories"),mt={ACCESSIBILITY:"accessibility",DESIGN:"design",PRIORITY:"priority"},ft={[mt.ACCESSIBILITY]:Object(h.__)("Accessibility","web-stories"),[mt.DESIGN]:Object(h.__)("Design","web-stories"),[mt.PRIORITY]:Object(h.__)("Priority","web-stories")},ht={fontSizeTooSmall:{title:Object(h.sprintf)(
|
2 |
/* translators: %d: minimum font size. */
|
3 |
Object(h.__)("Increase font size to %s or above","web-stories"),12),footer:Object(h.sprintf)(
|
4 |
/* translators: %d: minimum font size. */
|
5 |
Object(h.__)("Ensure legibility by selecting text size %d or greater","web-stories"),12)},imagesMissingAltText:{title:Object(h.__)("Add assistive text to images","web-stories"),footer:Object(h.__)("Optimize accessibility and indexability with meaningful text to better assist users.","web-stories")},linkTappableRegionTooBig:{title:Object(h.__)("Reduce link size","web-stories"),footer:Object(h.__)("Elements with links must not cover most of the page. Decrease the size of elements with links.","web-stories")},linkTappableRegionTooSmall:{title:Object(h.sprintf)(
|
6 |
/* translators: %s: minimum tappable region size width x minimum tappable region size height. */
|
7 |
-
Object(h.__)("Increase tap area size to at least %s","web-stories"),"48x48px"),footer:Object(h.__)("Optimize accessibility and indexability with meaningful text to better assist users","web-stories")},lowContrast:{title:Object(h.__)("Increase contrast between text and background color","web-stories"),footer:Object(h.__)("Ensure legibility of text and ease of reading by increasing color contrast","web-stories")},videoMissingCaptions:{title:Object(h.__)("Add video captions","web-stories"),footer:Object(h.__)("Keep the audience engaged even when they can't listen to the audio","web-stories")},videoMissingTitle:{title:Object(h.__)("Add video description","web-stories"),footer:Object(h.__)("Improves indexability and accessibility (for videos without captions)","web-stories")}},
|
8 |
/* translators: %d: maximum number of pages. */
|
9 |
Object(h._n)("Make Web Story at least %d page","Make Web Story at least %d pages",4,"web-stories"),4),footer:Object(h.sprintf)(
|
10 |
/* translators: 1: minimum number of pages. 2: maximum number of pages. */
|
@@ -32,19 +32,19 @@ Object(h._n)("Ensure your video has a minimum of %d frame per second","Ensure yo
|
|
32 |
/* translators: 1: minimum video resolution. 2: minimum video width x minimum video height in pixels. */
|
33 |
Object(h.__)("Consider using a minimum resolution of %1$s (%2$s) to represent portrait videos","web-stories"),"480p","852x480px")},videoTooLong:{title:Object(h.sprintf)(
|
34 |
/* translators: %d: maximum video length in minutes. */
|
35 |
-
Object(h._n)("Split videos into segments of %d minute or less","Split videos into segments of %d minutes or less",
|
36 |
/* translators: %d: maximum story title length in words. */
|
37 |
Object(h._n)("Keep under %d word","Keep under %d words",10,"web-stories"),10)),r.a.createElement("li",null,Object(h.sprintf)(
|
38 |
/* translators: %d: maximum story title length in characters. */
|
39 |
-
Object(h._n)("Don't exceed %d character","Don't exceed %d characters",
|
40 |
/* translators: %s: image dimensions. */
|
41 |
Object(h.__)("Use an image that's at least %s","web-stories"),"640x853px")),r.a.createElement("li",null,Object(h.sprintf)(
|
42 |
/* translators: %s: aspect ratio. */
|
43 |
Object(h.__)("Maintain a %s aspect ratio","web-stories"),"3:4")))},videoMissingPoster:{title:Object(h.__)("Add poster image to every video","web-stories"),footer:Object(h.__)("Ensure a better experience by displaying a poster while users wait for the video to load","web-stories")},storyTitleTooLong:{title:Object(h.sprintf)(
|
44 |
/* translators: %d: maximum number of story characters. */
|
45 |
-
Object(h._n)("Shorten title to fewer than %d character","Shorten title to fewer than %d characters",
|
46 |
/* translators: %d: maximum number of story characters. */
|
47 |
-
Object(h._n)("Limit story title to %d character or less","Limit story title to %d characters or less",
|
48 |
/* translators: %s: image dimensions. */
|
49 |
Object(h.__)("Increase size of publisher logo to at least %s","web-stories"),"96x96px"),footer:r.a.createElement(r.a.Fragment,null,r.a.createElement("li",null,Object(h.sprintf)(
|
50 |
/* translators: %s: image dimensions. */
|
@@ -62,160 +62,160 @@ Object(h.__)("Use an image that's at least %s","web-stories"),"640x853px")),r.a.
|
|
62 |
/* translators: %s: aspect ratio. */
|
63 |
Object(h.__)("Maintain a %s aspect ratio","web-stories"),"3:4")))},videoNotOptimized:{title:Object(h.__)("Optimize videos","web-stories"),footer:Object(h.sprintf)(
|
64 |
/* translators: %s: video resolution (720p) */
|
65 |
-
Object(h.__)("Videos larger than %s can cause slower loading and higher bandwidth costs.","web-stories"),"720p")},storyMissingPublisherName:{title:Object(h.__)("Add Site Title","web-stories")},ampValidation:{title:Object(h.__)("Compatibility","web-stories"),footer:r.a.createElement(h.TranslateWithMarkup,{mapping:{a:r.a.createElement(rt.a,{href:Object(h.__)("https://wp.stories.google/docs/","web-stories"),rel:"noreferrer",target:"_blank",onClick:e=>Object(f.e)(e,"click_checklist_amp_test"),size:lt.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL})}},Object(h.__)("Your story contains errors that can affect eligibility to appear on Google. Please see <a>our FAQ</a> for more information.","web-stories"))}},Et={UNAVAILABLE:"unavailable",ONLY_RECOMMENDED:"recommended",ALL:"all"},vt={[Et.UNAVAILABLE]:[],[Et.ONLY_RECOMMENDED]:[mt.ACCESSIBILITY,mt.DESIGN],[Et.ALL]:Object.values(mt)},yt={[Et.UNAVAILABLE]:null,[Et.ONLY_RECOMMENDED]:mt.DESIGN,[Et.ALL]:mt.PRIORITY},Ot="story is no longer empty",Mt="publish button is pressed",wt="story 'recommended' section enabled",Lt="story 'high priority' section enabled",_t="story is published, regardless of recommendations",jt={[Et.UNAVAILABLE]:{[Ot]:Et.ONLY_RECOMMENDED,[Mt]:Et.ALL,[_t]:Et.ALL,[wt]:Et.ONLY_RECOMMENDED},[Et.ONLY_RECOMMENDED]:{[Lt]:Et.ALL,[Mt]:Et.ALL,[_t]:Et.ALL},[Et.ALL]:{}},xt=(e,t)=>jt[e][t]||e,Zt=Object(u.f)({state:{},actions:{}});function ChecklistCheckpointProvider({children:e}){const[t,C]=Object(u.E)(xt,Et.UNAVAILABLE),[a,n]=Object(u.I)(),[l,i]=Object(u.I)(),o=a>0||[Et.UNAVAILABLE,Et.ONLY_RECOMMENDED].includes(t),c=Object(F.o)((({state:{story:e}})=>e.status));Object(u.y)((()=>{"publish"===c&&C(_t)}),[c]),Object(F.p)(F.b.onSecondPageAdded,Object(u.s)((()=>{C(wt)}),[])),Object(F.p)(F.b.onFifthPageAdded,Object(u.s)((()=>{C(Lt)}),[])),Object(F.p)(F.b.onInitialElementAdded,Object(u.s)((()=>{C(Ot)}),[]));const s=Object(u.s)((e=>{n(e)}),[]),d=Object(u.s)((()=>{i(!0),C(Mt)}),[]),p=Object(u.s)((()=>{i(!1)}),[]),m=Object(u.C)((()=>({state:{checkpoint:t,shouldReviewDialogBeSeen:o,reviewDialogRequested:l},actions:{updateHighPriorityCount:s,onReviewDialogRequest:d,onResetReviewDialogRequest:p}})),[t,d,p,l,o,s]);return r.a.createElement(Zt.Provider,{value:m},e)}function At(e){return Object(u.w)(Zt,null!=e?e:u.k)}const It=Object(u.f)(null),Tt=Object(u.f)(null),St={[mt.PRIORITY]:{},[mt.DESIGN]:{},[mt.ACCESSIBILITY]:{}};function ChecklistCountProvider({children:e}){const t=Object(u.I)(St);return r.a.createElement(It.Provider,{value:t},e)}function ChecklistCategoryProvider({children:e,category:t}){var C;const a=null===(C=Object(u.u)(It))||void 0===C?void 0:C[1];if(!a)throw new Error("Cannot use `ChecklistCategoryProvider` outside of `ChecklistCountProvider`");const n=Object(u.s)((e=>a((C=>({...C,[t]:{...C[t],...e}})))),[t,a]);return r.a.createElement(Tt.Provider,{value:n},e)}function Rt(e,t){const C=Object(u.u)(Tt);if(!C)throw new Error("Cannot use `useRegisterCheck` outside of `ChecklistCategoryProvider`");Object(u.y)((()=>C({[e]:t})),[e,C,t])}function kt(){var e;const t=null===(e=Object(u.u)(It))||void 0===e?void 0:e[0];if(!t)throw new Error("Cannot use `useIsChecklistEmpty` outside of `ChecklistCountProvider`");return Object.values(t).map((e=>Object.values(e))).flatMap((e=>e)).filter((e=>e)).length>0}function Pt(e){var t;const C=null===(t=Object(u.u)(It))||void 0===t?void 0:t[0];if(!C)throw new Error("Cannot use `useCategoryCount` outside of `ChecklistCountProvider`");return Object.values(C[e]||{}).filter((e=>e)).length}var Nt=C(625);const Dt=[o.a],zt=[];var Bt=function DirectionAware({children:e}){const{isRTL:t}=Object(F.g)();return r.a.createElement(l.a,{stylisPlugins:t?Dt:zt},e)},Ft=C(392);function Ht(){return(Ht=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Gt="entering",Vt="entered",Ut="exiting",Wt={initial:"default",states:{default:{entering:Gt},entering:{entered:Vt},entered:{exiting:Ut},exiting:{exited:"exited"},exited:{entering:Gt}}},Yt=(e,t)=>{var C;return(null===(C=Wt.states[e])||void 0===C?void 0:C[t])||e},$t=Object(u.j)((({state:e,children:t},C)=>{const[a,n]=Object(u.E)(Yt,e===Vt?e:Wt.initial),[r,l]=Object(u.I)(e);Object(u.y)((()=>{const t=requestAnimationFrame((()=>l(e)));return()=>cancelAnimationFrame(t)}),[e]),Object(u.y)((()=>{n(r)}),[r]);const i=[Gt,Vt].includes(a)&&"exiting"===e,o=[Ut].includes(a)&&[Gt,Vt].includes(e)||i;return Object(u.e)(t(o?e:a),{ref:C})}));function ScheduledTransition({children:e,...t}){const C=Object(u.G)();return r.a.createElement(Ft.a,Ht({nodeRef:C},t),(t=>r.a.createElement($t,{ref:C,state:t},(t=>e(t)))))}var qt=C(97);var Xt=l.f.div.withConfig({displayName:"navigationWrapper__NavigationWrapper",componentId:"sc-j8u8sh-0"})(["position:absolute;left:0;bottom:0;max-height:calc(100vh - ","px);width:","px;color:",";background-color:",";border:1px solid ",";border-radius:",";overflow:hidden;",""],161,310,(({theme:e})=>e.colors.fg.primary),(({theme:e})=>e.colors.bg.primary),(({theme:e})=>e.colors.bg.tertiary),(({theme:e})=>e.borders.radius.small),(({isOpen:e})=>!e&&Object(l.e)(["&,*{height:0;visibility:hidden;}"]))),Kt=C(563);const Qt=Object(l.e)(["",";"],(({theme:e})=>X.c.focusableOutlineCSS(e.colors.border.focus,e.colors.bg.secondary))),Jt=Object(l.e)([":focus-within{",";}"],(({theme:e})=>X.c.focusCSS(e.colors.border.focus,e.colors.bg.secondary)));var eC=C(367),tC=C(368);function CC(){return(CC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}function ToggleButton({isToggled:e=!1,type:t=null,...C}){const a=t===g.c.QUATERNARY?t:e?g.c.SECONDARY:g.c.TERTIARY;return r.a.createElement(b.a,CC({},C,{type:a,"aria-pressed":e,isToggled:e}))}function LockToggle({isLocked:e=!1,...t}){return r.a.createElement(b.a,CC({},t,{"aria-pressed":e,type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE}),e?r.a.createElement(eC.a,null):r.a.createElement(tC.a,null))}const aC=l.f.div.withConfig({displayName:"flipControls__ControlsContainer",componentId:"sc-1pemiea-0"})(["display:flex;justify-content:left;align-items:flex-start;"]),nC=l.f.div.withConfig({displayName:"flipControls__Space",componentId:"sc-1pemiea-1"})(["width:8px;"]),rC=Object(l.f)(ToggleButton).withConfig({displayName:"flipControls__StyledToggleButton",componentId:"sc-1pemiea-2"})(["",";"],Qt);var lC=function FlipControls({value:e,onChange:t}){const C=Object(u.s)((t=>!0===e[t]),[e]);return r.a.createElement(aC,null,r.a.createElement(Ke.a,{title:Object(h.__)("Flip horizontally","web-stories")},r.a.createElement(rC,{variant:g.d.SQUARE,size:g.a.SMALL,isToggled:!0===e.horizontal,onClick:()=>t({...e,horizontal:!C("horizontal")}),"aria-label":Object(h.__)("Flip horizontally","web-stories")},r.a.createElement(Xe.a.MirrorLeftright,null))),r.a.createElement(nC,null),r.a.createElement(Ke.a,{title:Object(h.__)("Flip vertically","web-stories")},r.a.createElement(rC,{variant:g.d.SQUARE,size:g.a.SMALL,isToggled:!0===e.vertical,onClick:()=>t({...e,vertical:!C("vertical")}),"aria-label":Object(h.__)("Flip vertically","web-stories")},r.a.createElement(Xe.a.MirrorUpdown,null))))},iC=C(129),oC=C(767);var cC=function(e){if(!e)return null;switch(e.type){case"radial":return Object(h.__)("Radial","web-stories");case"linear":return Object(h.__)("Linear","web-stories");case"solid":default:{const{color:{r:t,g:C,b:a}}=e;return function(e,t,C){const a=e=>e.toString(16).padStart(2,"0");return`${a(e)}${a(t)}${a(C)}`.toUpperCase()}(t,C,a)}}},sC=C(6),dC=({onChange:e})=>{const{fullbleedContainer:t,eyedropperPixelData:a,setEyedropperCallback:n,setIsEyedropperActive:r,setEyedropperImg:l,setEyedropperPixelData:i}=Object(F.d)((({state:{fullbleedContainer:e,eyedropperPixelData:t},actions:{setEyedropperCallback:C,setIsEyedropperActive:a,setEyedropperImg:n,setEyedropperPixelData:r}})=>({fullbleedContainer:e,setEyedropperCallback:C,eyedropperPixelData:t,setIsEyedropperActive:a,setEyedropperImg:n,setEyedropperPixelData:r}))),{zoomSetting:o,setZoomSetting:c}=Object(F.l)((({state:{zoomSetting:e},actions:{setZoomSetting:t}})=>({zoomSetting:e,setZoomSetting:t})));return{initEyedropper:Object(u.s)(((s=!0)=>async()=>{if(!s&&o!==sC.G.FIT)return;s&&r(!0);a&&s||(s&&c(sC.G.FIT),await new Promise((e=>{setTimeout((()=>{C.e(197).then(C.bind(null,1052)).then((C=>{C.toCanvas(t,{preferredFontFormat:"woff2",pixelRatio:1}).then((t=>{const C=t.getContext("2d").getImageData(0,0,t.width,t.height).data;i(C),l(t.toDataURL()),e()})).catch((()=>{e()}))}))}))}))),n((()=>t=>{e(t),r(!1),l(null),i(null)}))}),[t,e,a,o,r,n,l,i,c])}};var uC=function(e,t){if(!e)return null;const{type:C}=e;if(!C||"solid"===C){const{color:{r:C,g:a,b:n}}=e;return{color:{r:C,g:a,b:n,a:t}}}return{...e,alpha:t}},pC=C(286),mC=C.n(pC);function fC(e,{allowEmpty:t,isFloat:C,min:a,max:n}){if(`${e}`.length>0){const t=C?parseFloat(e):parseInt(e);let r=t;return void 0!==a&&(r=Math.max(a,t)),void 0!==n&&(r=Math.min(n,t)),isNaN(r)?null:r}return t?"":null}const hC=({allowEmpty:e,isFloat:t,max:C,min:a,onChange:n,value:r})=>{const l=Object(u.G)(null),i=Object(u.G)(r),o=Object(u.G)(!1),[c,s]=Object(u.I)(r),d=Object(u.C)((()=>({allowEmpty:e,isFloat:t,max:C,min:a})),[e,t,C,a]),p=Object(u.s)((e=>{let t=fC(i.current,d);if(!o.current){const e=fC(c,d);null!==e&&(t=e)}o.current=!1,null!==t&&(s(t),t!==i.current&&n(e,t))}),[c,n,d]),m=Object(u.s)((e=>{s(e.target.value)}),[]),f=Object(u.s)((e=>{const{altKey:t,key:r}=e;let l=function(e,{allowEmpty:t,isFloat:C,max:a,min:n}){if(t&&0===`${e}`.length)return!0;const r=C?parseFloat(e):parseInt(e);return!(void 0!==n&&r<n||void 0!==a&&r>a||isNaN(r))}(c,d)?fC(c,d):0;const i=mC()(d.isFloat&&t?.1:1);"ArrowUp"===r?l=void 0!==C?Math.min(C,mC()(l).plus(i)):mC()(l).plus(i):"ArrowDown"===r&&(l=void 0!==a?Math.max(a,mC()(l).minus(i)):mC()(l).minus(i)),n(e,Number(l))}),[c,C,a,n,d]),h=Object(u.s)((()=>{var e;s(i.current),o.current=!0,l&&(null===(e=l.current)||void 0===e||e.blur())}),[]);return Object(u.y)((()=>{i.current=r,s(r)}),[r]),{currentValue:c,inputRef:l,handleBlur:p,handleChange:m,handleEsc:h,handleKeyUpAndDown:f,isIndeterminate:i.current===c}};var bC=C(374);function gC(){return(gC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const NumericInput=({allowEmpty:e,isFloat:t,onChange:C,max:a,min:n,value:l="",isIndeterminate:i,...o})=>{const{currentValue:c,handleBlur:s,handleChange:d,handleEsc:u,handleKeyUpAndDown:p,inputRef:m,isIndeterminate:f}=hC({allowEmpty:e,isFloat:t,onChange:C,max:a,min:n,value:l,isIndeterminate:i});return Object(ve.h)(m,{key:["up","alt+up","down","alt+down"],editable:!0},p,[p]),Object(ve.h)(m,{key:["escape"],editable:!0},u,[u]),Object(ve.h)(m,{key:["enter"],editable:!0},s,[s]),r.a.createElement(bC.b,gC({ref:m,onBlur:s,onChange:d,value:String(c),isIndeterminate:f&&i},o))};var EC=function(e){if(!e||e===sC.y)return null;if(!("solid"===e.type||!e.type)){const{alpha:t=1}=e;return 100*t}const{color:{a:t=1}}=e;return Math.round(100*t)};const vC=Object(l.f)(NumericInput).withConfig({displayName:"opacityInput__Input",componentId:"sc-pgqg8m-0"})(["min-width:100px;div{background-color:transparent;}"]);var yC=function OpacityInput({value:e,onChange:t}){const[C,a]=Object(u.I)(""),n=Object(u.s)(((e,C)=>{a(C),isNaN(C)||t(C/100)}),[t]),l=Object(u.s)((()=>a(EC(e))),[e]);return Object(u.y)((()=>l()),[l,e]),r.a.createElement(vC,{"aria-label":Object(h.__)("Opacity","web-stories"),onChange:n,value:C,unit:Object(h._x)("%","Percentage","web-stories"),suffix:r.a.createElement(Xe.a.ColorDrop,null),min:0,max:100,allowEmpty:!1,isFloat:!1,containerStyleOverride:Jt})};var OC=function(e){if(!e.type||"solid"===e.type){const{color:t}=e;return{color:{...t,a:1}}}return t=e,C=["alpha"],Object.keys(t).filter((e=>!C.includes(e))).reduce(((e,C)=>({...e,[C]:t[C]})),{});var t,C};var MC=C(21);var wC=function(e){const t=(e||"").toUpperCase().trim().replace(/^#/,"");return/[^0-9a-f]/i.test(t)?null:6===t.length?t:1===t.length?t.repeat(6):2===t.length?t.repeat(3):3===t.length?t.replace(/./g,"$&$&"):4===t.length?`${t.substring(0,2).repeat(2)}${t.substring(2)}`:null};function LC(){return(LC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const _C=Object(u.j)((function Hex({value:e,placeholder:t,onChange:C,...a},n){const[l,i]=Object(u.I)(""),o=Object(u.G)(null),c=Object(u.G)(!1),s=cC(e);Object(u.y)((()=>i(s)),[s]);const d=Object(u.s)((e=>{const t=e.target.value.trim().replace(/^#/,"");i(t)}),[]),p=Object(u.s)((()=>{var t;const a=null!==(t=wC(l))&&void 0!==t?t:s;if(i(a),a!==s){const{red:t,green:n,blue:r}=Object(MC.a)(`#${a}`),l=e.color.a;C({color:{r:t,g:n,b:r,a:l}})}}),[l,s,C,e]),m=Object(u.s)((()=>{p()}),[p]),f=Object(u.s)((()=>{c.current||p(),c.current=!1}),[p]),h=Object(u.s)((()=>{i(s),c.current=!0;(null!=n&&n.current?n:o).current.blur()}),[s,n]);return Object(ve.h)(o,{key:["escape"],editable:!0},h,[h]),Object(ve.h)(o,{key:["enter"],editable:!0},m,[m]),r.a.createElement(bC.b,LC({ref:n||o,value:l||"",onChange:d,onBlur:f,placeholder:t},a))}));function jC(e){return void 0!==e.a&&e.a<1}var xC=function(e){const{color:t,alpha:C,stops:a}=e;if(t)return Boolean(jC(t));if("number"==typeof C&&C<1)return!0;for(const e of a||[])if(jC(e.color))return!0;return!1};var ZC=function(e){return Boolean(null==e?void 0:e.type)&&"solid"!==e.type};function AC(){return(AC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const IC=l.f.div.withConfig({displayName:"swatch__Transparent",componentId:"sc-zzfj65-0"})(["width:100%;height:100%;position:absolute;border-radius:100%;",""],X.c.transparentBg),TC=l.f.button.withConfig({displayName:"swatch__SwatchButton",componentId:"sc-zzfj65-1"})(["cursor:pointer;background-color:transparent;border-color:transparent;padding:0;border-width:0;display:block;width:","px;height:","px;border-radius:100%;overflow:hidden;position:relative;"," ",";::after{content:'';position:absolute;pointer-events:none;left:0;top:0;width:100%;height:100%;border-radius:50%;border:1px solid ",";}"],(({isSmall:e})=>e?24:32),(({isSmall:e})=>e?24:32),(({disabled:e})=>e&&Object(l.e)(["opacity:0.4;cursor:default;pointer-events:none;"])),(({theme:e})=>X.c.focusableOutlineCSS(e.colors.border.focus)),(({theme:e})=>e.colors.divider.primary)),SC=Object(l.f)(TC).attrs({as:"div",type:""}).withConfig({displayName:"swatch__SwatchPreview",componentId:"sc-zzfj65-2"})([""]),RC=Object(l.e)(["display:block;width:100%;height:100%;font-size:13px;position:relative;svg{width:","px;height:","px;position:absolute;top:calc(50% - ","px);left:calc(50% - ","px);filter:drop-shadow(0px 0px 4px rgba(0,0,0,0.4));}"],32,32,16,16),kC=l.f.div.withConfig({displayName:"swatch__SwatchItem",componentId:"sc-zzfj65-3"})([""," "," transform:rotate(","deg);svg{color:",";transform:rotate(","deg);}"],RC,(({$pattern:e})=>Object(J.a)(e)),(({displaySplit:e})=>e?-45:0),(({theme:e})=>e.colors.fg.primary),(({displaySplit:e})=>e?45:0)),PC=l.f.div.withConfig({displayName:"swatch__OpaqueColorWrapper",componentId:"sc-zzfj65-4"})(["height:","px;width:50%;overflow:hidden;position:absolute;left:0;top:0;"],(({isSmall:e})=>e?24:32)),NC=l.f.div.withConfig({displayName:"swatch__OpaqueColor",componentId:"sc-zzfj65-5"})(["height:","px;width:","px;position:absolute;top:0;left:0;",""],(({isSmall:e})=>e?24:32),(({isSmall:e})=>e?24:32),(({pattern:e})=>Object(J.a)(e)));function Swatch({pattern:e,isDisabled:t=!1,isSmall:C=!1,children:a,isPreview:n,className:l="",...i}){if(!e)return null;const o=xC(e),c=ZC(e),s=o?OC(e):e,d=!C&&!c&&o,u=n?SC:TC;return r.a.createElement(u,AC({disabled:t,isSmall:C,className:l},i),o&&r.a.createElement(IC,null),r.a.createElement(kC,{$pattern:e,displaySplit:d},d&&r.a.createElement(PC,{isSmall:C},r.a.createElement(NC,{isSmall:C,pattern:s})),a))}var DC=C(25),zC=C(131),BC=C(635),FC=C(276),HC=C(81),GC=C(171),VC=C(120);function UC(){return(UC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const WC=({r:e=0,g:t=0,b:C=0}={})=>`rgb(${e},${t},${C})`,YC=({r:e,g:t,b:C,a:a})=>{const n=e=>255*(1-a)+a*e;return`rgb(${n(e)}, ${n(t)}, ${n(C)})`},$C=24,qC=l.f.div.attrs((({currentColor:e={},withAlpha:t})=>({style:{background:t?YC(e):WC(e)}}))).withConfig({displayName:"pointer__PointerElement",componentId:"sc-1ye7lxq-0"})(["width:","px;height:","px;transform:translate( "," );background:transparent;border:","px solid ",";border-radius:100%;position:relative;&:before{content:'';display:block;width:","px;height:","px;position:absolute;top:-","px;left:-","px;}"],$C,$C,(({offsetX:e=0,offsetY:t=0,isRTL:C})=>`${(C?-1:1)*e}px, ${t}px`),2,(({theme:e})=>e.colors.fg.primary),48,48,14,14);var XC=function Pointer(e){const{isRTL:t}=Object(F.g)();return r.a.createElement(qC,UC({},e,{isRTL:t}))};const KC=Object(u.l)((()=>C.e(199).then(C.t.bind(null,1049,7)).then((e=>({default:e.EditableInput}))))),QC=l.f.button.withConfig({displayName:"editablePreview__Preview",componentId:"sc-t3ujjh-0"})(["margin:0;padding:5px 7px;border:1px solid ",";border-radius:4px;background:transparent;color:",";width:100%;",";"],(({theme:e})=>e.colors.border.defaultNormal),(({theme:e})=>e.colors.fg.primary),Qt),JC=l.f.div.withConfig({displayName:"editablePreview__Wrapper",componentId:"sc-t3ujjh-1"})(["input{",";}"],Qt);function EditablePreview({label:e,value:t,width:C,format:a,onChange:n}){const[l,i]=Object(u.I)(!1),o=Object(u.s)((()=>i(!0)),[]),c=Object(u.s)((()=>i(!1)),[]),s=Object(u.G)(null),d=Object(u.G)(),p=Object(u.C)((()=>({input:{textAlign:"center",textTransform:"lowercase",width:"100%",padding:"6px 12px",border:"1px solid #5E6668",color:"#E4E5E6",borderRadius:"4px",background:"transparent",lineHeight:"18px"},wrap:{lineHeight:0,maxWidth:`${C}px`}})),[C]);Object(ve.h)(s,{key:"esc",editable:!0},c,[l]);if(Object(u.B)((()=>{const t=setTimeout((()=>{l&&d.current&&(d.current.input.focus(),d.current.input.select(),d.current.input.setAttribute("aria-label",e))}));return()=>clearTimeout(t)}),[l,e]),!l)return r.a.createElement(QC,{"aria-label":e,onClick:o,onFocus:o},r.a.createElement(iC.a,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},a(t)));const m="transparent"===t?"000000":t;return r.a.createElement(JC,{ref:s,tabIndex:-1,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||c()}},r.a.createElement(u.d,{fallback:null},r.a.createElement(KC,{value:m,ref:d,onChange:n,onChangeComplete:c,style:p})))}EditablePreview.defaultProps={label:"",value:""};var ea=EditablePreview;const ta=Object(u.l)((()=>C.e(199).then(C.t.bind(null,1049,7)).then((e=>({default:e.Saturation}))))),Ca=Object(u.l)((()=>C.e(199).then(C.t.bind(null,1049,7)).then((e=>({default:e.Hue}))))),aa=Object(u.l)((()=>C.e(199).then(C.t.bind(null,1049,7)).then((e=>({default:e.Alpha}))))),na=l.f.div.withConfig({displayName:"currentColorPicker__Container",componentId:"sc-1qn97qy-0"})(["user-select:none;padding:0 ","px;"],16),ra=l.f.div.withConfig({displayName:"currentColorPicker__Body",componentId:"sc-1qn97qy-1"})(["padding-bottom:0;"]),la=l.f.div.withConfig({displayName:"currentColorPicker__BodyFallback",componentId:"sc-1qn97qy-2"})(["height:","px;display:flex;align-items:center;justify-content:center;"],304),ia=l.f.div.withConfig({displayName:"currentColorPicker__SaturationWrapper",componentId:"sc-1qn97qy-3"})(["position:relative;height:","px;margin-bottom:16px;"],156),oa=Object(l.e)(["margin-bottom:16px;border:1px solid ",";height:","px;position:relative;border-radius:","px;background-clip:padding-box;"],(({theme:e})=>e.colors.shadow.active),28,50),ca=l.f.div.withConfig({displayName:"currentColorPicker__HueWrapper",componentId:"sc-1qn97qy-4"})(["",""],oa),sa=l.f.div.withConfig({displayName:"currentColorPicker__AlphaWrapper",componentId:"sc-1qn97qy-5"})([""," div:first-child div:first-child div:first-child{background-image:conic-gradient( "," 0.25turn,transparent 0turn 0.5turn,"," 0turn 0.75turn,transparent 0turn 1turn ) !important;background-size:8px 8px !important;}"],oa,(({theme:e})=>e.colors.fg.tertiary),(({theme:e})=>e.colors.fg.tertiary)),da=l.f.div.withConfig({displayName:"currentColorPicker__Footer",componentId:"sc-1qn97qy-6"})(["height:","px;line-height:19px;position:relative;margin-top:7px;display:flex;gap:10px;margin-bottom:16px;"],36),ua=l.f.div.withConfig({displayName:"currentColorPicker__HexValue",componentId:"sc-1qn97qy-7"})(["width:","px;"],74),pa=l.f.div.withConfig({displayName:"currentColorPicker__Opacity",componentId:"sc-1qn97qy-8"})(["width:","px;"],52);function CurrentColorPicker({rgb:e,hsl:t,hsv:C,hex:a,onChange:n,showOpacity:l}){const i=String(Math.round(100*e.a)),o="#"===a[0]?a.substr(1):a,c=Object(u.s)((e=>("transparent"===e&&(e="000000"),`#${e}`)),[]),s=Object(u.s)((e=>`${e}%`),[]),d=Object(u.s)((e=>n({hex:e})),[n]),p=Object(u.s)((t=>n({...e,a:isNaN(t)?1:parseInt(t)/100})),[e,n]),{initEyedropper:m}=dC({onChange:n});return r.a.createElement(na,{"data-testid":"colorPicker"},r.a.createElement(ra,{showOpacity:l},r.a.createElement(u.d,{fallback:null},r.a.createElement(ia,null,r.a.createElement(ta,{radius:"8px",pointer:()=>r.a.createElement(XC,{offsetX:-12,offsetY:-12,currentColor:e}),hsl:t,hsv:C,onChange:n})),r.a.createElement(ca,null,r.a.createElement(Ca,{direction:"horizontal",height:"28px",radius:"50px",pointer:()=>r.a.createElement(XC,{offsetX:-12,offsetY:1,currentColor:e}),hsl:t,onChange:n})),l&&r.a.createElement(sa,null,r.a.createElement(aa,{direction:"horizontal",height:"28px",radius:"50px",pointer:()=>r.a.createElement(XC,{offsetX:-12,offsetY:1,currentColor:e,withAlpha:!0}),rgb:e,hsl:t,onChange:n})))),r.a.createElement(da,null,r.a.createElement(b.a,{variant:g.d.SQUARE,type:g.c.QUATERNARY,size:g.a.SMALL,"aria-label":Object(h.__)("Pick a color from canvas","web-stories"),onClick:m(),onPointerEnter:m(!1)},r.a.createElement(Xe.a.Pipette,null)),r.a.createElement(ua,null,r.a.createElement(ea,{label:Object(h.__)("Edit hex value","web-stories"),value:o,onChange:d,width:80,format:c})),l&&r.a.createElement(pa,null,r.a.createElement(ea,{label:Object(h.__)("Edit opacity","web-stories"),value:i,width:52,format:s,onChange:p}))))}CurrentColorPicker.defaultProps={showOpacity:!0};var ma=((...e)=>function DynamicFetcher(t){const a=Object(u.G)(!1),[n,l]=Object(u.I)(null);return Object(u.y)((()=>(a.current=!0,C.e(199).then(C.bind(null,1050)).then((({CustomPicker:t})=>{a.current&&l({component:t(...e)})})),()=>{a.current=!1})),[]),n?r.a.createElement(n.component,t):r.a.createElement(la,null,r.a.createElement(VC.a,null))})(CurrentColorPicker),fa=C(357);const ha=154,ba=16,ga="solid",Ea="linear",va="radial",ya="DELETE_COLOR_PRESET_DIALOG_DISMISSED",Oa=e=>Object(fa.a)(`#${e}`),Ma=[Oa("00000000"),Oa("000000"),Oa("454545"),Oa("B6B6B6"),Oa("EEEEEE"),Oa("FFFFFF"),Oa("003BAD"),Oa("0044C9"),Oa("0354F2"),Oa("1263FF"),Oa("347EFF"),Oa("6D9FFF"),Oa("4B1283"),Oa("5A189A"),Oa("7B2CBF"),Oa("9D4EDD"),Oa("C77DFF"),Oa("E0AAFF"),Oa("E03568"),Oa("FF477E"),Oa("FF5C8A"),Oa("FF7096"),Oa("FF85A1"),Oa("FF99AC"),Oa("590D22"),Oa("800F2F"),Oa("A4133C"),Oa("C9184A"),Oa("FF4D6D"),Oa("FF758F"),Oa("DBCA09"),Oa("FFD900"),Oa("FFE747"),Oa("FFEE70"),Oa("FFF599"),Oa("FFFFB7"),Oa("E06E04"),Oa("EA7D00"),Oa("FF9500"),Oa("FFA811"),Oa("FFBC35"),Oa("FFCC4A"),Oa("607047"),Oa("79895D"),Oa("839568"),Oa("A5B98B"),Oa("C1D3AA"),Oa("D4E4C0"),Oa("603809"),Oa("603808"),Oa("6F4518"),Oa("8B5E34"),Oa("A47148"),Oa("BC8A5F")],wa=l.f.button.attrs((({position:e})=>({style:{right:e*ha-8+"px"}}))).withConfig({displayName:"gradientStop__Stop",componentId:"sc-hum42b-0"})(["position:absolute;top:-","px;background:transparent;border:0;padding:0;&:focus{outline:none;}"],24),La=Object(l.e)(["position:absolute;left:0;top:0;width:100%;height:100%;"]),_a=l.f.div.withConfig({displayName:"gradientStop__Background",componentId:"sc-hum42b-1"})([""," ",""],La,(({color:e})=>Object(J.a)(e))),ja=l.f.div.withConfig({displayName:"gradientStop__Transparent",componentId:"sc-hum42b-2"})([""," width:100%;height:100%;position:absolute;top:0;"],X.c.transparentBg),xa=l.f.div.withConfig({displayName:"gradientStop__StopPointer",componentId:"sc-hum42b-3"})(["transform:translate(",",0);width:","px;height:","px;border-radius:2px;overflow:hidden;"],(({offset:e})=>`${e}px`),14,14),Za=l.f.div.withConfig({displayName:"gradientStop__IconWrapper",componentId:"sc-hum42b-4"})(["position:absolute;left:-","px;top:-8px;color:",";svg{width:32px;height:32px;}"],10,(({theme:e,isSelected:t})=>t?e.colors.fg.primary:e.colors.fg.tertiary));const Aa=Object(u.j)((function GradientStopWithRef({position:e,index:t,isSelected:C,color:a,onSelect:n},l){return r.a.createElement(wa,{ref:l,key:t,isSelected:C,position:e,onFocus:()=>n(t),onClick:()=>n(t),"aria-label":Object(h.sprintf)(
|
66 |
/* translators: %d: stop percentage */
|
67 |
-
Object(h.__)("Gradient stop at %d%%","web-stories"),Math.round(100-100*
|
68 |
/* translators: %d: stop percentage */
|
69 |
-
Object(h.__)("Temporary gradient stop at %d%%","web-stories"),Math.round(c/ha*100)),x:c}))};const Ga=l.f.div.withConfig({displayName:"gradientPicker__Wrapper",componentId:"sc-1cvb5mg-0"})(["display:flex;justify-content:space-between;align-items:flex-end;padding:0 16px 16px;height:60px;"]),Va=l.f.div.withConfig({displayName:"gradientPicker__Buttons",componentId:"sc-1cvb5mg-1"})(["display:flex;gap:8px;"]),Ua=Object(l.f)(b.a).withConfig({displayName:"gradientPicker__SmallButton",componentId:"sc-1cvb5mg-2"})(["width:24px;height:24px;padding:0;margin-bottom:-3px;svg{width:24px;height:24px;}"]);var Wa=function GradientPicker({stops:e,currentStopIndex:t,type:C,onSelect:a,onAdd:n,onDelete:l,onMove:i,onRotate:o,onReverse:c}){const s=Object(h.__)("Reverse gradient stops","web-stories"),d=Object(h.__)("Rotate gradient","web-stories"),u="radial"!==C;return r.a.createElement(Ga,null,r.a.createElement(Ha,{stops:e,currentStopIndex:t,onSelect:a,onAdd:n,onDelete:l,onMove:i}),r.a.createElement(Va,null,r.a.createElement(Ke.a,{hasTail:!0,title:s},r.a.createElement(Ua,{"aria-label":s,onClick:c,type:g.c.QUATERNARY,size:g.a.SMALL,variant:g.d.SQUARE},r.a.createElement(Xe.a.ArrowsLeftright,null))),u&&r.a.createElement(Ke.a,{hasTail:!0,title:d},r.a.createElement(Ua,{onClick:o,"aria-label":d,type:g.c.QUATERNARY,size:g.a.SMALL,variant:g.d.SQUARE},r.a.createElement(Xe.a.ArrowRightCurved,{id:"gradient-rotator"})))))};function Ya(){return(Ya=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const $a=l.f.div.withConfig({displayName:"header__Wrapper",componentId:"sc-gquso5-0"})(["display:flex;justify-content:space-between;align-items:center;height:","px;padding:4px 8px 4px 8px;position:relative;border-bottom:1px solid ",";"],44,(({theme:e})=>e.colors.divider.tertiary)),qa=l.f.div.withConfig({displayName:"header__Actions",componentId:"sc-gquso5-1"})(["display:flex;margin-left:auto;"]),Xa=Object(l.f)(b.a).withConfig({displayName:"header__StyledButton",componentId:"sc-gquso5-2"})(["margin-left:8px;",";"],Qt);var Ka=function Header({children:e,handleClose:t,isEditMode:C=!1,setIsEditMode:a=(()=>{}),hasPresets:n=!1}){const l=Object(u.G)();Object(u.y)((()=>{var e;null===(e=l.current)||void 0===e||e.focus()}),[]);const i={type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE,onClick:e=>{e.stopPropagation(),a(!C)},isEditMode:C};return r.a.createElement($a,null,e,r.a.createElement(qa,null,n&&r.a.createElement(Xa,Ya({},i,{"aria-label":C?Object(h.__)("Exit edit mode","web-stories"):Object(h.__)("Edit colors","web-stories")}),C?Object(h.__)("Done","web-stories"):r.a.createElement(Xe.a.Pencil,null)),r.a.createElement(Xa,{"aria-label":Object(h.__)("Close","web-stories"),onClick:t,type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE,ref:l},r.a.createElement(Xe.a.Cross,null))))};const Qa=l.f.div.withConfig({displayName:"patternTypePicker__Wrapper",componentId:"sc-sn273p-0"})(["display:flex;justify-content:flex-start;align-items:center;height:","px;padding:8px 16px 16px;position:relative;gap:8px;"],52);var Ja=function PatternTypePicker({type:e,setToGradient:t,setToSolid:C}){const a=Object(u.s)((()=>t("linear")),[t]),n=Object(u.s)((()=>t("radial")),[t]);return r.a.createElement(Qa,null,r.a.createElement(ToggleButton,{"aria-label":Object(h.__)("Solid pattern type","web-stories"),onClick:C,type:g.c.QUATERNARY,size:g.a.SMALL,variant:g.d.SQUARE,isToggled:"solid"===e},r.a.createElement(Xe.a.PatternSolid,null)),r.a.createElement(ToggleButton,{"aria-label":Object(h.__)("Linear gradient pattern type","web-stories"),onClick:a,type:g.c.QUATERNARY,size:g.a.SMALL,variant:g.d.SQUARE,isToggled:"linear"===e},r.a.createElement(Xe.a.PatternLinear,null)),r.a.createElement(ToggleButton,{"aria-label":Object(h.__)("Radial gradient pattern type","web-stories"),onClick:n,type:g.c.QUATERNARY,size:g.a.SMALL,variant:g.d.SQUARE,isToggled:"radial"===e},r.a.createElement(Xe.a.PatternRadial,null)))};var en=function(e,t){const C=e.findIndex((({position:e})=>e>t));if(-1===C)return{index:e.length,color:e[e.length-1].color};if(0===C)return{index:0,color:e[0].color};const a=e[C-1],n=e[C],r=(t-a.position)/(n.position-a.position),{color:{r:l,g:i,b:o,a:c=1}}=a,{color:{r:s,g:d,b:u,a:p=1}}=n,m=(e,t)=>e+(t-e)*r,f={r:Math.round(m(l,s)),g:Math.round(m(i,d)),b:Math.round(m(o,u)),a:m(c,p)};return{index:C,color:1===f.a?{r:f.r,g:f.g,b:f.b}:f}};function tn(e){return e.map((({color:{r:e,g:t,b:C,a:a},position:n})=>({color:Object(GC.a)(e,t,C,a).color,position:n})))}var Cn=function(e){const{regenerate:t,type:C}=e;if(!t)return null;switch(C){case ga:return function({currentColor:{r:e,g:t,b:C,a:a}}){return Object(GC.a)(e,t,C,a)}(e);case Ea:return function({stops:e,rotation:t,alpha:C}){const a={type:Ea,stops:tn(e)};return 0!==t&&(a.rotation=t),1!==C&&void 0!==C&&(a.alpha=C),a}(e);case va:return function({stops:e,center:t,size:C,alpha:a}){const n={type:va,stops:tn(e)};return!t||.5===t.x&&.5===t.y||(n.center=t),!C||1===C.w&&1===C.h||(n.size=C),1!==a&&void 0!==a&&(n.alpha=a),n}(e);default:return null}};const an={type:ga,regenerate:!1,stops:[],currentColor:{r:0,g:0,b:0,a:0},currentStopIndex:0,rotation:.5,alpha:1,center:{x:.5,y:.5},size:{w:1,h:1}},nn={load:(e,{payload:t})=>{var C;const{type:a,color:n,stops:r,rotation:l,center:i,size:o,alpha:c}=t,s=a&&a!==ga&&(e.type!==a||(null==r?void 0:r.length)!==(null===(C=e.stops)||void 0===C?void 0:C.length))?{currentColor:r[0].color,currentStopIndex:0}:{};switch(a){case Ea:return{...e,...s,type:a,regenerate:!1,stops:r,alpha:isNaN(c)?e.alpha:c,rotation:isNaN(l)?0:l};case va:return{...e,...s,type:a,regenerate:!1,stops:r,center:void 0!==i?i:e.center,size:void 0!==o?o:e.size,alpha:isNaN(c)?e.alpha:c};case ga:default:return{...e,type:ga,regenerate:!1,currentColor:n}}},setToSolid:e=>({...e,type:ga,regenerate:!0}),setToGradient:(e,{payload:t})=>{const C=e.stops&&e.stops.length>=2?e.stops:[{color:e.currentColor,position:0},{color:e.currentColor,position:1}];return{...e,regenerate:!0,type:t,stops:C}},addStopAt:(e,{payload:t})=>{if(t=Number(t.toFixed(2)),e.stops.some((({position:e})=>e===t)))return e;const{index:C,color:a}=en(e.stops,t),n=[...e.stops.slice(0,C),{color:a,position:t},...e.stops.slice(C)];return{...e,regenerate:!0,currentColor:a,currentStopIndex:C,stops:n}},moveCurrentStopBy:(e,{payload:t})=>{const C=e.currentStopIndex,a=e.stops[C].position,n=Math.max(0,Math.min(1,Number((a+t).toFixed(2))));if(n===a)return e;const r=[...e.stops.slice(0,C),{...e.stops[C],position:n},...e.stops.slice(C+1)];r.sort(((e,t)=>e.position-t.position));const l=r.findIndex((({position:e})=>e===n));return{...e,regenerate:!0,stops:r,currentStopIndex:l}},removeCurrentStop:e=>{if(2===e.stops.length)return e;const t=e.currentStopIndex,C=[...e.stops];C.splice(t,1);const a=t===C.length?t-1:t;return{...e,regenerate:!0,stops:C,currentColor:C[a].color,currentStopIndex:a}},updateCurrentColor:(e,{payload:{rgb:t}})=>{const C={...t},a={...e,regenerate:!0,currentColor:C};return e.type!==ga&&(a.stops=[...e.stops.slice(0,e.currentStopIndex),{...e.stops[e.currentStopIndex],color:C},...e.stops.slice(e.currentStopIndex+1)]),a},rotateClockwise:e=>({...e,rotation:(e.rotation+.25)%1,regenerate:!0}),selectStop:(e,{payload:t})=>{const C=Math.max(0,Math.min(e.stops.length-1,t)),a=e.stops[C].color;return{...e,currentStopIndex:C,currentColor:a}},reverseStops:e=>{const t=e.stops.map((({color:e,position:t})=>({color:e,position:1-t}))).reverse(),C=t.length-e.currentStopIndex-1;return{...e,stops:t,currentStopIndex:C,regenerate:!0}}};var rn=function(){const[e,t]=Object(u.F)(an,nn),C=Cn(e);return{state:{...e,generatedColor:C},actions:t}},ln=C(135);const on=Object(l.f)(b.a).withConfig({displayName:"addCustomColor__StyledButton",componentId:"sc-1r2s3xb-0"})(["flex-basis:100%;margin:0 16px 16px;"]);var cn=function AddCustomColor({color:e,onSave:t}){const{updateStory:C,globalStoryStyles:a}=Object(HC.a)((({state:{story:{globalStoryStyles:e}},actions:{updateStory:t}})=>({globalStoryStyles:e,updateStory:t}))),n=Object(u.s)((()=>{C({properties:{globalStoryStyles:{...a,colors:Object(ln.a)([...a.colors,e].filter(Boolean))}}}),t()}),[t,e,a,C]);return r.a.createElement(on,{onClick:n,type:g.c.SECONDARY,size:g.a.SMALL,variant:g.d.RECTANGLE},Object(h.__)("Add to Saved Colors","web-stories"))};const sn=l.f.div.withConfig({displayName:"customColorPicker__Body",componentId:"sc-muv2ze-0"})(["display:flex;flex-direction:column;"]);var dn=function CustomColorPicker({color:e,allowsGradient:t,allowsOpacity:C,handleColorChange:a,handleClose:n,hideCustomPicker:l,allowsSavedColors:i}){const{state:{type:o,stops:c,currentStopIndex:s,currentColor:d,generatedColor:p},actions:{load:m,updateCurrentColor:f,reverseStops:E,selectStop:v,addStopAt:y,removeCurrentStop:O,rotateClockwise:M,moveCurrentStopBy:w,setToSolid:L,setToGradient:_}}=rn();return Object(u.y)((()=>{p&&a(p)}),[a,p]),Object(u.y)((()=>{m(e||Object(GC.a)(0,0,0))}),[e,m]),r.a.createElement(r.a.Fragment,null,r.a.createElement(Ka,{handleClose:n},r.a.createElement(b.a,{"aria-label":Object(h.__)("Go back","web-stories"),onClick:l,type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE},r.a.createElement(Xe.a.ArrowLeft,null))),t&&r.a.createElement(Ja,{type:o,setToGradient:_,setToSolid:L}),r.a.createElement(sn,null,"solid"!==o&&r.a.createElement(Wa,{stops:c,currentStopIndex:s,onSelect:v,onReverse:E,onAdd:y,onDelete:O,onRotate:M,onMove:w,type:o}),r.a.createElement(ma,{color:d,onChange:f,showOpacity:C}),i&&r.a.createElement(cn,{color:p||e,onSave:l})))},un=C(238);function pn(e){const t=e.getBoundingClientRect();return{x:t.left+t.width/2,y:t.top+t.height/2}}function mn(e,t){let C=e[t];for(;C&&C.disabled;)C=C[t];return C}function fn({ref:e},t=[]){const{isRTL:C}=Object(L.c)(),a=Object(u.s)((({key:e,target:t})=>{const a=t,n=function(e,t){return(e?"ArrowRight"===t||"ArrowUp"===t||"PageUp"===t:"ArrowLeft"===t||"ArrowUp"===t||"PageUp"===t)?"previousSibling":"nextSibling"}(C,e),r=e=>{a.tabIndex=-1,e.tabIndex=0,e.focus(),e.scrollIntoView("previousSibling"===n)};if("ArrowLeft"===e||"ArrowRight"===e){const e=mn(a,n);e&&r(e)}else if("ArrowUp"===e||"ArrowDown"===e){const t=function(e,t){const C=pn(e);let a=null,n=null,r=null;for(let o=mn(e,t);o;o=mn(o,t)){const e=pn(o);if(Math.floor(e.y)===Math.floor(C.y))continue;if(a&&Math.floor(e.y)>Math.floor(n.y))break;const t=(l=C,i=e,Math.pow(l.x-i.x,2)+Math.pow(l.y-i.y,2));(!r||t<r)&&(r=t,n=e,a=o)}var l,i;return a}(a,n);if(t)a.tabIndex=-1,t.tabIndex=0,t.focus();else if("ArrowUp"===e){r(a.parentNode.firstChild)}else{r(a.parentNode.lastChild)}}else if("Home"===e){r(a.parentNode.firstChild)}else if("End"===e){r(a.parentNode.lastChild)}else if("PageDown"===e||"PageUp"===e){let e=a;for(let t=0;mn(e,n)&&t<5;e=mn(e,n))t++;r(e)}}),[C]);Object(ve.h)(e,{key:["up","down","left","right","pageup","pagedown","home","end"]},a,[e,a,...t])}var hn=C(812),bn=C(384),gn=C(79),En=C(78),vn=C(142);const yn=["backgroundColor","backgroundTextMode","font","fontSize","lineHeight","padding","textAlign"];function On(e,t,C){const a=t.colors,n=C?"color":"background";return a.find((t=>{try{return Object(hn.a)(t,e,n)}catch(e){return!1}}))}function Mn(e,t){const{color:C,backgroundColor:a,font:n,fontWeight:r,backgroundTextMode:l,textAlign:i,letterSpacing:o,lineHeight:c,isItalic:s,isUnderline:d,padding:u,fontSize:p}=e;let m={textAlign:i,letterSpacing:o/100+"em",fontWeight:r,textDecoration:d?"underline":null,fontStyle:s?"italic":null,fontFamily:Object(gn.b)(n),...Object(J.a)(C,"color")};return t||(m={...m,fontSize:p,lineHeight:c,padding:u,backgroundTextMode:l}),l===sC.b.NONE||t&&l===sC.b.HIGHLIGHT||(m={...m,...Object(J.a)(a,"background")}),m}function wn(e){return e!==sC.y?e:null}function Ln(e){const{color:t,fontWeight:C,isItalic:a,isUnderline:n,letterSpacing:r}=Object(En.b)(e);return{color:t!==sC.y?t:Object(GC.a)(0,0,0),fontWeight:wn(C),isItalic:wn(a),isUnderline:wn(n),letterSpacing:wn(r)}}function _n(e,t,C,a){return{colors:sC.C.STYLE===C?[]:e.map((({content:e,backgroundColor:t})=>a?t:Object(En.b)(e).color)).filter((e=>e!==sC.y)).filter((e=>e&&!On(e,t,!0))),textStyles:sC.C.COLOR===C?[]:e.map((e=>({...Object(vn.a)(e,yn),...Ln(e.content)}))).filter((e=>!function(e,t){const C=t.textStyles,a=Object(bn.a)(Mn(e));return C.find((e=>a===Object(bn.a)(Mn(e))))}(e,t)))}}function jn(e,t){return{colors:e.map((({backgroundColor:e})=>e||null)).filter((e=>e&&!On(e,t,!1)))}}var xn=function({presetType:e,isBackgroundColor:t}){var C,a,n;const{currentPage:r,currentStoryStyles:l={colors:[]},selectedElements:i,globalStoryStyles:o={colors:[],textStyles:[]},updateStory:c}=Object(F.o)((({state:{currentPage:e,selectedElements:t,story:{globalStoryStyles:C,currentStoryStyles:a}},actions:{updateStory:n}})=>({currentPage:e,currentStoryStyles:a,selectedElements:t,globalStoryStyles:C,updateStory:n}))),{colors:s,textStyles:d}=o,{colors:p}=l,m=function(e,t){return t.length>0&&t.every((({type:t})=>e===t))}("text",i),f=(null==i||null===(C=i[0])||void 0===C?void 0:C.id)===(null==r||null===(a=r.elements)||void 0===a||null===(n=a[0])||void 0===n?void 0:n.id),h=Object(u.s)(((C,a)=>{return m?{...C,..._n(i,a,e,t)}:f?{...C,...(n=r,l=a,{colors:[n.backgroundColor].filter((e=>e&&!On(e,l,!1)))})}:{...C,...jn(i,a)};var n,l}),[r,f,m,e,i,t]),b=Object(u.s)((e=>{c({properties:{currentStoryStyles:{colors:Object(ln.a)([...p,...e.colors])}}})}),[p,c]),g=Object(u.s)((e=>{c({properties:{globalStoryStyles:{textStyles:Object(ln.a)([...d,...e.textStyles]),colors:Object(ln.a)([...s,...e.colors])}}})}),[s,d,c]),E=Object(u.s)(((e,t=!1)=>{var C,a;const n=t?l:o;if((null===(C=(e=h(e,n)).colors)||void 0===C?void 0:C.length)>0||(null===(a=e.textStyles)||void 0===a?void 0:a.length)>0)return t?b(e,n):g(e,n),e}),[h,l,o,g,b]);return{addGlobalPreset:e=>(e.stopPropagation(),E({textStyles:[],colors:[]})),addLocalPreset:e=>(e.stopPropagation(),E({colors:[]},!0))}};function Zn(){return(Zn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const An=l.f.button.withConfig({displayName:"colorAdd__AddColorAction",componentId:"sc-1fz3728-0"})(["cursor:pointer;background-color:transparent;color:",";border-color:",";border-width:1px;border-style:dashed;border-radius:50%;height:","px;width:","px;padding:0;svg{height:100%;width:100%;}:hover{border-color:",";}",";"],(({theme:e})=>e.colors.fg.primary),(({theme:e})=>e.colors.border.defaultNormal),32,32,(({theme:e})=>e.colors.border.defaultHover),Qt);var In=function ColorAdd({isLocal:e=!1,isGlobal:t=!1,isBackground:C=!1,...a}){const{addGlobalPreset:n,addLocalPreset:l}=xn({presetType:sC.C.COLOR,isBackgroundColor:C});if(!e&&!t)return null;const i=e?Object(h.__)("Add local color","web-stories"):Object(h.__)("Add global color","web-stories");return r.a.createElement(An,Zn({tabIndex:"0",onClick:e?l:n,"aria-label":i},a),r.a.createElement(Xe.a.Plus,null))};function Tn(){return(Tn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Sn=Object(l.e)(["",";"],(({theme:e})=>X.c.focusableOutlineCSS(e.colors.border.focus,e.colors.bg.secondary))),Rn=l.f.div.attrs({role:"listbox"}).withConfig({displayName:"basicColorList__SwatchList",componentId:"sc-llss6t-0"})(["display:flex;max-width:100%;flex-wrap:wrap;gap:6px;"]),kn=Object(l.f)(Swatch).attrs((({isSelected:e})=>({role:"option","aria-selected":e}))).withConfig({displayName:"basicColorList__StyledSwatch",componentId:"sc-llss6t-1"})(["",";",""],Sn,(({isSelected:e,theme:t})=>e&&Object(l.e)(["border:2px solid ",";"],t.colors.border.defaultActive)));function Pn(e){if(!e)return"";const t=Object(J.a)(e);return t.backgroundColor||t.backgroundImage}function ConditionalTooltip({tooltip:e,children:t}){return e?r.a.createElement(Ke.a,{title:e},t):t}var Nn=function BasicColorList({color:e,colors:t,handleClick:C,allowsOpacity:a,allowsGradient:n,isLocal:l=!1,isGlobal:i=!1,isEditMode:o,changedStyle:c,...s}){const d=Pn(e),p=Object(u.G)(null);fn({ref:p});const m=t.map(Pn).findIndex((e=>d===e));let f=0;const b=l?Object(h.__)("local","web-stories"):Object(h.__)("global","web-stories"),g="background"===c;return r.a.createElement(r.a.Fragment,null,t.length>0&&r.a.createElement(Rn,Tn({ref:p},s),t.map(((e,t)=>{const i=!a&&xC(e),c=!n&&ZC(e),s=(i||c)&&!o;let u=null;s&&!o&&(u=i?Object(h.__)("Page background colors cannot have an opacity.","web-stories"):Object(h.__)("Gradient not allowed for Text","web-stories"));const p=Pn(e),g=o?Object(h.sprintf)(
|
70 |
/* translators: First %s is the color type, second %s is the color as a string */
|
71 |
-
Object(h.__)("Delete %1$s color: %2$s","web-stories"),b,p):p,E=d===p;let v=t===f?0:-1;return m>=0?v=E?0:-1:s&&t===f&&(f++,v=-1),r.a.createElement(ConditionalTooltip,{key:p,tooltip:u},r.a.createElement(kn,{onClick:()=>C(e,l),pattern:e,isSelected:E,isDisabled:s,tabIndex:v,title:g},o&&r.a.createElement(Xe.a.Cross,null)))})),(l||i)&&r.a.createElement(In,{isLocal:l,isGlobal:i,isBackground:g})),!t.length&&(l||i)&&r.a.createElement(In,{isLocal:l,isGlobal:i,isBackground:g}))},Dn=C(288);const zn=l.f.label.withConfig({displayName:"confirmationDialog__Label",componentId:"sc-1go2j3s-0"})(["margin-left:12px;"]),Bn=l.f.footer.withConfig({displayName:"confirmationDialog__CheckboxWrapper",componentId:"sc-1go2j3s-1"})(["display:flex;margin-top:12px;padding:14px 0 0 9px;border-top:1px solid ",";"],(({theme:e})=>e.colors.divider.primary));var Fn=function ConfirmationDialog({onClose:e,onPrimary:t}){const[C,a]=Object(u.I)(un.b.getItemByKey(un.a[ya])),n=`cb-${Object(Dn.a)()}`;return r.a.createElement(Be.a,{isOpen:!0,onClose:e,secondaryText:Object(h.__)("Cancel","web-stories"),onPrimary:t,primaryText:Object(h.__)("Delete","web-stories")},r.a.createElement(iC.a,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("This is a global color. Deleting this color will remove it from the Saved Colors across all stories and the color will no longer be available to any other users on the site.","web-stories")),r.a.createElement(Bn,null,r.a.createElement(oC.a,{id:n,checked:C,onChange:()=>{un.b.setItemByKey(un.a[ya],!C),a(!C)}}),r.a.createElement(zn,{htmlFor:n},r.a.createElement(iC.a,{as:"span",size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Don't ask for confirmation again.","web-stories")))))};var Hn=function({onEmpty:e=(()=>{})}){const{currentStoryStyles:t,globalStoryStyles:C,updateStory:a}=Object(F.o)((({state:{story:{globalStoryStyles:e,currentStoryStyles:t}},actions:{updateStory:C}})=>({currentStoryStyles:t,globalStoryStyles:e,updateStory:C}))),{colors:n}=C||{},{colors:r}=t||{},l=(null==r?void 0:r.length)>0,i=Object(u.s)((t=>{const r=n.filter((e=>e!==t));a({properties:{globalStoryStyles:{...C||{},colors:r}}}),0!==r.length||l||e()}),[n,a,l,C,e]);return{deleteLocalColor:Object(u.s)((t=>{const C=r.filter((e=>e!==t));a({properties:{currentStoryStyles:{colors:C}}}),0===C.length&&0===n.length&&e()}),[n,r,a,e]),deleteGlobalColor:i}};const Gn=l.f.div.withConfig({displayName:"basicColorPicker__Body",componentId:"sc-1d9u82i-0"})(["display:flex;flex-direction:column;margin:8px 16px 16px;"]),Vn=l.f.div.withConfig({displayName:"basicColorPicker__SavedColors",componentId:"sc-1d9u82i-1"})(["border-bottom:1px solid ",";padding-bottom:24px;"],(({theme:e})=>e.colors.border.defaultNormal)),Un=l.f.div.withConfig({displayName:"basicColorPicker__DefaultColors",componentId:"sc-1d9u82i-2"})(["padding-bottom:24px;"]),Wn=Object(l.f)(iC.a).attrs({size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL}).withConfig({displayName:"basicColorPicker__Label",componentId:"sc-1d9u82i-3"})(["color:",";margin:16px 0 10px;"],(({theme:e})=>e.colors.fg.secondary)),Yn=Object(l.f)(Wn).withConfig({displayName:"basicColorPicker__DefaultText",componentId:"sc-1d9u82i-4"})(["margin:0 0 0 8px;color:",";"],(({theme:e})=>e.colors.fg.primary)),$n=Object(l.f)(b.a).withConfig({displayName:"basicColorPicker__StyledButton",componentId:"sc-1d9u82i-5"})(["display:flex;justify-content:center;align-items:center;gap:4px;flex-basis:100%;"]),qn=Object(l.f)(iC.a).withConfig({displayName:"basicColorPicker__StyledText",componentId:"sc-1d9u82i-6"})(["padding:5px 10px;"]),Xn=Object(l.f)(Xe.a.PlusOutline).withConfig({displayName:"basicColorPicker__StyledPlus",componentId:"sc-1d9u82i-7"})(["width:32px;margin:-8px 0;"]),Kn=l.f.div.withConfig({displayName:"basicColorPicker__EyedropperWrapper",componentId:"sc-1d9u82i-8"})(["display:flex;"]);var Qn=function BasicColorPicker({color:e,handleColorChange:t,allowsOpacity:C,allowsGradient:a,allowsSavedColors:n,showCustomPicker:l,handleClose:i,showDialog:o,setShowDialog:c,changedStyle:s}){const{savedColors:d,storyColors:p}=Object(HC.a)((e=>{var t,C,a,n;return{savedColors:(null===(t=e.state.story)||void 0===t||null===(C=t.globalStoryStyles)||void 0===C?void 0:C.colors)||[],storyColors:(null===(a=e.state.story)||void 0===a||null===(n=a.currentStoryStyles)||void 0===n?void 0:n.colors)||[]}})),[m,f]=Object(u.I)(!1),[E,v]=Object(u.I)(null),y=p.length>0||d.length>0,{initEyedropper:O}=dC({onChange:e=>t({color:e})}),{deleteLocalColor:M,deleteGlobalColor:w}=Hn({onEmpty:()=>f(!1)}),L=(e,C=!1)=>{if(!m)return void t(e);if(C)return void M(e);un.b.getItemByKey(un.a[ya])?w(e):(c(!0),v(e))};return r.a.createElement(r.a.Fragment,null,r.a.createElement(Ka,{handleClose:i,isEditMode:m,setIsEditMode:f,hasPresets:y},r.a.createElement(Yn,null,Object(h.__)("Color","web-stories"))),r.a.createElement(Gn,null,r.a.createElement(Kn,null,r.a.createElement(b.a,{variant:g.d.SQUARE,type:g.c.QUATERNARY,size:g.a.SMALL,"aria-label":Object(h.__)("Pick a color from canvas","web-stories"),onClick:O(),onPointerEnter:O(!1)},r.a.createElement(Xe.a.Pipette,null)),r.a.createElement(qn,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Sample color","web-stories"))),r.a.createElement(Vn,null,n&&r.a.createElement(r.a.Fragment,null,r.a.createElement(Wn,{id:"colorpicker-story-colors-title"},Object(h.__)("Current story","web-stories")),r.a.createElement(Nn,{color:e,colors:p,handleClick:L,isLocal:!0,allowsOpacity:C,allowsGradient:a,"aria-labelledby":"colorpicker-story-colors-title",isEditMode:m,"data-testid":"saved-story-colors",changedStyle:s}),r.a.createElement(Wn,{id:"colorpicker-saved-colors-title"},Object(h.__)("Saved colors","web-stories")),r.a.createElement(Nn,{color:e,colors:d,isGlobal:!0,handleClick:L,allowsOpacity:C,allowsGradient:a,"aria-labelledby":"colorpicker-saved-colors-title",isEditMode:m,changedStyle:s}))),r.a.createElement(Un,null,r.a.createElement(Wn,{id:"colorpicker-default-colors-title"},Object(h.__)("Default","web-stories")),r.a.createElement(Nn,{color:e,colors:Ma,handleClick:e=>{t(e),f(!1)},allowsOpacity:C,allowsGradient:a,"aria-labelledby":"colorpicker-default-colors-title",isEditMode:!1})),r.a.createElement($n,{onClick:l,type:g.c.SECONDARY,size:g.a.SMALL,variant:g.d.RECTANGLE},Object(h.__)("Custom","web-stories"),r.a.createElement(Xn,null))),o&&r.a.createElement(Fn,{onClose:()=>c(!1),onPrimary:()=>{w(E),v(null),c(!1)}}))};const Jn=l.f.div.withConfig({displayName:"colorPicker__Container",componentId:"sc-9q80if-0"})(["border-radius:8px;background:",";width:256px;user-select:none;display:flex;flex-direction:column;align-items:stretch;overflow:hidden;&.picker-appear{opacity:0.01;margin-top:-10px;&.picker-appear-active{opacity:1;margin-top:0;transition:300ms ease-out;transition-property:opacity,margin-top;}}"],(({theme:e})=>e.colors.bg.secondary));var er=function ColorPicker({onChange:e,isEyedropperActive:t=!1,color:C=null,allowsGradient:a=!1,allowsOpacity:n=!0,allowsSavedColors:l=!1,onClose:i=(()=>{}),changedStyle:o="background",onDimensionChange:c=(()=>{})}){const[s,d]=Object(u.I)(!1),[p,m]=Object(u.I)(ZC(C)),f=Object(u.s)((()=>{m(!0),c()}),[c]),b=Object(u.s)((()=>{m(!1),c()}),[c]),{actions:{pushTransform:g}}=Object(G.b)(),{selectedElementIds:E=[]}=Object(HC.a)((({state:{selectedElementIds:e}})=>({selectedElementIds:e}))),v=Object(u.x)(e,100,{leading:!0}),y=Object(u.s)((e=>{v(e),E.forEach((t=>{g(t,{color:e,style:o,staticTransformation:!0})}))}),[v,E,o,g]),O=Object(u.G)();Object(u.z)(O,(()=>{t||s||i()}),[t,s]);const M=Object(u.G)(document.activeElement),w=Object(u.s)((e=>{M.current&&M.current.focus(),i(e)}),[i]);Object(ve.h)(O,"esc",w),Object(FC.a)({ref:O});const L=p?dn:Qn;return r.a.createElement(BC.a,{nodeRef:O,in:!0,appear:!0,classNames:"picker",timeout:300},r.a.createElement(Jn,{role:"dialog","aria-label":Object(h.__)("Color and gradient picker","web-stories"),ref:O},r.a.createElement(L,{color:C,allowsGradient:a,allowsOpacity:n,handleColorChange:y,showCustomPicker:f,hideCustomPicker:b,handleClose:w,allowsSavedColors:l,showDialog:s,setShowDialog:d,changedStyle:o})))},tr=Object(u.f)({state:{},actions:{},tabs:{},refs:{}});var Cr=function(e){return Object(u.w)(tr,null!=e?e:u.k)};function ar(){return(ar=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const nr=l.f.div.withConfig({displayName:"colorInput__Preview",componentId:"sc-8jvqvx-0"})(["height:36px;color:",";cursor:pointer;position:relative;width:100%;padding:0;"],(({theme:e})=>e.colors.fg.primary)),rr=Object(l.f)(_C).withConfig({displayName:"colorInput__Input",componentId:"sc-8jvqvx-1"})(["min-width:100px;div{background-color:transparent;}input{padding-left:26px;}"]),lr=Object(l.f)(Ke.a).withConfig({displayName:"colorInput__Tooltip",componentId:"sc-8jvqvx-2"})(["width:100%;height:100%;"]),ir=Object(l.e)(["position:absolute;top:0;left:0;border-radius:50px;width:24px;height:24px;"]),or=Object(l.e)(["overflow:hidden;border:1px solid ",";outline:none;background:transparent;"],(({theme:e})=>e.colors.border.defaultNormal)),cr=Object(l.f)(nr).attrs({as:"button",type:"button"}).withConfig({displayName:"colorInput__ColorButton",componentId:"sc-8jvqvx-3"})(["border-radius:4px;"," &:focus{box-shadow:0px 0px 0 2px ",",0px 0px 0 4px ",";border-color:",";}"],or,(({theme:e})=>e.colors.bg.primary),(({theme:e})=>e.colors.border.focus),(({theme:e})=>e.colors.border.defaultHover)),sr=l.f.div.withConfig({displayName:"colorInput__ColorPreview",componentId:"sc-8jvqvx-4"})([""," top:6px;left:6px;padding:0;background:transparent;cursor:pointer;"],ir),dr=l.f.div.withConfig({displayName:"colorInput__TextualPreview",componentId:"sc-8jvqvx-5"})(["padding:6px 12px 6px 38px;text-align:left;flex-grow:1;height:32px;"]),ur=Object(l.f)(Swatch).withConfig({displayName:"colorInput__StyledSwatch",componentId:"sc-8jvqvx-6"})(["",";"],Qt),pr=()=>C.e(199).then(C.bind(null,1050)),mr={x:20};var fr=Object(u.j)((function ColorInput({onChange:e,allowsGradient:t=!1,allowsOpacity:C=!0,allowsSavedColors:a=!1,value:n=null,label:l=null,changedStyle:i},o){var c;const s=n===sC.y;n=s?"":n;const d=s?{color:{r:0,g:0,b:0,a:0}}:OC(n),p=cC(n),[m,f]=Object(u.I)(!1),b=Object(u.G)(null),{isEyedropperActive:g}=Object(F.d)((({state:{isEyedropperActive:e}})=>({isEyedropperActive:e}))),{refs:{inspector:E}}=Cr(),v=null===(c=n)||void 0===c?void 0:c.type,y=!v||"solid"===v,O={onClick:()=>f(!0),"aria-label":l,onPointerEnter:()=>pr(),onFocus:()=>pr()};Object(u.J)((()=>()=>f(!1)));const M=Object(u.s)((()=>f(!1)),[]),w=Object(h.__)("Open color picker","web-stories");return r.a.createElement(r.a.Fragment,null,y?r.a.createElement(nr,{ref:b},r.a.createElement(rr,{ref:o,"aria-label":l,value:s?null:n,onChange:e,isIndeterminate:s,placeholder:s?sC.x:"",containerStyleOverride:Jt}),r.a.createElement(sr,null,r.a.createElement(lr,{title:w,hasTail:!0},r.a.createElement(ur,ar({isSmall:!0,pattern:d},O))))):r.a.createElement(lr,{title:w,hasTail:!0},r.a.createElement(cr,ar({ref:b},O),r.a.createElement(sr,null,r.a.createElement(Swatch,{isSmall:!0,isPreview:!0,role:"status",tabIndex:"-1",pattern:d})),r.a.createElement(dr,null,r.a.createElement(iC.a,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},p)))),r.a.createElement(zC.a,{anchor:b,dock:E,isOpen:m,placement:DC.a.LEFT_START,spacing:mr,invisible:g,renderContents:({propagateDimensionChange:l})=>r.a.createElement(er,{color:s?null:n,isEyedropperActive:g,onChange:e,allowsGradient:t,allowsOpacity:C,allowsSavedColors:a,onClose:M,changedStyle:i,onDimensionChange:l})}))}));const hr=Object(l.e)(["display:flex;align-items:center;width:100%;"]),br=l.f.section.withConfig({displayName:"color__Container",componentId:"sc-6hx2ba-0"})(["",""],hr),gr=l.f.div.withConfig({displayName:"color__ColorInputsWrapper",componentId:"sc-6hx2ba-1"})(["",""],hr),Er=l.f.div.withConfig({displayName:"color__Space",componentId:"sc-6hx2ba-2"})(["width:8px;height:1px;margin:6px;background-color:",";"],(({theme:e})=>e.colors.divider.primary)),vr=l.f.div.withConfig({displayName:"color__InputWrapper",componentId:"sc-6hx2ba-3"})(["width:calc(53% - 10px);"]),yr=l.f.div.withConfig({displayName:"color__OpacityWrapper",componentId:"sc-6hx2ba-4"})(["width:calc(47% - 10px);"]),Or=Object(l.f)(b.a).attrs({variant:g.d.SQUARE,type:g.c.TERTIARY,size:g.a.SMALL}).withConfig({displayName:"color__EyeDropperButton",componentId:"sc-6hx2ba-5"})(["margin-right:8px;",";"],Qt);var Mr=Object(u.j)((function Color({onChange:e,allowsGradient:t=!1,allowsOpacity:C=!0,allowsSavedColors:a=!1,value:n=null,label:l=null,changedStyle:i=null,hasEyedropper:o=!1},c){const s=Object(u.s)((t=>e(uC(n,t))),[n,e]),d=Object(h.sprintf)(
|
72 |
/* translators: %s: color input label name. */
|
73 |
-
Object(h.__)("Color input: %s","web-stories"),
|
74 |
/* translators: %s: list of allowed file types. */
|
75 |
-
Object(h.__)("Please choose only %s as an icon.","web-stories"),Object(h.translateToExclusiveList)(
|
76 |
/* translators: %s: list of allowed file types. */
|
77 |
-
Object(h.__)("Please choose only %s to insert into page.","web-stories"),Object(h.translateToExclusiveList)(n)));const y=Object(u.s)((t=>{try{f&&c(t)&&(E.includes(t.mimeType)&&p({resource:t}),"image/gif"===t.mimeType&&m({resource:t})),e(t),d(t)}catch(e){b({message:e.message,dismissible:!0})}}),[f,c,e,m,p,d,b,E]);return r.a.createElement(o,{onSelect:y,onSelectErrorMessage:v,onClose:s,type:g,render:t,buttonInsertText:C})},ml=C(9),fl=C.n(ml);function hl(){return(hl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const bl="ON",gl="OFF",El=l.f.h3.withConfig({displayName:"switch__VisuallyHiddenRadioGroupLabel",componentId:"sc-r6bc36-0"})(["",";"],X.c.visuallyHidden),vl=l.f.span.withConfig({displayName:"switch__SlidingButton",componentId:"sc-r6bc36-1"})(["position:absolute;display:block;top:0;left:0;width:50%;height:","px;border-radius:100px;transition:all 0.15s ease-out;z-index:0;",""],32,(({hasOffset:e})=>e&&"left: 50%")),yl=l.f.div.withConfig({displayName:"switch__SwitchContainer",componentId:"sc-r6bc36-2"})(["position:relative;height:","px;display:flex;flex-direction:row;justify-content:center;align-items:center;appearance:none;background:",";border-radius:100px;color:",";cursor:pointer;",";"],32,(({theme:e})=>e.colors.divider.secondary),(({theme:e})=>e.colors.fg.primary),(({disabled:e,theme:t})=>e?Object(l.e)(["cursor:default;background:",";","{background-color:",";}"],t.colors.divider.tertiary,vl,t.colors.interactiveBg.disable):Object(l.e)([":hover ","{background-color:",";}"],vl,t.colors.interactiveBg.primaryHover))),Ol=l.f.input.attrs({type:"radio"}).withConfig({displayName:"switch__HiddenRadioButton",componentId:"sc-r6bc36-3"})(["position:absolute;height:0;width:0;padding:0;min-width:unset;appearance:none;border:0;box-shadow:none;margin:-1px;outline:none;overflow:hidden;opacity:0;"]),Ml=Object(l.f)(iC.a).attrs({forwardedAs:"label",size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL}).withConfig({displayName:"switch__RadioButtonLabel",componentId:"sc-r6bc36-4"})(["display:flex;align-items:center;justify-content:center;flex:1;height:","px;width:50%;padding:0px 6px;z-index:1;color:",";background-color:",";border-radius:100px;cursor:pointer;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;transition:all 0.15s ease-out;",":focus-within ~ span{",";}"],32,(({isActive:e,theme:t})=>e?t.colors.inverted.fg.primary:t.colors.fg.secondary),(({isActive:e,theme:t})=>e&&t.colors.interactiveBg.primaryNormal),(({disabled:e,theme:t})=>e&&Object(l.e)(["cursor:default;color:",";"],t.colors.fg.disable)),X.c.focusCSS),wl=Object(u.j)((function({className:e,disabled:t,groupLabel:C,id:a,offLabel:n,onChange:l,onLabel:i,value:o,...c},s){const d=Object(u.C)((()=>({group:a||Object(Dn.a)(),offInput:Object(Dn.a)(),onInput:Object(Dn.a)()})),[a]),p=Object(u.s)((e=>{l(e,e.target.value===bl)}),[l]);return r.a.createElement(yl,{ref:s,className:e,role:"radiogroup","aria-labelledby":d.group,"aria-disabled":t,disabled:t},r.a.createElement(El,{id:d.group},C),r.a.createElement(Ml,{htmlFor:d.onInput,isActive:o,disabled:t},i,r.a.createElement(Ol,hl({checked:o,disabled:t,id:d.onInput,onChange:p,value:bl},c))),r.a.createElement(Ml,{htmlFor:d.offInput,isActive:!o,disabled:t},n,r.a.createElement(Ol,hl({checked:!o,disabled:t,id:d.offInput,onChange:p,value:gl},c))),r.a.createElement(vl,{hasOffset:!o}))}));wl.displayName="Switch";fl.a.string,fl.a.bool,fl.a.string.isRequired,fl.a.string,fl.a.string.isRequired,fl.a.string.isRequired,fl.a.func.isRequired,fl.a.string.isRequired,fl.a.bool;function Ll(){return(Ll=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}wl.defaultProps={value:!1};const _l=Object(l.f)(wl).withConfig({displayName:"switch__StyledSwitch",componentId:"sc-1io8pri-0"})(["label:focus-within ~ span{",";}"],(({theme:e})=>`box-shadow: 0px 0px 0 2px ${e.colors.bg.secondary}, 0px 0px 0 4px ${e.colors.border.focus} !important;`));var jl=function({offLabel:e=Object(h.__)("Off","web-stories"),onChange:t,onLabel:C=Object(h.__)("On","web-stories"),value:a,...n}){const l=Object(u.G)(null),i=Object(u.s)((e=>{t(e,!a)}),[t,a]);return Object(ve.h)(l,["space","enter","left","right","up","down"],i,[i,a]),r.a.createElement(_l,Ll({ref:l,offLabel:e,onChange:t,onLabel:C,value:a},n))},xl=C(151);function Zl(){return(Zl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Al=l.f.div.withConfig({displayName:"textArea__Container",componentId:"sc-mwg0xv-0"})(["position:relative;width:100%;min-width:100px;"]),Il=Object(l.f)(iC.a).attrs({size:lt.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL,forwardedAs:"span"}).withConfig({displayName:"textArea__CounterText",componentId:"sc-mwg0xv-1"})(["color:",";"],(({theme:e})=>e.colors.fg.tertiary)),Tl=Object(l.f)(iC.a).withConfig({displayName:"textArea__Label",componentId:"sc-mwg0xv-2"})(["margin-bottom:12px;"]),Sl=Object(l.f)(iC.a).withConfig({displayName:"textArea__Hint",componentId:"sc-mwg0xv-3"})(["margin-top:12px;color:",";"],(({hasError:e,theme:t})=>t.colors.fg[e?"negative":"tertiary"])),Rl=l.f.div.withConfig({displayName:"textArea__InputContainer",componentId:"sc-mwg0xv-4"})((({focused:e,hasError:t,theme:C,styleOverride:a})=>Object(l.e)(["box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border:1px solid ",";border-radius:",";overflow:hidden;",";:focus-within{",";}",";"],C.colors.border[t?"negativeNormal":"defaultNormal"],C.borders.radius.small,e&&!t&&Object(l.e)(["border-color:",";"],C.colors.border.defaultActive),Object(xl.a)(C.colors.border.focus),a))),kl=l.f.textarea.withConfig({displayName:"textArea__StyledTextArea",componentId:"sc-mwg0xv-5"})((({theme:e})=>Object(l.e)(["height:100%;width:100%;padding:0;background-color:inherit;border:none;outline:none;color:",";resize:none;",";",";:disabled{color:",";border-color:",";}:active{color:",";}::placeholder{color:",";}"],e.colors.fg.primary,X.c.scrollbarCSS,X.c.expandPresetStyles({preset:e.typography.presets.paragraph[lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL],theme:e}),e.colors.fg.disable,e.colors.border.disable,e.colors.fg.primary,e.colors.fg.tertiary))),Pl=l.f.div.withConfig({displayName:"textArea__Counter",componentId:"sc-mwg0xv-6"})(["text-align:right;align-self:flex-end;span{color:",";}"],(({theme:e})=>e.colors.fg.tertiary)),Nl=Object(u.j)((({className:e,disabled:t,hasError:C,hint:a,id:n,label:l,onBlur:i,onFocus:o,value:c,showCount:s=!1,maxLength:d,isIndeterminate:p=!1,containerStyleOverride:m="",...f},h)=>{const b=Object(u.C)((()=>n||Object(Dn.a)()),[n]),g=s&&d>0,[E,v]=Object(u.I)(!1),[y,O]=Object(u.I)(!1);let M=c;return p&&(M=""),r.a.createElement(Al,{className:e},l&&r.a.createElement(Tl,{htmlFor:b,forwardedAs:"label",disabled:t},l),r.a.createElement(Rl,{focused:E,hasError:C,styleOverride:m},r.a.createElement(kl,Zl({id:b,disabled:t,ref:e=>{"function"==typeof h?h(e):h&&(h.current=e),e&&E&&!y&&(e.select(),O(!0))},onFocus:e=>{null==o||o(e),v(!0),O(!1)},onBlur:e=>{null==i||i(e),v(!1)},value:M,maxLength:d},f)),g&&r.a.createElement(Pl,null,r.a.createElement(Il,null,`${c.length}/${d}`))),a&&r.a.createElement(Sl,{hasError:C},a))}));function Dl(){return(Dl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}Nl.displayName="TextArea";const zl=Object(u.j)((({className:e,placeholder:t,value:C,disabled:a,rows:n,onChange:l,onBlur:i,...o},c)=>{const[s,d]=Object(u.I)(C),p=Object(u.s)((e=>{s!==C&&l(e)}),[s,l,C]);Object(u.y)((()=>{d(C)}),[C]);const m=Object(u.s)((e=>{p(e),i&&i(e)}),[i,p]);return r.a.createElement(Nl,Dl({placeholder:t,value:s},o,{containerStyleOverride:Jt,onChange:e=>d(e.target.value),onBlur:m,ref:c}))}));zl.displayName="TextArea",zl.defaultProps={showTextLimit:!0,rows:2};var Bl=zl,Fl=Object(u.f)({isMultiple:!1,registerPresubmitHandler:()=>{}});var Hl=function(e){return Object(u.w)(Fl,null!=e?e:u.k)};var Gl=function(e,t){const{registerPresubmitHandler:C}=Hl();Object(u.y)((()=>C(e)),[C].concat(t||[]))};const Vl=l.f.div.withConfig({displayName:"timeZone__Wrapper",componentId:"sc-1ahgbp6-0"})(["white-space:nowrap;"]),Ul=Object(l.f)(iC.a).withConfig({displayName:"timeZone__StyledText",componentId:"sc-1ahgbp6-1"})(["color:",";line-height:30px;"],(({theme:e})=>e.colors.fg.disable));var Wl=function TimeZone({date:e}){const{timezone:t,gmtOffset:C}=Object(et.h)(),a=(new Date).getTimezoneOffset()/60*-1;if(Number(C)===a)return null;const{timeZone:n}=Object(et.f)(),l=null!=t&&t.length?Object(et.c)(e,"T"):`UTC${n}`,i="UTC"===l?Object(h.__)("Coordinated Universal Time","web-stories"):t;return r.a.createElement(Vl,null,r.a.createElement(Ke.a,{hasTail:!0,title:i,placement:DC.a.TOP},r.a.createElement(Ul,{forwardedAs:"span",size:lt.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL},l)))};const Yl=l.f.div.withConfig({displayName:"timePicker__TimeWrapper",componentId:"sc-tuyyzu-0"})(["margin-bottom:1em;padding:0 20px;"]),$l=l.f.fieldset.withConfig({displayName:"timePicker__Fieldset",componentId:"sc-tuyyzu-1"})(["margin-top:0.5em;position:relative;"]),ql=l.f.legend.withConfig({displayName:"timePicker__Legend",componentId:"sc-tuyyzu-2"})(["position:absolute;top:-999em;left:-999em;"]),Xl=l.f.div.withConfig({displayName:"timePicker__InputRow",componentId:"sc-tuyyzu-3"})(["display:flex;"]),Kl=Object(l.e)(["min-height:30px;box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;border-radius:4px;border:1px solid #006edc;height:28px;vertical-align:middle;background-color:",";color:#32373c;"],(({theme:e})=>e.colors.standard.white)),Ql=l.f.input.withConfig({displayName:"timePicker__NumberInput",componentId:"sc-tuyyzu-4"})([""," padding:0;margin-right:4px;text-align:center;width:50%;max-width:50px;::-webkit-inner-spin-button,::-webkit-outer-spin-button{margin:0;appearance:none;}"],Kl),Jl=l.f.span.withConfig({displayName:"timePicker__TimeSeparator",componentId:"sc-tuyyzu-5"})(["padding:0 3px 0 0;color:#555d66;"]),ei=l.f.button.withConfig({displayName:"timePicker__Button",componentId:"sc-tuyyzu-6"})(["display:inline-flex;text-decoration:none;font-size:13px;margin:0;border:0;cursor:pointer;transition:box-shadow 0.1s linear;padding:0 10px;line-height:2;height:30px;border-radius:3px;white-space:nowrap;border-width:1px;border-style:solid;color:#006edc;border-color:#006edc;background:#f3f5f6;&:focus{outline:2px solid transparent;background:#f3f5f6;color:rgb(0,93,140);border-color:",";box-shadow:0 0 0 1px ",";text-decoration:none;}",""],(({theme:e})=>e.colors.fg.linkHover),(({theme:e})=>e.colors.fg.linkHover),(({isToggled:e})=>e&&"\n background: #edeff0;\n border-color: #8f98a1;\n box-shadow: inset 0 2px 5px -3px #555d66;\n ")),ti=l.f.div.withConfig({displayName:"timePicker__InputGroup",componentId:"sc-tuyyzu-7"})(["flex-basis:100%;"]),Ci=Object(l.f)(ei).withConfig({displayName:"timePicker__AMButton",componentId:"sc-tuyyzu-8"})(["margin-right:-1px;border-radius:3px 0 0 3px;"]),ai=Object(l.f)(ei).withConfig({displayName:"timePicker__PMButton",componentId:"sc-tuyyzu-9"})(["margin-left:-1px;border-radius:0 3px 3px 0;"]);var ni=function TimePicker({onChange:e,is12Hour:t,localData:C,setLocalData:a}){const n=e=>t=>{a({...C,[e]:parseInt(t.target.value)})},l=()=>t?12:23,i=()=>t?1:0,o=e=>{const{am:a}=C;return t?"AM"===a?e%12:(e%12+12)%24:e},c=(t,n={})=>{a({...C,...n,date:t}),e(t.toISOString())},s=e=>()=>{const{am:t,date:a,hours:n}=C;if(t===e)return;const r=a;"PM"===e?r.setHours((n%12+12)%24):r.setHours(n%12),c(r,{am:e})},d=Object(u.G)();Object(u.y)((()=>{d.current.focus()}),[]);const p="AM"===C.am,m="PM"===C.am;return r.a.createElement(Yl,null,r.a.createElement($l,null,r.a.createElement(ql,null,Object(h.__)("Time","web-stories")),r.a.createElement(Xl,null,r.a.createElement(ti,null,r.a.createElement(Ql,{ref:d,"aria-label":Object(h.__)("Hours","web-stories"),type:"number",step:1,min:i(),max:l(),value:parseInt(C.hours),onChange:n("hours"),onBlur:()=>{const{hours:e,date:t}=C,a=parseInt(e);if(!(isNaN(a)||a<i()||a>l())&&t.getHours()!==o(e)){const C=t;C.setHours(o(e)),c(C)}}}),r.a.createElement(Jl,null,":"),r.a.createElement(Ql,{"aria-label":Object(h.__)("Minutes","web-stories"),type:"number",min:0,max:59,value:parseInt(C.minutes),onChange:n("minutes"),onBlur:()=>{const{minutes:e,date:t}=C,a=parseInt(e);if(!(isNaN(a)||a<0||a>59)&&t.getMinutes()!==e){const C=t;C.setMinutes(e),c(C)}}})),t&&r.a.createElement(ti,null,r.a.createElement(Ci,{"aria-pressed":p,type:"button",isToggled:p,onClick:s("AM")},Object(h.__)("AM","web-stories")),r.a.createElement(ai,{"aria-pressed":m,type:"button",isToggled:m,tabIndex:"-1",onClick:s("PM")},Object(h.__)("PM","web-stories"))),r.a.createElement(Wl,{date:null==C?void 0:C.date}))))};C(639);const ri=Object(u.l)((()=>C.e(198).then(C.bind(null,1051)))),li=l.f.div.withConfig({displayName:"datePicker__CalendarWrapper",componentId:"sc-w0bwdp-0"})(["min-height:236px;"]),ii=l.f.div.withConfig({displayName:"datePicker__FallbackCalendar",componentId:"sc-w0bwdp-1"})(["height:256px;width:350px;display:flex;align-items:center;justify-content:center;"]);var oi=function DatePicker({currentDate:e,onChange:t,onViewChange:C}){const a=Object(u.G)(),n=Object(u.C)((()=>new Date(e)),[e]),l=Object(u.s)((e=>{e.setHours(n.getHours()),e.setMinutes(n.getMinutes()),t(e.toISOString(),!0)}),[n,t]),i=Object(u.s)(((e=!1)=>{if(a.current){const t=[...a.current.querySelectorAll(".react-calendar__navigation button")];t[0].tabIndex="0",t.shift();for(const e of t)e.tabIndex="-1";const C=[...a.current.querySelectorAll(".react-calendar__viewContainer button")];let n=!1;for(const t of C)t.classList.contains("react-calendar__tile--now")?(t.tabIndex="0",e&&t.focus(),n=!0):t.tabIndex="-1";n||(C[0].tabIndex="0",C[0].focus())}}),[a]);return Object(u.y)((()=>{const e=setTimeout((()=>{i()}));return()=>{clearTimeout(e)}}),[i]),r.a.createElement(u.d,{fallback:r.a.createElement(ii,null,r.a.createElement(VC.a,null))},r.a.createElement(li,{ref:a},r.a.createElement(ri,{value:n,onChange:l,onViewChange:C,onActiveStartDateChange:()=>i(!0),nextAriaLabel:Object(h._x)("Next","This label can apply to next month, year and/or decade","web-stories"),prevAriaLabel:Object(h._x)("Previous","This label can apply to previous month, year and/or decade","web-stories"),next2AriaLabel:Object(h._x)("Jump forward","This label can apply to month, year and/or decade","web-stories"),prev2AriaLabel:Object(h._x)("Jump backwards","This label can apply to month, year and/or decade","web-stories")})))};const ci=l.f.div.withConfig({displayName:"dateTime__DateTimeWrapper",componentId:"sc-844guv-0"})(["border-radius:4px;box-shadow:0 3px 30px rgba(25,30,35,0.1);border:1px solid ",";background-color:",";width:100%;padding:4px;"],(({theme:e})=>Object(MC.c)(e.colors.standard.black,.2)),(({theme:e})=>e.colors.standard.white)),si=Object(l.f)(b.a).withConfig({displayName:"dateTime__StyledButton",componentId:"sc-844guv-1"})(["color:#006edc;margin:5px 0;"]);var di=function DateTime({value:e,onChange:t,onViewChange:C,is12Hour:a=!0,forwardedRef:n,onClose:l,canReset:i=!1}){const o=e?new Date(e):new Date,c=o.getHours(),[s,d]=Object(u.I)({minutes:o.getMinutes(),am:c<12?"AM":"PM",hours:a?c%12||12:c,date:o}),p=Object(u.G)(document.activeElement),m=Object(u.s)((e=>{p.current&&p.current.focus(),l(e)}),[l]);return Object(ve.h)(n,{key:["esc"],editable:!0},m),fn({ref:n}),Object(FC.a)({ref:n}),r.a.createElement(ci,{ref:n},r.a.createElement(ni,{localData:s,setLocalData:d,onChange:t,is12Hour:a}),r.a.createElement(oi,{currentDate:e,onChange:t,onViewChange:C}),i&&r.a.createElement(si,{size:g.a.SMALL,onClick:()=>{t(null),l()},"aria-label":Object(h.__)("Reset publish time","web-stories")},Object(h.__)("Reset","web-stories")))};const ui=l.f.div.withConfig({displayName:"required__RequiredWrapper",componentId:"sc-8cv4nb-0"})(["display:flex;flex-direction:row;justify-content:flex-start;align-items:center;"]),pi=Object(l.f)(iC.a).attrs({as:"span",size:lt.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL}).withConfig({displayName:"required__StyledText",componentId:"sc-8cv4nb-1"})(["color:",";font-size:12px;"],(({theme:e})=>e.colors.fg.secondary));var mi=function Required(){return r.a.createElement(ui,null,r.a.createElement(pi,null,Object(h._x)("Required","Required form input","web-stories")))},fi=C(94);function hi(){return(hi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const bi=24,gi=l.f.div.withConfig({displayName:"radio__Container",componentId:"sc-113uep1-0"})(["display:flex;align-items:center;min-height:","px;padding:8px 0;"],44),Ei=l.f.div.withConfig({displayName:"radio__RadioInputContainer",componentId:"sc-113uep1-1"})(["position:relative;height:","px;width:","px;"],bi,bi),vi=l.f.div.withConfig({displayName:"radio__LabelContainer",componentId:"sc-113uep1-2"})(["display:flex;flex-direction:column;margin:0 12px;gap:","px;"],8),yi=l.f.span.withConfig({displayName:"radio__RadioBorder",componentId:"sc-113uep1-3"})((({theme:e})=>Object(l.e)(["display:inline-block;height:","px;width:","px;border:","px solid ",";border-radius:",";pointer-events:none;transition:all 0.15s;"],bi,bi,1,e.colors.border.defaultNormal,e.borders.radius.round))),Oi=l.f.span.withConfig({displayName:"radio__InnerButton",componentId:"sc-113uep1-4"})((({theme:e})=>Object(l.e)(["pointer-events:none;display:none;:after{content:'';position:absolute;height:","px;width:","px;top:50%;left:50%;transform:translate(-50%,-50%);background-color:",";border-radius:",";}"],16,16,e.colors.fg.primary,e.borders.radius.round))),Mi=l.f.input.attrs({type:"radio"}).withConfig({displayName:"radio__HiddenInput",componentId:"sc-113uep1-5"})(["position:absolute;height:","px;width:","px;margin:0;opacity:0;cursor:pointer;:hover ~ ","{border-color:",";}:focus{outline:none;}:focus ~ ",",&."," ~ ","{",";border-color:",";}:active ~ ","{box-shadow:0 0 0 8px ",";}:checked ~ ","{display:block;}:disabled{cursor:auto;~ ","{border-color:",";}~ ","::after{background-color:",";}}"],bi,bi,yi,(({theme:e})=>e.colors.border.defaultHover),yi,fi.b,yi,(({theme:e})=>X.c.focusCSS(e.colors.border.focus)),(({theme:e})=>e.colors.border.defaultHover),yi,(({theme:e})=>e.colors.shadow.active),Oi,yi,(({theme:e})=>e.colors.border.disable),Oi,(({theme:e})=>e.colors.fg.disable)),wi=Object(l.f)(iC.a).attrs({forwardedAs:"span",size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL}).withConfig({displayName:"radio__Hint",componentId:"sc-113uep1-6"})(["color:",";"],(({theme:e})=>e.colors.fg.secondary)),Li=Object(u.j)((function RadioButton({className:e,hint:t,id:C,label:a,...n},l){const i=Object(u.C)((()=>C||Object(Dn.a)()),[C]);return r.a.createElement(gi,{className:e},r.a.createElement(Ei,null,r.a.createElement(Mi,hi({id:i,ref:l},n)),r.a.createElement(yi,null),r.a.createElement(Oi,null)),r.a.createElement(vi,null,r.a.createElement(iC.a,{htmlFor:i,as:"label",size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},a),t&&r.a.createElement(wi,null,t)))}));var _i=function(e){const t=Object(u.s)((t=>{const C=e.current;if(!C)return;const a=Array.from(C.querySelectorAll('input[type="radio"]')),n=a.indexOf(document.activeElement);if(-1===n)return;const r=n+t;r<0||r>=a.length||(a[r].focus(),a[r].click())}),[e]),C=Object(u.s)((()=>t(-1)),[t]);Object(ve.h)(e,["up","left"],C,[C]);const a=Object(u.s)((()=>t(1)),[t]);Object(ve.h)(e,["down","right"],a,[a])};function ji(){return(ji=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const xi=l.f.h3.withConfig({displayName:"radioGroup__VisuallyHiddenLabel",componentId:"sc-3nsxci-0"})(["",";"],X.c.visuallyHidden),Zi=Object(l.f)(Li).withConfig({displayName:"radioGroup__StyledRadio",componentId:"sc-3nsxci-1"})(["input:focus + span,input&."," + span{",";}"],X.a.FOCUS_VISIBLE_SELECTOR,(({theme:e})=>`box-shadow: 0px 0px 0 2px ${e.colors.bg.secondary}, 0px 0px 0 4px ${e.colors.border.focus} !important;`));var Ai=function RadioGroup({className:e,groupLabel:t,id:C,name:a,options:n,value:l,...i}){const o=Object(u.C)((()=>C||Object(Dn.a)()),[C]),c=Object(u.G)(null);return _i(c),r.a.createElement("div",{className:e,ref:c,role:"radiogroup","aria-labelledby":o},r.a.createElement(xi,{id:o},t),n.map((({helper:e="",label:t,value:C})=>r.a.createElement(Zi,ji({key:C,name:a,value:C,checked:C===l,label:t,hint:e},i)))))},Ii=C(559);function Ti(){return(Ti=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Si=l.f.div.withConfig({displayName:"select__Container",componentId:"sc-pkvka4-0"})(["position:relative;width:100%;"]),Ri=Object(l.f)(Ii.a).withConfig({displayName:"select__StyledDropDown",componentId:"sc-pkvka4-1"})(["background-color:transparent;border:0;width:auto;"]),ki=Object(l.e)(["top:-14px;right:unset;width:auto;"]),Pi=Object(l.e)(["border:none;width:auto;margin-right:auto;padding-left:0;",";"],Qt),Ni=Object(l.e)(["margin-right:-12px;"]);var Di=function Select(e){return r.a.createElement(Si,null,r.a.createElement(Ri,Ti({isInline:!0,hasSearch:!1,menuStylesOverride:ki,selectButtonStylesOverride:Pi,selectValueStylesOverride:Ni},e)))},zi=C(768);const Bi=(e,t=[])=>t.map((t=>{const C=e[t.id];return{...t,options:C&&C.length?Bi(e,C):[]}})),Fi=(e,t="")=>{const{options:C,...a}=e;let n=[];if(C)for(let e=0;e<C.length;e++)n=n.concat(Fi(C[e],t));const r={...a,options:n};return e.label.toLowerCase().includes(t.trim().toLowerCase())||n.length?[r]:[]};function Hi(e=[],t=0){return e.flatMap((({options:e,...C})=>[{...C,$level:t},...Hi(e,t+1)]))}function Gi(e,t=""){return Hi(((e,t)=>e.reduce(((e,C)=>e.concat(Fi(C,t))),[]))((e=>{const t=e.map((e=>({options:[],parent:0,...e}))),C=(a="parent",t.reduce(((e,t)=>(e[t[a]]?e[t[a]].push(t):e[t[a]]=[t],e)),{}));var a;return Bi(C,C[0])})(e),t))}function Vi(){return(Vi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Ui=l.f.div.withConfig({displayName:"hierarchical__Container",componentId:"sc-1gmjupi-0"})(["margin-bottom:8px;display:block;"]),Wi=Object(l.f)(iC.a).attrs({forwardedAs:"label",size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL}).withConfig({displayName:"hierarchical__Label",componentId:"sc-1gmjupi-1"})(["margin:0 12px;"]),Yi=l.f.div.withConfig({displayName:"hierarchical__Border",componentId:"sc-1gmjupi-2"})(["padding-top:4px;margin-top:-4px;border:1px solid ",";border-top:none;border-radius:",";"],(({theme:e})=>e.colors.border.defaultNormal),(({theme:e})=>`0 0 ${e.borders.radius.small} ${e.borders.radius.small}`)),$i=l.f.ul.withConfig({displayName:"hierarchical__CheckboxArea",componentId:"sc-1gmjupi-3"})(["max-height:175px;padding:12px 12px 0 12px;overflow-y:scroll;margin-top:4px;margin-bottom:0;",";:focus-within{",";}"],X.c.scrollbarCSS,(({theme:e})=>X.c.focusCSS(e.colors.border.focus,e.colors.bg.secondary))),qi=l.f.li.withConfig({displayName:"hierarchical__CheckboxContainer",componentId:"sc-1gmjupi-4"})(["display:flex;align-items:center;margin-bottom:8px;margin-left:","px;"],(({$level:e})=>20*e)),Xi=Object(l.f)(iC.a).withConfig({displayName:"hierarchical__NoResultsText",componentId:"sc-1gmjupi-5"})(["margin-bottom:12px;color:",";"],(({theme:e})=>e.colors.fg.secondary)),Ki=e=>`hierarchical_term_option_${e}`,Option=({optionRefs:e={current:{}},$level:t=0,...C})=>{const{id:a,label:n,onBlur:l,onChange:i,onFocus:o,checked:c,value:s}=C,d=Ki(C.id),u=`hierarchical_term_${C.label}`;return r.a.createElement(qi,{"aria-selected":c,role:"treeitem",$level:t},r.a.createElement(oC.a,{id:d,ref:t=>{e.current[a]=t},value:s,checked:c,name:u,onChange:e=>i(e,C),onBlur:l,onFocus:o,tabIndex:-1}),r.a.createElement(Wi,{htmlFor:d},n))};var Qi=({className:e,inputValue:t,onInputChange:C,label:a,noOptionsText:n,options:l,onChange:i,...o})=>{const c=Object(zi.a)("assertive"),s=Object(u.x)(c,500),d=Object(u.G)(null),p=Object(u.G)(null),[m,f]=Object(u.I)(-1),b=Object(u.G)({}),g=Object(u.s)((e=>{if(document.activeElement===d.current){if(!l.length)return;var t;if(d.current.contains(e.relatedTarget))return void(null===(t=p.current)||void 0===t||t.focus());if(-1===m){var C;const e=null===(C=l.find((e=>e.checked)))||void 0===C?void 0:C.id;f(e||0)}else{var a;null===(a=b.current[m])||void 0===a||a.focus()}}}),[m,l]),E=Object(u.s)((e=>{const t=l.findIndex((e=>e.id===m));switch(e.key){case Nt.b.UP:t>0&&f(l[t-1].id);break;case Nt.b.DOWN:t<l.length-1&&f(l[t+1].id)}}),[l,m]),v=Object(u.s)((e=>{C(e.target.value)}),[C]),y=Object(u.s)(((e,t)=>{i(e,{id:t.id,checked:!t.checked})}),[i]),O=Object(u.D)(t);Object(u.y)((()=>{if(O!==t){const e=l.length,t=Object(h.sprintf)(
|
78 |
/* Translators: %d: Number of results. */
|
79 |
-
Object(h._n)("%d result found.","%d results found.","web-stories","web-stories"),e);s(t)}}),[s,l,t,O]),Object(ve.h)(d,{key:["up","down","shift+up","shift+down"]},E,[E]),Object(u.y)((()=>{var e,t;null!==(e=d.current)&&void 0!==e&&e.contains(document.activeElement)&&(null===(t=b.current[m])||void 0===t||t.focus())}),[m]);const M=Boolean(l.length)||Boolean(t.length);return r.a.createElement(Ui,{className:e},r.a.createElement(bC.b,Vi({ref:p,value:t,onChange:v,label:a,type:"search",placeholder:Object(h.__)("Search","web-stories")},o)),M&&r.a.createElement(Yi,null,r.a.createElement(Bt,null,r.a.createElement($i,{id:"checkbox_list",ref:d,tabIndex:0,onFocus:g,role:"tree","aria-activedescendant":-1!==m?Ki(m):void 0,"aria-multiselectable":!0},l.length?l.map((e=>r.a.createElement(Option,Vi({key:e.id},e,{onChange:y,optionRefs:b})))):r.a.createElement(Xi,{role:"treeitem",size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},n)))))};const Ji=[{key:"sponsored",title:Object(h.__)("Sponsored","web-stories")},{key:"nofollow",title:Object(h.__)("Nofollow","web-stories")}],eo=l.f.div.withConfig({displayName:"linkRelations__CheckboxWrapper",componentId:"sc-ytkre2-0"})(["display:flex;padding:9px 0;"]),to=l.f.label.withConfig({displayName:"linkRelations__Label",componentId:"sc-ytkre2-1"})(["margin-left:12px;"]),Co=Object(l.f)(iC.a).withConfig({displayName:"linkRelations__StyledText",componentId:"sc-ytkre2-2"})(["color:",";padding:8px 0;"],(({theme:e})=>e.colors.fg.secondary));var ao=function LinkRelations({rel:e,onChangeRel:t}){const C=Object(h.__)("https://developers.google.com/search/docs/advanced/guidelines/qualify-outbound-links?hl=en","web-stories"),a=Object(u.s)((C=>{const a=e.includes(C)?e.filter((e=>e!==C)):[...e,C];t(a)}),[t,e]);return r.a.createElement(ol,null,r.a.createElement("div",null,r.a.createElement(Co,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Qualify outbound links","web-stories")),Ji.map((({key:t,title:C})=>r.a.createElement(eo,{key:t},r.a.createElement(oC.a,{id:t,name:t,checked:null==e?void 0:e.includes(t),onChange:()=>a(t)}),r.a.createElement(to,{htmlFor:t},r.a.createElement(iC.a,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL,as:"span"},C))))),r.a.createElement(rt.a,{rel:"noopener noreferrer",target:"_blank",href:C,size:lt.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL},Object(h.__)("Learn more","web-stories"))))};function no(e,t){return void 0===e?t:e}var ro=function(e,t,C){const a="function"==typeof t?t:e=>e[t],n=no(a(e[0]),C);return e.every((e=>no(a(e),C)===n))?n:sC.y};var lo=function(e,t,C){const a={},n=e.map((e=>e[t]||C));return Object.keys(C).forEach((e=>{a[e]=ro(n,e)})),a};var io=function(e,t){return Object(u.C)((()=>{const C=e.map((e=>e[t]));if(0===C.length)return null;if(1===C.length)return C[0];const a={};return C.forEach((e=>{const t=Object(bn.a)(Object(J.a)(e));t in a||(a[t]=e)})),1===Object.keys(a).length?Object.values(a)[0]:sC.y}),[e,t])};var oo=function(e,t,C){const a=lo(e,t,C),n=Object.keys(C).map((e=>a[e]));return Object(u.C)((()=>a),n)};const co=l.f.div.withConfig({displayName:"components__NavBar",componentId:"sc-wuvgsg-0"})(["display:flex;justify-content:space-between;align-items:center;width:100%;height:","px;background-color:",";",""],48,(({theme:e})=>e.colors.bg.secondary),X.c.expandTextPreset((({label:e},{MEDIUM:t})=>e[t]))),so=Object(l.f)(b.a).withConfig({displayName:"components__NavButton",componentId:"sc-wuvgsg-1"})([""," ",";svg{width:32px;}* + *{margin-left:12px;}"],X.c.expandTextPreset((({label:e},{MEDIUM:t})=>e[t])),Qt),uo=l.f.div.withConfig({displayName:"topNavigation__TopNavButtons",componentId:"sc-13ba783-0"})(["padding-right:15px;"]),po=Object(l.f)(Kt.a).attrs({as:"h2",size:lt.b.TYPOGRAPHY.PRESET_SIZES.XX_SMALL}).withConfig({displayName:"topNavigation__Label",componentId:"sc-13ba783-1"})(["padding-left:24px;font-weight:",";"],(({theme:e})=>e.typography.weight.regular));function TopNavigation({onClose:e,label:t,popupId:C}){return r.a.createElement(co,null,r.a.createElement(po,null,t),r.a.createElement(uo,null,r.a.createElement(so,{"aria-label":Object(h.__)("Close","web-stories"),onClick:()=>{!function(e){var t;null===(t=document.querySelector(`[aria-owns=${e}]`))||void 0===t||t.focus()}(C),e()},type:g.c.PLAIN,size:g.a.SMALL,variant:g.d.CIRCLE},r.a.createElement(Xe.a.Cross,null))))}const mo=Object(l.e)(["opacity:1;transform:none;"]),fo=Object(l.e)(["opacity:0;transform:translateX(-20px);"]),ho={entering:mo,entered:mo,exiting:fo,exited:fo},bo=l.f.div.withConfig({displayName:"secondaryPopup__Controller",componentId:"sc-1w71fw4-0"})(["position:absolute;top:-12px;left:0px;opacity:0;transform:translateX(-20px);transition:opacity ","ms ",",transform ","ms ",";",""],300,lt.a.default,300,lt.a.default,(({state:e})=>ho[e]));var go=function Popup({isOpen:e,popupId:t,children:C,ariaLabel:a,shouldKeepMounted:n,onEnter:l=qt.a,onExited:i=qt.a}){return r.a.createElement(ScheduledTransition,{in:e,timeout:300,mountOnEnter:!n,unmountOnExit:!n,onEnter:l,onExited:i},(e=>r.a.createElement(bo,{id:t,role:"dialog","aria-label":a,state:e},C)))},Eo=C(372);const vo=lt.b.ICON_SIZE,yo=vo+8,Oo=lt.b.ICON_SIZE+6+2,Mo=2*(lt.b.LARGE_BUTTON_SIZE+2)+Oo+16+16;var wo=function(){const{carouselState:e}=Object(F.l)((({state:{carouselState:e}})=>({carouselState:e})));return e===sC.d.CLOSED?52:116},Lo=C(98);var _o=function({containerRef:e}){const{zoomLevel:t,setZoomLevel:C}=Object(Lo.a)((({state:{zoomLevel:e},actions:{setZoomLevel:t}})=>({zoomLevel:e,setZoomLevel:t}))),a=Object(u.x)((e=>C(e)),25);Object(u.B)((()=>{if(!e.current)return;const C=e=>Math.min(3,Math.max(.25,e-e%.25)),n=n=>{const{ctrlKey:r,deltaY:l}=n,i=e.current.childNodes[0];if(r&&i.contains(n.target)&&l){a(C(l>0?t-.25:t+.25)),n.preventDefault()}},r=t=>{e.current.childNodes[0].contains(t.target)&&t.preventDefault()},l=n=>{const r=e.current.childNodes[0],{scale:l}=n;if(r.contains(n.target)&&l){a(C(l<1?t-.25:t+.25)),n.preventDefault()}};return document.addEventListener("wheel",n,{passive:!1}),document.addEventListener("gesturestart",r),document.addEventListener("gestureend",r),document.addEventListener("gesturechange",l),()=>{document.removeEventListener("wheel",n,{passive:!1}),document.removeEventListener("gesturestart",r),document.removeEventListener("gestureend",r),document.removeEventListener("gesturechange",l)}}),[e,a,t])};function jo(){return(jo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const xo=2,Zo=3,Ao=lt.b.LARGE_BUTTON_SIZE+8,Io=l.f.section.withConfig({displayName:"layout__LayerGrid",componentId:"sc-1empfby-0"})([""," position:absolute;top:0;left:0;right:0;bottom:0;"," display:grid;grid:'h h h h h h h' ","px '. . . . . . .' minmax(16px,1fr) '. b . p . f .' var(--viewport-height-px) '. . . . . . .' 1fr 'w w w w w w w' ","px '. . . . . . .' ","px / 1fr var(--page-nav-width) var(--page-nav-gap) var(--viewport-width-px) var(--page-nav-gap) var(--page-nav-width) 1fr;height:100%;"],Eo.a,(({zIndex:e})=>"number"==typeof e?`z-index: ${e};`:""),sC.j,(({footerHeight:e})=>e),16),To=l.f.div.withConfig({displayName:"layout__Area",componentId:"sc-1empfby-1"})([""," grid-area:",";overflow:",";position:relative;width:100%;height:100%;",";"],Eo.a,(({area:e})=>e),(({showOverflow:e})=>e?"visible":"hidden"),(({zIndex:e})=>void 0!==e?`z-index: ${e}`:null)),So=Object(l.f)(To).attrs({area:"p"}).withConfig({displayName:"layout__PageAreaContainer",componentId:"sc-1empfby-2"})(["position:relative;display:flex;justify-content:",";align-items:",";overflow:",";",""],(({hasHorizontalOverflow:e})=>e?"flex-start":"center"),(({hasVerticalOverflow:e})=>e?"flex-start":"center"),(({showOverflow:e})=>e?"visible":"var(--overflow-x) var(--overflow-y)"),(({isControlled:e,hasVerticalOverflow:t,hasHorizontalOverflow:C,showOverflow:a})=>e&&`\n overflow: ${a?"visible":"hidden"};\n width: calc(\n 100% - ${t?X.c.SCROLLBAR_WIDTH:0}px\n );\n height: calc(\n 100% - ${C?X.c.SCROLLBAR_WIDTH:0}px\n );\n `)),Ro=Object(u.j)((function Layer({children:e,...t},C){const a=wo();return r.a.createElement(Io,jo({ref:C,footerHeight:a},t),e)})),ko=l.f.div.withConfig({displayName:"layout__PaddedPage",componentId:"sc-1empfby-3"})(["padding:calc(0.5 * var(--page-padding-px));"]),Po=l.f.div.withConfig({displayName:"layout__PageClip",componentId:"sc-1empfby-4"})(["",""],(({hasHorizontalOverflow:e,hasVerticalOverflow:t})=>(e||t)&&`\n overflow: hidden;\n width: ${e?"calc(var(--page-width-px) + var(--page-padding-px))":`calc(var(--viewport-width-px) - ${X.c.SCROLLBAR_WIDTH}px)`};\n flex-basis: ${e?"calc(var(--page-width-px) + var(--page-padding-px))":`calc(var(--viewport-width-px) - ${X.c.SCROLLBAR_WIDTH}px)`};\n height: ${t?"calc(var(--fullbleed-height-px) + var(--page-padding-px))":`calc(var(--viewport-height-px) - ${X.c.SCROLLBAR_WIDTH}px)`};\n flex-shrink: 0;\n flex-grow: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n `)),No=l.f.div.withConfig({displayName:"layout__FullbleedContainer",componentId:"sc-1empfby-5"})([""," overflow:visible;position:relative;width:var(--page-width-px);height:var(--fullbleed-height-px);display:flex;justify-content:center;align-items:center;border-radius:5px;",";",""],(({background:e})=>Object(J.a)(e)),(({isControlled:e})=>e&&"\n left: var(--scroll-left-px);\n top: var(--scroll-top-px);\n "),(({isBackgroundSelected:e,theme:t})=>e&&`\n &:before {\n content: '';\n position: absolute;\n top: -4px;\n left: -4px;\n right: -4px;\n bottom: -4px;\n border: ${t.colors.border.selection} 1px solid;\n border-radius: ${t.borders.radius.medium};\n }\n `)),Do=l.f.div.withConfig({displayName:"layout__PageAreaWithoutOverflow",componentId:"sc-1empfby-6"})(["overflow:",";position:relative;width:var(--page-width-px);height:var(--fullbleed-height-px);display:flex;justify-content:center;align-items:center;"],(({showOverflow:e})=>e?"initial":"hidden")),zo=l.f.div.withConfig({displayName:"layout__PageAreaSafeZone",componentId:"sc-1empfby-7"})(["width:var(--page-width-px);height:var(--page-height-px);overflow:visible;position:relative;"]),Bo=Object(l.f)(To).attrs({area:"h"}).withConfig({displayName:"layout__HeadArea",componentId:"sc-1empfby-8"})([""]),Fo=(Object(l.f)(To).attrs({area:"m"}).withConfig({displayName:"layout__MenuArea",componentId:"sc-1empfby-9"})([""]),Object(l.f)(To).withConfig({displayName:"layout__NavArea",componentId:"sc-1empfby-10"})(["display:flex;align-items:center;justify-content:center;"])),Ho=Object(l.f)(Fo).attrs({area:"b"}).withConfig({displayName:"layout__NavPrevArea",componentId:"sc-1empfby-11"})([""]),Go=Object(l.f)(Fo).attrs({area:"f"}).withConfig({displayName:"layout__NavNextArea",componentId:"sc-1empfby-12"})([""]),Vo=l.f.div.withConfig({displayName:"layout__PageMenuArea",componentId:"sc-1empfby-13"})(["grid-area:p;position:absolute;right:calc(-24px + var(--page-padding-px));top:calc(0.5 * var(--page-padding-px));min-height:calc(100% - var(--page-padding-px));"]),Uo=Object(l.f)(To).attrs({area:"w",showOverflow:!0}).withConfig({displayName:"layout__FooterArea",componentId:"sc-1empfby-14"})([""]);const Wo=Object(u.j)((function PageArea({children:e,fullbleedRef:t=Object(u.i)(),fullBleedContainerLabel:C=Object(h.__)("Fullbleed area","web-stories"),overlay:a=[],background:n,isControlled:l=!1,className:i="",showOverflow:o=!1,isBackgroundSelected:c=!1,pageAreaRef:s=Object(u.i)(),withSafezone:d=!0,...p},m){const{hasVerticalOverflow:f,hasHorizontalOverflow:b,zoomSetting:g,scrollLeft:E,scrollTop:v}=Object(F.l)((({state:{hasVerticalOverflow:e,hasHorizontalOverflow:t,zoomSetting:C,scrollLeft:a,scrollTop:n}})=>({hasVerticalOverflow:e,hasHorizontalOverflow:t,zoomSetting:C,scrollLeft:a,scrollTop:n}))),y=Object(u.G)();y.current={top:v,left:E},Object(u.y)((()=>{l||(t.current.scrollTop=y.current.top,t.current.scrollLeft=y.current.left)}),[l,g,t]);const O=Object(u.G)(null);return _o({containerRef:O}),r.a.createElement(So,jo({showOverflow:o,isControlled:l,hasHorizontalOverflow:b,hasVerticalOverflow:f,className:i,"data-scroll-container":!0},p),r.a.createElement(Po,{hasHorizontalOverflow:b,hasVerticalOverflow:f},r.a.createElement(ko,{ref:O},r.a.createElement(No,{"aria-label":C,role:"region",ref:t,"data-testid":"fullbleed",background:n,isControlled:l,isBackgroundSelected:c},r.a.createElement(Do,{ref:s,showOverflow:o},d?r.a.createElement(zo,{ref:m,"data-testid":"safezone"},e):e,a)))))})),Yo="normal",$o="danger",qo=l.f.div.attrs({role:"tablist"}).withConfig({displayName:"styles__Tablist",componentId:"sc-1ng91zr-0"})(["background:",";"],(({theme:e})=>e.colors.bg.primary));qo.propTypes={"aria-label":He.a.string.isRequired};const Xo=Object(l.f)(Kt.a).attrs({as:"h3",size:lt.b.TYPOGRAPHY.PRESET_SIZES.XXX_SMALL}).withConfig({displayName:"styles__PanelText",componentId:"sc-1ng91zr-1"})(["transition:background-color 300ms ease-in;"]),Ko=l.f.div.withConfig({displayName:"styles__TabButtonWrapper",componentId:"sc-1ng91zr-2"})(["position:relative;height:60px;width:100%;padding:5px 4px;&,:hover,:focus-within,.","{background-color:",";}"],X.a.FOCUS_VISIBLE_SELECTOR,(({theme:e})=>e.colors.bg.secondary)),Qo=Object(l.f)(b.a).attrs({variant:g.d.PLAIN}).withConfig({displayName:"styles__TabButton",componentId:"sc-1ng91zr-3"})(["position:absolute;display:flex;justify-content:space-between;width:calc(100% - 8px);height:calc(100% - 10px);padding:16px;border-radius:0;&,:hover,:focus,.","{background-color:",";}",";","{opacity:0.8;}",";"],X.a.FOCUS_VISIBLE_SELECTOR,(({theme:e})=>e.colors.bg.secondary),(({theme:e})=>X.c.focusableOutlineCSS(e.colors.border.focus,e.colors.bg.secondary)),Xo,(({status:e})=>e===$o&&Object(l.e)(["&,","{color:",";}","{background-color:",";}"],Xo,(({theme:e})=>e.colors.fg.negative),Cc,(({theme:e})=>e.colors.fg.negative)))),Jo=l.f.div.withConfig({displayName:"styles__PanelWrapper",componentId:"sc-1ng91zr-4"})(["width:100%;background:",";&:not(:first-child) > ","{box-shadow:0px -1px 0 0 ",";margin-top:1px;}",";"],(({theme:e})=>e.colors.bg.primary),Qo,(({theme:e})=>e.colors.divider.tertiary),(({isExpanded:e,theme:t})=>e&&Object(l.e)(["& ",",& ","{:not(:last-child){box-shadow:none;}",";","{opacity:1;}&,:hover,:focus{background-color:",";}svg{transform:rotate(0);}}","{height:560px;","{visibility:visible;}}"],Qo,Ko,X.c.focusableOutlineCSS,Xo,t.colors.bg.primary,ac,nc))),ec=l.f.div.withConfig({displayName:"styles__ButtonText",componentId:"sc-1ng91zr-5"})(["display:flex;align-items:center;justify-content:center;margin-left:-12px;"]),tc=l.f.div.withConfig({displayName:"styles__IconContainer",componentId:"sc-1ng91zr-6"})(["height:32px;width:32px;color:",";svg{transform:rotate(-90deg);transition:transform 300ms ease-in-out;}"],(({theme:e})=>e.colors.fg.primary)),Cc=l.f.div.withConfig({displayName:"styles__Badge",componentId:"sc-1ng91zr-7"})(["display:flex;align-items:center;justify-content:center;height:20px;width:20px;border-radius:",";background-color:",";","{color:",";line-height:20px;}"],(({theme:e})=>e.borders.radius.round),(({theme:e})=>e.colors.fg.primary),Xo,(({theme:e})=>e.colors.inverted.fg.primary)),ac=l.f.div.withConfig({displayName:"styles__ScrollableContent",componentId:"sc-1ng91zr-8"})(["height:0;max-height:",";overflow-y:",";transition:height 300ms ease-in;"],(({maxHeight:e})=>e?`calc(${e})`:"none"),(({maxHeight:e})=>e?"scroll":"hidden")),nc=l.f.div.withConfig({displayName:"styles__TabPanel",componentId:"sc-1ng91zr-9"})(["padding:0;visibility:hidden;overflow:hidden;background:",";transition:all 300ms ease-in;margin:0 0 16px 16px;",";"],(({theme:e})=>e.colors.bg.primary),X.c.scrollbarCSS);var rc=({badgeCount:e=0,children:t,className:C,id:a,isExpanded:n,onClick:l,maxHeight:i,status:o=Yo,title:c})=>{const s=Object(u.C)(Dn.a,[]),d=a||s;return r.a.createElement(Jo,{className:C,isExpanded:n},r.a.createElement(Ko,null,r.a.createElement(Qo,{"aria-controls":d,"aria-selected":n,onClick:l,role:"tab",status:o},r.a.createElement(ec,null,r.a.createElement(tc,null,r.a.createElement(Xe.a.ChevronDownSmall,null)),r.a.createElement(Xo,{id:`${c}-${d}`,"aria-label":Object(h.sprintf)(
|
80 |
/* translators: 1: number of issues. 2: type of issue, for example "High Priority". */
|
81 |
-
Object(h._n)("%1$d %2$s issue","%1$d %2$s issues",
|
82 |
/* translators: %s: number of unaddressed issues. */
|
83 |
-
Object(h._n)("Checklist: %s unaddressed issue","Checklist: %s unaddressed issues",
|
84 |
/* translators: %s is a list of allowed file extensions. */
|
85 |
-
Object(h.__)("You can upload %s.","web-stories"),Object(h.translateToExclusiveList)(C))),r.a.createElement(Fc,t,r.a.createElement(Hc,null,r.a.createElement(Vc,null),r.a.createElement(Gc,{isBold:!0,size:lt.b.TYPOGRAPHY.PRESET_SIZES.MEDIUM},e),r.a.createElement(Gc,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},a)))}));var Wc=Object(u.f)({state:{},actions:{}});function Yc(){return(Yc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const $c=999999999,qc=l.f.section.withConfig({displayName:"panel__Wrapper",componentId:"sc-109cucz-0"})(["display:flex;flex-direction:column;position:relative;border-bottom:1px solid ",";",""],(({theme:e})=>e.colors.divider.tertiary),(({noBorder:e})=>e&&"border-bottom: none;"));var Xc=function({name:e,children:t,resizable:C=!1,showDragHandle:a,showFocusStyles:n,canCollapse:l=!0,collapsedByDefault:i=!0,initialHeight:o=null,maxHeight:c=$c,ariaLabel:s=null,ariaHidden:d=!1,isPersistable:p=!0,...m}){const h=0===c?$c:c,{selectedElementIds:b}=Object(Z.e)((({state:{selectedElementIds:e}})=>({selectedElementIds:e}))),g=Object(u.C)((()=>p?un.b.getItemByKey(`${un.a.PANEL}:${e}`):null),[e,p]),[E,v]=Object(u.I)((()=>{var e;return!!p&&(null!==(e=null==g?void 0:g.isCollapsed)&&void 0!==e?e:i)})),[y,O]=Object(u.I)(Math.min(null==g?void 0:g.expandToHeight,h)||o),[M,w]=Object(u.I)(Math.min(null==g?void 0:g.height,h)||o),[L,_]=Object(u.I)(!1),[j,x]=Object(u.I)(!1),A=Object(u.s)((e=>{w(Math.min(e,h))}),[h]),I=Object(u.s)((e=>{O(Math.min(e,h))}),[h]),T=Object(u.s)((()=>_(!0)),[]),S=Object(u.s)((()=>{l&&(v(!0),x(!0),C&&A(0),Object(f.g)("panel_toggled",{name:e,status:"collapsed"}))}),[C,l,e,A]),R=Object(u.s)(((t=!0)=>{v(!1),x(!0),t&&C&&A(y),Object(f.g)("panel_toggled",{name:e,status:"expanded"})}),[C,y,e,A]);Object(u.y)((()=>{p||R(!0)}),[R,p,b]),Object(u.y)((()=>{C&&M<=10&&!E&&S()}),[S,M,C,E]),Object(u.y)((()=>{j||g||!C||(A(o),I(o))}),[j,o,C,g,e,I,A]),Object(u.y)((()=>{h<M&&A(h),h<y&&I(h)}),[y,M,h,A,I]),Object(u.y)((()=>{p&&j&&un.b.setItemByKey(`${un.a.PANEL}:${e}`,{height:M,isCollapsed:E,expandToHeight:y})}),[e,E,M,y,j,p]);const k=Object(u.s)((e=>{C&&(x(!0),A(Math.min(e(M),h)),E&&e(M)>10&&R(!1))}),[R,M,E,h,C,A,x]),P=Object(u.s)((()=>{x(!1),E&&R(!0)}),[R,E]),N=`panel-${e}-${Object(Dn.a)()}`,D=`panel-title-${e}-${Object(Dn.a)()}`,z={state:{height:M,resizable:C,showDragHandle:a,showFocusStyles:n,isCollapsed:E,panelContentId:N,panelTitleId:D,panelTitleReadable:`panel-title-${e}`,ariaHidden:d},actions:{setHeight:k,setExpandToHeight:I,collapse:S,expand:R,resetHeight:P,confirmTitle:T}},B=Wc.Provider,F=Object(u.C)((()=>L?{"aria-labelledby":D}:{"aria-label":s}),[L,D,s]);return r.a.createElement(qc,Yc({},F,{"aria-hidden":d},m),r.a.createElement(B,{value:z},t))},Kc=C(769);var Qc=function(e,t,C){const a=Object(u.G)(),[n,r]=Object(u.I)(!1),l=Object(u.s)((e=>{const C=a.current-e.pageY;t(C),a.current=e.pageY}),[t]),i=Object(u.s)((e=>{e.target.releasePointerCapture(e.pointerId),r(!1),C()}),[C]),o=Object(u.s)((e=>{e.target.setPointerCapture(e.pointerId),a.current=e.pageY,r(!0)}),[]);Object(u.B)((()=>{const t=e.current;return t.addEventListener("pointerdown",o),n&&(t.addEventListener("pointermove",l),t.addEventListener("pointerup",i)),()=>{t.removeEventListener("pointerdown",o),n&&(t.removeEventListener("pointermove",l),t.removeEventListener("pointerup",i))}}),[n,i,l,o,e])};var Jc=function(e,t){Object(ve.i)(e,"up",(()=>t(20)),[t]),Object(ve.i)(e,"down",(()=>t(-20)),[t])};function es(){return(es=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const ts=l.f.div.withConfig({displayName:"handle__Handle",componentId:"sc-1dqth7v-0"})(["border:0;padding:0;height:","px;display:flex;flex-direction:column;justify-content:center;align-items:center;cursor:row-resize;user-select:none;position:absolute;",";",";left:0;right:0;width:100%;",";"],8,(({$position:e})=>"top"===e&&"top: 0"),(({$position:e})=>"bottom"===e&&"bottom: 0"),(({$showFocusStyles:e})=>e&&Object(l.e)(["border-bottom:1px solid transparent;&:focus{border-color:",";}"],(({theme:e})=>e.colors.border.focus)))),Cs=l.f.div.withConfig({displayName:"handle__DragBar",componentId:"sc-1dqth7v-1"})(["position:absolute;width:35px;height:3px;top:","px;background:",";border-radius:",";cursor:inherit;"],4,(({theme:e})=>e.colors.bg.quaternary),(({theme:e})=>e.borders.radius.small));function DragHandle({height:e,minHeight:t,maxHeight:C,handleHeightChange:a,handleExpandToHeightChange:n,handleDoubleClick:l,position:i,showDragHandle:o,showFocusStyles:c=!0,...s}){const d=Object(u.G)();return Qc(d,a,n),Jc(d,a),r.a.createElement(ts,es({ref:d,onClick:e=>e.stopPropagation(),onDoubleClick:l,tabIndex:0,$position:i,role:"slider","aria-orientation":"vertical","aria-valuenow":e,"aria-valuemin":t,"aria-valuemax":C,"aria-label":Object(h.__)("Set panel height","web-stories"),$showFocusStyles:c},s),o&&r.a.createElement(Cs,null))}DragHandle.defaultProps={position:"top"};var as=DragHandle;function ns(){return(ns=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const rs=Object(l.f)(Kt.a).attrs({as:"h2"}).withConfig({displayName:"title__Header",componentId:"sc-gwphet-0"})(["color:",";background-color:",";"," margin:0;position:relative;display:flex;flex-direction:row;user-select:none;align-items:center;justify-content:space-between;padding:",";"],(({theme:e})=>e.colors.fg.secondary),(({isSecondary:e,theme:t})=>e&&t.colors.interactiveBg.secondaryNormal),(({hasResizeHandle:e})=>e&&"padding-top: 0;"),(({isCollapsed:e})=>e?"14px 16px":"14px 16px 6px 16px")),ls=l.f.span.withConfig({displayName:"title__Heading",componentId:"sc-gwphet-1"})(["color:",";display:flex;align-items:space-between;",";"],(({theme:e,isCollapsed:t})=>t?e.colors.fg.secondary:e.colors.fg.primary),(({theme:e})=>X.c.expandPresetStyles({preset:e.typography.presets.headline[lt.b.TYPOGRAPHY.PRESET_SIZES.XX_SMALL],theme:e}))),is=Object(l.f)(Kc.b).withConfig({displayName:"title__StyledNotificationBubble",componentId:"sc-gwphet-2"})(["margin-left:12px;"]),os=l.f.div.withConfig({displayName:"title__HeaderActions",componentId:"sc-gwphet-3"})(["display:flex;align-items:center;"]),cs=l.f.div.withConfig({displayName:"title__IconWrapper",componentId:"sc-gwphet-4"})(["position:relative;width:32px;height:32px;svg{position:relative;z-index:1;}"]),ss=l.f.button.withConfig({displayName:"title__Collapse",componentId:"sc-gwphet-5"})(["border:none;border-radius:",";background:transparent;color:",";height:32px;display:flex;padding:0 4px 0 0;align-items:center;justify-content:flex-start;cursor:pointer;margin-left:-12px;transition:",";&:hover,&.",",&[","]{color:",";}",";svg{width:32px;height:32px;",";}:hover ",":after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);height:16px;width:16px;border-radius:",";background:",";}"],(({theme:e})=>e.borders.radius.small),(({theme:e,isCollapsed:t})=>t?e.colors.fg.secondary:e.colors.fg.primary),g.b,X.a.FOCUS_VISIBLE_SELECTOR,X.a.FOCUS_VISIBLE_DATA_ATTRIBUTE,(({theme:e})=>e.colors.fg.primary),Qt,(({$isCollapsed:e,theme:t})=>e&&Object(l.e)(["color:",";transform:rotate(-90deg);"],t.colors.fg.secondary)),cs,(({theme:e})=>e.borders.radius.round),(({theme:e})=>e.colors.bg.quaternary));function ds({children:e,isCollapsed:t,toggle:C,...a}){return r.a.createElement(ss,ns({onClick:e=>{e.stopPropagation(),C()},$isCollapsed:t},a),e)}function Title({ariaLabel:e,children:t,isPrimary:C,isSecondary:a,secondaryAction:n,isResizable:l,canCollapse:i,maxHeight:o,count:c,...s}){const{state:{isCollapsed:d,height:p,resizable:m,showDragHandle:f,showFocusStyles:h,panelContentId:b,panelTitleId:g,ariaHidden:E},actions:{collapse:v,expand:y,setHeight:O,setExpandToHeight:M,resetHeight:w,confirmTitle:L}}=Object(u.u)(Wc),{state:{inspectorContentHeight:_}}=Cr();Object(u.y)(L,[L]);const j=o||Math.round(.7*_),x=Object(u.s)((e=>m?O((t=>Math.max(0,Math.min(j,t+e)))):null),[m,O,j]),Z=Object(u.s)((()=>{m&&p>=10&&M(p)}),[M,p,m]),A=d?y:v,I=0===c||Boolean(c);return r.a.createElement(rs,ns({isPrimary:C,isSecondary:a,hasResizeHandle:l&&!d,isCollapsed:d},s),l&&r.a.createElement(as,{height:p,minHeight:0,maxHeight:j,handleHeightChange:x,handleExpandToHeightChange:Z,handleDoubleClick:w,tabIndex:E?-1:0,showDragHandle:f,showFocusStyles:h}),r.a.createElement(ds,{toggle:A,disabled:!i,tabIndex:E?-1:0,"aria-label":e,"aria-expanded":!d,"aria-controls":b,isCollapsed:d},r.a.createElement(cs,null,i&&r.a.createElement(Xe.a.ChevronDownSmall,null)),r.a.createElement(ls,{isCollapsed:d,id:g,size:lt.b.TYPOGRAPHY.PRESET_SIZES.XX_SMALL},t),I&&r.a.createElement(is,{"data-testid":"panel-badge",notificationCount:c,variant:Kc.a.PRIMARY,"aria-hidden":!0})),n&&r.a.createElement(os,null,n))}Title.defaultProps={isPrimary:!1,isSecondary:!1,isResizable:!1,canCollapse:!0};var us=Title;function ps(){return(ps=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const ms=l.f.div.withConfig({displayName:"content__Container",componentId:"sc-19ch33y-0"})(["padding:",";overflow:auto;background-color:",";"],(({padding:e})=>e||"8px 12px 8px"),(({isSecondary:e,theme:t})=>e?t.colors.interactiveBg.secondaryNormal:"transparent"));function fs({children:e,...t}){const{state:{isCollapsed:C,height:a,resizable:n,panelContentId:l}}=Object(u.u)(Wc),i={height:n?`${a}px`:"auto"};return C?null:r.a.createElement(ms,ps({style:i},t,{id:l}),e)}fs.defaultProps={isPrimary:!1};var hs=fs;function bs(){return(bs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var gs=function SimplePanel({children:e,name:t,ariaLabel:C,title:a,className:n,...l}){return r.a.createElement(Xc,bs({name:t},l),r.a.createElement(us,{ariaLabel:null!=C?C:"string"==typeof a?a:""},a),r.a.createElement(hs,{className:n},e))};function Es(){return(Es=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const vs=Object(l.f)(b.a).withConfig({displayName:"directionRadioInput__StyledButton",componentId:"sc-qek4l4-0"})(["z-index:0;width:28px;height:28px;"," svg{transform-origin:50% 50%;transform:",";}"],(({selected:e,disabled:t,theme:C})=>e&&!t&&Object(l.e)(["background-color:",";"],C.colors.interactiveBg.secondaryPress)),(({direction:e})=>{switch(e){case te.g.RIGHT_TO_LEFT:return"rotate(270deg)";case te.g.TOP_TO_BOTTOM:return"rotate(180deg)";case te.g.LEFT_TO_RIGHT:return"rotate(90deg)";case te.i.COUNTER_CLOCKWISE:return"rotateX(180deg) rotateZ(90deg)";case te.j.SCALE_OUT_BOTTOM_LEFT:return"rotate(-135deg)";case te.j.SCALE_IN_TOP_LEFT:return"rotate(135deg)";case te.j.SCALE_OUT_TOP_RIGHT:return"rotate(-315deg)";case te.j.SCALE_IN_BOTTOM_RIGHT:return"rotate(315deg)";default:return"rotate(0deg)"}})),ys=Object(l.f)((({className:e,direction:t,...C})=>r.a.createElement(vs,Es({variant:g.d.SQUARE,type:g.c.TERTIARY,size:g.a.SMALL,className:e,direction:t},C),[...Object.values(te.g),...Object.values(te.j)].includes(t)&&r.a.createElement(Xe.a.ArrowUp,null)))).withConfig({displayName:"directionRadioInput__DirectionIndicator",componentId:"sc-qek4l4-1"})([""]),Os=l.f.fieldset.withConfig({displayName:"directionRadioInput__Fieldset",componentId:"sc-qek4l4-2"})(["position:relative;height:91px;width:88px;margin-top:1px;border-right:1px solid ",";"],(({theme:e})=>e.colors.border.defaultNormal)),Ms=l.f.div.withConfig({displayName:"directionRadioInput__Figure",componentId:"sc-qek4l4-3"})(["position:absolute;top:50%;left:50%;width:8px;height:8px;background-color:",";border-radius:2px;transform:translate(-50%,-50%);"],(({theme:e})=>e.colors.fg.primary)),ws=l.f.label.withConfig({displayName:"directionRadioInput__Label",componentId:"sc-qek4l4-4"})(["position:absolute;cursor:",";",""],(({disabled:e})=>e?"default":"pointer"),(({direction:e})=>{switch(e){case te.g.RIGHT_TO_LEFT:return Object(l.e)(["top:50%;right:","px;transform:translateY(-50%);"],3);case te.g.TOP_TO_BOTTOM:return Object(l.e)(["top:","px;left:50%;transform:translateX(-50%);"],3);case te.g.LEFT_TO_RIGHT:return Object(l.e)(["top:50%;left:","px;transform:translateY(-50%);"],3);case te.i.COUNTER_CLOCKWISE:return Object(l.e)(["bottom:","px;right:","px;transform:translate(-10%,-10%);"],3,3);case te.j.SCALE_OUT_BOTTOM_LEFT:return Object(l.e)(["bottom:","px;left:","px;"],3,3);case te.j.SCALE_IN_TOP_LEFT:return Object(l.e)(["top:","px;left:","px;"],3,3);case te.j.SCALE_OUT_TOP_RIGHT:return Object(l.e)(["top:","px;right:","px;"],3,3);case te.j.SCALE_IN_BOTTOM_RIGHT:return Object(l.e)(["bottom:","px;right:","px;"],3,3);default:return Object(l.e)(["bottom:","px;left:50%;transform:translateX(-50%);"],3)}})),Ls=l.f.legend.withConfig({displayName:"directionRadioInput__HiddenLegend",componentId:"sc-qek4l4-5"})(["position:absolute;opacity:0;clip-path:polygon(0 0);cursor:pointer;"]),_s=l.f.div.withConfig({displayName:"directionRadioInput__RadioGroup",componentId:"sc-qek4l4-6"})(["position:absolute;top:0;right:0;bottom:0;left:0;"]),js={[te.g.RIGHT_TO_LEFT]:Object(h._x)("right to left","animation direction","web-stories"),[te.g.LEFT_TO_RIGHT]:Object(h._x)("left to right","animation direction","web-stories"),[te.g.TOP_TO_BOTTOM]:Object(h._x)("top to bottom","animation direction","web-stories"),[te.g.BOTTOM_TO_TOP]:Object(h._x)("bottom to top","animation direction","web-stories"),[te.i.CLOCKWISE]:Object(h._x)("clockwise","rotation direction","web-stories"),[te.i.COUNTER_CLOCKWISE]:Object(h._x)("counterclockwise","rotation direction","web-stories"),[te.j.SCALE_IN]:Object(h._x)("scale in","scale direction","web-stories"),[te.j.SCALE_OUT]:Object(h._x)("scale out","scale direction","web-stories")},xs=e=>{switch(e){case te.j.SCALE_IN_TOP_LEFT:case te.j.SCALE_IN_BOTTOM_RIGHT:return te.j.SCALE_IN;case te.j.SCALE_OUT_BOTTOM_LEFT:case te.j.SCALE_OUT_TOP_RIGHT:return te.j.SCALE_OUT;default:return e}},Zs=e=>[...te.k.SCALE_IN,...te.k.SCALE_OUT].includes(e),As=(e="")=>{var t,C;return(null==e||null===(t=e.replace(/([a-z])([A-Z])/g,"$1 $2"))||void 0===t||null===(C=t.toLocaleLowerCase())||void 0===C?void 0:C.split(" "))||[]},Is=(e="")=>{var t;return null===(t=As(e))||void 0===t?void 0:t[0]},Ts=(e="")=>{const t=As(e);return t[t.length-1]},Ss=[te.g.TOP_TO_BOTTOM,te.g.RIGHT_TO_LEFT,te.g.BOTTOM_TO_TOP,te.g.LEFT_TO_RIGHT],Rs=[te.j.SCALE_IN_TOP_LEFT,te.j.SCALE_OUT_TOP_RIGHT,te.j.SCALE_IN_BOTTOM_RIGHT,te.j.SCALE_OUT_BOTTOM_LEFT],ks=(e,t,C)=>{const a=C?t.reverse():t;return e.sort(((e,t)=>a.indexOf(e)-a.indexOf(t)))},DirectionRadioInput=({value:e,directions:t=[],onChange:C,disabled:a=[],tooltip:n})=>{const l=Object(u.G)(),{isRTL:i}=Object(L.c)(),o=Object(u.C)((()=>{const e=[];if(t.includes(te.j.SCALE_OUT)||t.includes(te.j.SCALE_IN)){const C=[];t.includes(te.j.SCALE_OUT)&&C.push(...te.k.SCALE_OUT),t.includes(te.j.SCALE_IN)&&C.push(...te.k.SCALE_IN),e.push(...ks(C,Rs,i))}else e.push(...ks(t,Ss,i));return e}),[t,i]);return _i(l),r.a.createElement(Os,null,r.a.createElement(Ms,null),r.a.createElement(Ls,null,Object(h.__)("Which Direction?","web-stories")),r.a.createElement(_s,{ref:l},o.map((t=>{const l=null==a?void 0:a.includes(xs(t));return r.a.createElement(ws,{key:t,"aria-label":js[t],htmlFor:t,direction:t,disabled:l},r.a.createElement(Pr.a,{title:l?n:"",placement:Zs(t)?Ts(t):Is(t)},r.a.createElement(ys,{direction:t,selected:e===t||(null==t?void 0:t.includes(e)),disabled:l,onClick:()=>C(xs(t))})))}))))},Ps=Object(l.e)(["border-radius:0;border-color:"," transparent transparent transparent;"],(({theme:e})=>e.colors.border.defaultNormal)),Ns=Object(l.f)(NumericInput).withConfig({displayName:"effectInput__StyledInput",componentId:"sc-xr8h1x-0"})(["height:","px;div{height:calc(100% + 1px);"," &:focus-within{border-radius:",";}}"],45,Ps,(({theme:e})=>e.borders.radius.small)),Ds=Object(l.f)(Ii.a).withConfig({displayName:"effectInput__StyledDropDown",componentId:"sc-xr8h1x-1"})(["button{height:46px;"," &:hover{","}&.",",&[","]{border-radius:",";}}"],Ps,Ps,X.a.FOCUS_VISIBLE_SELECTOR,X.a.FOCUS_VISIBLE_DATA_ATTRIBUTE,(({theme:e})=>e.borders.radius.small));var zs=function EffectInput({effectProps:e,effectConfig:t,field:C,onChange:a,disabledOptions:n,tooltip:l}){var i;const o=Object(u.s)((e=>a(e,!0)),[a]),c=null!==(i=t[C])&&void 0!==i?i:e[C].defaultValue,s=e[C].type===te.h.FLOAT;switch(e[C].type){case te.h.DROPDOWN:return r.a.createElement(Ds,{options:(e[C].values||[]).map((({name:e,...t})=>({...t,label:e,disabled:n.includes(t.value)}))),placeholder:Object(h.__)("Select a value","web-stories"),ariaLabel:Object(h.__)("Select effect value","web-stories"),isKeepMenuOpenOnSelection:!1,selectedValue:c,onMenuItemClick:e=>a(e.target.value,!0)});case te.h.DIRECTION_PICKER:return r.a.createElement(DirectionRadioInput,{value:c,directions:e[C].values,onChange:o,disabled:n,tooltip:l});default:return r.a.createElement(Ns,{"aria-label":e[C].label,suffix:e[C].label,unit:e[C].unit,value:c,min:0,onChange:e=>a(s?parseFloat(e.target.value):parseInt(e.target.value),!0),isFloat:s,containerStyleOverride:Jt})}};function Bs(e={}){return(!e.zoomDirection||!e.panDir)&&(e.zoomDirection?e.zoomDirection:e.scaleDirection?e.scaleDirection:e.flyInDir?e.flyInDir:e.rotateInDir?e.rotateInDir:e.whooshInDir?e.whooshInDir:!!e.panDir&&e.panDir)}const Fs=l.f.div.withConfig({displayName:"effectPanel__AnimationGrid",componentId:"sc-1sagrh3-0"})(["display:grid;grid-template-columns:auto auto;"]),Hs=l.f.div.withConfig({displayName:"effectPanel__AnimationGridField",componentId:"sc-1sagrh3-1"})((({isRotationComponent:e,isHalfWidthField:t})=>[{gridColumn:"1/3"},e&&{gridRow:"1/3",gridColumn:"auto"},t&&{gridColumn:"auto"}]));var Gs=function EffectPanel({animation:{id:e,type:t,...C},onChange:a,disabledTypeOptionsMap:n}){const{props:l}=Object(te.p)(t),i=Object(u.s)(((n,r)=>{a({id:e,type:t,...C,...n},r)}),[e,t,C,a]),o=Object(u.C)((()=>Object.keys(l).reduce(((e,t)=>l[t].type===te.h.DIRECTION_PICKER||l[t].type===te.h.ROTATION_PICKER||e),!1)),[l]),c=Object.keys(l).map(((e,a)=>{var c,s;return r.a.createElement(Hs,{key:e,isRotationComponent:o&&0===a,isHalfWidthField:o&&(1===a||2===a)},r.a.createElement(zs,{effectProps:l,effectConfig:C,field:e,onChange:(t,C)=>i({[e]:t},C),disabledOptions:(null===(c=n[t])||void 0===c?void 0:c.options)||[],tooltip:null===(s=n[t])||void 0===s?void 0:s.tooltip}))}));return r.a.createElement(Fs,null,c)};const Vs=l.f.div.withConfig({displayName:"effectChooserElements__BaseAnimationCell",componentId:"sc-l596rg-0"})(["display:none;transform-origin:50% 50%;"]),Us=Object(l.g)(["0%{transform:translateY(-100%);animation-timing-function:cubic-bezier(.75,.05,.86,.08);}15%{transform:translateY(0%);animation-timing-function:cubic-bezier(.22,.61,.35,1);}26%{transform:translateY(-62%);animation-timing-function:cubic-bezier(.75,.05,.86,.08);}37%{transform:translateY(-0%);animation-timing-function:cubic-bezier(.22,.61,.35,1);}41.5%{transform:translateY(-30%);animation-timing-function:cubic-bezier(.75,.05,.86,.08);}50%,100%{transform:translateY(0%);animation-timing-function:cubic-bezier(.22,.61,.35,1);}"]),Ws=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__DropAnimation",componentId:"sc-l596rg-1"})(["animation:"," 3.2s linear infinite;"],Us),Ys=Object(l.g)(["0%{opacity:0;}50%,100%{opacity:1;}"]),$s=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__FadeInAnimation",componentId:"sc-l596rg-2"})(["animation:"," 2.5s linear infinite;"],Ys),qs=Object(l.g)(["0%{transform:translateX(-100%);}50%,100%{transform:translateX(0%);}"]),Xs=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__FlyInLeftAnimation",componentId:"sc-l596rg-3"})(["animation:"," 2s linear infinite;"],qs),Ks=Object(l.g)(["0%{transform:translateX(100%);}50%,100%{transform:translateX(0%);}"]),Qs=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__FlyInRightAnimation",componentId:"sc-l596rg-4"})(["animation:"," 2s linear infinite;"],Ks),Js=Object(l.g)(["0%{transform:translateY(-100%);}50%,100%{transform:translateY(0%);}"]),ed=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__FlyInTopAnimation",componentId:"sc-l596rg-5"})(["animation:"," 2s linear infinite;"],Js),td=Object(l.g)(["0%{transform:translateY(100%);}50%,100%{transform:translateY(0%);}"]),Cd=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__FlyInBottomAnimation",componentId:"sc-l596rg-6"})(["animation:"," 2s linear infinite;"],td),ad=Object(l.g)(["0%{transform:scale(1);}12.5%{transform:scale(0.75);}37.5%{transform:scale(1.25);}50%,100%{transform:scale(1);}"]),nd=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__PulseAnimation",componentId:"sc-l596rg-7"})(["animation:"," 2s cubic-bezier(0.4,0,0.2,1) infinite;"],ad),rd=Object(l.g)(["0%{transform:translateX(-100%) rotate(-360deg);}50%,100%{transform:translateX(0%);}"]),ld=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__RotateInLeftAnimation",componentId:"sc-l596rg-8"})(["animation:"," 2s linear infinite;"],rd),id=Object(l.g)(["0%{transform:translateX(100%) rotate(360deg);}50%,100%{transform:translateX(0%);}"]),od=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__RotateInRightAnimation",componentId:"sc-l596rg-9"})(["animation:"," 2s linear infinite;"],id),cd=Object(l.g)(["0%{transform:rotate(-540deg) scale(0.1);opacity:0;}50%,100%{transform:none;opacity:1;}"]),sd=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__TwirlInAnimation",componentId:"sc-l596rg-10"})(["animation:"," 2s cubic-bezier(0.2,0.75,0.4,1) infinite;"],cd),dd=Object(l.g)(["0%{transform:translateX(-100%);opacity:0;}50%,100%{transform:translateX(0%);opacity:1;}"]),ud=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__WhooshInLeftAnimation",componentId:"sc-l596rg-11"})(["animation:"," 2s cubic-bezier(0,0,0.2,1) infinite;"],dd),pd=Object(l.g)(["0%{transform:translateX(100%);opacity:0;}50%,100%{transform:translateX(0%);opacity:1;}"]),md=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__WhooshInRightAnimation",componentId:"sc-l596rg-12"})(["animation:"," 2s cubic-bezier(0,0,0.2,1) infinite;"],pd),fd=Object(l.g)(["0%{transform:translateX(-100%) scale(1.5);}50%,100%{transform:translateX(200%) scale(1.5);}"]),hd=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__PanLeftAnimation",componentId:"sc-l596rg-13"})(["animation:"," 3s linear infinite;"],fd),bd=Object(l.g)(["0%{transform:translateX(100%) scale(1.5);}50%,100%{transform:translateX(-200%) scale(1.5);}"]),gd=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__PanRightAnimation",componentId:"sc-l596rg-14"})(["animation:"," 3s linear infinite;"],bd),Ed=Object(l.g)(["0%{transform:translateY(-100%) scale(1.5);}50%,100%{transform:translateY(200%) scale(1.5);}"]),vd=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__PanTopAnimation",componentId:"sc-l596rg-15"})(["animation:"," 3s linear infinite;"],Ed),yd=Object(l.g)(["0%{transform:translateY(100%) scale(1.5);}50%,100%{transform:translateY(-200%) scale(1.5);}"]),Od=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__PanBottomAnimation",componentId:"sc-l596rg-16"})(["animation:"," 3s linear infinite;"],yd),Md=Object(l.g)(["0%{opacity:0;transform:scale(0);}50%,100%{opacity:1;transform:scale(1);}"]),wd=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__ZoomInAnimation",componentId:"sc-l596rg-17"})(["animation:"," 2s linear infinite;"],Md),Ld=Object(l.g)(["0%{opacity:0;transform:scale(2);}50%,100%{opacity:1;transform:scale(1);}"]),_d=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__ZoomOutAnimation",componentId:"sc-l596rg-18"})(["animation:"," 2s linear infinite;"],Ld),jd=Object(l.g)(["0%{opacity:0;transform:translate3d(-50%,0,0) scale(2);}50%,100%{opacity:1;transform:none;}"]),xd=Object(l.f)(Vs).withConfig({displayName:"effectChooserElements__PanAndZoomAnimation",componentId:"sc-l596rg-19"})(["animation:"," 2s linear infinite;"],jd),Zd=(e,t)=>Rd.includes(e)?e:t?`${e} ${t}`.trim():e,Ad="none",Id="dynamicPropertyValue",Td={HALF:"half",QUARTER:"quarter"},Sd=[],Rd=[te.d.PAN_AND_ZOOM.value],kd={NO_ANIMATION:{value:Ad,label:Object(h._x)("None","animation effect","web-stories")},[Zd(te.d.PAN.value,te.g.LEFT_TO_RIGHT)]:{value:Zd(te.d.PAN.value,te.g.LEFT_TO_RIGHT),label:Object(h._x)("Pan Left","animation effect","web-stories"),animation:{ariaLabel:Object(h.sprintf)(
|
86 |
/* translators: %s: animation effect. */
|
87 |
-
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Pan Left","animation effect","web-stories")),value:
|
88 |
/* translators: %s: animation effect. */
|
89 |
-
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Pan Right","animation effect","web-stories")),value:
|
90 |
/* translators: %s: animation effect. */
|
91 |
-
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Pan Up","animation effect","web-stories")),value:
|
92 |
/* translators: %s: animation effect. */
|
93 |
-
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Pan Down","animation effect","web-stories")),value:
|
94 |
/* translators: %s: animation effect. */
|
95 |
-
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Zoom In","animation effect","web-stories")),value:
|
96 |
/* translators: %s: animation effect. */
|
97 |
-
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Zoom Out","animation effect","web-stories")),value:
|
98 |
/* translators: %s: animation effect. */
|
99 |
-
Object(h.__)('"%s" Effect',"web-stories"),
|
100 |
/* translators: %s: animation effect. */
|
101 |
-
Object(h.__)('"%s" Effect',"web-stories"),
|
102 |
/* translators: %s: animation effect. */
|
103 |
-
Object(h.__)('"%s" Effect',"web-stories"),
|
104 |
/* translators: %s: animation effect. */
|
105 |
-
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Fly In from Left","animation effect","web-stories")),value:
|
106 |
/* translators: %s: animation effect. */
|
107 |
-
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Fly In from Top","animation effect","web-stories")),value:
|
108 |
/* translators: %s: animation effect. */
|
109 |
-
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Fly In from Bottom","animation effect","web-stories")),value:
|
110 |
/* translators: %s: animation effect. */
|
111 |
-
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Fly In from Right","animation effect","web-stories")),value:
|
112 |
/* translators: %s: animation effect. */
|
113 |
-
Object(h.__)('"%s" Effect',"web-stories"),
|
114 |
/* translators: %s: animation effect. */
|
115 |
-
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Rotate In from Left","animation effect","web-stories")),value:
|
116 |
/* translators: %s: animation effect. */
|
117 |
-
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Rotate In from Right","animation effect","web-stories")),value:
|
118 |
/* translators: %s: animation effect. */
|
119 |
-
Object(h.__)('"%s" Effect',"web-stories"),
|
120 |
/* translators: %s: animation effect. */
|
121 |
-
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Whoosh In from Left","animation effect","web-stories")),value:
|
122 |
/* translators: %s: animation effect. */
|
123 |
-
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Whoosh In from Right","animation effect","web-stories")),value:
|
124 |
/* translators: %s: animation effect. */
|
125 |
-
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Scale In","animation effect","web-stories")),value:
|
126 |
/* translators: %s: animation effect. */
|
127 |
-
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Scale Out","animation effect","web-stories")),value:te.a.ZOOM.value,scaleDirection:te.j.SCALE_OUT,gridSpace:Td.HALF,Effect:_d,size:20}}},Nd={ariaLabel:He.a.string,value:He.a.string.isRequired,Effect:He.a.any,gridSpace:He.a.oneOf(Object.values(Td)),size:He.a.number,scaleDirection:He.a.oneOf(Object.values(te.j)),panDirection:He.a.oneOf(Object.values(te.g)),zoomDirection:He.a.oneOf(Object.values(te.j)),flyInDirection:He.a.oneOf(Object.values(te.g)),rotateInDirection:He.a.oneOf(Object.values(te.g)),whooshInDirection:He.a.oneOf(Object.values(te.g))},Dd={value:He.a.string.isRequired,label:He.a.string.isRequired,animation:He.a.shape(Nd)};He.a.oneOf([...Object.values(te.g),...Object.values(te.j),!1]);var zd=(e,t)=>{const C=Object.entries(t).filter((([e])=>-1===Rd.indexOf(e))).map((([e,t])=>[e,t.options])).reduce(((e,[t,C])=>[...e,...(C||[]).map((e=>Zd(t,e)))]),[]);return Object.keys(e).filter((e=>C.includes(e)))};var Bd=e=>Object.values(e).includes(Id);var Fd=({animation:e,disabledOptions:t=[]})=>{var C;const a=e.panDirection&&!t.includes(e.panDirection)?e.panDirection:(null===(C=Object.values(te.g).filter((e=>!t.includes(e))))||void 0===C?void 0:C[0])||void 0;switch(e.value){case te.d.PAN_AND_ZOOM.value:return{...e,zoomDirection:t.includes(te.j.SCALE_IN)?te.j.SCALE_OUT:te.j.SCALE_IN,panDirection:a};default:return e}};var Hd=({animation:e,disabledTypeOptionsMap:t})=>{var C;return Bd(e)?Fd({animation:e,disabledOptions:null===(C=t[e.value])||void 0===C?void 0:C.options}):e};const Gd=l.f.div.withConfig({displayName:"styles__ContentWrapper",componentId:"sc-1g67h3c-0"})(["display:inline-block;"]),Vd=l.f.li.withConfig({displayName:"styles__AnimationListItem",componentId:"sc-1g67h3c-1"})(["border:none;background:",";border-radius:",";height:","px;position:relative;grid-column-start:",";overflow:hidden;font-family:'Teko',sans-serif;font-size:","px;line-height:1;color:",";text-transform:uppercase;transition:background 0.1s linear;margin:0;& > div{height:100%;display:flex;align-items:center;justify-content:center;text-align:center;}&[aria-disabled='true']{background:",";}&:hover:not([aria-disabled='true']){cursor:pointer;}&:hover:not([aria-disabled='true']),&:focus:not([aria-disabled='true']){background:",";","{display:inline-block;}","{display:none;}}"," ",";"],(({active:e,theme:t})=>e?t.colors.interactiveBg.secondaryPress:t.colors.interactiveBg.secondaryNormal),(({theme:e})=>e.borders.radius.small),56,(({gridSpace:e})=>(e=>{switch(e){case Td.HALF:return"span 2";case Td.QUARTER:return"span 1";default:return"span 4"}})(e)),(({size:e=28})=>e),(({theme:e})=>e.colors.fg.primary),(({theme:e})=>e.colors.interactiveBg.disable),(({active:e,theme:t})=>e?t.colors.interactiveBg.secondaryPress:t.colors.interactiveBg.secondaryHover),Vs,Gd,(({noEffect:e})=>e&&Object(l.e)(["height:36px;font-size:14px;text-transform:none;","{display:inline-block !important;}"],Gd)),Qt),Ud=Object(l.e)(["display:inline-block;margin-top:0;padding:16px 4px 16px 16px;ul{display:grid;justify-content:center;gap:12px 4px;grid-template-columns:repeat(4,1fr);position:relative;}"]),Wd=({theme:e})=>Object(l.e)(["margin:-1px -1px 0 -1px;width:calc(100% + 2px);border-color:transparent transparent "," transparent;height:","px;&:hover{border-color:transparent transparent "," transparent;}",""],e.colors.border.defaultNormal,45,e.colors.border.defaultNormal,Qt);function Yd(){return(Yd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const $d=Object(u.j)((({option:e,...t},C)=>{var a,n,l,i,o;return r.a.createElement(Vd,Yd({ref:C,"aria-label":(null===(a=e.animation)||void 0===a?void 0:a.ariaLabel)||e.label,disabled:e.disabled,"aria-disabled":e.disabled,size:null===(n=e.animation)||void 0===n?void 0:n.size,gridSpace:null===(l=e.animation)||void 0===l?void 0:l.gridSpace,noEffect:!(null!==(i=e.animation)&&void 0!==i&&i.Effect)},t),r.a.createElement(Pr.a,{title:(null==e?void 0:e.tooltip)||""},r.a.createElement(Gd,null,e.label),(null===(o=e.animation)||void 0===o?void 0:o.Effect)&&r.a.createElement(e.animation.Effect,null,e.label)))}));var qd=$d;$d.displayName="DropDownItem",$d.propTypes={option:He.a.shape(Dd)};var Xd=Object(u.j)((function EffectChooserDropdown({onAnimationSelected:e,onNoEffectSelected:t,isBackgroundEffects:C=!1,selectedEffectType:a,disabledTypeOptionsMap:n,direction:i,selectButtonStylesOverride:o},c){const{enableExperimentalAnimationEffects:s}=Object(p.c)(),d=Object(u.C)((()=>Zd(a,i)),[a,i]),m=Object(u.C)((()=>C&&zd(kd,n)),[n,C]),f=C?DC.a.BOTTOM:DC.a.TOP,b=C?kd:Pd,g=Object(u.C)((()=>s?Object.values(b):Object.values(b).filter((({value:e})=>-1===Sd.indexOf(e)))),[b,s]),E=Object(u.C)((()=>null==g?void 0:g.map((e=>{var t,a;const r=C&&m.includes(e.value);return{...e,disabled:r,tooltip:r&&(null===(t=n[null===(a=e.animation)||void 0===a?void 0:a.value])||void 0===t?void 0:t.tooltip)}}))),[g,C,m,n]),v=Object(u.s)(((C,a)=>{var r;if(C.preventDefault(),a===Ad)return void(Boolean(d)&&t());const l=null===(r=b[a])||void 0===r?void 0:r.animation,i=Hd({animation:l,disabledTypeOptionsMap:n});e({animation:i.value,panDir:null==i?void 0:i.panDirection,zoomDirection:null==i?void 0:i.zoomDirection,flyInDir:null==i?void 0:i.flyInDirection,rotateInDir:null==i?void 0:i.rotateInDirection,whooshInDir:null==i?void 0:i.whooshInDirection,scaleDirection:null==i?void 0:i.scaleDirection})}),[b,n,e,d,t]),y=d&&d!==Ad?Wd:Qt,O=Object(l.e)([""," ",""],y,void 0!==o&&o);return r.a.createElement(Ii.a,{ref:c,options:E,placeholder:Object(h._x)("None","animation effect","web-stories"),selectedValue:d,ariaLabel:Object(h.__)("Animation: Effect Chooser","web-stories"),menuStylesOverride:Ud,renderItem:qd,onMenuItemClick:v,placement:f,isKeepMenuOpenOnSelection:!0,selectButtonStylesOverride:O})}));const Kd="animation",Qd=Object(l.f)(ol).withConfig({displayName:"animation__StyledRow",componentId:"sc-13kgp5s-0"})(["margin-bottom:-1px;"]),Jd=Object(l.f)(iC.a).withConfig({displayName:"animation__Note",componentId:"sc-13kgp5s-1"})(["color:",";"],(({theme:e})=>e.colors.fg.secondary)),eu=l.f.div.withConfig({displayName:"animation__GroupWrapper",componentId:"sc-13kgp5s-2"})([""," margin-bottom:16px;"],(({hasAnimation:e,theme:t})=>e&&`\n border: 1px solid ${t.colors.border.defaultNormal};\n border-radius: ${t.borders.radius.small};\n `)),tu=Object(h.__)("The background image is too small to animate. Double click on the bg & scale the image before applying the animation.","web-stories");var Cu=function AnimationPanel({selectedElements:e,selectedElementAnimations:t,pushUpdateForObject:C,updateAnimationState:a}){var n,l;const i=Object(u.G)(!1),{highlight:o,resetHighlight:c}=jc((e=>({highlight:e[Ox.ANIMATION],resetHighlight:e.onFocusOut,cancelHighlight:e.cancelEffect}))),s=1===e.length&&e[0].isBackground,d=Object(u.C)((()=>{const C=e.map((e=>e.animation)).filter(Boolean);return t.map((e=>({...C.find((t=>t.id===e.id))||e}))).filter((e=>!e.delete))}),[e,t]),p=Object(u.s)(((e,t=!1)=>{Object(u.p)(e,d[0])||(C(Kd,e,null,t),i.current=!0)}),[C,d]),m=Object(u.s)((({animation:e,...a})=>{var n,r,l,o;if(!e)return;const c=(null===(n=t[0])||void 0===n?void 0:n.id)||Object(Dn.a)(),s=Object(te.o)(e),d=(null===(r=t[0])||void 0===r?void 0:r.type)===e?{duration:null===(l=t[0])||void 0===l?void 0:l.duration,delay:null===(o=t[0])||void 0===o?void 0:o.delay}:{};C(Kd,{id:c,type:e,...s,...d,...a},null,!0),i.current=!0}),[t,C]),f=document.activeElement,b=Object(u.x)((()=>{i.current&&(a({animationState:te.l.PLAYING_SELECTED}),i.current=!1)}),300);Object(u.y)(b,[t,a,f,b]);const g=Object(u.s)((()=>{C(Kd,{...d[0],delete:!0},null,!0)}),[C,d]),E=Object(u.C)((()=>{var t;if(null!==(t=e[0])&&void 0!==t&&t.isBackground){var C;const t=["media","image","video","gif"].includes(e[0].type)&&Object(te.r)({element:e[0]}),a=Object(te.s)((null===(C=e[0])||void 0===C?void 0:C.scale)||0,[te.f,te.e]);return{[te.d.PAN.value]:{tooltip:tu,options:[!t.bottom&&te.g.TOP_TO_BOTTOM,!t.left&&te.g.RIGHT_TO_LEFT,!t.top&&te.g.BOTTOM_TO_TOP,!t.right&&te.g.LEFT_TO_RIGHT].filter(Boolean)},[te.d.ZOOM.value]:{tooltip:tu,options:[a<=.01&&te.j.SCALE_IN,a>=.99&&te.j.SCALE_OUT].filter(Boolean)},[te.d.PAN_AND_ZOOM.value]:{tooltip:tu,options:[!t.bottom&&te.g.TOP_TO_BOTTOM,!t.left&&te.g.RIGHT_TO_LEFT,!t.top&&te.g.BOTTOM_TO_TOP,!t.right&&te.g.LEFT_TO_RIGHT,a<=.01&&te.j.SCALE_IN,a>=.99&&te.j.SCALE_OUT].filter(Boolean)}}}return{}}),[e]),v=(y=null===(n=d[0])||void 0===n?void 0:n.type,(null===(O=[...Object.values(te.a),...Object.values(te.b),...Object.values(te.d)].find((e=>e.value===y)))||void 0===O?void 0:O.name)||"");var y,O;return e.length>1?r.a.createElement(gs,{name:"animation",title:Object(h.__)("Animation","web-stories")},r.a.createElement(ol,null,r.a.createElement(Jd,{forwardedAs:"span",size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Group animation support coming soon.","web-stories")))):r.a.createElement(au,{name:"animation",title:Object(h.__)("Animation","web-stories"),onAnimationEnd:()=>c(),isPersistable:!o,$_css:(null==o?void 0:o.showEffect)&&Ux.FLASH},r.a.createElement(eu,{hasAnimation:v},r.a.createElement(Qd,null,r.a.createElement(Xd,{ref:e=>{e&&null!=o&&o.focus&&null!=o&&o.showEffect&&e.focus()},onAnimationSelected:m,onNoEffectSelected:g,isBackgroundEffects:s,disabledTypeOptionsMap:E,direction:Bs(d[0]),selectedEffectType:null===(l=d[0])||void 0===l?void 0:l.type,selectButtonStylesOverride:(null==o?void 0:o.focus)&&Ux.OUTLINE})),d[0]&&r.a.createElement(Gs,{animation:d[0],onChange:p,disabledTypeOptionsMap:E})))},au=Object(l.f)(gs).withConfig({displayName:"animation___StyledSimplePanel",componentId:"sc-13kgp5s-3"})(["",""],(e=>e.$_css)),nu=C(73);const ru={left:0,right:0,top:0,bottom:0,lockedWidth:!0,color:Object(GC.a)(0,0,0)},lu=Object(l.e)(["position:relative;:focus-within{z-index:1;",";}"],(({theme:e})=>X.c.focusCSS(e.colors.border.focus,e.colors.bg.secondary))),iu=Object(l.e)(["width:29px;height:29px;"]);var ou=Object(l.f)(NumericInput).withConfig({displayName:"stackableInput__StackableInput",componentId:"sc-4o6vkm-0"})(["svg{","}& > div{border-radius:0;margin-left:-1px;padding:2px 7px 2px 12px;",";}"],iu,lu);const cu=l.f.div.withConfig({displayName:"stackableGroup__StackableContainer",componentId:"sc-z33fvo-0"})(["display:flex;max-width:",";& > ","{border-radius:0;&:first-of-type > div{border-top-left-radius:4px;border-bottom-left-radius:4px;margin-left:0;}&:last-of-type > div{border-top-right-radius:4px;border-bottom-right-radius:4px;}}"],(({locked:e})=>e?"106px":"none"),ou);var su=function StackableGroup({children:e,locked:t,className:C}){return r.a.createElement(cu,{locked:t,className:C},e)};function du(){return(du=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const uu=l.f.div.withConfig({displayName:"borderWidth__BorderInputsFlexContainer",componentId:"sc-lm7hl8-0"})(["display:flex;gap:7px;margin-bottom:16px;"]),pu=Object(l.f)(LockToggle).withConfig({displayName:"borderWidth__StyledLockToggle",componentId:"sc-lm7hl8-1"})(["",";"],Qt),mu=l.f.div.withConfig({displayName:"borderWidth__ToggleWrapper",componentId:"sc-lm7hl8-2"})(["padding-top:2px;",";align-self:stretch;"],(({locked:e})=>e&&Object(l.e)(["padding-left:8px;"]))),fu=Object(l.f)(Xe.a.Border).withConfig({displayName:"borderWidth__BorderTop",componentId:"sc-lm7hl8-3"})(["transform:rotate(90deg);"]),hu=Object(l.f)(Xe.a.Border).withConfig({displayName:"borderWidth__BorderBottom",componentId:"sc-lm7hl8-4"})(["transform:rotate(-90deg);"]),bu=Object(l.f)(Xe.a.Border).withConfig({displayName:"borderWidth__BorderRight",componentId:"sc-lm7hl8-5"})(["transform:scaleX(-1);"]);var gu=function WidthControls({selectedElements:e,pushUpdateForObject:t}){const C=oo(e,"border",ru),a=!0===C.lockedWidth,n=Object(u.s)((e=>(C,n)=>{t("border",a?{left:n,top:n,right:n,bottom:n}:{[e]:n},ru,!0)}),[t,a]),l=Object(u.s)((e=>{t("border",e,ru,!0)}),[t]),i=a?Object(h.__)("Border","web-stories"):Object(h.__)("Left border","web-stories"),o=Object(u.s)((e=>({isIndeterminate:sC.y===e,placeholder:sC.y===e?sC.x:null})),[]);return r.a.createElement(uu,null,r.a.createElement(su,{locked:a},r.a.createElement(ou,du({value:C.left,onChange:n("left"),"aria-label":i,suffix:!a&&r.a.createElement(Xe.a.Border,null)},o(C.left))),!a&&r.a.createElement(r.a.Fragment,null,r.a.createElement(ou,du({value:C.top,onChange:n("top"),"aria-label":Object(h.__)("Top border","web-stories"),labelText:Object(h.__)("Top","web-stories"),suffix:r.a.createElement(fu,null)},o(C.top))),r.a.createElement(ou,du({value:C.right,onChange:n("right"),"aria-label":Object(h.__)("Right border","web-stories"),labelText:Object(h.__)("Right","web-stories"),suffix:r.a.createElement(bu,null)},o(C.right))),r.a.createElement(ou,du({value:C.bottom,onChange:n("bottom"),"aria-label":Object(h.__)("Bottom border","web-stories"),labelText:Object(h.__)("Bottom","web-stories"),suffix:r.a.createElement(hu,null)},o(C.bottom))))),r.a.createElement(mu,{locked:a},r.a.createElement(Ke.a,{title:Object(h.__)("Toggle consistent border","web-stories")},r.a.createElement(pu,{isLocked:a,onClick:()=>{let e={lockedWidth:!a};a||(e={...e,top:C.left,right:C.left,bottom:C.left}),l(e)},"aria-label":Object(h.__)("Toggle consistent border","web-stories")}))))};var Eu=function BorderStylePanel(e){const{selectedElements:t,pushUpdate:C}=e,a=oo(t,"border",ru),{color:n,left:l,top:i,right:o,bottom:c}=a,s=t.every((e=>Object(nu.a)(e))),d=Object(u.s)(((e,t)=>C({border:{...a,[t]:e}},!0)),[a,C]);if(!s)return null;const p=[l,i,o,c].some((e=>e>0));return r.a.createElement(gs,{name:"borderStyle",title:Object(h.__)("Border","web-stories")},r.a.createElement(gu,e),p&&r.a.createElement(ol,null,r.a.createElement(Mr,{value:n,onChange:e=>{d(e,"color")},label:Object(h.__)("Border color","web-stories"),changedStyle:"border-color",hasEyedropper:!0})))};const vu=l.f.div.withConfig({displayName:"captions__InputRow",componentId:"sc-z7md5d-0"})(["display:flex;flex-grow:1;margin-right:8px;"]),yu=Object(l.f)(bC.b).withConfig({displayName:"captions__StyledFileInput",componentId:"sc-z7md5d-1"})((({hasMixedValue:e,theme:t})=>Object(l.e)(["",";",";"],Qt,!e&&Object(l.e)(["* > input:disabled{color:",";}"],t.colors.fg.primary)))),Ou=Object(l.f)(b.a).withConfig({displayName:"captions__StyledButton",componentId:"sc-z7md5d-2"})(["",";"],(({theme:e})=>X.c.focusableOutlineCSS(e.colors.border.focus,e.colors.bg.secondary))),Mu=Object(l.f)(Ou).withConfig({displayName:"captions__UploadButton",componentId:"sc-z7md5d-3"})(["padding:12px 8px;"]);var wu=Object(l.f)(Mu).withConfig({displayName:"captions___StyledUploadButton",componentId:"sc-z7md5d-4"})(["",""],(e=>e.$_css));Object(l.f)(iC.a).attrs({as:"span",size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL}).withConfig({displayName:"captions__ErrorText",componentId:"sc-z7md5d-5"})(["color:",";"],(({theme:e})=>e.colors.fg.negative));const Lu={MAX:1e3};var _u=function CaptionsPanel({selectedElements:e,pushUpdate:t}){const C=ro(e,"tracks",[]),a=C===sC.y,{capabilities:{hasUploadMediaAction:n},MediaUpload:l}=Object(F.g)();Gl((({resource:e})=>{var t;return{resource:{...e,alt:null===(t=e.alt)||void 0===t?void 0:t.slice(0,Lu.MAX)}}}),[]);const i=Object(u.s)((e=>{let a=[];if(e){const t=C.findIndex((({id:t})=>t===e));a=[...C.slice(0,t),...C.slice(t+1)]}t({tracks:a},!0)}),[C,t]),o=Object(u.s)((({src:e="",id:a})=>{const n={track:e,trackId:a,trackName:e.split("/").pop(),id:Object(Dn.a)(),kind:"captions",srclang:"",label:""};t({tracks:[...C,n]},!0)}),[C,t]),{highlight:c,resetHighlight:s}=jc((e=>({highlight:e[Ox.CAPTIONS],resetHighlight:e.onFocusOut,cancelHighlight:e.cancelEffect}))),d=Object(h.__)("Upload a file","web-stories"),p=Object(u.s)((e=>r.a.createElement(wu,{onAnimationEnd:()=>s(),ref:e=>{e&&null!=c&&c.focus&&null!=c&&c.showEffect&&e.focus()},onClick:e,type:g.c.SECONDARY,size:g.a.SMALL,variant:g.d.RECTANGLE,$_css:(null==c?void 0:c.showEffect)&&Ux.OUTLINE},d)),[s,d,null==c?void 0:c.focus,null==c?void 0:c.showEffect]);if(!n&&!C.length)return null;const m=Object(h.__)("Remove file","web-stories");return r.a.createElement(ju,{onAnimationEnd:()=>s(),name:"caption",title:Object(h.__)("Caption and Subtitles","web-stories"),isPersistable:!c,$_css2:(null==c?void 0:c.showEffect)&&Ux.FLASH},a&&r.a.createElement(ol,null,r.a.createElement(yu,{value:sC.x,disabled:!0,"aria-label":Object(h.__)("Filename","web-stories"),onChange:()=>i(),hasMixedValue:a})),C&&!a&&C.map((({id:e,trackName:t})=>r.a.createElement(ol,{key:`row-filename-${e}`},r.a.createElement(vu,null,r.a.createElement(yu,{value:t,"aria-label":Object(h.__)("Filename","web-stories"),onChange:()=>i(e),hasMixedValue:a,disabled:!0})),r.a.createElement(Ke.a,{hasTail:!0,title:m},r.a.createElement(Ou,{"aria-label":m,type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE,onClick:()=>i(e)},r.a.createElement(Xe.a.Trash,null)))))),!C.length&&r.a.createElement(r.a.Fragment,null,r.a.createElement(ol,{expand:!0},r.a.createElement(l,{onSelect:o,onSelectErrorMessage:Object(h.__)("Please choose a VTT file to use as caption.","web-stories"),type:["text/vtt"],title:d,buttonInsertText:Object(h.__)("Select caption","web-stories"),render:p})),!1))},ju=Object(l.f)(gs).withConfig({displayName:"captions___StyledSimplePanel",componentId:"sc-z7md5d-6"})(["",""],(e=>e.$_css2)),xu=C(747),Zu=C(59);var Au=function(){const[e,t]=Object(u.I)([]);return{setUpdatedSelectedElementsWithFrame:t,handleAlign:(t,C,a)=>{a((a=>{const{id:n}=a,r=e.find((e=>e.id===n)),{width:l=0,height:i=0,frameWidth:o=0,frameHeight:c=0}=r||{},s="left"===t||"right"===t?(o-l)/2:(c-i)/2;return"left"===t||"right"===t?{x:"left"===t?C.startX+s:C.endX-l-s}:{y:"top"===t?C.startY+s:C.endY-i-s}}),!0)},handleAlignCenter:(e,t)=>{const C=(e.endX+e.startX)/2;t((e=>{const{width:t}=e;return{x:C-t/2}}),!0)},handleAlignMiddle:(e,t)=>{const C=(e.endY+e.startY)/2;t((e=>{const{height:t}=e;return{y:C-t/2}}),!0)},handleHorizontalDistribution:(t,C)=>{const a=[...e];a.sort(((e,t)=>(e.frameX+e.frameWidth)/2-(t.frameX+t.frameWidth)/2));const n=a.reduce(((e,t)=>e+t.frameWidth),0),r=t.width-n,l=Object(Zu.b)(r/(a.length-1)),i={};let o=0;a.forEach(((e,t)=>{const{id:C,x:n,width:r,frameWidth:c}=e;0===t||t===a.length-1?(i[C]={x:n},o=n):i[C]={x:o+(c-r)/2},o+=c+l})),C((({id:e})=>i[e]),!0)},handleVerticalDistribution:(t,C)=>{const a=[...e];a.sort(((e,t)=>(e.frameY+e.frameHeight)/2-(t.frameY+t.frameHeight)/2));const n=a.reduce(((e,t)=>e+t.frameHeight),0),r=t.height-n,l=Object(Zu.b)(r/(a.length-1)),i={};let o=0;a.forEach(((e,t)=>{const{id:C,y:n,height:r,frameHeight:c}=e;0===t||t===a.length-1?(i[C]={y:n},o=n):i[C]={y:o+(c-r)/2},o+=c+l})),C((({id:e})=>i[e]),!0)}}};const Iu=l.f.div.withConfig({displayName:"alignment__ElementRow",componentId:"sc-n61zdk-0"})(["display:flex;flex-direction:row;justify-content:center;align-items:center;padding:16px;overflow:auto;overflow:overlay;"]),Tu=["distributeHorizontally","distributeVertically","alignLeft","alignCenter","alignRight","alignTop","alignMiddle","alignBottom"],Su={startX:0,startY:0,endX:Q.h,endY:Q.f,width:Q.h,height:Q.f},Ru=Object(l.f)(b.a).attrs({variant:g.d.SQUARE,type:g.c.TERTIARY,size:g.a.SMALL}).withConfig({displayName:"alignment__AlignmentButton",componentId:"sc-n61zdk-1"})(["position:relative;:focus{z-index:1;}",";"],(({theme:e})=>X.c.focusableOutlineCSS(e.colors.border.focus,"#1d1f20"))),ku=Object(l.f)(Xc).withConfig({displayName:"alignment__StyledPanel",componentId:"sc-n61zdk-2"})(["background-color:",";border-bottom:1px solid ",";"],(({theme:e})=>e.colors.opacity.black24),(({theme:e})=>e.colors.divider.secondary));var Pu=function ElementAlignmentPanel({selectedElements:e,pushUpdate:t}){const{isRTL:C}=Object(F.g)(),a=1===e.length?Su:Object(xu.b)(e),n=Object(u.C)((()=>e.map((e=>{const{id:t,x:C,y:a,width:n,height:r,rotationAngle:l}=e;let i=C,o=a,c=n,s=r;if(l){const e=Object(xu.a)(l,C,a,n,r);i=e.x,o=e.y,c=e.width,s=e.height}return{id:t,x:C,y:a,width:n,height:r,frameX:i,frameY:o,frameWidth:c,frameHeight:s}}))),[e]),{setUpdatedSelectedElementsWithFrame:l,handleAlign:i,handleAlignCenter:o,handleAlignMiddle:c,handleHorizontalDistribution:s,handleVerticalDistribution:d}=Au();Object(u.y)((()=>l(n)),[n,l]);const p=e.length>2,m=Object(u.G)(),[f,b]=Object(u.I)(null),g=Object(u.s)((e=>()=>{const t=Tu.findIndex((e=>e===f)),C=Tu[t+e];C&&(b(C),m.current.querySelector(`#${C}`).focus())}),[f,b]);return Object(ve.h)(m,"left",(()=>g(C?1:-1)),[g,C]),Object(ve.h)(m,"right",(()=>g(C?-11:1)),[g,C]),Object(ve.h)(m,{key:"mod+{",shift:!0},(()=>i("left")),[i]),Object(ve.h)(m,{key:"mod+h",shift:!0},o,[o]),Object(ve.h)(m,{key:"mod+}",shift:!0},(()=>i("right")),[i]),r.a.createElement(ku,{name:"alignment",canCollapse:!1,ariaLabel:Object(h.__)("Alignment","web-stories")},r.a.createElement(Iu,{ref:m},r.a.createElement(Ke.a,{title:Object(h.__)("Distribute horizontally","web-stories")},r.a.createElement(Ru,{disabled:!p,onClick:()=>s(a,t),"aria-label":Object(h.__)("Distribute horizontally","web-stories"),id:Tu[0],onFocus:()=>b(Tu[0])},r.a.createElement(Xe.a.DistributeHorizontal,null))),r.a.createElement(Ke.a,{title:Object(h.__)("Distribute vertically","web-stories")},r.a.createElement(Ru,{disabled:!p,onClick:()=>d(a,t),"aria-label":Object(h.__)("Distribute vertically","web-stories"),id:Tu[1],onFocus:()=>b(Tu[1])},r.a.createElement(Xe.a.DistributeVertical,null))),r.a.createElement(Ke.a,{title:Object(h.__)("Align left","web-stories"),shortcut:"mod+{"},r.a.createElement(Ru,{onClick:()=>i("left",a,t),"aria-label":Object(h.__)("Align left","web-stories"),id:Tu[2],onFocus:()=>b(Tu[2])},r.a.createElement(Xe.a.AlignLeft,null))),r.a.createElement(Ke.a,{title:Object(h.__)("Align center","web-stories"),shortcut:"mod+H"},r.a.createElement(Ru,{onClick:()=>o(a,t),"aria-label":Object(h.__)("Align center","web-stories"),id:Tu[3],onFocus:()=>b(Tu[3])},r.a.createElement(Xe.a.AlignCenter,null))),r.a.createElement(Ke.a,{title:Object(h.__)("Align right","web-stories"),shortcut:"mod+}"},r.a.createElement(Ru,{onClick:()=>i("right",a,t),"aria-label":Object(h.__)("Align right","web-stories"),id:Tu[4],onFocus:()=>b(Tu[4])},r.a.createElement(Xe.a.AlignRight,null))),r.a.createElement(Ke.a,{title:Object(h.__)("Align top","web-stories")},r.a.createElement(Ru,{onClick:()=>i("top",a,t),"aria-label":Object(h.__)("Align top","web-stories"),id:Tu[5],onFocus:()=>b(Tu[5])},r.a.createElement(Xe.a.AlignTop,null))),r.a.createElement(Ke.a,{title:Object(h.__)("Align vertical center","web-stories")},r.a.createElement(Ru,{onClick:()=>c(a,t),"aria-label":Object(h.__)("Align vertical center","web-stories"),id:Tu[6],onFocus:()=>b(Tu[6])},r.a.createElement(Xe.a.AlignMiddle,null))),r.a.createElement(Ke.a,{title:Object(h.__)("Align bottom","web-stories")},r.a.createElement(Ru,{onClick:()=>i("bottom",a,t),"aria-label":Object(h.__)("Align bottom","web-stories"),id:Tu[7],onFocus:()=>b(Tu[7])},r.a.createElement(Xe.a.AlignBottom,null)))))},Nu=C(68);var Du=function(e,t,C){switch(C){case Nu.b.NONE:return null;case Nu.b.SOLID:return function(e,t){switch(t){case Nu.b.NONE:return{color:{r:0,g:0,b:0,a:.5}};case Nu.b.LINEAR:case Nu.b.RADIAL:{const{stops:t}=e,C=t.sort(((e,t)=>{var C,a;return(null!==(C=t.color.a)&&void 0!==C?C:1)-(null!==(a=e.color.a)&&void 0!==a?a:1)})),{color:{r:a,g:n,b:r}}=C[0];return{color:{r:a,g:n,b:r,a:.5}}}default:return e}}(e,t);case Nu.b.LINEAR:return function(e,t){switch(t){case Nu.b.NONE:return{type:"linear",rotation:0,stops:[{color:{r:0,g:0,b:0,a:0},position:0},{color:{r:0,g:0,b:0,a:1},position:1}],alpha:.7};case Nu.b.SOLID:{const{color:{r:t,g:C,b:a,a:n}}=e;return{type:"linear",rotation:0,stops:[{color:{r:t,g:C,b:a,a:0},position:.4},{color:{r:t,g:C,b:a,a:1},position:1}],alpha:n}}case Nu.b.RADIAL:{const{stops:t,alpha:C}=e;return{type:"linear",rotation:0,stops:t,alpha:C}}default:return e}}(e,t);case Nu.b.RADIAL:return function(e,t){switch(t){case Nu.b.NONE:return{type:"radial",size:{w:.67,h:.67},stops:[{color:{r:0,g:0,b:0,a:0},position:0},{color:{r:0,g:0,b:0,a:1},position:1}],alpha:.7};case Nu.b.SOLID:{const{color:{r:t,g:C,b:a,a:n}}=e;return{type:"radial",size:{w:.67,h:.67},stops:[{color:{r:t,g:C,b:a,a:0},position:0},{color:{r:t,g:C,b:a,a:1},position:1}],alpha:n}}case Nu.b.LINEAR:{const{stops:t,alpha:C}=e;return{type:"radial",size:{w:.67,h:.67},stops:t,alpha:C}}default:return e}}(e,t);default:return e}};var zu=function FilterPanel({selectedElements:e,pushUpdate:t}){const C=io(e,"overlay"),a=C===sC.y,n=C?C.type||Nu.b.SOLID:Nu.b.NONE,l=Object(u.s)((e=>t({overlay:e},!0)),[t]),i=n!==Nu.b.RADIAL&&n!==Nu.b.LINEAR,{LayerIcon:o}=Object(Ce.g)(e[0].type);return r.a.createElement(gs,{name:"filter",title:Object(h.__)("Filters","web-stories")},!a&&r.a.createElement(ol,null,Object.keys(Nu.a).map((t=>{const{label:a}=Nu.a[t];return r.a.createElement(Ir,{key:t,element:e[0],label:a,isToggled:n===t,onClick:()=>l(Du(C,n,t)),filter:Du(C,Nu.b.NONE,t),"aria-label":Object(h.sprintf)(
|
128 |
/* translators: %s: Filter type */
|
129 |
-
Object(h.__)("Filter: %s","web-stories"),
|
130 |
/* translators: %d: new position. */
|
131 |
-
const ap=Object(h.__)("Reordering. Press Escape to abort. Release mouse to drop in position %d.","web-stories");var np=function(e,t){const[C,a]=Object(u.I)(!1),[n,r]=Object(u.I)(null),[l,i]=Object(u.I)(null),[o,c]=Object(u.I)(null),s=Object(zi.a)("assertive"),d=Object(u.s)((({position:e,onStartReordering:t=(()=>{})})=>C=>{C.shiftKey||C.metaKey||(t(),i(e),c(C.target))}),[]),p=Object(u.G)(null);return Object(u.y)((()=>{p.current=n}),[n]),Object(u.y)((()=>{if(!o)return;const t=t=>{if(t.preventDefault(),null!==p.current){const t=p.current;e(l,t>l?t-1:t)}c(null)},C=()=>a(!0),n=e=>{"Escape"===e.key&&(c(null),e.stopPropagation())};return o.ownerDocument.addEventListener("pointerup",t),o.ownerDocument.addEventListener("keydown",n,!0),o.addEventListener("pointermove",C),()=>{r(null),a(!1),o.removeEventListener("pointermove",C),o.ownerDocument.removeEventListener("pointerup",t),o.ownerDocument.removeEventListener("keydown",n,!0)}}),[o,l,r,a,e]),Object(u.y)((()=>{if(C&&n){const e=t-n,C=Object(h.sprintf)(ap,e);s(C)}}),[C,n,t,s]),{isReordering:C,currentSeparator:n,setCurrentSeparator:r,handleStartReordering:d}};const rp=l.f.div.withConfig({displayName:"reorderableScroller__Scroller",componentId:"sc-10sd1c1-0"})(["z-index:3;opacity:0;position:sticky;"]),lp=Object(l.f)(rp).withConfig({displayName:"reorderableScroller__HorizontalScroller",componentId:"sc-10sd1c1-1"})(["padding-left:","px;height:100%;",""],(({size:e})=>e),(({direction:e,size:t})=>-1===e?`\n left: 0px;\n margin-right: -${t}px;\n `:`\n right: 0px;\n margin-left: -${t}px;\n `)),ip=Object(l.f)(rp).withConfig({displayName:"reorderableScroller__VerticalScroller",componentId:"sc-10sd1c1-2"})(["padding-top:","px;width:100%;",""],(({size:e})=>e),(({direction:e,size:t})=>-1===e?`\n top: 0px;\n margin-bottom: -${t}px;\n `:`\n bottom: 0px;\n margin-top: -${t}px;\n `));var op=Object(u.m)((function ReorderableScroller({direction:e,size:t}){const{state:{canScrollEnd:C,canScrollStart:a,mode:n},actions:{startScroll:l}}=Object(u.u)(Cp),[i,o]=Object(u.I)(!1),c=Object(u.s)((()=>o(!0)),[]),s=Object(u.s)((()=>o(!1)),[]);Object(u.y)((()=>{if(i)return l(e)}),[e,l,i]);const d=-1===e&&a||1===e&&C;if(Object(u.y)((()=>{d||o(!1)}),[d]),!d)return null;const p="horizontal"===n?lp:ip;return r.a.createElement(p,{size:t,direction:e,onPointerEnter:c,onPointerLeave:s,mode:n})}));var cp=function(e="horizontal",t,C,a){const[n,r]=Object(u.I)(!1),[l,i]=Object(u.I)(!1),[o,c]=Object(u.I)(0),s=Object(u.r)((()=>{const t=C.current;if(t)if("horizontal"===e){const e=t.scrollWidth-t.clientWidth;e<=0?(r(!1),i(!1)):(r(t.scrollLeft>0),i(t.scrollLeft<e))}else{const e=t.scrollHeight-t.clientHeight;e<=0?(r(!1),i(!1)):(r(t.scrollTop>0),i(t.scrollTop<e))}}),[e,C]),d=Object(u.s)((e=>(c(e),()=>c(0))),[c]),p=t&&n,m=t&&l;return Object(u.y)((()=>{if(0===o||!(p&&o<0||m&&o>0))return;let t=!0;const n=()=>{const r=Math.max(Math.min(.2*a,10),0);"horizontal"===e?C.current.scrollLeft+=o*r:C.current.scrollTop+=o*r,s(),t&&window.requestAnimationFrame(n)};return n(),()=>{t=!1}}),[o,s,p,m,a,e,C]),Object(u.y)((()=>s()),[t,s]),{startScroll:d,canScrollEnd:m,canScrollStart:p}};function sp(){return(sp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const dp=l.f.div.attrs({role:"listbox"}).withConfig({displayName:"reorderable__ReorderableContainer",componentId:"sc-jpo1fc-0"})(["display:flex;"]);var up=Object(u.j)((function Reorderable({children:e,onPositionChange:t,getItemSize:C,scrollSize:a=null,mode:n="horizontal",...l},i){const o=Object(u.G)(null),c=i||o,{isReordering:s,currentSeparator:d,setCurrentSeparator:p,handleStartReordering:m}=np(t,e.length),{startScroll:f,canScrollEnd:h,canScrollStart:b}=cp(n,s,c,C()),g={state:{isReordering:s,currentSeparator:d,containerRef:c,mode:n,canScrollEnd:h,canScrollStart:b},actions:{setCurrentSeparator:p,handleStartReordering:m,startScroll:f}},E=a||C();return r.a.createElement(Cp.Provider,{value:g},r.a.createElement(dp,sp({ref:c},l),r.a.createElement(op,{direction:-1,size:E}),e,r.a.createElement(op,{direction:1,size:E})))}));var pp=function(e){return Object(u.w)(Cp,null!=e?e:u.k)};function mp(){return(mp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const fp=l.f.div.withConfig({displayName:"reorderableItem__Container",componentId:"sc-zbk2r1-0"})(["z-index:1;"]);var hp=function ReorderableItem({children:e,position:t,onStartReordering:C,disabled:a,...n}){const l=pp((({actions:e})=>e.handleStartReordering));return r.a.createElement(fp,mp({},a?null:{onPointerDown:l({position:t,onStartReordering:C})},n),e)};function bp(){return(bp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const gp=l.f.div.withConfig({displayName:"reorderableSeparator__Wrapper",componentId:"sc-ds2z3h-0"})(["opacity:0;position:relative;z-index:",";&:hover{opacity:",";}"],(({isReordering:e})=>e?2:-1),(({isReordering:e})=>e?1:0)),Ep=l.f.div.withConfig({displayName:"reorderableSeparator__Line",componentId:"sc-ds2z3h-1"})(["height:4px;margin:0 0 -4px;background:",";width:100%;"],(({theme:e})=>e.colors.accent.secondary));var vp=function ReorderableSeparator({position:e,children:t=r.a.createElement(Ep,null),...C}){const a=Object(u.G)(null),{isReordering:n,setCurrentSeparator:l}=pp((({state:e,actions:t})=>({isReordering:e.isReordering,setCurrentSeparator:t.setCurrentSeparator}))),i=Object(u.s)((()=>{n&&l(e)}),[l,n,e]);return r.a.createElement(gp,bp({onPointerOver:i,ref:a,isReordering:n},C),t)},yp=C(132);var Op=C(101);var Mp=function(e){const{id:t}=e,{isSelected:C,toggleLayer:a}=Object(F.o)((({state:e,actions:C})=>({isSelected:e.selectedElementIds.includes(t),toggleLayer:C.toggleLayer}))),n=Object(yp.a)();return{isSelected:C,handleClick:Object(u.s)((e=>{e.preventDefault(),e.stopPropagation(),a({elementId:t,metaKey:e.metaKey,shiftKey:e.shiftKey}),n()}),[a,t,n])}};const wp=l.f.div.withConfig({displayName:"layer__ActionsContainer",componentId:"sc-fkd13k-0"})(["position:absolute;display:none;align-items:center;height:100%;top:0;right:0;padding-right:6px;column-gap:6px;--background-color:",";--background-color-opaque:",";background-color:var(--background-color);::before{position:absolute;content:'';width:32px;height:100%;top:0;left:0;transform:translateX(-100%);background:linear-gradient( to right,var(--background-color-opaque),var(--background-color) );pointer-events:none;}"],(({theme:e})=>e.colors.interactiveBg.secondaryNormal),(({theme:e})=>Object(MC.c)(e.colors.interactiveBg.secondaryNormal,0))),Lp=l.f.div.attrs({"data-testid":"layer-option"}).withConfig({displayName:"layer__LayerContainer",componentId:"sc-fkd13k-1"})(["position:relative;height:","px;width:100%;overflow:hidden;:is(:hover,:focus-within) ","{display:inline-flex;}"],35,wp),_p=Object(l.f)(b.a).attrs({type:g.c.PLAIN,tabIndex:-1,role:"option"}).withConfig({displayName:"layer__LayerButton",componentId:"sc-fkd13k-2"})(["position:relative;display:grid;grid-template-columns:36px 1fr;border:0;padding:0;background:transparent;height:100%;width:100%;overflow:hidden;align-items:center;user-select:none;border-radius:0;padding-left:12px;transition:revert;",":hover{background:",";}:hover + *{--background-color:",";--background-color-opaque:",";}:active{background:",";}:active + *{--background-color:",";--background-color-opaque:",";}"],(({isSelected:e,theme:t})=>e&&Object(l.e)(["background:",";+ *{--background-color:",";--background-color-opaque:",";--selected-hover-color:",";}"],t.colors.interactiveBg.secondaryPress,t.colors.interactiveBg.secondaryPress,Object(MC.c)(t.colors.interactiveBg.secondaryPress,0),t.colors.interactiveBg.tertiaryHover)),(({theme:e})=>e.colors.interactiveBg.secondaryHover),(({theme:e})=>e.colors.interactiveBg.secondaryHover),(({theme:e})=>Object(MC.c)(e.colors.interactiveBg.secondaryHover,0)),(({theme:e})=>e.colors.interactiveBg.secondaryPress),(({theme:e})=>e.colors.interactiveBg.secondaryPress),(({theme:e})=>Object(MC.c)(e.colors.interactiveBg.secondaryPress,0))),jp=l.f.div.withConfig({displayName:"layer__LayerIconWrapper",componentId:"sc-fkd13k-3"})(["display:flex;align-items:center;justify-content:flex-start;color:",";"],(({theme:e})=>e.colors.fg.primary)),xp=l.f.div.withConfig({displayName:"layer__LayerDescription",componentId:"sc-fkd13k-4"})(["position:relative;width:100%;overflow:hidden;display:flex;align-items:center;margin-left:0;text-align:left;color:",";"],(({theme:e})=>e.colors.fg.primary)),Zp=l.f.div.withConfig({displayName:"layer__IconWrapper",componentId:"sc-fkd13k-5"})(["display:flex;align-items:center;justify-content:flex-start;position:absolute;right:0;width:32px;aspect-ratio:1;svg{position:relative;display:block;width:100%;color:",";}"],(({theme:e})=>e.colors.fg.secondary)),Ap=l.f.div.withConfig({displayName:"layer__LayerContentContainer",componentId:"sc-fkd13k-6"})(["margin-right:8px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;"]),Ip=Object(l.f)(b.a).attrs({type:g.c.PLAIN,tabIndex:-1}).withConfig({displayName:"layer__LayerAction",componentId:"sc-fkd13k-7"})(["position:relative;aspect-ratio:1;width:20px;padding:0;svg{position:absolute;width:32px;height:auto;top:50%;left:50%;transform:translate(-50%,-50%);}&&{transition:revert;background:var(--background-color);}:disabled{color:",";}:hover{color:var( --selected-hover-color,"," );}& + &{margin-left:4px;}*{pointer-events:none;}:focus{","}"],(({theme:e})=>e.colors.fg.secondary),(({theme:e})=>e.colors.fg.secondary),(({theme:e})=>X.c.focusCSS(e.colors.border.focus,"var(--background-color)")));function Tp(e){e.stopPropagation(),e.preventDefault()}var Sp=Object(u.m)((function({element:e}){const{LayerIcon:t,LayerContent:C}=Object(Ce.g)(e.type),{isSelected:a,handleClick:n}=Mp(e),{duplicateElementById:l,deleteElementById:i}=Object(F.o)((({actions:e})=>({duplicateElementById:e.duplicateElementById,deleteElementById:e.deleteElementById}))),o=Object(u.G)(null);$u({node:o.current,eventData:{...qu.SELECT_ELEMENT,label:e.type}});const c=Object(u.G)(null);$u({node:c.current,eventData:{...qu.DELETE_ELEMENT,label:e.type}});const s=`layer-${e.id}`;return r.a.createElement(Lp,null,r.a.createElement(_p,{ref:o,id:s,onClick:n,isSelected:a},r.a.createElement(jp,null,r.a.createElement(t,{element:e})),r.a.createElement(xp,null,r.a.createElement(Ap,null,e.isBackground?r.a.createElement(Op.a,null,Object(h.__)("Background","web-stories")):r.a.createElement(C,{element:e})),e.isBackground&&r.a.createElement(Zp,null,r.a.createElement(Xe.a.LockClosed,null)))),r.a.createElement(wp,null,e.isBackground?r.a.createElement(Ip,{"aria-label":Object(h.__)("Locked","web-stories"),"aria-describedby":s,disabled:!0},r.a.createElement(Xe.a.LockClosed,null)):r.a.createElement(r.a.Fragment,null,r.a.createElement(Pr.a,{title:Object(h.__)("Delete Layer","web-stories"),hasTail:!0,isDelayed:!0},r.a.createElement(Ip,{ref:c,"aria-label":Object(h.__)("Delete","web-stories"),"aria-describedby":s,onPointerDown:Tp,onClick:()=>i({elementId:e.id})},r.a.createElement(Xe.a.Trash,null))),r.a.createElement(Pr.a,{title:Object(h.__)("Duplicate Layer","web-stories"),hasTail:!0,isDelayed:!0},r.a.createElement(Ip,{"aria-label":Object(h.__)("Duplicate","web-stories"),"aria-describedby":s,onPointerDown:Tp,onClick:()=>l({elementId:e.id})},r.a.createElement(Xe.a.PagePlus,null))))))}));const Rp=Object(l.f)(up).attrs({"aria-orientation":"vertical","aria-label":Object(h.__)("Layers List","web-stories")}).withConfig({displayName:"layerList__LayerList",componentId:"sc-1f648cf-0"})(["flex-direction:column;width:100%;height:100%;align-items:stretch;user-select:",";overflow-y:auto;"],(({hasUserSelect:e})=>e?"none":"initial")),kp=Object(l.f)(vp).withConfig({displayName:"layerList__LayerSeparator",componentId:"sc-1f648cf-1"})(["height:","px;margin:-","px 0;padding:","px 0;"],35,17.5,17.5),Pp=Object(u.m)((function ReorderableLayer({id:e,position:t,handleStartReordering:C}){const a=Object(F.o)((({state:t})=>{var C;return null===(C=t.currentPage)||void 0===C?void 0:C.elements.find((t=>t.id===e))}));return a?r.a.createElement(u.b,{key:e},r.a.createElement(kp,{position:t+1}),r.a.createElement(hp,{position:t,onStartReordering:C(e),disabled:a.isBackground},r.a.createElement(Sp,{element:a}))):null}));var Np=function LayerPanel({layers:e}){const{arrangeElement:t,setSelectedElementsById:C}=Object(F.o)((({actions:e})=>({arrangeElement:e.arrangeElement,setSelectedElementsById:e.setSelectedElementsById}))),a=Object(F.n)((e=>e.onOpenMenu)),n=e.length,l=Object(yp.a)(),i=Object(u.s)((e=>()=>{C({elementIds:[e]}),l()}),[C,l]);return n?r.a.createElement(Rp,{onContextMenu:a,onPositionChange:(C,a)=>t({elementId:e.find((e=>e.position===C)).id,position:a}),mode:"vertical",getItemSize:()=>35},e.map((e=>r.a.createElement(Pp,{key:e.id,id:e.id,position:e.position,handleStartReordering:i})))):null};var Dp=function(){const e=Object(F.o)((({state:e})=>{var t,C;return(null===(t=e.currentPage)||void 0===t||null===(C=t.elements)||void 0===C?void 0:C.map((e=>e.id)))||sC.E})).map(((e,t)=>({id:e,position:t})));return e.reverse(),e};const zp=l.f.div.withConfig({displayName:"layerPanel__Container",componentId:"sc-72vku8-0"})(["margin:0 4px;filter:drop-shadow(0px -4px 8px rgba(0,0,0,0.2));"]),Bp=Object(l.f)(us).withConfig({displayName:"layerPanel__StyledPanelTitle",componentId:"sc-72vku8-1"})(["height:48px;border-top-left-radius:",";border-top-right-radius:",";"],(({theme:e})=>e.borders.radius.small),(({theme:e})=>e.borders.radius.small)),Fp=l.f.div.withConfig({displayName:"layerPanel__DividerContainer",componentId:"sc-72vku8-2"})(["background:",";"],(({theme:e})=>e.colors.bg.tertiary)),Hp=l.f.div.withConfig({displayName:"layerPanel__Divider",componentId:"sc-72vku8-3"})(["border-bottom:1px solid ",";margin:0 16.5px;"],(({theme:e})=>e.colors.divider.tertiary));var Gp=Object(u.m)((function(){const e=Dp(),t=Cr((({state:e})=>e.inspectorContentHeight))-52+2,C=Object(u.C)((()=>Math.round(window.innerHeight/4)),[]);return r.a.createElement(zp,null,r.a.createElement(Xc,{name:"layer-panel",initialHeight:C,resizable:!0,showDragHandle:!0,showFocusStyles:!1,ariaHidden:!0,collapsedByDefault:!1},r.a.createElement(Bp,{isSecondary:!0,isResizable:!0,count:null==e?void 0:e.length,maxHeight:t},Object(h.__)("Layers","web-stories")),r.a.createElement(Fp,null,r.a.createElement(Hp,null)),r.a.createElement(hs,{isSecondary:!0,padding:"0"},r.a.createElement(Np,{layers:e}))))}));function Vp(e,t){try{return new URL(t,e).href}catch(e){return t}}var Up=C(280);var Wp=function(){const{currentPage:e,selectedElements:t}=Object(F.o)((e=>({currentPage:e.state.currentPage,selectedElements:e.state.selectedElements}))),{pageAttachmentContainer:C}=Object(F.d)((e=>({pageAttachmentContainer:e.state.pageAttachmentContainer}))),{elements:a}=e,n=Object(u.C)((()=>a.filter((({link:e})=>{var t;return null==e||null===(t=e.url)||void 0===t?void 0:t.length}))),[a]),r=Object(u.s)((()=>{var a,n;if(!C)return!1;if(null==e||null===(a=e.pageAttachment)||void 0===a||null===(n=a.url)||void 0===n||!n.length)return!1;return t.filter((({link:e})=>{var t;return null==e||null===(t=e.url)||void 0===t?void 0:t.length})).filter((e=>Object(Up.a)(e))).length>0}),[e,t,C]),l=Object(u.s)(((e,t=!1)=>C?e.filter((e=>Object(Up.a)(e,t))):[]),[C]),i=Object(u.s)((()=>l(n,!0)),[n,l]),o=Object(u.s)((t=>{var a;return!!C&&(!(null==e||null===(a=e.pageAttachment)||void 0===a||!a.url.length)&&Object(Up.a)(t,!1))}),[C,e]);return{getLinksInAttachmentArea:i,hasInvalidLinkSelected:r(),isElementInAttachmentArea:o,getElementsInAttachmentArea:l}},Yp=C(169),$p=C(89);const qp=l.f.div.withConfig({displayName:"link__IconInfo",componentId:"sc-1tshrug-0"})(["display:flex;flex-direction:column;margin-left:20px;"]),Xp=Object(l.f)(iC.a).withConfig({displayName:"link__IconText",componentId:"sc-1tshrug-1"})(["color:",";"],(({theme:e})=>e.colors.fg.secondary)),Kp=l.f.span.withConfig({displayName:"link__Error",componentId:"sc-1tshrug-2"})(["font-size:12px;line-height:16px;color:",";"],(({theme:e})=>e.colors.fg.negative));var Qp=function LinkPanel({selectedElements:e,pushUpdateForObject:t}){var C,a;const{clearEditing:n,setDisplayLinkGuidelines:l,displayLinkGuidelines:i}=Object(F.d)((e=>({clearEditing:e.actions.clearEditing,setDisplayLinkGuidelines:e.actions.setDisplayLinkGuidelines,displayLinkGuidelines:e.state.displayLinkGuidelines}))),{currentPage:o}=Object(F.o)((e=>({currentPage:e.state.currentPage}))),{highlight:c,resetHighlight:s,cancelHighlight:d}=jc((e=>({highlight:e[Ox.LINK],resetHighlight:e.onFocusOut,cancelHighlight:e.cancelEffect}))),{getElementsInAttachmentArea:p}=Wp(),m=p(e).length>0&&(null==o||null===(C=o.pageAttachment)||void 0===C||null===(a=C.url)||void 0===a?void 0:a.length)>0,f=Object(u.C)((()=>Object(Yp.a)({icon:null,desc:null})),[]),b=oo(e,"link",f),g=Object(Yp.a)(b),{url:E="",desc:v="",icon:y,rel:O=[]}=g,[M,w]=Object(u.I)(!1),[L,_]=Object(u.I)(!1),{actions:{getLinkMetadata:j}}=Object(F.c)(),{getProxiedUrl:x,checkResourceAccess:Z}=Object($p.a)(),A=Object(u.r)((({newUrl:e,newTitle:C,newIcon:a,needsProxy:n})=>t("link",(()=>e?Object(Yp.a)({url:e,needsProxy:n,desc:C||"",icon:a?Vp(e,a):""}):null),f,!0)),[t,f]),[I,T]=Object(u.I)(!Object(il.a)(Object(il.b)(E))),S=Object(u.x)((async e=>{w(!0);try{const{title:t,image:C}=j?await j(e):{},a=!!C&&await Z(C);A({newUrl:e,newTitle:t,newIcon:C,needsProxy:a})}catch(e){T(!0)}finally{w(!1)}}),1200),R=Object(u.s)(((e,C)=>{if(n(),e.url){if(sC.y===e.url)return;const t=Object(il.b)(e.url),C=Object(il.a)(t);T(!C),C&&S(t)}t("link",""!==e.url?{...e}:null,f,C)}),[n,t,f,S]),k=Object(u.s)((e=>{R({icon:null==e?void 0:e.src},!0)}),[R]),P=Boolean(null==E?void 0:E.length),N=P&&!I;Object(u.y)((()=>{if(L){const e=P&&E!==sC.y;l(m&&!e)}}),[e,L,m,P,l,E]);const D=y?x(g,y):null,z=sC.y===E,B=sC.y===v,H=sC.y===O,G=Object(u.s)((e=>R({rel:e},!0)),[R]);return r.a.createElement(Jp,{name:"link",title:Object(h.__)("Link","web-stories"),onAnimationEnd:()=>s(),isPersistable:!c,$_css:(null==c?void 0:c.showEffect)&&Ux.FLASH},r.a.createElement(dl,{ref:e=>{e&&null!=c&&c.focus&&null!=c&&c.showEffect&&(e.addEventListener("keydown",d,{once:!0}),e.focus())},onChange:e=>!i&&R({url:e},!e),onBlur:()=>{l(!1),_(!1)},onFocus:()=>{_(!0)},value:E,placeholder:z?sC.x:Object(h.__)("Enter an address to apply a link","web-stories"),isIndeterminate:z,"aria-label":Object(h.__)("Element link","web-stories"),hasError:i}),i&&r.a.createElement(ol,null,r.a.createElement(Kp,null,Object(h.__)("Link can not reside below the dashed line when a page attachment is present","web-stories"))),N&&r.a.createElement(r.a.Fragment,null,r.a.createElement(ol,null,r.a.createElement(bC.b,{placeholder:B?sC.x:Object(h.__)("Optional description","web-stories"),onChange:({target:e})=>R({desc:e.value},!e.value),value:v,"aria-label":Object(h.__)("Link description","web-stories"),isIndeterminate:B,disabled:M,containerStyleOverride:Jt})),r.a.createElement(ol,{spaceBetween:!1},r.a.createElement(ll,{handleChange:k,icon:D,isLoading:M,disabled:M}),r.a.createElement(qp,null,r.a.createElement(Xp,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Optional brand icon","web-stories")))),!H&&r.a.createElement(ao,{onChangeRel:G,rel:O})))},Jp=Object(l.f)(gs).withConfig({displayName:"link___StyledSimplePanel",componentId:"sc-1tshrug-3"})(["",""],(e=>e.$_css));const em=l.f.label.withConfig({displayName:"pageAttachment__Label",componentId:"sc-1vga0up-0"})(["margin-left:12px;"]),tm=Object(l.f)(oC.a).withConfig({displayName:"pageAttachment__StyledCheckbox",componentId:"sc-1vga0up-1"})(["",""],(({theme:e})=>`\n input[type='checkbox']&.${X.a.FOCUS_VISIBLE_SELECTOR} ~ div, input[type='checkbox']:focus ~ div {\n box-shadow: 0px 0px 0 2px ${e.colors.bg.secondary}, 0px 0px 0 4px ${e.colors.border.focus} !important;\n }\n `)),Cm=Object(l.f)(ol).withConfig({displayName:"pageAttachment__StyledRow",componentId:"sc-1vga0up-2"})(["justify-content:flex-start;"]),am=l.f.div.withConfig({displayName:"pageAttachment__Space",componentId:"sc-1vga0up-3"})(["width:20px;"]);var nm=function PageAttachmentPanel(){const{currentPage:e,updateCurrentPageProperties:t}=Object(F.o)((e=>({updateCurrentPageProperties:e.actions.updateCurrentPageProperties,currentPage:e.state.currentPage}))),{setDisplayLinkGuidelines:C}=Object(F.d)((e=>({setDisplayLinkGuidelines:e.actions.setDisplayLinkGuidelines}))),{actions:{getLinkMetadata:a}}=Object(F.c)(),{pageAttachment:n={}}=e,l=Object(h.__)("Learn more","web-stories"),{url:i,ctaText:o=l,icon:c,theme:s,rel:d=[]}=n,[p,m]=Object(u.I)(o),[f,b]=Object(u.I)(i),[g,E]=Object(u.I)(!1),[v,y]=Object(u.I)(!1),{getLinksInAttachmentArea:O}=Wp(),M=O().length>0;Object(u.y)((()=>()=>{C(!1)}),[M,C,i]),Object(u.y)((()=>{g&&null!=i&&i.length&&E(!1)}),[i,g]);const w=Object(u.s)((e=>{const C={...n,...e};t({properties:{pageAttachment:C}})}),[t,n]),L=Object(u.x)(w,300),{getProxiedUrl:_,checkResourceAccess:j}=Object($p.a)(),x=Object(u.x)((async e=>{y(!0);try{const{image:t}=a?await a(e):{},C=t?Vp(e,t):"",n=!!C&&await j(C);w({url:e,icon:C,needsProxy:n})}catch(t){w({url:e,icon:"",needsProxy:!1}),A(!0)}finally{y(!1)}}),1200),[Z,A]=Object(u.I)(i&&!Object(il.a)(Object(il.b)(i).trim())),I=p===l,T=Boolean(i)&&!Z,S=Object(u.s)((e=>{b(e),A(!1);const t=Object(il.b)(e.trim());Object(il.a)(t)&&x(t)}),[x]),R=Object(u.s)((({target:e})=>{const{value:t}=e;m(t),L({ctaText:t})}),[L]),k=Object(u.s)((e=>{w({icon:null==e?void 0:e.src},!0)}),[w]),P=Object(u.s)((e=>w({rel:e},!0)),[w]),N=Object(u.s)((({target:e})=>{e.value?(L.cancel(),w({ctaText:p||l})):(w({ctaText:l}),m(l))}),[p,L,l,w]),D=`cb-${Object(Dn.a)()}`,z=c?_(n,c):null;let B;const H=g||Z;return H&&(B=g?Object(h.__)("Links cannot reside below the dashed line when a page attachment is present. If you add a page attachment, your viewers will not be able to click on the link.","web-stories"):Object(h.__)("Invalid link","web-stories")),r.a.createElement(gs,{name:"pageAttachment",title:Object(h.__)("Page Attachment","web-stories"),collapsedByDefault:!1},r.a.createElement(dl,{onChange:e=>S(null==e?void 0:e.trim()),onBlur:()=>{L.cancel(),w({url:null!=f&&f.trim().length?Object(il.b)(f.trim()):""})},onFocus:()=>{!M||null!=i&&i.length||(E(!0),C(!0))},value:f,clear:!0,"aria-label":Object(h.__)("Type an address to add a page attachment link","web-stories"),hasError:H,hint:B}),T&&r.a.createElement(r.a.Fragment,null,r.a.createElement(ol,null,r.a.createElement(bC.b,{onChange:R,onBlur:N,value:p,"aria-label":Object(h.__)("Page Attachment CTA text","web-stories"),suffix:I?Object(h.__)("Default","web-stories"):null})),r.a.createElement(Cm,null,r.a.createElement(tm,{id:D,checked:s===sC.z.DARK,onChange:e=>w({theme:e.target.checked?sC.z.DARK:sC.z.LIGHT})}),r.a.createElement(em,{htmlFor:D},r.a.createElement(iC.a,{as:"span",size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Use dark theme","web-stories")))),r.a.createElement(Cm,null,r.a.createElement(ll,{handleChange:k,icon:z,isLoading:v,disabled:v}),r.a.createElement(am,null),r.a.createElement(iC.a,{as:"span",size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Link icon","web-stories"))),r.a.createElement(ao,{onChangeRel:P,rel:d})))},rm=C(237);const lm={horizontal:!1,vertical:!1},im=Object(l.f)(ol).withConfig({displayName:"pageBackground__Row",componentId:"sc-110pcke-0"})(["justify-content:flex-start;"]),om=l.f.div.withConfig({displayName:"pageBackground__SelectedMedia",componentId:"sc-110pcke-1"})(["width:128px;height:36px;border-radius:4px;border:1px solid ",";display:flex;justify-content:space-between;margin-right:12px;"],(({theme:e})=>e.colors.border.defaultNormal)),cm=l.f.div.withConfig({displayName:"pageBackground__MediaWrapper",componentId:"sc-110pcke-2"})(["height:24px;width:24px;border-radius:4px;overflow:hidden;margin:5px;img{object-fit:cover;max-height:100%;max-width:100%;}"]),sm=Object(l.f)(b.a).withConfig({displayName:"pageBackground__RemoveButton",componentId:"sc-110pcke-3"})(["margin:1px;align-self:center;"]),dm=Object(l.f)(b.a).attrs({size:g.a.SMALL,variant:g.d.SQUARE,type:g.c.TERTIARY}).withConfig({displayName:"pageBackground__ReplaceButton",componentId:"sc-110pcke-4"})(["margin-right:8px;"]),um=Object(l.f)(iC.a).withConfig({displayName:"pageBackground__Text",componentId:"sc-110pcke-5"})(["align-self:center;width:55px;"]);var pm=function PageBackgroundPanel({selectedElements:e,pushUpdate:t}){var C;const{combineElements:a,currentPage:n,clearBackgroundElement:l,updateCurrentPageProperties:i}=Object(F.o)((({state:e,actions:t})=>({currentPage:e.currentPage,clearBackgroundElement:t.clearBackgroundElement,combineElements:t.combineElements,updateCurrentPageProperties:t.updateCurrentPageProperties}))),{capabilities:{hasUploadMediaAction:o}}=Object(F.g)(),c=Object(u.s)((e=>{i({properties:{backgroundColor:e}})}),[i]),s=Object(u.s)((()=>{t({isBackground:!1,opacity:100},!0),l()}),[t,l]),d=Object(u.s)((t=>{const C=Object(Ce.b)(t.type,Object(rm.a)(t.type,{resource:t}));a({firstElement:C,secondId:e[0].id}),Object(f.g)("replace_background_media")}),[a,e]),p=Object(u.s)((e=>r.a.createElement(dm,{onClick:e,"aria-label":Object(h.__)("Replace","web-stories")},r.a.createElement(Xe.a.ArrowCloud,null))),[]),{highlight:m,resetHighlight:b,cancelHighlight:E}=jc((e=>({highlight:e[Ox.PAGE_BACKGROUND],resetHighlight:e.onFocusOut,cancelHighlight:e.cancelEffect}))),v=e[0];if(!v||!v.isBackground)return null;const y=v.isDefaultBackground,O=v.isBackground&&!y,{backgroundColor:M}=n,{LayerIcon:w}=Object(Ce.g)(v.type),L=(null===(C=e[0])||void 0===C?void 0:C.flip)||lm;return r.a.createElement(mm,{onAnimationEnd:()=>b(),name:"pageBackground",title:Object(h.__)("Page Background","web-stories"),isPersistable:!m,collapsedByDefault:!1,$_css:(null==m?void 0:m.showEffect)&&Ux.FLASH},y&&r.a.createElement(im,null,r.a.createElement(Mr,{ref:e=>{e&&null!=m&&m.focus&&null!=m&&m.showEffect&&(e.addEventListener("keydown",E,{once:!0}),e.focus())},allowsGradient:!0,value:M,onChange:c,label:Object(h.__)("Background color","web-stories"),allowsSavedColors:!0,allowsOpacity:!1})),O&&r.a.createElement(im,{expand:!1},r.a.createElement(om,null,r.a.createElement(cm,null,r.a.createElement(w,{element:v})),r.a.createElement(um,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Media","web-stories")),r.a.createElement(sm,{"aria-label":Object(h.__)("Detach background","web-stories"),onClick:s,size:g.a.SMALL,variant:g.d.SQUARE,type:g.c.TERTIARY},r.a.createElement(Xe.a.Cross,null))),o&&r.a.createElement(Pr.a,{title:Object(h.__)("Replace","web-stories")},r.a.createElement(pl,{buttonInsertText:Object(h.__)("Use as background","web-stories"),onInsert:d,renderButton:p})),r.a.createElement(lC,{onChange:e=>t({flip:e},!0),value:L})))},mm=Object(l.f)(gs).withConfig({displayName:"pageBackground___StyledSimplePanel",componentId:"sc-110pcke-6"})(["",""],(e=>e.$_css));var fm=function ShapeStylePanel({selectedElements:e,pushUpdate:t}){const C=ro(e,"backgroundColor"),a=Object(u.s)((e=>{t({backgroundColor:e},!0)}),[t]),{highlight:n,resetHighlight:l,cancelHighlight:i}=jc((e=>({highlight:e[Ox.STYLE],resetHighlight:e.onFocusOut,cancelHighlight:e.cancelEffect})));return r.a.createElement(hm,{onAnimationEnd:()=>l(),name:"shapeStyle",title:Object(h.__)("Color","web-stories"),isPersistable:!n,"aria-labelledby":null,"aria-label":Object(h.__)("Shape style","web-stories"),$_css:(null==n?void 0:n.showEffect)&&Ux.FLASH},r.a.createElement(ol,null,r.a.createElement(Mr,{ref:e=>{e&&null!=n&&n.focus&&null!=n&&n.showEffect&&(e.addEventListener("keydown",i,{once:!0}),e.focus())},allowsGradient:!0,value:C,isMultiple:""===C,onChange:a,label:Object(h.__)("Background color","web-stories"),allowsSavedColors:!0})))},hm=Object(l.f)(gs).withConfig({displayName:"shapeStyle___StyledSimplePanel",componentId:"sc-j609ly-0"})(["",""],(e=>e.$_css)),bm=C(82);var gm=(e,{MIN:t,MAX:C})=>Math.min(Math.max(e,t),C);const Em={MIN:-360,MAX:360},vm={MIN:1,MAX:1e3},ym={MIN:1,MAX:1e3},Om={MIN:1,MAX:Q.h-1},Mm={MIN:1-Math.floor(Q.a),MAX:Q.f+Math.floor(Q.a)-1},wm={horizontal:!1,vertical:!1};function Lm(e){return"number"==typeof e&&!isNaN(e)}var _m=function(e,t,C){Gl(((t,{width:C,height:a},{width:n,height:r})=>{const{type:l}=t,i=Boolean(C),o=Boolean(a);if(!i&&!o)return null;const{updateForResizeEvent:c}=Object(Ce.g)(l);if(c){return c(t,[i?1:0,o?1:0],gm(C,vm),gm(a,ym))}if(e){const e=n/r;if(!i)return{width:gm(Object(Zu.b)(a*e),vm)};if(!o)return{height:gm(Object(Zu.b)(C/e),ym)}}return null}),[e]),Gl((({rotationAngle:e})=>({rotationAngle:e%360})),[]),Gl((({rotationAngle:e,x:t,y:C,width:a,height:n})=>{const r=Object(xu.a)(e,t,C,a,n),l=t-r.x,i=C-r.y;return{x:gm(t,{MIN:Om.MIN+l-r.width,MAX:Om.MAX+l}),y:gm(C,{MIN:Mm.MIN+i-r.height,MAX:Mm.MAX+i})}}),[]);const a=Object(u.s)(((t,C,a)=>e&&t>=a.MAX?gm(a.MAX*C,a):gm(t,a)),[e]);Gl((({height:e},{width:t,height:C})=>{const n=C/t;return e=gm(e,ym),Lm(n)?{height:a(Object(Zu.b)(e),n,ym)}:{height:gm(e,ym)}}),[t,e]),Gl((({width:e},{width:t,height:C})=>{const n=t/C;return e=gm(e,vm),Lm(n)?{width:a(Object(Zu.b)(e),n,vm)}:{width:gm(e,vm)}}),[C,e])};const jm={MIN:0,MAX:100};function xm({opacity:e}){return void 0!==e?e:jm.MAX}var Zm=function OpacityControls({selectedElements:e,pushUpdate:t}){const C=ro(e,xm),a=Object(u.s)(((e,C)=>t({opacity:null!=C?C:100},!0)),[t]);return r.a.createElement(NumericInput,{suffix:r.a.createElement(Xe.a.ColorDrop,null),unit:Object(h._x)("%","Percentage","web-stories"),value:C,onChange:a,min:jm.MIN,max:jm.MAX,"aria-label":Object(h.__)("Opacity in percent","web-stories"),placeholder:C===sC.y?sC.x:"",isIndeterminate:C===sC.y,containerStyleOverride:Jt})};const Am={topLeft:0,topRight:0,bottomRight:0,bottomLeft:0,locked:!0},Im=l.f.div.withConfig({displayName:"radius__FlexContainer",componentId:"sc-1d7ux9v-0"})(["display:flex;"]),Tm=l.f.div.withConfig({displayName:"radius__LockContainer",componentId:"sc-1d7ux9v-1"})(["position:relative;display:flex;align-items:center;width:32px;margin-left:8px;"]),Sm=Object(l.f)(LockToggle).withConfig({displayName:"radius__StyledLockToggle",componentId:"sc-1d7ux9v-2"})(["",";"],Qt),Rm=Object(l.f)(Xe.a.Corner).withConfig({displayName:"radius__TopLeft",componentId:"sc-1d7ux9v-3"})(["transform:rotate(90deg);"]),km=Object(l.f)(Xe.a.Corner).withConfig({displayName:"radius__TopRight",componentId:"sc-1d7ux9v-4"})(["transform:rotate(180deg);"]),Pm=Object(l.f)(Xe.a.Corner).withConfig({displayName:"radius__BottomRight",componentId:"sc-1d7ux9v-5"})(["transform:rotate(270deg);"]);var Nm=function RadiusControls({selectedElements:e,pushUpdateForObject:t}){const C=oo(e,"borderRadius",Am),a=e.every((e=>Object(nu.a)(e))),n=!0===C.locked,l=Object(u.s)(((e,C)=>{t("borderRadius",n?{topLeft:C,topRight:C,bottomRight:C,bottomLeft:C}:{[e]:C},Am,!0)}),[t,n]),i=Object(u.s)((e=>{const a=e?{locked:e,topLeft:C.topLeft,topRight:C.topLeft,bottomRight:C.topLeft,bottomLeft:C.topLeft}:{locked:e};t("borderRadius",a,Am,!0)}),[t,C]);if(!a)return null;const o=n?Object(h.__)("Corner Radius","web-stories"):Object(h.__)("Top left corner radius","web-stories");return r.a.createElement(Im,null,r.a.createElement(su,{locked:n},r.a.createElement(ou,{suffix:r.a.createElement(Rm,null),value:C.topLeft===sC.y?"":C.topLeft,"aria-label":o,onChange:(e,t)=>l("topLeft",t),placeholder:C.topLeft===sC.y?sC.x:"",isIndeterminate:C.topLeft===sC.y}),!n&&r.a.createElement(r.a.Fragment,null,r.a.createElement(ou,{suffix:r.a.createElement(km,null),value:C.topRight===sC.y?"":C.topRight,"aria-label":Object(h.__)("Top right corner radius","web-stories"),onChange:(e,t)=>l("topRight",t),placeholder:C.topRight===sC.y?sC.x:"",isIndeterminate:C.topRight===sC.y}),r.a.createElement(ou,{value:C.bottomLeft===sC.y?"":C.bottomLeft,"aria-label":Object(h.__)("Bottom left corner radius","web-stories"),onChange:(e,t)=>l("bottomLeft",t),placeholder:C.bottomLeft===sC.y?sC.x:"",suffix:r.a.createElement(Xe.a.Corner,null),isIndeterminate:C.bottomLeft===sC.y}),r.a.createElement(ou,{value:C.bottomRight===sC.y?"":C.bottomRight,"aria-label":Object(h.__)("Bottom right corner radius","web-stories"),onChange:(e,t)=>l("bottomRight",t),placeholder:C.bottomRight===sC.y?sC.x:"",suffix:r.a.createElement(Pm,null),isIndeterminate:C.bottomRight===sC.y}))),r.a.createElement(Tm,null,r.a.createElement(Ke.a,{title:Object(h.__)("Toggle consistent corner radius","web-stories"),key:C.locked.toString()},r.a.createElement(Sm,{isLocked:C.locked,onClick:()=>i(!C.locked),"aria-label":Object(h.__)("Toggle consistent corner radius","web-stories")}))))};function Dm(){return(Dm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const zm=Object(l.f)(LockToggle).withConfig({displayName:"sizePosition__StyledLockToggle",componentId:"sc-1r5n89-0"})(["",";"],Qt);function Bm(e){var t;return(null===bm.a||void 0===bm.a?void 0:bm.a[null==e||null===(t=e.sticker)||void 0===t?void 0:t.type].aspectRatio)||1}const Fm=Object(l.e)(["grid-template-areas:"," 'x . . . y . .' 'w . d . h . l' 'r . . . o . .' 'c c c c c c c';"],(({isSingleMedia:e})=>e?"'b b b b b . .'":null)),Hm=Object(l.e)(["grid-template-areas:"," 'x . . . y . .' 'w . d . h . l' 'r . . . f . .' ",";"],(({isSingleMedia:e})=>e?"'b b b b b . .'":null),(({unlockedRadius:e})=>e?"\n 'o . . . . . .'\n 'c c c c c c c'\n":"'o . . . c c c'")),Gm=l.f.div.withConfig({displayName:"sizePosition__Grid",componentId:"sc-1r5n89-1"})(["display:grid;"," grid-template-columns:1fr 4px 8px 4px 1fr 8px 32px;grid-template-rows:repeat(4,36px);row-gap:16px;align-items:center;justify-items:start;margin-bottom:16px;"],(({canFlip:e})=>e?Hm:Fm)),Vm=l.f.div.withConfig({displayName:"sizePosition__Area",componentId:"sc-1r5n89-2"})(["grid-area:",";width:100%;"],(({area:e})=>e)),Um=l.f.div.withConfig({displayName:"sizePosition__Dash",componentId:"sc-1r5n89-3"})(["height:1px;width:100%;background:",";"],(({theme:e})=>e.colors.divider.primary)),Wm=Object(l.f)(b.a).withConfig({displayName:"sizePosition__StyledButton",componentId:"sc-1r5n89-4"})(["padding:10px 16px;width:100%;",";"],Qt);var Ym=function SizePositionPanel(e){const{selectedElements:t,submittedSelectedElements:C,pushUpdate:a,pushUpdateForObject:n}=e,l=ro(t,"x"),i=ro(t,"y"),o=ro(t,"width"),c=ro(t,"height"),s=ro(t,"rotationAngle"),d=oo(t,"flip",wm),p=oo(t,"borderRadius",{locked:!0}),m=Object(u.C)((()=>ro(C,"width")/ro(C,"height")),[C]),f=ro(t,"lockAspectRatio"),b=Object(u.G)(null);$u({node:b.current,eventData:qu.SET_BACKGROUND_MEDIA});const E=f===sC.y||f,{currentPage:v,combineElements:y}=Object(HC.a)((e=>({currentPage:e.state.currentPage,combineElements:e.actions.combineElements}))),O=null==v?void 0:v.elements[0].id,M=1===t.length,{isMedia:w}=Object(Ce.g)(t[0].type),L=t.every((({type:e})=>Object(Ce.g)(e).canFlip)),_=t.some((({type:e})=>Object(Ce.g)(e).isAspectAlwaysLocked)),j=t.some((({type:e})=>"text"===e)),x=Object(u.C)((()=>M?Object(xu.a)(s,l,i,o,c):{}),[s,l,i,o,c,M]),Z=l-x.x,A=i-x.y,I=M?{minX:Om.MIN+Z-x.width,minY:Mm.MIN+A-x.height,maxX:Om.MAX+Z,maxY:Mm.MAX+A}:function(e){const t=e.map((e=>Object(xu.a)(e.rotationAngle,e.x,e.y,e.width,e.height)));return e.reduce(((e,C,a)=>{const n=t[a],r=C.x-n.x,l=C.y-n.y,i=Om.MIN+r-n.width,o=Mm.MIN+l-n.height,c=Om.MAX+r,s=Mm.MAX+l;return{minX:e.minX?Math.max(e.minX,i):i,minY:e.minY?Math.max(e.minY,o):o,maxX:e.maxX?Math.min(e.maxX,c):c,maxY:e.maxY?Math.min(e.maxY,s):s}}),{})}(t),T=(e,t)=>f===sC.y?{lockAspectRatio:E,height:t,width:e}:{height:t,width:e};_m(E,c,o);const S=Object(u.s)((()=>{y({firstElement:t[0],secondId:O})}),[t,y,O]),R=!E&&j,k=sC.y===c?sC.x:null,P=R?Object(h.__)("Auto","web-stories"):k,N=Object(u.s)((e=>({isIndeterminate:sC.y===e,placeholder:sC.y===e?sC.x:null})),[]);return r.a.createElement(gs,{name:"size",title:Object(h.__)("Selection","web-stories")},r.a.createElement(Gm,{isSingleMedia:w&&M,canFlip:L,unlockedRadius:!p.locked},w&&M&&r.a.createElement(Vm,{area:"b"},r.a.createElement(Wm,{ref:b,onClick:S,type:g.c.SECONDARY,size:g.a.SMALL,variant:g.d.RECTANGLE},Object(h.__)("Set as background","web-stories"))),r.a.createElement(Vm,{area:"x"},r.a.createElement(NumericInput,Dm({suffix:Object(h._x)("X","Position on X axis","web-stories"),value:l,min:I.minX,max:I.maxX,onChange:(e,t)=>a({x:t},!0),"aria-label":Object(h.__)("X position","web-stories"),canBeNegative:!0},N(l),{containerStyleOverride:Jt}))),r.a.createElement(Vm,{area:"y"},r.a.createElement(NumericInput,Dm({suffix:Object(h._x)("Y","Position on Y axis","web-stories"),value:i,min:I.minY,max:I.maxY,onChange:(e,t)=>a({y:t},!0),"aria-label":Object(h.__)("Y position","web-stories"),canBeNegative:!0},N(i),{containerStyleOverride:Jt}))),r.a.createElement(Vm,{area:"w"},r.a.createElement(NumericInput,Dm({suffix:Object(h._x)("W","The Width dimension","web-stories"),value:o,min:vm.MIN,max:vm.MAX,onChange:(e,t)=>{const C=t;let n=c;E&&(""===C?n="":Lm(C/m)&&(n=Object(Zu.b)(C/m))),a((e=>{if("sticker"===(null==e?void 0:e.type)){const t=Bm(e);return T(C,Math.floor(C/t))}return T(C,n)}),!0)},"aria-label":Object(h.__)("Width","web-stories")},N(o),{containerStyleOverride:Jt}))),r.a.createElement(Vm,{area:"d"},r.a.createElement(Um,null)),r.a.createElement(Vm,{area:"h"},r.a.createElement(NumericInput,{suffix:Object(h._x)("H","The Height dimension","web-stories"),value:R?"":c,disabled:R,min:ym.MIN,max:ym.MAX,onChange:(e,t)=>{const C=t;let n=o;E&&(""===C?n="":Lm(C*m)&&(n=Object(Zu.b)(C*m))),a((e=>{if("sticker"===(null==e?void 0:e.type)){const t=Bm(e);return T(Math.floor(C*t),C)}return T(n,C)}),!0)},"aria-label":Object(h.__)("Height","web-stories"),isIndeterminate:sC.y===c,placeholder:P,containerStyleOverride:Jt})),r.a.createElement(Vm,{area:"l"},r.a.createElement(Pr.a,{title:Object(h.__)("Lock aspect ratio","web-stories")},r.a.createElement(zm,{"aria-label":Object(h.__)("Lock aspect ratio","web-stories"),title:Object(h.__)("Lock aspect ratio","web-stories"),isLocked:E||_,disabled:_,onClick:()=>!_&&a({lockAspectRatio:!E},!0)}))),r.a.createElement(Vm,{area:"r"},r.a.createElement(NumericInput,Dm({suffix:r.a.createElement(Xe.a.Angle,null),unit:Object(h._x)("°","Degrees, 0 - 360.","web-stories"),value:s,min:Em.MIN,max:Em.MAX,onChange:(e,t)=>a({rotationAngle:t},!0),"aria-label":Object(h.__)("Rotation","web-stories"),canBeNegative:!0},N(s),{containerStyleOverride:Jt}))),L&&r.a.createElement(Vm,{area:"f"},r.a.createElement(lC,{onChange:e=>n("flip",e,wm,!0),value:d})),r.a.createElement(Vm,{area:"o"},r.a.createElement(Zm,e)),r.a.createElement(Vm,{area:"c"},r.a.createElement(Nm,e))))},$m=C(144),qm=C(243);var Xm=function(e){const{width:t,height:C,rotationAngle:a,x:n,y:r}=e,l=Object(Zu.b)(Object($m.b)(e,t)),[i,o]=Object(qm.a)(a,0,0,0,l-C);return{height:l,x:Object(Zu.b)(n+i),y:Object(Zu.b)(r+o)}},Km=C(77),Qm=C(275);function Jm(e,t){return Object.fromEntries(Object.keys(t).map((C=>{const a=e[C]===sC.y,n=void 0!==e[C]&&!function(e,t){const C=e&&"object"==typeof e&&(e.type||e.color),a=t&&"object"==typeof t&&(t.type||t.color);return C&&a?Object(hn.a)(e,t):e===t}(e[C],t[C]);return a||n?[C,sC.y]:[C,t[C]]})))}var ef=function(e,t){const{state:{hasCurrentEditor:C,selectionInfo:a},actions:{selectionActions:n}}=Object(Qm.a)(),{clearEditing:r}=Object(F.d)((({actions:{clearEditing:e}})=>({clearEditing:e}))),l=Object(u.C)((()=>C?a:e.map((({content:e})=>e)).map(En.b).reduce(Jm,{})),[C,a,e]),i=Object(u.s)(((e,...C)=>t((({content:t})=>({content:e(t,...C)})),!0)),[t]),o=Object(u.G)(null),c=Object(u.s)(((...e)=>{o.current=e}),[o]);Object(u.y)((()=>{const e=o.current;e&&(i(...e),o.current=null)}),[e,o,i]);const s=Object(u.C)((()=>{const e=Object(En.a)();return C?{handleClickBold:()=>n.toggleBoldInSelection(),handleSelectFontWeight:n.setFontWeightInSelection,handleClickItalic:n.toggleItalicInSelection,handleClickUnderline:n.toggleUnderlineInSelection,handleClickUppercase:n.toggleUppercaseInSelection,handleSetLetterSpacing:n.setLetterSpacingInSelection,handleSetColor:n.setColorInSelection,handleResetFontWeight:async t=>{await r(),c(e.setFontWeight,t)}}:{handleClickBold:t=>i(e.toggleBold,t),handleSelectFontWeight:t=>i(e.setFontWeight,t),handleClickItalic:t=>i(e.toggleItalic,t),handleClickUnderline:t=>i(e.toggleUnderline,t),handleClickUppercase:t=>i(e.toggleUppercase,t),handleSetLetterSpacing:t=>i(e.setLetterSpacing,t),handleSetColor:t=>i(e.setColor,t),handleResetFontWeight:t=>i(e.setFontWeight,t)}}),[C,n,i,r,c]),d=Object(u.s)((()=>e.filter((({type:e})=>"text"===e)).length>0),[e]);return Object(ve.g)({key:["mod+b","mod+u","mod+i"]},(({key:e})=>{if(d)switch(e){case"b":s.handleClickBold();break;case"i":s.handleClickItalic();break;case"u":s.handleClickUnderline()}}),[s,d]),{textInfo:l,handlers:s}};function tf(){return(tf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Cf={MIN:.5,MAX:10},af={MIN:0,MAX:300},nf=Object(l.f)(NumericInput).withConfig({displayName:"style__StyledNumericInput",componentId:"sc-4ez79f-0"})(["flex-grow:1;"]),rf=l.f.div.withConfig({displayName:"style__Space",componentId:"sc-4ez79f-1"})(["flex:0 0 3px;"]),lf=Object(l.f)(ToggleButton).withConfig({displayName:"style__StyledToggle",componentId:"sc-4ez79f-2"})(["",";"],Qt);function of(e){return r.a.createElement(lf,tf({size:g.a.SMALL,variant:g.d.SQUARE},e))}var cf=function StylePanel({selectedElements:e,pushUpdate:t}){const{actions:{maybeEnqueueFontStyle:C}}=Object(A.b)(),a=ro(e,"textAlign"),n=ro(e,"lineHeight"),{textInfo:{isBold:l,isItalic:i,isUnderline:o,isUppercase:c,letterSpacing:s,fontWeight:d},handlers:{handleClickBold:p,handleClickItalic:m,handleClickUnderline:f,handleClickUppercase:b,handleSetLetterSpacing:g}}=ef(e,t),E=Object(u.s)(((e,t)=>g(gm(t,af))),[g]);Gl((({lineHeight:e})=>({lineHeight:gm(e,Cf)})),[]);const v=Object(u.s)((e=>()=>{t({textAlign:a===e?"":e},!0)}),[t,a]),y=!0===l,O=!0===i,M=!0===o,w=!0===c;return r.a.createElement(r.a.Fragment,null,r.a.createElement(ol,null,r.a.createElement(nf,{"aria-label":Object(h.__)("Line-height","web-stories"),isFloat:!0,value:n,min:Cf.MIN,max:Cf.MAX,suffix:r.a.createElement(Xe.a.LetterAHeight,null),onChange:(e,C)=>t({lineHeight:C},!0),allowEmpty:!0,isIndeterminate:sC.y===n,placeholder:sC.y===n?sC.x:null,containerStyleOverride:Jt}),r.a.createElement(rf,null),r.a.createElement(nf,{"aria-label":Object(h.__)("Letter-spacing","web-stories"),value:s,min:af.MIN,max:af.MAX,suffix:r.a.createElement(Xe.a.LetterAWidth,null),unit:"%",onChange:E,allowEmpty:!0,isIndeterminate:sC.y===s,placeholder:sC.y===s?sC.x:null,containerStyleOverride:Jt})),r.a.createElement(ol,null,r.a.createElement(of,{isToggled:"left"===a,onClick:v("left"),"aria-label":Object(h.__)("Align text left","web-stories")},r.a.createElement(Xe.a.AlignTextLeft,null)),r.a.createElement(of,{isToggled:"center"===a,onClick:v("center"),"aria-label":Object(h.__)("Align text center","web-stories")},r.a.createElement(Xe.a.AlignTextCenter,null)),r.a.createElement(of,{isToggled:"right"===a,onClick:v("right"),"aria-label":Object(h.__)("Align text right","web-stories")},r.a.createElement(Xe.a.AlignTextRight,null)),r.a.createElement(of,{isToggled:"justify"===a,onClick:v("justify"),"aria-label":Object(h.__)("Align text justified","web-stories")},r.a.createElement(Xe.a.AlignTextJustified,null)),r.a.createElement(of,{isToggled:y,onClick:()=>p(!y),"aria-label":Object(h.__)("Bold","web-stories")},r.a.createElement(Xe.a.LetterBBold,null)),r.a.createElement(of,{isToggled:O,onClick:async()=>{await C(e.map((({font:e,content:t})=>({font:e,fontStyle:O?"normal":"italic",fontWeight:d,content:Object(Km.a)(t)})))),m(!O)},"aria-label":Object(h.__)("Italic","web-stories")},r.a.createElement(Xe.a.LetterIItalic,null)),r.a.createElement(of,{isToggled:M,onClick:()=>f(!M),"aria-label":Object(h.__)("Underline","web-stories")},r.a.createElement(Xe.a.LetterUUnderline,null)),r.a.createElement(of,{isToggled:w,onClick:()=>b(!w),"aria-label":Object(h.__)("Uppercase","web-stories")},r.a.createElement(Xe.a.LetterTUppercase,null))))};var sf=function ColorControls({selectedElements:e,pushUpdate:t,textColorRef:C}){const{textInfo:{color:a},handlers:{handleSetColor:n}}=ef(e,t);return r.a.createElement(ol,null,r.a.createElement(Mr,{"data-testid":"text.color",value:a,onChange:n,allowsSavedColors:!0,label:Object(h.__)("Text color","web-stories"),labelId:"text-color-label",changedStyle:"color",ref:C,hasEyedropper:!0}))};var df=function(e){const t=[{label:sC.i[400],value:"400"}];return null!=e&&e.weights?e.weights.map((e=>({label:sC.i[e],value:e.toString()}))):t},uf=C(786);var pf=function(e=400,t){return e=parseInt(e),isNaN(parseInt(e))?400:t&&0!==t.length?t.reduce(((t,C)=>{t=parseInt(t),C=parseInt(C);const a=Math.abs(t-e),n=Math.abs(C-e);return a===n?t<C?t:C:n<a?C:t})):e};function mf(){return(mf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var ff=Object(u.j)((function FontPicker({selectedElements:e,pushUpdate:t,highlightStylesOverride:C},a){const n=ro(e,(({font:e})=>null==e?void 0:e.family)),{textInfo:{fontWeight:l,isItalic:i},handlers:{handleResetFontWeight:o}}=ef(e,t),c=i?"italic":"normal",{fonts:s=[],recentFonts:d=[],curatedFonts:p=[],customFonts:m=[],addRecentFont:f,maybeEnqueueFontStyle:b,ensureMenuFontsLoaded:g,ensureCustomFontsLoaded:E,getFontsBySearch:v}=Object(A.b)((({actions:e,state:t})=>({getFontsBySearch:e.getFontsBySearch,addRecentFont:e.addRecentFont,ensureMenuFontsLoaded:e.ensureMenuFontsLoaded,ensureCustomFontsLoaded:e.ensureCustomFontsLoaded,maybeEnqueueFontStyle:e.maybeEnqueueFontStyle,recentFonts:t.recentFonts,curatedFonts:t.curatedFonts,fonts:t.fonts,customFonts:t.customFonts}))),y=Object(u.s)((async C=>{await b(e.map((({content:e})=>({font:C,fontStyle:c,fontWeight:l,content:Object(Km.a)(e)})))),f(C),t({font:C},!0);const a=pf(400,C.weights);await o(a)}),[f,c,l,b,t,e,o]),O=Object(u.C)((()=>{const e=new Map;return s.forEach((t=>{e.set(t.id,t)})),e}),[s]),M=Object(u.s)((e=>{e.length&&(g(e.filter((e=>{var t;return"fonts.google.com"===(null===(t=O.get(e))||void 0===t?void 0:t.service)}))),E(e.filter((e=>{var t;return"custom"===(null===(t=O.get(e))||void 0===t?void 0:t.service)}))))}),[O,E,g]),w=Object(u.s)((({option:e,...t},C)=>r.a.createElement(uf.a.Option,mf({ref:C},t,{fontFamily:"fonts.google.com"===e.service?`'${e.name}::MENU'`:e.name}),n===e.id&&r.a.createElement(uf.a.Selected,{"aria-label":Object(h.__)("Selected","web-stories")}),e.name)),[n]),L=Object(u.C)((()=>[...null!=m&&m.length?[{label:Object(h.__)("Your fonts","web-stories"),options:m}]:[],...null!=d&&d.length?[{label:Object(h.__)("Recently used","web-stories"),options:d}]:[]]),[m,d]);return r.a.createElement(uf.a.DropDown,{ref:a,highlightStylesOverride:C,"data-testid":"font","aria-label":Object(h.__)("Font family","web-stories"),options:s,primaryOptions:p,primaryLabel:Object(h.__)("Recommended","web-stories"),priorityOptionGroups:L,searchResultsLabel:Object(h.__)("Search results","web-stories"),selectedId:sC.y===n?"":n,placeholder:sC.y===n?sC.x:n,hasSearch:!0,getOptionsByQuery:v,onChange:y,onObserve:M,renderer:Object(u.j)(w),disabled:!(null!=s&&s.length),dropDownLabel:Object(h.__)("Font","web-stories")})}));const hf={MIN:8,MAX:800},bf=l.f.div.withConfig({displayName:"font__Space",componentId:"sc-fz8wma-0"})(["flex:0 0 10px;"]),gf=Object(l.f)(NumericInput).withConfig({displayName:"font__StyledNumericInput",componentId:"sc-fz8wma-1"})(["flex-basis:80px;text-align:center;"]),Ef=Object(l.f)(Ii.a).withConfig({displayName:"font__StyledDropDown",componentId:"sc-fz8wma-2"})(["background-color:transparent;"]);var vf=function FontControls({selectedElements:e,pushUpdate:t,fontDropdownRef:C,highlightStylesOverride:a}){const n=ro(e,(({font:e})=>null==e?void 0:e.family)),l=ro(e,"fontSize"),{textInfo:{fontWeight:i,isItalic:o},handlers:{handleSelectFontWeight:c}}=ef(e,t),{fonts:s=[],maybeEnqueueFontStyle:d,getFontByName:p}=Object(A.b)((({actions:{maybeEnqueueFontStyle:e,getFontByName:t},state:{fonts:C}})=>({maybeEnqueueFontStyle:e,getFontByName:t,fonts:C}))),m=Object(u.C)((()=>df(p(n))),[p,n]),f=o?"italic":"normal",b=Object(u.s)((async(t,C)=>{await d(e.map((({font:e,content:t})=>({font:e,fontStyle:f,fontWeight:parseInt(C),content:Object(Km.a)(t)})))),c(C)}),[f,c,d,e]);return Gl((({fontSize:e})=>({fontSize:gm(e,hf)})),[]),r.a.createElement(r.a.Fragment,null,s&&r.a.createElement(ol,null,r.a.createElement(ff,{ref:C,selectedElements:e,pushUpdate:t,highlightStylesOverride:a})),r.a.createElement(ol,null,m&&r.a.createElement(r.a.Fragment,null,r.a.createElement(Ef,{ariaLabel:Object(h.__)("Font weight","web-stories"),placeholder:sC.x,options:m,selectedValue:sC.y===i?"":i,onMenuItemClick:b,selectButtonStylesOverride:Qt}),r.a.createElement(bf,null)),r.a.createElement(gf,{"aria-label":Object(h.__)("Font size","web-stories"),isFloat:!0,value:l,onChange:(e,C)=>t({fontSize:C},!0),min:hf.MIN,max:hf.MAX,isIndeterminate:sC.y===l,placeholder:sC.y===l?sC.x:null,containerStyleOverride:Jt})))},yf=C(556);function Of(){return(Of=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Mf=l.f.div.attrs({role:"listbox"}).withConfig({displayName:"pillGroup__Container",componentId:"sc-1wkuprr-0"})(["display:flex;flex:1;column-gap:4px;"]);var wf=function PillGroup({options:e,value:t,onSelect:C,...a}){return r.a.createElement(Mf,null,e.map((({id:e,label:n})=>r.a.createElement(yf.a,Of({key:e,isActive:e===t,onClick:()=>C(e),role:"option"},a),n))))};function Lf(e){var t,C;return null!=e&&null!==(t=e.padding)&&void 0!==t&&t.hasHiddenPadding?e.padding:{...null!==(C=e.padding)&&void 0!==C?C:{},hasHiddenPadding:!0,...["vertical","horizontal"].reduce(((t,C)=>{var a;return t[C]=((null==e||null===(a=e.padding)||void 0===a?void 0:a[C])||0)+sC.k[C],t}),{})}}function _f(e){var t,C;return null!=e&&null!==(t=e.padding)&&void 0!==t&&t.hasHiddenPadding?{...null!==(C=e.padding)&&void 0!==C?C:{},hasHiddenPadding:!1,...["vertical","horizontal"].reduce(((t,C)=>{var a;return t[C]=((null==e||null===(a=e.padding)||void 0===a?void 0:a[C])||0)-sC.k[C],t}),{})}:e.padding}function jf(e={},t="horizontal"){var C;return null!=e&&null!==(C=e.padding)&&void 0!==C&&C.hasHiddenPadding?sC.k[t]:0}const xf=Object(l.f)(ol).withConfig({displayName:"backgroundColor__FillRow",componentId:"sc-1wxsoqa-0"})(["align-items:flex-start;justify-content:space-between;button{flex:1;z-index:1;}"]),Zf=[{id:sC.b.NONE,label:Object(h.__)("None","web-stories")},{id:sC.b.FILL,label:Object(h.__)("Fill","web-stories")},{id:sC.b.HIGHLIGHT,label:Object(h.__)("Highlight","web-stories")}];var Af=function BackgroundControls({selectedElements:e,pushUpdate:t}){const C=io(e,"backgroundColor"),a=ro(e,"backgroundTextMode"),n=Object(u.G)(),l=Object(u.s)((e=>{t((t=>({backgroundTextMode:e,padding:[sC.b.FILL,sC.b.HIGHLIGHT].includes(e)?Lf(t):_f(t)})),!0)}),[t]),i=Object(u.s)((e=>{l(e)}),[l]);return r.a.createElement(r.a.Fragment,null,r.a.createElement(xf,{ref:n},r.a.createElement(wf,{value:a,onSelect:i,options:Zf,pillStyleOverride:Qt})),a!==sC.b.NONE&&r.a.createElement(ol,null,r.a.createElement(Mr,{"data-testid":"text.backgroundColor",allowsGradient:!0,allowsSavedColors:!0,value:C,onChange:e=>t({backgroundColor:e},!0),label:Object(h.__)("Background color","web-stories"),labelId:"background-color-label",changedStyle:"background",hasEyedropper:!0})))};function If(){return(If=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Tf={horizontal:0,vertical:0,locked:!0,hasHiddenPadding:!1},Sf={MIN:0,MAX:300},Rf=l.f.div.withConfig({displayName:"padding__Space",componentId:"sc-uy0gwa-0"})(["flex:0 0 8px;"]),kf=Object(l.f)(LockToggle).withConfig({displayName:"padding__LockToggle",componentId:"sc-uy0gwa-1"})([""," ",";"],(({isLocked:e})=>!e&&"\n position: absolute;\n right: 0;\n top: calc(100% - 8px);\n "),Qt),Pf=Object(l.f)(ol).withConfig({displayName:"padding__Row",componentId:"sc-uy0gwa-2"})(["position:relative;"]),Nf=l.f.div.withConfig({displayName:"padding__IconWrapper",componentId:"sc-uy0gwa-3"})(["width:44px;margin-left:6px;color:",";"," svg{width:22px;}"],(({theme:e})=>e.colors.divider.primary),(({reverse:e})=>e&&"transform: scaleY(-1);"));var Df=function PaddingControls({selectedElements:e,pushUpdateForObject:t,pushUpdate:C}){const a=oo(e.map((e=>({...e,padding:_f(e)}))),"padding",Tf),n=!0===a.locked,l=Object(u.s)((e=>{C((t=>{const{x:C,y:a,width:n,height:r}=t,l=e(t);return function({currentPadding:e,newPadding:t,x:C,y:a,width:n,height:r}){const l={};return"horizontal"in t&&(l.x=C-(t.horizontal-(e.horizontal||0)),l.width=n+2*(t.horizontal-(e.horizontal||0))),"vertical"in t&&(l.y=a-(t.vertical-(e.vertical||0)),l.height=r+2*(t.vertical-(e.vertical||0))),l}({x:C,y:a,height:r,width:n,currentPadding:t.padding,newPadding:l})})),t("padding",(t=>e({padding:t})),Tf,!0)}),[C,t]);Gl((({padding:{horizontal:e,vertical:t,...C}})=>({padding:{...C,horizontal:gm(e,Sf),vertical:gm(t,Sf)}})),[]);const i=n?{suffix:Object(h.__)("Padding","web-stories"),"aria-label":Object(h.__)("Padding","web-stories"),onChange:(e,t)=>{l((e=>({horizontal:t+jf(e,"horizontal"),vertical:t+jf(e,"vertical")})))},stretch:!0}:{suffix:Object(h.__)("Horizontal padding","web-stories"),"aria-label":Object(h.__)("Horizontal padding","web-stories"),onChange:(e,t)=>{l((e=>({horizontal:t+jf(e,"horizontal")})))}};return r.a.createElement(r.a.Fragment,null,r.a.createElement(Pf,null,r.a.createElement(NumericInput,If({value:a.horizontal,isIndeterminate:a.horizontal===sC.y,placeholder:a.horizontal===sC.y?sC.x:null},i,{containerStyleOverride:Jt})),n&&r.a.createElement(Rf,null),r.a.createElement(kf,{isLocked:n,onClick:()=>l((e=>n?{locked:!1}:{locked:!0,horizontal:e.padding.horizontal,vertical:e.padding.horizontal+jf(e,"vertical")-jf(e,"horizontal")})),"aria-label":Object(h.__)("Toggle padding ratio lock","web-stories")}),!n&&r.a.createElement(Nf,{reverse:!0},r.a.createElement(Xe.a.TurningLine,null))),!n&&r.a.createElement(Pf,null,r.a.createElement(NumericInput,{isIndeterminate:a.vertical===sC.y,placeholder:a.vertical===sC.y?sC.x:null,suffix:Object(h.__)("Vertical padding","web-stories"),value:a.vertical,onChange:(e,t)=>{l((e=>({vertical:Number(t)+jf(e,"vertical")})))},"aria-label":Object(h.__)("Vertical padding","web-stories"),containerStyleOverride:Jt}),r.a.createElement(Nf,null,r.a.createElement(Xe.a.TurningLine,null))))},zf=C(287);function Bf(e){const{r:t,g:C,b:a,a:n=1}=e;return zf.relativeLuminance({r:t/255,g:C/255,b:a/255,a:n})}function Ff(e,t,C){const a=zf.contrast(e,t);return{ratio:a,WCAG_AA:zf.aa(a,C)}}function Hf(e,t,C){return Ff(Bf({r:e[0],g:e[1],b:e[2]}),Bf({r:t[0],g:t[1],b:t[2]}),C)}var Gf=function(e){const{pageCanvasData:t,setPageCanvasData:a,pageCanvasPromise:n,setPageCanvasPromise:r,fullbleedContainer:l}=Object(F.d)((({actions:e,state:t})=>({pageCanvasData:t.pageCanvasData,pageCanvasPromise:t.pageCanvasPromise,setPageCanvasData:e.setPageCanvasData,setPageCanvasPromise:e.setPageCanvasPromise,fullbleedContainer:t.fullbleedContainer}))),{selectedElementIds:i,currentPageHash:o}=Object(F.o)((({state:{selectedElementIds:e,currentPageHash:t}})=>({selectedElementIds:e,currentPageHash:t}))),{zoomSetting:c,setZoomSetting:s}=Object(F.l)((({state:{zoomSetting:e},actions:{setZoomSetting:t}})=>({zoomSetting:e,setZoomSetting:t}))),d=Object(u.s)((()=>o!==t.currentPage),[o,t]),p=Object(u.s)(((u,p=!1)=>{if((p||c===sC.G.FIT)&&(!t||d())){p&&s(sC.G.FIT);const t=e=>{u?u(e):a({canvas:e,currentPage:o}),r(null)},c=()=>{p&&u(),r(null)};!n&&l?C.e(197).then(C.bind(null,1052)).then((C=>{const a=1===i.length,n=e&&a,o=C.toCanvas(l,{fontEmbedCss:"",pixelRatio:1,filter:n&&(e=>{var t;return(null==e||null===(t=e.dataset)||void 0===t?void 0:t.elementId)!==i[0]})});r(o),o.then(t).catch(c)})).catch((()=>{})):p&&setTimeout((()=>{n.then(t).catch((()=>c()))}))}}),[l,t,n,r,a,s,c,d,o,i,e]);return{calculateAccessibleTextColors:Object(u.s)(((e,C=!0,a=!1)=>new Promise((n=>{C||c===sC.G.FIT||n(null);const r=t=>{try{const C=t.getContext("2d"),a=(t.width/Q.e-t.width/Q.g)/2,r=Object(Zu.i)({...e,height:e.height?e.height:Object($m.b)(e,e.width)},t.width,t.height-2*a),{x:l,y:i,width:o,height:c}=r,s=i+a,d=C.getImageData(l,s,o,c).data,{fontSize:u}=e;n(function(e,t){const C=[255,255,255,255],a=[0,0,0,255],n=[],r={r:255,g:255,b:255,a:1},l={r:0,g:0,b:0,a:1};for(let t=0;t<e.length;t+=4)n.push([e[t],e[t+1],e[t+2],e[t+3]]);const i=n.map((e=>Hf(a,e,t)));if(!i.some((({WCAG_AA:e})=>!e)))return{color:l};const o=n.map((e=>Hf(C,e,t)));return o.some((({WCAG_AA:e})=>!e))?i.reduce(((e,t)=>e+t.ratio),0)<o.reduce(((e,t)=>e+t.ratio),0)?{color:l,backgroundColor:{...r,a:.7}}:{color:r,backgroundColor:{...l,a:.7}}:{color:r}}(d,u))}catch(e){n({color:null})}};!t||d()&&!a?p(r,C):r(t.canvas)}))),[p,t,d,c]),generateCanvasFromPage:p}};var Vf=function(e,t){const C=Object(En.a)(),{setColor:a}=C,{calculateAccessibleTextColors:n}=Gf(!0);return async()=>{const C=await n(e),{color:r,backgroundColor:l}=C;if(l||r){const C=l?{backgroundColor:{color:l},backgroundTextMode:sC.b.HIGHLIGHT,padding:Lf(e)}:null,n=r?a(e.content,{color:r}):e.content;t({...C,content:n})}}};const Uf=Object(l.f)(b.a).attrs({variant:g.d.SQUARE,type:g.c.TERTIARY,size:g.a.SMALL}).withConfig({displayName:"panelHeader__AutoStyleButton",componentId:"sc-97lklc-0"})(["",";"],(({theme:e})=>X.c.focusableOutlineCSS(e.colors.border.focus,"#1d1f20")));var Wf=function PanelHeader({selectedElements:e,pushUpdate:t}){const{state:{isCollapsed:C}}=Object(u.u)(Wc),a=Vf(e[0],(e=>{t(e,!0),Object(f.g)("auto_style_text")})),n=Object(h.__)("Text","web-stories");return r.a.createElement(us,{ariaLabel:n,secondaryAction:C?null:r.a.createElement(Ke.a,{title:Object(h.__)("Adaptive text colors","web-stories")},r.a.createElement(Uf,{"aria-label":Object(h.__)("Adaptive text colors","web-stories"),onClick:a,disabled:(null==e?void 0:e.length)>1},r.a.createElement(Xe.a.ColorBucket,null)))},n)};var Yf=function({pushUpdate:e}){Gl(Xm,[]);const{selectedElements:t}=Object(Z.e)((({state:{selectedElements:e}})=>({selectedElements:e}))),C=Object(u.G)(null),a=Object(u.s)((t=>{e((e=>({...t(e),...C.current})),!0),C.current=null}),[e]),{handlers:{handleSetColor:n,handleSetLetterSpacing:r,handleClickUnderline:l,handleClickItalic:i,handleSelectFontWeight:o}}=ef(t,a);return Object(u.s)((e=>{const{color:t,fontWeight:a,isItalic:c,isUnderline:s,letterSpacing:d,...u}=e;C.current=u,n(t),r(d),o(a),l(s),i(c)}),[n,r,l,i,o])};var $f=function({activeIndex:e,setActiveIndex:t,groupRef:C}){Object(ve.h)(C,{key:["up","down","left","right"]},(({key:a})=>{if(C.current){const n=((e,t)=>{switch(e){case"ArrowUp":return-t;case"ArrowDown":return t;case"ArrowLeft":return-1;case"ArrowRight":return 1;default:return 0}})(a,2),r=C.current.querySelectorAll("button:not([disabled])"),l=r.length-1,i=(null!=e?e:0)+n,o=Math.max(0,Math.min(l,i));t(o),r[o]&&r[o].focus()}}),[e,t,C])};const qf=l.f.button.withConfig({displayName:"styleItem__PresetButton",componentId:"sc-1d2ufms-0"})(["background-color:",";border-color:transparent;position:relative;cursor:pointer;border-width:0;border-radius:4px;padding:3px;height:100%;width:100%;display:flex;justify-content:center;align-items:center;svg{width:","px;height:","px;position:absolute;top:calc(50% - ","px);left:calc(50% - ","px);color:",";filter:drop-shadow(0px 0px 4px rgba(0,0,0,0.4));}",""],(({theme:e})=>e.colors.interactiveBg.secondaryNormal),32,32,16,16,(({theme:e})=>e.colors.fg.primary),Qt),Xf=l.f.span.withConfig({displayName:"styleItem__HighLight",componentId:"sc-1d2ufms-1"})(["padding:0 2px;"," box-decoration-break:clone;"],(({background:e})=>Object(J.a)(e))),Kf=l.f.div.withConfig({displayName:"styleItem__TextWrapper",componentId:"sc-1d2ufms-2"})(["position:relative;display:inline-block;line-height:","px;max-height:","px;overflow:hidden;border-radius:4px;padding:3px;max-width:100%;"," font-size:12px;",""],20,43,(({styles:e})=>e),(({background:e})=>e?Object(J.a)(e):null));var Qf=function StyleItem({style:e,i:t,activeIndex:C,handleOnClick:a,isEditMode:n}){const{selectedElements:l}=Object(Z.e)((({state:{selectedElements:e}})=>({selectedElements:e})));if(!e)return null;const i=Object(Km.a)(l[0].content)||Object(h.__)("Text","web-stories");return r.a.createElement(qf,{tabIndex:C===t?0:-1,style:e,onClick:()=>a(e),"aria-label":n?Object(h.__)("Delete style","web-stories"):Object(h.__)("Apply style","web-stories")},(()=>{const t=e.backgroundTextMode===sC.b.HIGHLIGHT,C=e.backgroundTextMode===sC.b.FILL;return r.a.createElement(Kf,{styles:Mn(e,!0),background:C?e.backgroundColor:null},t?r.a.createElement(Xf,{background:e.backgroundColor},i):i)})(),n&&r.a.createElement(Xe.a.Cross,null))};const Jf=l.f.div.withConfig({displayName:"styleGroup__Group",componentId:"sc-1ey81kd-0"})(["display:grid;grid-template-columns:repeat(2,1fr);grid-column-gap:20px;grid-row-gap:16px;"]),eh=l.f.div.withConfig({displayName:"styleGroup__ButtonWrapper",componentId:"sc-1ey81kd-1"})(["height:","px;width:","px;"],sC.D,(({width:e})=>e));var th=function StyleGroup({styles:e,isEditMode:t=!1,handleClick:C,buttonWidth:a=128}){const[n,l]=Object(u.I)(0),i=Object(u.G)(null);return $f({activeIndex:n,setActiveIndex:l,groupRef:i,type:sC.C.STYLE}),r.a.createElement(Jf,{ref:i},e.map(((e,l)=>r.a.createElement(eh,{key:JSON.stringify(e),width:a},r.a.createElement(Qf,{style:e,i:l,activeIndex:n,handleOnClick:C,isEditMode:t})))))};function Ch(){return(Ch=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const ah=l.f.div.withConfig({displayName:"header__Wrapper",componentId:"sc-l59k93-0"})(["display:flex;justify-content:space-between;align-items:center;height:","px;padding:4px 8px 4px 8px;position:relative;border-bottom:1px solid ",";"],44,(({theme:e})=>e.colors.divider.tertiary)),nh=l.f.div.withConfig({displayName:"header__Actions",componentId:"sc-l59k93-1"})(["display:flex;margin-left:auto;"]),rh=Object(l.f)(b.a).withConfig({displayName:"header__StyledButton",componentId:"sc-l59k93-2"})(["margin-left:8px;",";"],Qt);var lh=function({children:e,handleClose:t,isEditMode:C=!1,setIsEditMode:a=(()=>{})}){const n=Object(u.G)();Object(u.y)((()=>{var e;null===(e=n.current)||void 0===e||e.focus()}),[]);const l={type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE,onClick:e=>{e.stopPropagation(),a(!C)},isEditMode:C};return r.a.createElement(ah,null,e,r.a.createElement(nh,null,r.a.createElement(rh,Ch({},l,{"aria-label":C?Object(h.__)("Exit edit mode","web-stories"):Object(h.__)("Edit styles","web-stories")}),C?Object(h.__)("Done","web-stories"):r.a.createElement(Xe.a.Pencil,null)),r.a.createElement(rh,{"aria-label":Object(h.__)("Close","web-stories"),onClick:t,type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE,ref:n},r.a.createElement(Xe.a.Cross,null))))};var ih=function({onEmpty:e}){const{globalStoryStyles:t,updateStory:C}=Object(F.o)((({state:{story:{globalStoryStyles:e}},actions:{updateStory:t}})=>({globalStoryStyles:e,updateStory:t}))),{textStyles:a}=t||{};return Object(u.s)((n=>{const r=a.filter((e=>e!==n));C({properties:{globalStoryStyles:{...t,textStyles:r}}}),0===r.length&&e()}),[a,C,t,e])};const oh="DELETE_STYLE_PRESET_DIALOG_DISMISSED",ch=l.f.label.withConfig({displayName:"confirmationDialog__Label",componentId:"sc-1txkiib-0"})(["margin-left:12px;"]),sh=l.f.footer.withConfig({displayName:"confirmationDialog__CheckboxWrapper",componentId:"sc-1txkiib-1"})(["display:flex;margin-top:12px;padding:14px 0 0 9px;border-top:1px solid ",";"],(({theme:e})=>e.colors.divider.primary));var dh=function({onClose:e,onPrimary:t}){const[C,a]=Object(u.I)(un.b.getItemByKey(un.a[oh])),n=Object(h.__)("This is a global style. Deleting this style will remove it from the Saved Styles across all stories and the style will no longer be available to any other users on the site.","web-stories"),l=`cb-${Object(Dn.a)()}`;return r.a.createElement(Be.a,{isOpen:!0,onClose:e,secondaryText:Object(h.__)("Cancel","web-stories"),onPrimary:t,primaryText:Object(h.__)("Delete","web-stories")},r.a.createElement(iC.a,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},n),r.a.createElement(sh,null,r.a.createElement(oC.a,{id:l,checked:C,onChange:()=>{un.b.setItemByKey(un.a[oh],!C),a(!C)}}),r.a.createElement(ch,{htmlFor:l},r.a.createElement(iC.a,{as:"span",size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Don't ask for confirmation again.","web-stories")))))};const uh=l.f.div.withConfig({displayName:"styleManager__Container",componentId:"sc-x3j1o0-0"})(["border-radius:8px;background:",";width:256px;user-select:none;display:flex;flex-direction:column;align-items:stretch;overflow:hidden;&.style-manager-appear{opacity:0.01;margin-top:-10px;&.style-manager-appear-active{opacity:1;margin-top:0;transition:300ms ease-out;transition-property:opacity,margin-top;}}"],(({theme:e})=>e.colors.bg.secondary)),ph=l.f.div.withConfig({displayName:"styleManager__Body",componentId:"sc-x3j1o0-1"})(["display:flex;margin:8px 12px 16px;"]),mh=Object(l.f)(iC.a).attrs({size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL}).withConfig({displayName:"styleManager__StyledText",componentId:"sc-x3j1o0-2"})(["margin:0 0 0 8px;color:",";"],(({theme:e})=>e.colors.fg.primary));var fh=function StyleManager({styles:e,onClose:t,applyStyle:C}){const[a,n]=Object(u.I)(!1),[l,i]=Object(u.I)(!1),[o,c]=Object(u.I)(null),s=Object(u.G)(null),d=ih({onEmpty:()=>t()});return Object(u.z)(s,(()=>{l||t()}),[l]),r.a.createElement(BC.a,{nodeRef:s,in:!0,appear:!0,classNames:"style-manager",timeout:300},r.a.createElement(uh,{role:"dialog","aria-label":Object(h.__)("Style presets manager","web-stories"),ref:s},r.a.createElement(lh,{handleClose:t,isEditMode:a,setIsEditMode:n},r.a.createElement(mh,null,Object(h.__)("Saved Styles","web-stories"))),r.a.createElement(ph,null,r.a.createElement(th,{styles:[...e].reverse(),handleClick:e=>{if(!a)return void C(e);un.b.getItemByKey(un.a[oh])?d(e):(i(!0),c(e))},isEditMode:a,buttonWidth:106})),l&&r.a.createElement(dh,{onClose:()=>i(!1),onPrimary:()=>{d(o),c(null),i(!1)}})))};const hh=l.f.div.withConfig({displayName:"stylePresets__PresetsHeader",componentId:"sc-hdmthb-0"})(["display:flex;padding:8px 0;justify-content:space-between;"]),bh=l.f.div.withConfig({displayName:"stylePresets__StylesWrapper",componentId:"sc-hdmthb-1"})([""]),gh=Object(l.f)(iC.a).withConfig({displayName:"stylePresets__SubHeading",componentId:"sc-hdmthb-2"})(["color:",";margin:6px 0;font-weight:",";"],(({theme:e})=>e.colors.fg.secondary),(({theme:e})=>e.typography.weight.bold)),Eh=Object(l.f)(b.a).withConfig({displayName:"stylePresets__StyledButton",componentId:"sc-hdmthb-3"})(["margin-left:auto;"]),vh=Object(l.f)(b.a).withConfig({displayName:"stylePresets__StyledMoreButton",componentId:"sc-hdmthb-4"})(["",";margin:12px 0;padding:0 16px;justify-content:center;align-self:center;svg{transform:rotate(-90deg);height:32px;width:32px;margin-left:-4px;}"],Qt),yh=l.f.div.withConfig({displayName:"stylePresets__NoStylesWrapper",componentId:"sc-hdmthb-5"})(["display:flex;justify-content:center;align-items:center;width:calc(100% + 32px);margin:0 0 -8px -16px;background-color:",";height:64px;"],(({theme:e})=>e.colors.opacity.black24)),Oh=Object(l.f)(iC.a).withConfig({displayName:"stylePresets__NoStylesText",componentId:"sc-hdmthb-6"})(["color:",";"],(({theme:e})=>e.colors.fg.tertiary)),Mh={x:20};var wh=function PresetPanel({pushUpdate:e}){const{globalStoryStyles:t}=Object(F.o)((({state:{story:{globalStoryStyles:e}}})=>({globalStoryStyles:e}))),{refs:{inspector:C}}=Cr(),a=Object(u.G)(null),[n,l]=Object(u.I)(!1),{textStyles:i}=t,o=i.length>0,c=Yf({pushUpdate:e}),{addGlobalPreset:s}=xn({presetType:sC.C.STYLE}),d=e=>{c(e)};return r.a.createElement(r.a.Fragment,null,r.a.createElement(hh,null,r.a.createElement(gh,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Recently Saved Styles","web-stories")),r.a.createElement(Eh,{type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE,onClick:s,"aria-label":Object(h.__)("Add style","web-stories")},r.a.createElement(Xe.a.Plus,null))),o&&r.a.createElement(r.a.Fragment,null,r.a.createElement(bh,null,r.a.createElement(th,{styles:[...i].reverse().slice(0,2),handleClick:d})),r.a.createElement(vh,{ref:a,type:g.c.PLAIN,size:g.a.SMALL,variant:g.d.RECTANGLE,onClick:()=>l(!0)},Object(h.__)("More styles","web-stories"),r.a.createElement(Xe.a.ChevronDownSmall,null)),r.a.createElement(zC.a,{anchor:a,dock:C,isOpen:n,placement:DC.a.LEFT_START,spacing:Mh,renderContents:()=>r.a.createElement(fh,{styles:i,applyStyle:d,onClose:()=>l(!1)})})),!o&&r.a.createElement(yh,null,r.a.createElement(Oh,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("No Styles Saved","web-stories"))))};function Lh(){return(Lh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const _h=l.f.section.withConfig({displayName:"textStyle__SubSection",componentId:"sc-1wpn7wm-0"})(["border-top:1px solid ",";display:flex;flex-direction:column;"],(({theme:e})=>e.colors.border.defaultNormal)),jh=Object(l.f)(iC.a).withConfig({displayName:"textStyle__SubHeading",componentId:"sc-1wpn7wm-1"})(["color:",";margin:14px 0;font-weight:",";"],(({theme:e})=>e.colors.fg.secondary),(({theme:e})=>e.typography.weight.bold));var xh=function(e){const{dropdownHighlight:t,colorHighlight:C,resetHighlight:a,cancelHighlight:n}=jc((e=>({dropdownHighlight:e[Ox.FONT],colorHighlight:e[Ox.TEXT_COLOR],resetHighlight:e.onFocusOut,cancelHighlight:e.cancelEffect}))),[l,i]=Object(u.I)(!1);return Gl(Xm,[]),r.a.createElement(Zh,{name:"textStyle",onAnimationEnd:()=>a(),isPersistable:!1,$_css:((null==t?void 0:t.showEffect)||(null==C?void 0:C.showEffect))&&Ux.FLASH},r.a.createElement(Wf,e),r.a.createElement(hs,null,r.a.createElement(vf,Lh({},e,{fontDropdownRef:e=>{e&&null!=t&&t.focus&&null!=t&&t.showEffect&&(e.focus(),i(!0))},highlightStylesOverride:l?Ux.OUTLINE:[]})),r.a.createElement(cf,e),r.a.createElement(sf,Lh({},e,{textColorRef:e=>{e&&null!=C&&C.focus&&null!=C&&C.showEffect&&(e.addEventListener("keydown",n,{once:!0}),e.focus(),i(!1))}})),r.a.createElement(_h,null,r.a.createElement(jh,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Text Box","web-stories")),r.a.createElement(Af,e),r.a.createElement(Df,e)),r.a.createElement(_h,null,r.a.createElement(wh,e))))},Zh=Object(l.f)(Xc).withConfig({displayName:"textStyle___StyledPanel",componentId:"sc-1wpn7wm-2"})(["",""],(e=>e.$_css));const Ah={alt:null,poster:null,height:0,width:0},Ih={MAX:1e3},Th=Object(l.f)(al).withConfig({displayName:"videoAccessibility__StyledMedia",componentId:"sc-1owogo0-0"})(["height:114px;width:64px;"]),Sh=l.f.div.withConfig({displayName:"videoAccessibility__InputsWrapper",componentId:"sc-1owogo0-1"})(["align-self:flex-start;margin-left:16px;"]),Rh=Object(l.f)(iC.a).withConfig({displayName:"videoAccessibility__StyledText",componentId:"sc-1owogo0-2"})(["color:",";margin-bottom:10px;"],(({theme:e})=>e.colors.fg.secondary));var kh=function VideoAccessibilityPanel({selectedElements:e,pushUpdate:t}){const C=oo(e,"resource",Ah),a=ro(e,"alt",C.alt),{height:n,width:l}=C,i=ro(e,"poster"),o=ro(e,"poster",C.poster),{allowedImageMimeTypes:c,allowedImageFileTypes:s,capabilities:{hasUploadMediaAction:d}}=Object(L.c)(),p=Object(u.s)((e=>{(null==e?void 0:e.src)!==i&&t({poster:null==e?void 0:e.src},!0)}),[t,i]),m=Object(u.C)((()=>{let e=Object(h.__)("No file types are currently supported.","web-stories");return s.length&&(e=Object(h.sprintf)(
|
132 |
/* translators: %s: list of allowed file types. */
|
133 |
-
Object(h.__)("Please choose only %s as a poster.","web-stories"),Object(h.translateToExclusiveList)(
|
134 |
/* translators: %s: list of allowed file types. */
|
135 |
-
Object(h.__)("Please choose only %s to insert into page.","web-stories"),Object(h.translateToExclusiveList)(a)),o=Object(u.s)((e=>{t({src:e.src,id:e.id,mimeType:e.mimeType})}),[t]),c=Object(u.s)((e=>r.a.createElement(Qh,{onClick:e,type:g.c.SECONDARY,size:g.a.SMALL,variant:g.d.RECTANGLE},Object(h.__)("Upload an audio file","web-stories"))),[]);return r.a.createElement(r.a.Fragment,null,!(null!=e&&e.src)&&n&&r.a.createElement(ol,{expand:!0},r.a.createElement(l,{onSelect:o,onSelectErrorMessage:i,type:C,title:Object(h.__)("Upload an audio file","web-stories"),buttonInsertText:Object(h.__)("Select audio file","web-stories"),render:c})),(null==e?void 0:e.src)&&r.a.createElement(ol,null,r.a.createElement(Xh,{title:null==e?void 0:e.src.substring((null==e?void 0:e.src.lastIndexOf("/"))+1),src:null==e?void 0:e.src,mimeType:null==e?void 0:e.mimeType}),r.a.createElement(Ke.a,{hasTail:!0,title:Object(h.__)("Remove file","web-stories")},r.a.createElement(Kh,{"aria-label":Object(h.__)("Remove file","web-stories"),type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE,onClick:()=>t(null)},r.a.createElement(Xe.a.Trash,null)))))};const eb=Object(l.f)(iC.a).attrs({size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL}).withConfig({displayName:"backgroundAudio__HelperText",componentId:"sc-1hcfdjv-0"})(["color:",";"],(({theme:e})=>e.colors.fg.secondary));var tb=function PageBackgroundAudioPanel(){const{capabilities:{hasUploadMediaAction:e}}=Object(F.g)(),{backgroundAudio:t,updateCurrentPageProperties:C}=Object(F.o)((e=>{var t;return{updateCurrentPageProperties:e.actions.updateCurrentPageProperties,backgroundAudio:null===(t=e.state.currentPage)||void 0===t?void 0:t.backgroundAudio}})),a=Object(u.s)((e=>{C({properties:{backgroundAudio:e}})}),[C]);return t||e?r.a.createElement(gs,{name:"pageBackgroundAudio",title:Object(h.__)("Page Background Audio","web-stories"),collapsedByDefault:!1},r.a.createElement(ol,null,r.a.createElement(eb,null,Object(h.__)("Select an audio file that plays while this page is in view.","web-stories"))),r.a.createElement(Jh,{backgroundAudio:t,updateBackgroundAudio:a})):null};var Cb=function(){const e=Object(u.G)([]),t=Object(u.s)((t=>{const C=e.current;return C.push(t),()=>{C.splice(C.indexOf(t),1)}}),[]);return Object(u.C)((()=>[e.current,t]),[t])};var ab=function(e,t,C){const a="function"==typeof t?t(e):t;if(!a)return{};let n=Object.keys(a);return n=n.filter((e=>a[e]!==sC.y)),C&&(n=n.filter((e=>""!==a[e]))),0===n.length?{}:Object.fromEntries(n.map((e=>[e,a[e]])))},nb=C(33);const rb=Object.values(nb.a);var lb=function(e){if(0===e.length)return[];if(1===e.length&&e[0].isBackground){const t=[];return!e[0].isDefaultBackground&&(t.push({type:nb.a.PAGE_BACKGROUND,Panel:pm}),t.push({type:nb.a.FILTER,Panel:zu}),t.push({type:nb.a.ANIMATION,Panel:Cu})),"video"===e[0].type?(t.push({type:nb.a.VIDEO_OPTIONS,Panel:Wh}),t.push({type:nb.a.CAPTIONS,Panel:_u}),t.push({type:nb.a.VIDEO_ACCESSIBILITY,Panel:kh})):["gif","image"].includes(e[0].type)?t.push({type:nb.a.IMAGE_ACCESSIBILITY,Panel:Gu}):t.unshift({type:nb.a.PAGE_BACKGROUND,Panel:pm}),t.push({type:nb.a.PAGE_ATTACHMENT,Panel:nm}),t.push({type:nb.a.PAGE_BACKGROUND_AUDIO,Panel:tb}),t}return e.map((({type:e})=>Ce.f.find((t=>t.type===e)).panels)).reduce(((e,t)=>{return C=t,e.filter((e=>C.includes(e)));var C}),rb).map((e=>{switch(e){case nb.a.ANIMATION:return{type:e,Panel:Cu};case nb.a.PAGE_BACKGROUND:return null;case nb.a.FILTER:return{type:e,Panel:zu};case nb.a.SIZE_POSITION:return{type:e,Panel:Ym};case nb.a.LINK:return{type:e,Panel:Qp};case nb.a.TEXT_STYLE:return{type:e,Panel:xh};case nb.a.SHAPE_STYLE:return{type:e,Panel:fm};case nb.a.BORDER:return{type:e,Panel:Eu};case nb.a.VIDEO_OPTIONS:return{type:e,Panel:Wh};case nb.a.CAPTIONS:return{type:e,Panel:_u};case nb.a.VIDEO_ACCESSIBILITY:return{type:e,Panel:kh};case nb.a.IMAGE_ACCESSIBILITY:return{type:e,Panel:Gu};case nb.a.ELEMENT_ALIGNMENT:return{type:e,Panel:Pu};default:throw new Error(`Unknown panel: ${e}`)}})).filter((e=>e))};var ib=function(){const{selectedElementIds:e,selectedElements:t,selectedElementAnimations:C,deleteSelectedElements:a,updateElementsById:n,updateAnimationState:r}=Object(F.o)((({state:{selectedElementIds:e,selectedElements:t,selectedElementAnimations:C},actions:{deleteSelectedElements:a,updateElementsById:n,updateAnimationState:r}})=>({selectedElementIds:e,selectedElements:t,selectedElementAnimations:C,deleteSelectedElements:a,updateElementsById:n,updateAnimationState:r}))),l=Object(u.C)((()=>lb(t)),[t]),[i,o]=Cb(),c=Object(u.s)((t=>{n({elementIds:e,properties:e=>ab(e,t,!0)})}),[e,n]),s=Object(u.s)((e=>t=>(i.forEach((C=>C(c,e,t))),t)),[c,i]);return Object(u.y)((()=>{const e={},t=o(((t,C,a)=>{c===t&&(e[C]=a)}));return()=>{t(),Object.values(e).forEach((e=>e()))}}),[c,o]),Object(u.C)((()=>({panels:l,createSubmitHandlerForPanel:s,panelProperties:{onSetProperties:c,deleteSelectedElements:a,selectedElements:t,selectedElementAnimations:C,updateAnimationState:r}})),[l,s,c,a,t,C,r])};function ob(){return(ob=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const cb=l.f.form.withConfig({displayName:"designPanel__Form",componentId:"sc-flfuee-0"})(["padding:0;margin:0;"]),sb=l.f.input.attrs({type:"submit"}).withConfig({displayName:"designPanel__AutoSubmitButton",componentId:"sc-flfuee-1"})(["display:none;"]);var db=function({panelType:e,selectedElements:t,onSetProperties:C,registerSubmitHandler:a,...n}){const l=Object(u.G)(null),[i,o]=Cb(),c=Object(u.C)((()=>({isMultiple:t.length>1,registerPresubmitHandler:o})),[t,o]),[s,d]=Object(u.I)({}),p=Object(u.C)((()=>t.map((e=>({...e,...s[e.id]})))),[t,s]),m=Object(u.s)((e=>{if(0===Object.keys(e).length)return;const a=e;i.length>0&&t.forEach((t=>{const C=ab(t,e[t.id],!0);let n=C;i.forEach((e=>{const a=e({...t,...n},C,t);n={...n,...a}})),a[t.id]=n})),C((e=>a[e.id]))}),[i,t,C]),f=a(Object(u.s)((e=>{e&&(e.preventDefault(),d({})),m(s)}),[m,s])),h=Object(u.s)((()=>{setTimeout((()=>{const e=l.current;e&&e.dispatchEvent(new window.Event("submit",{cancelable:!0,bubbles:!0}))}))}),[]),b=Object(u.s)(((e,C=!1)=>{d((C=>{const a={};return t.forEach((t=>{const n={...t,...C[t.id]},r=ab(n,e,!1);a[t.id]={...C[t.id],...r}})),a})),C&&h()}),[t,h]),g=Object(u.s)(((e,t,C,a=!1)=>{b((a=>{const n=a[e]||C;return{[e]:t?{...n,...ab(n,t,!1)}:null}}),a)}),[b]),E=e;return r.a.createElement(cb,{ref:l,onSubmit:f},r.a.createElement(sb,null),r.a.createElement(Fl.Provider,{value:c},r.a.createElement(E,ob({selectedElements:p,submittedSelectedElements:t,pushUpdate:b,pushUpdateForObject:g,submit:h},n))))};function ub(){return(ub=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const pb=l.f.div.withConfig({displayName:"designPanels__NoSelection",componentId:"sc-10bh8tc-0"})(["height:100%;display:flex;justify-content:center;align-items:center;"]),mb=Object(l.f)(iC.a).withConfig({displayName:"designPanels__Note",componentId:"sc-10bh8tc-1"})(["color:",";"],(({theme:e})=>e.colors.fg.secondary));var fb=function DesignPanels(){const{panels:e,createSubmitHandlerForPanel:t,panelProperties:C}=ib();return null!=e&&e.length?e.map((({Panel:e,type:a})=>r.a.createElement(db,ub({key:a,panelType:e,registerSubmitHandler:t(a)},C)))):r.a.createElement(pb,null,r.a.createElement(mb,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.MEDIUM},Object(h.__)("Nothing selected","web-stories")))};const hb=l.f.div.withConfig({displayName:"designInspector__Wrapper",componentId:"sc-quf4b9-0"})(["height:100%;flex-direction:column;justify-content:space-between;display:flex;"]),bb=l.f.div.withConfig({displayName:"designInspector__TopPanels",componentId:"sc-quf4b9-1"})(["overflow:auto;flex:1;"]),gb=l.f.div.withConfig({displayName:"designInspector__BottomPanels",componentId:"sc-quf4b9-2"})([""]);var Eb=function DesignInspector(){const e=Object(F.o)((({actions:e})=>e.updateAnimationState)),t=Object(u.s)((()=>e({animationState:te.l.RESET})),[e]);return r.a.createElement(hb,null,r.a.createElement(bb,{onFocus:t},r.a.createElement(fb,null)),r.a.createElement(gb,null,r.a.createElement(Gp,null)))};const vb=new Set([Zc,xc]);var yb=function InspectorProvider({inspectorTabs:e,children:t}){const{actions:{getAuthors:C}}=Object(_.c)(),{selectedElementIds:a,currentPage:n}=Object(Z.e)((({state:e})=>({selectedElementIds:e.selectedElementIds,currentPage:e.currentPage}))),{tab:l}=jc((({tab:e})=>({tab:e})));Object(u.y)((()=>{vb.has(l)&&(c(l),Object(f.g)("quick_action_tab_change",{name:l}))}),[l]);const i=Object(u.G)(null),[o,c]=Object(u.I)(xc),[s,d]=Object(u.I)([]),[p,m]=Object(u.I)(null),b=Object(u.G)(),g=Object(u.G)(o),E=Object(u.G)(null),v=Object(u.G)(null),y=Object(u.C)((()=>({[xc]:E,[Zc]:v})),[]),[O,M]=Object(u.I)(!1),w=Object(u.s)((e=>{b.current=e}),[]);Object(u.H)(b,(({height:e})=>m(e)),[]),Object(u.y)((()=>{a.length>0&&g.current===Zc&&c(xc)}),[a]),Object(u.y)((()=>{g.current===Zc&&c(xc)}),[n]);const L=Object(u.s)((()=>{O||0!==s.length||(M(!0),C().then((e=>{const t=e.map((({id:e,name:t})=>({id:e,name:t})));d(t)})).finally((()=>{M(!1)})))}),[O,s.length,C]),j={state:{tab:o,tabRefs:y,users:s,inspectorContentHeight:p,isUsersLoading:O},refs:{inspector:i},actions:{setTab:c,loadUsers:L,setInspectorContentNode:w},data:{tabs:[{id:xc,title:Object(h.__)("Design","web-stories"),Pane:Eb}]}};return null!=e&&e.document&&j.data.tabs.push({id:Zc,...e.document}),r.a.createElement(tr.Provider,{value:j},t)};const Ob=e=>`inspector-tab-${e}`,Mb=l.f.div.attrs({role:"tabpanel"}).withConfig({displayName:"inspectorContent__InspectorPane",componentId:"sc-38vbl6-0"})(["height:100%;overflow:overlay;"]),wb=l.f.section.withConfig({displayName:"inspectorContent__InspectorPanes",componentId:"sc-38vbl6-1"})(["height:100%;"]);var Lb=function Inspector(){const{state:{tab:e},data:{tabs:t}}=Cr();return r.a.createElement(wb,null,t.map((({id:t,Pane:C})=>r.a.createElement(Mb,{"aria-labelledby":t,id:Ob(t),key:t,hidden:t!==e},t===e&&r.a.createElement(C,null)))))};const _b=l.f.section.attrs({"aria-label":Object(h.__)("Inspector","web-stories")}).withConfig({displayName:"inspectorLayout__Layout",componentId:"sc-1thwrwp-0"})(["height:100%;display:flex;flex-direction:column;background-color:",";color:",";"],(({theme:e})=>e.colors.bg.secondary),(({theme:e})=>e.colors.fg.secondary)),jb=l.f.div.withConfig({displayName:"inspectorLayout__InspectorContainer",componentId:"sc-1thwrwp-1"})(["height:100%;padding:0;overflow:auto;"]),xb=Object(l.f)(tp).withConfig({displayName:"inspectorLayout__UnjustifiedTabView",componentId:"sc-1thwrwp-2"})(["justify-content:center;"]);var Zb=function InspectorLayout(){const{state:{tab:e,tabRefs:t},actions:{setInspectorContentNode:C,setTab:a},refs:{inspector:n},data:{tabs:l}}=Cr(),i=Object(u.s)((e=>{a(e),Object(f.g)("inspector_tab_change",{name:e})}),[a]);return Object(ve.e)(n),r.a.createElement(_b,{ref:n},r.a.createElement(xb,{label:Object(h.__)("Inspector Selection","web-stories"),tabs:l,tab:e,tabRefs:t,onTabChange:i,getAriaControlsId:Ob,shortcut:"mod+option+3"}),r.a.createElement(jb,{ref:C},r.a.createElement(Lb,null)))};var Ab=function({inspectorTabs:e}){return r.a.createElement(yb,{inspectorTabs:e},r.a.createElement(Pc,{disabled:!0},r.a.createElement(Zb,null)))},Ib=C(816),Tb=C(561);const Sb=Object(l.f)(Tb.a).withConfig({displayName:"searchInput__StyledSearchInput",componentId:"sc-1rp7o9g-0"})(["input{",";}"],Qt);var Rb=function WrappedSearchInput({initialValue:e,placeholder:t,onSearch:C,disabled:a=!1,incremental:n=!1,delayMs:l=500}){const[i,o]=Object(u.I)(e),c=Object(u.x)((()=>{C(i)}),l),s=Object(u.s)((e=>{n&&l?c():C(e)}),[c,C,l,n]),d=Object(u.s)((e=>{const t=e.target.value;o(t),(n||""===t)&&s(t)}),[s,n]),p=Object(u.s)((()=>{o(""),s("")}),[s]),m=Object(u.s)((e=>{e.preventDefault(),s(i)}),[s,i]),f=i.length>0;return r.a.createElement("form",{onSubmit:m},r.a.createElement(Sb,{inputValue:i,placeholder:t,onChange:d,handleClearInput:p,disabled:a,ariaClearLabel:Object(h.__)("Clear Search","web-stories"),isOpen:f,"aria-label":Object(h.__)("Search","web-stories")}))};const kb=l.f.div.withConfig({displayName:"section__Container",componentId:"sc-kgxakq-0"})(["position:relative;margin-top:28px;margin-bottom:28px;&:first-child{margin-top:0px;}"]),Pb=Object(l.f)(Kt.a).attrs({as:"h2",size:lt.b.TYPOGRAPHY.PRESET_SIZES.XXX_SMALL}).withConfig({displayName:"section__Title",componentId:"sc-kgxakq-1"})(["flex:1 1 auto;color:",";margin-bottom:28px;"],(({theme:e})=>e.colors.fg.primary));function Section({title:e,children:t,...C}){return r.a.createElement(kb,C,r.a.createElement(Pb,null,e),t)}l.f.h3.withConfig({displayName:"common__Title",componentId:"sc-ihtwvz-0"})(["color:",";margin:0;font-size:19px;line-height:1.4;flex:3 0 0;display:flex;align-items:center;padding:2px 0;"],(({theme:e})=>e.colors.fg.primary)),l.f.div.withConfig({displayName:"common__Header",componentId:"sc-ihtwvz-1"})(["display:flex;margin:0 0 25px;"]);var Nb=Object(u.f)({tabs:{}});var Db=function(e){return Object(u.w)(Nb,null!=e?e:u.k)},zb=C(770);var Bb=function({sectionRef:e,innerContainerRef:t,isExpanded:C,setFocusedRowOffset:a,collapsedHeight:n,bottomMargin:r,topMargin:l}){Object(u.B)((()=>{if(!e.current||!t.current)return;let i;i=C?`${t.current.offsetHeight+l+r}px`:`${n}px`,e.current.style.height=i,e.current.style.minHeight=i,a(0)}),[r,n,t,C,e,a,l])};var Fb=function({innerContainerRef:e,isExpanded:t,setFocusedRowOffset:C,selectedItemId:a,itemRefs:n,offsetSpacing:r=0}){Object(u.B)((()=>{var l;if(!e.current)return;const i=null!==(l=n.current)&&void 0!==l&&l[a]?n.current[a]:null,o=(null==i?void 0:i.offsetTop)-r||0;!t&&i&&C(o)}),[e,t,n,r,a,C]),Object(u.B)((()=>{var C;if(!e.current)return;const r=null!==(C=n.current)&&void 0!==C&&C[a]?n.current[a]:null,l=(null==r?void 0:r.offsetTop)||0;for(const e of n.current){if(!e)continue;const C=r&&e.offsetTop===l;!r||C||t?e.classList.remove("invisible"):e.classList.add("invisible")}}),[e,t,a,n])};const Hb=l.f.div.withConfig({displayName:"chipGroup__Section",componentId:"sc-1xhgb2k-0"})(["height:","px;min-height:","px;background-color:",";display:flex;flex-direction:column;align-items:flex-start;flex:0 1 auto;position:relative;transition:height 0.2s,min-height 0.2s;"],80,80,(({theme:e})=>e.colors.divider.tertiary)),Gb=l.f.div.withConfig({displayName:"chipGroup__Container",componentId:"sc-1xhgb2k-1"})(["overflow:hidden;margin:","px 12px ","px 24px;"],16,20),Vb=l.f.div.withConfig({displayName:"chipGroup__InnerContainer",componentId:"sc-1xhgb2k-2"})(["display:flex;justify-content:center;flex-wrap:wrap;position:relative;padding:4px 0;transition:transform 0.2s;column-gap:8px;row-gap:14px;"]),Ub=Object(l.f)(b.a).attrs({type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.CIRCLE}).withConfig({displayName:"chipGroup__ExpandButton",componentId:"sc-1xhgb2k-3"})(["display:flex;position:absolute;bottom:-24px;background:",";max-height:none;width:32px;height:32px;"," visibility:inherit;align-self:center;justify-content:center;align-items:center;"],(({theme:e})=>e.colors.bg.tertiary),(({isExpanded:e})=>e&&"transform: scaleY(-1);"));var Wb=({items:e,selectedItemId:t,selectItem:C,deselectItem:a,ariaLabel:n})=>{const[l,i]=Object(u.I)(!1),o=Object(u.G)(),c=Object(u.G)(),s=Object(u.G)([]),[d,p]=Object(u.I)(0),m=Object(u.s)(((e,t)=>{e&&null!==t?a():(i(!1),C(t))}),[a,C]),f=Object(u.s)((()=>i((e=>!e))),[]);Bb({sectionRef:o,innerContainerRef:c,isExpanded:l,setFocusedRowOffset:p,collapsedHeight:80,bottomMargin:20,topMargin:16}),Fb({isExpanded:l,innerContainerRef:c,selectedItemId:t,setFocusedRowOffset:p,itemRefs:s,offsetSpacing:4});const b=e.length>0;fn({ref:o},[l]),Object(ve.h)(o,l?"":"down",(()=>b&&i(!0)),[l,b]);const g=Object(u.C)((()=>`pill-group-${Object(Dn.a)()}`),[]);return r.a.createElement(Hb,{ref:o},b&&r.a.createElement(r.a.Fragment,null,r.a.createElement(Gb,{id:g,isExpanded:l,role:"listbox","aria-label":n||Object(h.__)("List of filtering options","web-stories")},r.a.createElement(Vb,{role:"presentation",ref:c,style:{transform:`translateY(-${d}px`}},e.map(((e,C)=>{const{id:a,label:n}=e,l=a===t,i=l||!l&&0===C?0:-1;return r.a.createElement(zb.a,{key:a,role:"option",ref:e=>{s.current[a]=e},active:l,"aria-selected":l,onClick:()=>m(l,a),tabIndex:i},n)})))),r.a.createElement(Ub,{onClick:f,isExpanded:l,"aria-controls":g,"aria-expanded":l,"aria-label":Object(h.__)("Expand","web-stories")},r.a.createElement(Xe.a.ChevronUp,null))))};const Yb="1em",$b=l.f.section.attrs((({isActive:e})=>({role:"tabpanel","aria-expanded":e,hidden:!e}))).withConfig({displayName:"shared__Pane",componentId:"sc-27lfsm-0"})(["padding:1.5em ",";",""],Yb,(({isOverflowScrollable:e=!1})=>e&&Object(l.e)(["overflow-y:scroll;height:100%;"])));function qb(e){return`library-pane-${e}`}function Xb(e){return`library-tab-${e}`}const Kb=l.f.div.withConfig({displayName:"shared__LoadingContainer",componentId:"sc-27lfsm-1"})(["display:flex;justify-content:center;margin-top:18px;"]),Qb=l.f.div.withConfig({displayName:"styles__PaneInner",componentId:"sc-o2n85s-0"})(["height:100%;display:flex;flex-direction:column;"]),Jb=l.f.div.withConfig({displayName:"styles__PaneHeader",componentId:"sc-o2n85s-1"})(["padding-top:24px;flex:0 1 auto;"]),eg=l.f.div.withConfig({displayName:"styles__MediaGalleryContainer",componentId:"sc-o2n85s-2"})(["overflow-y:scroll;overflow-x:hidden;padding:0 ",";margin-top:1em;position:relative;width:100%;flex:1 1 auto;min-height:100px;"],Yb),tg=l.f.div.withConfig({displayName:"styles__MediaGalleryInnerContainer",componentId:"sc-o2n85s-3"})(["width:calc(100% + 19px);margin:0 -4px;"]),Cg=l.f.div.withConfig({displayName:"styles__MediaGalleryLoadingPill",componentId:"sc-o2n85s-4"})(["display:block;position:absolute;bottom:20px;left:60px;right:60px;width:240px;text-align:center;padding:8px 80px;background-color:",";border-radius:100px;"],(({theme:e})=>Object(MC.c)(e.colors.standard.black,.4))),ag=Object(l.f)(iC.a).attrs({size:lt.b.TYPOGRAPHY.PRESET_SIZES.MEDIUM}).withConfig({displayName:"styles__MediaGalleryMessage",componentId:"sc-o2n85s-5"})(["color:",";padding:1em;text-align:center;"],(({theme:e})=>e.colors.fg.secondary)),ng=Object(l.f)($b).withConfig({displayName:"styles__StyledPane",componentId:"sc-o2n85s-6"})(["height:100%;padding:0;overflow:hidden;"]),rg=l.f.div.withConfig({displayName:"styles__SearchInputContainer",componentId:"sc-o2n85s-7"})(["padding:0 ",";"],Yb);var lg=C(63),ig=C(617);function og(){return(og=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const cg="loading-indicator",sg=l.f.span.withConfig({displayName:"loadingBar__AriaOnlyAlert",componentId:"sc-6jeb1k-0"})(X.c.visuallyHidden),dg=Object(l.g)(["0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}"]),ug=l.f.div.withConfig({displayName:"loadingBar__UploadingIndicator",componentId:"sc-6jeb1k-1"})(["height:4px;background:",";background-size:400% 400%;position:absolute;bottom:0px;border-radius:",";animation:"," 4s ease infinite;&.","{&.appear{width:0;}&.appear-done{width:100%;transition:1s ease-out;transition-property:width;}}"],(({theme:e})=>e.colors.gradient.loading),(({theme:e})=>`0px 0px ${e.borders.radius.small} ${e.borders.radius.small}`),dg,cg),LoadingBar=({loadingMessage:e,...t})=>{const C=Object(u.G)();return r.a.createElement(r.a.Fragment,null,e&&r.a.createElement(sg,{role:"status"},e),r.a.createElement(BC.a,{nodeRef:C,in:!0,appear:!0,timeout:0,className:cg},r.a.createElement(ug,og({ref:C},t))))};var pg=C(622);var mg=function DeleteDialog({mediaId:e,type:t,onClose:C}){const{actions:{deleteMedia:a}}=Object(_.c)(),{showSnackbar:n}=Object(Ee.a)(),{deleteMediaElement:l}=Object(I.c)((({actions:{deleteMediaElement:e}})=>({deleteMediaElement:e}))),{deleteElementsByResourceId:i}=Object(Z.e)((e=>({deleteElementsByResourceId:e.actions.deleteElementsByResourceId}))),o=Object(u.s)((async()=>{C();try{await a(e),l({id:e}),i({id:e})}catch(e){Object(f.f)("local_media_deletion",e.message),n({message:Object(h.__)("Failed to delete media item.","web-stories"),dismissible:!0})}}),[a,l,i,e,C,n]),c=Object(h.__)("Delete Image?","web-stories"),s=Object(h.__)("Delete Video?","web-stories"),d=Object(h.__)("You are about to permanently delete this image from your site. The image will appear broken in any WordPress content that uses it. ","web-stories"),p=Object(h.__)("You are about to permanently delete this video from your site. The video will appear broken in any WordPress content that uses it. ","web-stories");return r.a.createElement(Be.a,{isOpen:!0,onClose:C,title:"image"===t?c:s,secondaryText:Object(h.__)("Cancel","web-stories"),onPrimary:o,primaryText:Object(h.__)("Delete","web-stories"),maxWidth:512},r.a.createElement(iC.a,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},"image"===t?d:p),r.a.createElement(iC.a,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL,isBold:!0},Object(h.__)("This action can not be undone.","web-stories")))},fg=C(624);const hg=Object(l.e)(["display:flex;width:","px;margin-right:28px;"],152),bg=l.f.img.withConfig({displayName:"mediaEditDialog__Image",componentId:"sc-2vc3eo-0"})(["",""],hg),gg=l.f.video.withConfig({displayName:"mediaEditDialog__Video",componentId:"sc-2vc3eo-1"})(["",""],hg),Eg=l.f.div.withConfig({displayName:"mediaEditDialog__DialogBody",componentId:"sc-2vc3eo-2"})(["display:flex;justify-content:left;align-items:flex-start;"]),vg=l.f.div.withConfig({displayName:"mediaEditDialog__MetadataTextContainer",componentId:"sc-2vc3eo-3"})(["display:flex;flex-direction:column;margin:0 4px;"]),yg=Object(l.f)(iC.a).withConfig({displayName:"mediaEditDialog__DateText",componentId:"sc-2vc3eo-4"})(["margin-bottom:8px;"]),Og=Object(l.f)(Nl).withConfig({displayName:"mediaEditDialog__AssistiveTextArea",componentId:"sc-2vc3eo-5"})(["margin:20px 0 4px;"]),Mg=Object(h.__)("Edit Image","web-stories"),wg=Object(h.__)("Edit Video","web-stories"),Lg=Object(h.__)("Assistive text","web-stories"),_g=Object(h.__)("Video description","web-stories"),jg=Object(h.__)("Describe the appearance and function of the image. Leave empty if the image is purely decorative.","web-stories"),xg=Object(h.__)("For indexability and accessibility. Include any burned-in text inside the video.","web-stories");var Zg=function MediaEditDialog({resource:e,onClose:t}){const{id:C,src:a,creationDate:n,width:l,height:i,type:o,alt:c,poster:s,mimeType:d}=e,{actions:{updateMedia:p}}=Object(_.c)(),{updateMediaElement:m}=Object(I.c)((({actions:{updateMediaElement:e}})=>({updateMediaElement:e}))),{showSnackbar:b}=Object(Ee.a)(),[g,E]=Object(u.I)(c),v=Object(et.m)(n),y=Object(u.s)((e=>{E(e.target.value)}),[]),O=Object(u.s)((async()=>{try{await p(C,{alt_text:g}),m({id:C,data:{alt:g}}),t()}catch(e){Object(f.f)("local_media_edit",e.message),b({message:Object(h.__)("Failed to update, please try again.","web-stories"),dismissible:!0})}}),[g,C,t,b,p,m]),M="image"===o;return r.a.createElement(Be.a,{isOpen:!0,onClose:t,title:M?Mg:wg,secondaryText:Object(h.__)("Cancel","web-stories"),onPrimary:O,primaryText:Object(h.__)("Save","web-stories")},r.a.createElement(Eg,null,"image"===o?r.a.createElement(bg,{src:Object(fg.a)(152,e),alt:c,loading:"lazy",crossOrigin:"anonymous",decoding:"async"}):r.a.createElement(gg,{key:a,crossOrigin:"anonymous",poster:s,preload:"metadata",muted:!0},r.a.createElement("source",{src:a,type:d})),r.a.createElement(vg,null,Object(et.k)(v)&&r.a.createElement(yg,{forwardedAs:"span",size:lt.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL},Object(h.sprintf)(
|
136 |
/* translators: %s: upload date of media item. */
|
137 |
-
Object(h.__)("Uploaded: %s","web-stories"),Object(
|
138 |
/* translators: 1: image width. 2: image height. */
|
139 |
-
Object(h.__)("%1$d x %2$d pixels","web-stories"),l,i)),r.a.createElement(Og,{value:g,"aria-label":M?Lg:_g,type:"text",placeholder:M?Lg:_g,onChange:y}),r.a.createElement(iC.a,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},M?jg:xg))))};const Ag=Object(l.f)(b.a).attrs({variant:g.d.ICON}).withConfig({displayName:"dropDownMenu__MoreButton",componentId:"sc-h8rx9u-0"})(["display:flex;align-items:center;position:absolute;top:8px;right:8px;background:",";color:",";border-radius:100%;width:28px;height:28px;"],(({theme:e})=>e.colors.bg.secondary),(({theme:e})=>e.colors.fg.primary)),Ig=l.f.div.withConfig({displayName:"dropDownMenu__IconContainer",componentId:"sc-h8rx9u-1"})(["height:32px;width:auto;"]),Tg=l.f.div.withConfig({displayName:"dropDownMenu__DropDownContainer",componentId:"sc-h8rx9u-2"})(["margin-top:10px;"]),Sg=l.f.div.withConfig({displayName:"dropDownMenu__MenuContainer",componentId:"sc-h8rx9u-3"})(["z-index:1;"]),Rg=Object(l.e)(["min-width:100px;margin-top:0;li{display:block;}"]);var kg=function DropDownMenu({resource:e,display:t,isMenuOpen:C,onMenuOpen:a,onMenuCancelled:n,onMenuSelected:l}){const i=[{group:[{label:Object(h.__)("Edit","web-stories"),value:"edit"},{label:Object(h.__)("Delete","web-stories"),value:"delete"}]}],[o,c]=Object(u.I)(!1),[s,d]=Object(u.I)(!1),p=Object(u.G)(),{canTranscodeResource:m}=Object(F.m)((({state:{canTranscodeResource:e}})=>({canTranscodeResource:e}))),f=Object(u.s)((()=>c(!1)),[c]),b=Object(u.s)((()=>d(!1)),[d]),g=Object(u.C)((()=>`list-${Object(Dn.a)()}`),[]),E=Object(u.C)((()=>`button-${Object(Dn.a)()}`),[]);return m(e)&&r.a.createElement(Sg,null,(t||C)&&r.a.createElement(r.a.Fragment,null,r.a.createElement(Ag,{ref:p,onClick:a,"aria-label":Object(h.__)("More","web-stories"),"aria-pressed":C,"aria-haspopup":!0,"aria-expanded":C,"aria-owns":C?g:null,id:E},r.a.createElement(Ig,null,r.a.createElement(Xe.a.Dots,null))),r.a.createElement(Nr.a,{anchor:p,placement:DC.a.BOTTOM_START,isOpen:C,width:160},r.a.createElement(Tg,null,r.a.createElement(kr.a,{parentId:E,listId:g,onMenuItemClick:(e,t)=>{switch(l(),t){case"edit":d(!0);break;case"delete":c(!0)}},options:i,onDismissMenu:n,hasMenuRole:!0,menuStylesOverride:Rg})))),o&&r.a.createElement(mg,{mediaId:e.id,type:e.type,onClose:f}),s&&r.a.createElement(Zg,{resource:e,onClose:b}))};const Pg=Object(l.f)(iC.a).withConfig({displayName:"attribution__StyledText",componentId:"sc-re3elg-0"})(["color:",";"],(({theme:e,active:t})=>Object(MC.c)(e.colors.standard.white,t?1:.6))),Ng=l.f.a.withConfig({displayName:"attribution__Link",componentId:"sc-re3elg-1"})(["display:block;position:absolute;left:0;bottom:0;width:100%;padding:8px;background-color:",";text-overflow:ellipsis;overflow:hidden;white-space:nowrap;text-decoration:none;"],(({theme:e,active:t})=>Object(MC.c)(e.colors.bg.primary,t?.8:.6)));var Dg=({author:e,url:t})=>{const[C,a]=Object(u.I)(!1),n=()=>a(!0),l=()=>a(!1);return r.a.createElement(Ng,{title:e,active:C,onPointerEnter:n,onFocus:n,onPointerLeave:l,onBlur:l,href:t,target:"_blank",rel:"noreferrer"},r.a.createElement(Pg,{forwardedAs:"span",size:lt.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL},e))},zg=C(133),Bg=C(119),Fg=C(418);function Hg(){return(Hg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Gg=l.f.div.withConfig({displayName:"withOverlay__Overlay",componentId:"sc-13g5elr-0"})(["position:absolute;top:0;/*! @noflip */ left:0;width:0;height:0;z-index:",";"],(({zIndex:e})=>e));var Vg=function(e){return Object(u.j)((function WithOverlay({children:t,...C},a){const[n,l]=Object(u.I)(null),[i,o]=Object(u.I)(null),{zIndex:c=1}=C;return r.a.createElement(Fg.a.Provider,{value:{container:i,overlay:n}},r.a.createElement(e,Hg({ref:Object(u.t)(a,o)},C),t,r.a.createElement(Gg,{ref:l,zIndex:c})))}))},Ug=C(278),Wg=C.n(Ug),Yg=C(84);var $g=function({canSnap:e,otherNodes:t,snappingOffsetX:C=null,isDragging:a}){const n=Object(F.e)(F.a.CANVAS_CONTAINER),r=Object(F.e)(F.a.PAGE_CONTAINER),l=Object(F.d)((({state:e})=>e.designSpaceGuideline)),{pageWidth:i,pageHeight:o}=Object(F.l)((({state:{pageWidth:e,pageHeight:t}})=>({pageWidth:e,pageHeight:t}))),{activeDropTargetId:c,isDropTargetingDisabled:s}=Object(V.b)((({state:e})=>({activeDropTargetId:e.activeDropTargetId,isDropTargetingDisabled:e.isDropTargetingDisabled}))),d=Object(F.r)((({SAFE_ZONE:e})=>e));e=e&&!s&&!c;const p=Object(u.s)((({elements:e})=>{const t=e.flat().some((({center:e,element:t})=>t===l&&!e));a&&t&&d()}),[a,l,d]);if(!n||!r)return{};const m=C||n.x,f=Math.ceil(r.x-m),h=Math.floor(r.y-n.y),b=e?[f,f+i/2,f+i]:[],g=(i/Q.e-o)/2;return{snappable:e,snapHorizontal:e,snapVertical:e,snapCenter:e,snapGap:e,isDisplaySnapDigit:!1,onSnap:p,horizontalGuidelines:e?[h-g,h,h+o/2,h+o,h+o+g]:[],verticalGuidelines:b,elementGuidelines:e?[...t,l]:[]}};var qg=function(e,t=[]){Object(u.y)((()=>{const t=()=>{var t,C;return null===(t=e.current)||void 0===t||null===(C=t.updateRect)||void 0===C?void 0:C.call(t)};t();const C=setTimeout(t);return()=>clearTimeout(C)}),t)};var Xg=function(e){Object(u.y)((()=>{const t=()=>{var t;return null===(t=e.current)||void 0===t?void 0:t.updateRect()};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e])};var Kg=function(e,t){const{left:C,right:a,top:n,bottom:r}=e.getBoundingClientRect(),l=t.getBoundingClientRect();return C>l.right||a<l.left||r<l.top||n>l.bottom};var Qg=function(){const{deleteSelectedElements:e}=Object(F.o)((e=>({deleteSelectedElements:e.actions.deleteSelectedElements}))),{fullbleedContainer:t}=Object(F.d)((({state:{fullbleedContainer:e}})=>({fullbleedContainer:e})));return{handleElementOutOfCanvas:C=>!!Kg(C,t)&&(e(),!0)}};var Jg=function({setIsDragging:e,resetMoveable:t,selectedElement:C,setTransformStyle:a,frame:n}){const{isDropSource:r,handleDrag:l,handleDrop:i,setDraggingResource:o}=Object(V.b)((({actions:{handleDrag:e,handleDrop:t,isDropSource:C,setDraggingResource:a}})=>({handleDrag:e,handleDrop:t,setDraggingResource:a,isDropSource:C}))),{handleElementOutOfCanvas:c}=Qg(),{updateSelectedElements:s}=Object(F.o)((e=>({updateSelectedElements:e.actions.updateSelectedElements}))),{editorToDataX:d,editorToDataY:p}=Object(ee.a)((({actions:{editorToDataX:e,editorToDataY:t}})=>({editorToDataX:e,editorToDataY:t}))),m=Object(u.r)((C=>{e(!1),o(null),t(C)}),[e,o,t]);return{onDrag:({target:t,beforeTranslate:i,clientX:c,clientY:s})=>{e(!0),r(C.type)&&o(C.resource),n.translate=i,a(t,n),r(C.type)&&l(C.resource,c,s,C.id)},throttleDrag:0,onDragStart:({set:e})=>{e(n.translate)},onDragEnd:({target:t,isDrag:a})=>{if(!a)return!1;if(c(t))return e(!1),void o(null);const l=e=>Math.abs(e)<=1?0:e,[u,f]=n.translate;if(0!==u||0!==f){const e={x:l(C.x+d(u)),y:l(C.y+p(f))};s({properties:e}),r(C.type)&&i(C.resource,C.id)}m(t)}}};const eE=[],tE=["n","s"],CE=["e","w"],aE=["nw","ne","sw","se"];function nE({vertical:e,horizontal:t,diagonal:C}){return[...e?tE:eE,...t?CE:eE,...C?aE:eE]}var rE=function({resetMoveable:e,selectedElement:t,setTransformStyle:C,frame:a,isEditMode:n,pushTransform:r,classNames:l}){const{updateSelectedElements:i}=Object(F.o)((e=>({updateSelectedElements:e.actions.updateSelectedElements}))),{handleElementOutOfCanvas:o}=Qg(),{editorToDataX:c,editorToDataY:s,dataToEditorY:d,dataToEditorX:p}=Object(ee.a)((({actions:{editorToDataX:e,editorToDataY:t,dataToEditorY:C,dataToEditorX:a}})=>({editorToDataX:e,editorToDataY:t,dataToEditorY:C,dataToEditorX:a}))),{resizeRules:m={},updateForResizeEvent:f}=Object(Ce.g)(t.type),[h,b]=Object(u.I)(!0),g=p(m.minWidth),E=d(m.minHeight),v=t.width/t.height,y=t.width<=m.minWidth||t.height<=m.minHeight;return{onResize:({target:e,direction:n,width:r,height:l,drag:i})=>{let o=r,u=l,p=null;h?(o<g&&(o=g,u=o/v),u<E&&(u=E,o=E*v)):(u=Math.max(u,E),o=Math.max(o,g)),f&&(p=f(t,n,c(o,!1),s(u,!1))),p&&p.height&&(u=d(p.height)),p&&p.marginOffset&&(e.querySelector(".syncMargin").style.margin=-d(p.marginOffset)/2+"px 0"),e.style.width=`${o}px`,e.style.height=`${u}px`,a.direction=n,a.resize=[o,u],a.translate=i.beforeTranslate,a.updates=p,C(e,a)},onResizeStart:({setOrigin:e,dragStart:C,direction:l})=>{e(["%","%"]),C&&C.set(a.translate);const i=0!==l[0]&&0!==l[1];h!==i&&b(i),n&&r(t.id,a)},onResizeEnd:({target:C})=>{if(o(C))return;const[n,r]=a.resize;if(0!==n&&0!==r){const{direction:e}=a,[C,l]=a.translate,o=c(n),d=s(r),u={width:o,height:d,x:t.x+c(C),y:t.y+s(l)};f&&Object.assign(u,f(t,e,o,d)),i({properties:u})}b(!0),e(C)},keepRatio:h||"sticker"===(null==t?void 0:t.type),renderDirections:nE(m),className:Wg()(l,{"visually-hide-handles":y})}};var utils_normalizeRotationDegrees=function(e){return(e%360+360)%360};var lE=function({selectedElement:e,isEditMode:t,pushTransform:C,frame:a,setTransformStyle:n,resetMoveable:r}){const{updateSelectedElements:l}=Object(F.o)((e=>({updateSelectedElements:e.actions.updateSelectedElements}))),i=Object(ve.f)("shift"),{handleElementOutOfCanvas:o}=Qg();return{throttleRotate:i?30:0,onRotate:({target:e,beforeRotate:t})=>{a.rotate=utils_normalizeRotationDegrees(t),n(e,a)},onRotateEnd:({target:e})=>{if(o(e))return;const t={rotationAngle:Math.round(a.rotate)};l({properties:t}),r(e)},onRotateStart:({set:n})=>{t&&C(e.id,a),n(a.rotate)}}};function iE(){return(iE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var oE=function SingleSelectionMoveable({selectedElement:e,targetEl:t,pushEvent:C,isEditMode:a,editMoveableRef:n}){const l=Object(u.G)(null),[i,o]=Object(u.I)(!1),c=Object(F.d)((({state:e})=>e.nodesById)),s=Object(ee.a)((({actions:e})=>e.getBox)),d=Object(G.b)((({actions:e})=>e.pushTransform)),{zoomSetting:p,scrollLeft:m,scrollTop:f}=Object(F.l)((({state:e})=>({zoomSetting:e.zoomSetting,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}))),h=!e.isBackground,b=Object(u.G)(),g=Object(F.o)((({state:e})=>{var t,C;return null===(t=e.currentPage)||void 0===t||null===(C=t.elements[0])||void 0===C?void 0:C.id}));Xg(l),Object(u.y)((()=>{b.current=C}),[C]),Object(u.y)((()=>{l.current&&l.current.updateRect()}),[m,f]),qg(l,[p]),Object(u.y)((()=>{l.current&&(b.current&&t.contains(b.current.target)&&h&&l.current.moveable.dragStart(b.current),l.current.updateRect())}),[t,l,h]),Object(u.y)((()=>{l.current&&l.current.updateRect()}));const E=s(e),v=Object(u.C)((()=>({translate:[0,0],rotate:E.rotationAngle,resize:[0,0],updates:null})),[E.rotationAngle]),y=(t,C=v)=>{v.translate=C.translate,v.direction=C.direction,v.resize=C.resize,v.updates=C.updates,v.rotate=C.rotate,t.style.transform=`translate(${v.translate[0]}px, ${v.translate[1]}px) rotate(${v.rotate}deg)`,v.resize[0]&&(t.style.width=`${v.resize[0]}px`),v.resize[1]&&(t.style.height=`${v.resize[1]}px`),d(e.id,v)},O=Object(u.r)((t=>{v.direction=[0,0],v.translate=[0,0],v.resize=[0,0],v.updates=null,d(e.id,null),t.style.transform="",t.style.width="",t.style.height="",l.current&&l.current.updateRect()}),[v,d,e.id]),M=!a,w=i,L=Wg()("default-moveable",{"hide-handles":w,"type-text":"text"===e.type}),_=Jg({setIsDragging:o,resetMoveable:O,selectedElement:e,setTransformStyle:y,frame:v}),j=a?{onDrag:()=>!1,onDragEnd:()=>!1,onDragStart:()=>!1}:_,x=rE({resetMoveable:O,selectedElement:e,setTransformStyle:y,frame:v,isEditMode:a,pushTransform:d,classNames:L}),Z=lE({selectedElement:e,isEditMode:a,pushTransform:d,frame:v,setTransformStyle:y,resetMoveable:O}),A=Object.values(Object(Yg.a)(c,[e.id,g])),I=$g({otherNodes:A,canSnap:M&&h,isDragging:i});return r.a.createElement(zg.a,iE({className:L,zIndex:0,ref:Object(u.t)(l,n),target:t,edge:!0,draggable:h,resizable:h&&!w,rotatable:h&&!w},j,x,Z,I,{origin:!1,pinchable:!0}))};function cE(){return(cE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const sE=l.f.div.withConfig({displayName:"editElement__Wrapper",componentId:"sc-1bhg57l-0"})([""," "," "," pointer-events:initial;"],ae.h,ae.j,ae.i);var dE=function EditElement({element:e}){const{id:t,type:C}=e,{getBox:a}=Object(ee.a)((e=>({getBox:e.actions.getBox}))),[n,l]=Object(u.I)(null),[i,o]=Object(u.I)(null),{Edit:c,hasEditModeMoveable:s}=Object(Ce.g)(C),d=a(i?{...e,...i}:e),p=Object(u.G)(null);return r.a.createElement(r.a.Fragment,null,r.a.createElement(sE,cE({"aria-labelledby":`layer-${t}`},d,{ref:l}),r.a.createElement(c,{element:i?{...e,...i}:e,box:d,editWrapper:s&&n,onResize:()=>{p.current&&p.current.updateRect()},setLocalProperties:o})),s&&n&&r.a.createElement(oE,{selectedElement:e,targetEl:n,isEditMode:!0,editMoveableRef:p}))};const uE=Object(l.f)(Ro).withConfig({displayName:"editLayer__LayerWithGrayout",componentId:"sc-1eukii4-0"})(["background-color:",";"],(({grayout:e,theme:t})=>e?t.colors.opacity.overlayDark:"transparent")),pE=Vg(Wo);function EditLayerForElement({element:e,showOverflow:t}){const C=Object(u.G)(null),a=Object(u.G)(null),{editModeGrayout:n,EditMenu:l}=Object(Ce.g)(e.type),{clearEditing:i}=Object(F.d)((e=>({clearEditing:e.actions.clearEditing}))),o=Object(yp.a)();return Object(ve.h)(C,{key:"esc",editable:!0},(()=>i()),[i]),Object(u.y)((()=>()=>o(!1)),[o]),r.a.createElement(uE,{ref:C,"aria-label":Object(h._x)("Edit layer","compound noun","web-stories"),"data-testid":"editLayer",grayout:n,zIndex:Zo,onPointerDown:e=>{e.target!==C.current&&e.target!==a.current||i()}},r.a.createElement(pE,{ref:a,fullBleedContainerLabel:Object(h.__)("Fullbleed area (Edit layer)","web-stories"),isControlled:!0,showOverflow:t,overflow:t?"visible":"hidden"},r.a.createElement(dE,{element:e})),l&&r.a.createElement(Uo,{showOverflow:!0},r.a.createElement(l,null)))}var mE=Object(u.m)((function EditLayer(){const{currentPage:e}=Object(F.o)((e=>({currentPage:e.state.currentPage}))),{editingElement:t,showOverflow:C=!0}=Object(F.d)((({state:{editingElement:e,editingElementState:{showOverflow:t}={}}})=>({editingElement:e,showOverflow:t}))),a=t&&e&&e.elements.find((e=>e.id===t));return a?r.a.createElement(EditLayerForElement,{element:a,showOverflow:C}):null}));function fE(){return(fE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var hE=n.createElement("path",{fillOpacity:.1,d:"M12 0c6.6 0 12 5.4 12 12s-5.4 12-12 12S0 18.6 0 12 5.4 0 12 0z"}),bE=n.createElement("path",{d:"M13.8 14.6c.1.1.2.3.2.5s-.1.3-.2.5L12.3 17c-.7.7-1.7 1.1-2.7 1.1-1 0-1.9-.4-2.7-1.1-.7-.7-1.1-1.7-1.1-2.7 0-1 .4-1.9 1.1-2.7l1.5-1.5c.2 0 .3-.1.5-.1s.3.1.5.2c.1.1.2.3.2.5s-.1.4-.2.5l-1.5 1.5c-.5.5-.7 1.1-.7 1.7 0 .6.3 1.3.7 1.7.5.5 1.1.7 1.7.7s1.3-.3 1.7-.7l1.5-1.5c.3-.3.7-.3 1 0zM17 7c-.7-.7-1.7-1.1-2.7-1.1-1 0-1.9.4-2.7 1.1l-1.5 1.5c0 .1-.1.3-.1.4 0 .2.1.3.2.5.1.1.3.2.5.2s.3-.1.5-.2l1.5-1.5c.5-.5 1.1-.7 1.7-.7.6 0 1.3.3 1.7.7.5.5.7 1.1.7 1.7 0 .6-.3 1.3-.7 1.7l-1.5 1.5c-.1.1-.2.3-.2.5s.1.3.2.5c.1.1.3.2.5.2s.3-.1.5-.2l1.5-1.5c.7-.7 1.1-1.7 1.1-2.7-.1-1-.5-1.9-1.2-2.6zm-7.9 7.2c0 .2.1.3.2.5.1.1.3.2.5.2s.4-.1.5-.2l4.5-4.5c.1-.1.2-.3.2-.5s-.1-.4-.2-.5c-.3-.2-.8-.2-1 .1l-4.5 4.5c-.1.1-.2.3-.2.4z"});function SvgDefaultIcon({title:e,titleId:t,...C}){return n.createElement("svg",fE({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-labelledby":t},C),e?n.createElement("title",{id:t},e):null,hE,bE)}const gE=n.memo(SvgDefaultIcon);function EE(){return(EE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var vE=n.createElement("path",{d:"M18 7.7c-.2 0-.5-.1-.7-.2l-7.3-4-7.3 4c-.7.4-1.6.2-2-.6-.4-.7-.1-1.6.6-2l8-4.4c.5-.2 1-.2 1.5 0l8 4.4c.7.4 1 1.3.6 2-.4.5-.9.8-1.4.8z"});function SvgArrowBar({title:e,titleId:t,...C}){return n.createElement("svg",EE({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 8","aria-labelledby":t},C),e?n.createElement("title",{id:t},e):null,vE)}const yE=n.memo(SvgArrowBar);const OE=l.f.div.withConfig({displayName:"pageAttachment__Wrapper",componentId:"sc-p5mnb3-0"})(["position:absolute;display:flex;align-items:center;justify-content:flex-end;flex-direction:column;bottom:0;height:20%;width:100%;color:",";z-index:3;"],(({theme:e})=>e.colors.standard.white)),ME=l.f.div.withConfig({displayName:"pageAttachment__Guideline",componentId:"sc-p5mnb3-1"})(["mix-blend-mode:difference;position:absolute;height:1px;bottom:20%;width:100%;background-image:",";background-position:top;background-size:16px 0.5px;background-repeat:repeat-x;z-index:3;"],(({theme:e})=>`linear-gradient(to right, ${e.colors.standard.black} 50%, ${e.colors.standard.white} 0%)`)),wE=Object(l.f)(yE).withConfig({displayName:"pageAttachment__ArrowBar",componentId:"sc-p5mnb3-2"})(["display:block;cursor:pointer;margin-bottom:10px;filter:drop-shadow(0px 2px 6px rgba(0,0,0,0.3));width:20px;height:8px;"]),LE=l.f.div.withConfig({displayName:"pageAttachment__OutlinkChip",componentId:"sc-p5mnb3-3"})(["height:36px;display:flex;position:relative;padding:10px 6px;margin:0 0 20px;max-width:calc(100% - 64px);border-radius:30px;place-items:center;box-shadow:0px 4px 10px rgba(0,0,0,0.15);background:",";"],(({bgColor:e})=>e)),_E=l.f.span.withConfig({displayName:"pageAttachment__TextWrapper",componentId:"sc-p5mnb3-4"})(["font-family:Roboto,sans-serif;font-size:16px;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative;padding-inline-start:6px;padding-inline-end:8px;height:16px;letter-spacing:0.3px;font-weight:700;max-width:210px;color:",";"],(({fgColor:e})=>e)),jE=l.f.div.withConfig({displayName:"pageAttachment__Tooltip",componentId:"sc-p5mnb3-5"})(["background-color:",";color:",";width:200px;padding:8px;font-size:14px;border-radius:4px;text-align:center;"],(({theme:e})=>e.colors.standard.black),(({theme:e})=>e.colors.standard.white)),xE=l.f.div.withConfig({displayName:"pageAttachment__LinkImage",componentId:"sc-p5mnb3-6"})(["height:24px;width:24px;vertical-align:middle;background-size:cover;background-repeat:no-repeat;background-position:50%;border-radius:50%;background-image:url('","') !important;"],(({icon:e})=>e)),ZE={x:8},AE="#FFFFFF",IE="#000000";var TE=function PageAttachment({pageAttachment:e={}}){const{displayLinkGuidelines:t,pageAttachmentContainer:C,setPageAttachmentContainer:a}=Object(F.d)((e=>({displayLinkGuidelines:e.state.displayLinkGuidelines,pageAttachmentContainer:e.state.pageAttachmentContainer,setPageAttachmentContainer:e.actions.setPageAttachmentContainer}))),{hasInvalidLinkSelected:n}=Wp(),{ctaText:l=Object(h.__)("Learn more","web-stories"),url:i,icon:o,theme:c}=e,s=c===sC.z.DARK?IE:AE,d=c===sC.z.DARK?AE:IE;return r.a.createElement(r.a.Fragment,null,(t||n)&&r.a.createElement(ME,null),r.a.createElement(OE,{role:"presentation",ref:a},(null==i?void 0:i.length)>0&&r.a.createElement(r.a.Fragment,null,r.a.createElement(wE,{fill:s}),r.a.createElement(LE,{bgColor:s},o?r.a.createElement(xE,{icon:o}):r.a.createElement(gE,{fill:d,width:24,height:24}),r.a.createElement(_E,{fgColor:d},l)),C&&n&&r.a.createElement(zC.a,{anchor:{current:C},isOpen:!0,placement:"left",spacing:ZE},r.a.createElement(jE,null,Object(h.__)("Links can not reside below the dashed line when a page attachment is present. Your viewers will not be able to click on the link.","web-stories"))))))};var SE=function(e){const t=/^(?:(\d{2,}):)?(\d{2}):(\d{2})\.(\d{3})$/.exec(e);return t?3600*(t[1]?parseInt(t[1]):0)+60*parseInt(t[2])+parseInt(t[3])+parseInt(t[4])/1e3:null};const RE=l.f.span.withConfig({displayName:"cue__CueWrapper",componentId:"sc-2e81be-0"})(["text-align:center;height:",";"],(({$height:e})=>`${e}px`)),kE=l.f.span.withConfig({displayName:"cue__CueEl",componentId:"sc-2e81be-1"})(["color:",";"],(({$isFutureCue:e,theme:t})=>e?t.colors.fg.black:t.colors.fg.white)),PE=l.f.span.withConfig({displayName:"cue__Section",componentId:"sc-2e81be-2"})(["margin:0 10px 10px;padding:6px 12px;vertical-align:middle;border-radius:15px;background:rgba(11,11,11,0.6);color:rgba(255,255,255,1);display:inline-block;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',sans-serif;line-height:1.4;word-break:break-word;word-wrap:break-word;overflow-wrap:break-word;"]);var NE=function Cue({cue:e,videoTime:t,height:C}){const a=e.getCueAsHTML();return r.a.createElement(RE,{$height:C},r.a.createElement(PE,null,[...a.childNodes].map((e=>{if("timestamp"===e.target)return null;{var C;let a=null;"timestamp"===(null===(C=e.previousSibling)||void 0===C?void 0:C.target)&&(a=SE(e.previousSibling.data));const n=a>t;return e.nodeType===Node.TEXT_NODE?null!==a?r.a.createElement("span",null,r.a.createElement(kE,{$isFutureCue:n},e.textContent)):r.a.createElement(kE,null,e.textContent):null!==a?r.a.createElement("span",null,r.a.createElement(kE,{$isFutureCue:n,dangerouslySetInnerHTML:{__html:e.innerHTML}})):r.a.createElement(kE,{dangerouslySetInnerHTML:{__html:e.innerHTML}})}}))))};const DE=l.f.div.withConfig({displayName:"trackRenderer__Track",componentId:"sc-1jcwbxw-0"})(["width:100%;height:100%;display:grid;align-content:end;font-size:",";"],(({$fontSize:e})=>`${e}px`));var zE=function TrackRenderer({videoElement:e,trackIndex:t}){const{pageWidth:C,pageHeight:a}=Object(F.l)((({state:{pageWidth:e,pageHeight:t}})=>({pageWidth:e,pageHeight:t}))),n=.04*C,l=.2*a,[i,o]=Object(u.I)(null),[c,s]=Object(u.I)(0),[d,p]=Object(u.I)([]),m=Object(u.s)((()=>{const e=null!=i&&i.activeCues?[...i.activeCues]:[];p(e)}),[i]);return Object(u.y)((()=>{var C;m(),s(0);const a=document.getElementById(`video-${e.id}`);if(!a)return;const n=null===(C=a.textTracks)||void 0===C?void 0:C[t];return n?(n.mode="hidden",m(),o(n),a.addEventListener("timeupdate",(()=>{s(a.currentTime)})),n.addEventListener("cuechange",m),()=>{n.removeEventListener("cuechange",m)}):void 0}),[t,m,e,C,a]),d&&i?r.a.createElement(DE,{$fontSize:n},d.map(((e,t)=>r.a.createElement(NE,{key:t,cue:e,videoTime:c,height:l})))):null};const BE=Object(l.f)(Ro).withConfig({displayName:"videoCaptionsLayer__CaptionsLayer",componentId:"sc-nkc37r-0"})([""]),FE=Object(l.f)(Wo).withConfig({displayName:"videoCaptionsLayer__CaptionsPageArea",componentId:"sc-nkc37r-1"})(["position:absolute;pointer-events:none;"]),HE=l.f.div.withConfig({displayName:"videoCaptionsLayer__CaptionsCanvas",componentId:"sc-nkc37r-2"})(["background:transparent;border-radius:5px;position:absolute;z-index:2;transform:translateZ(0);top:0;left:0;bottom:0;right:0;cursor:default;"]);var GE=function VideoCaptionsLayer(){const e=Object(p.b)("customVideoCaptionsInEditor"),{isEditing:t}=Object(F.d)((({state:{isEditing:e}})=>({isEditing:e}))),C=Object(F.o)((({state:e})=>{const{selectedElements:t}=e;if(1!==t.length)return null;const C=t[0],{type:a,tracks:n}=C;return"video"===a&&(null==n?void 0:n.length)>0?C:null})),[a,n]=Object(u.I)(0);return Object(u.y)((()=>{if(n(0),t||!C)return;const e=document.getElementById(`video-${C.id}`);n(e.textTracks.length)}),[C,n,t]),e&&!t&&C&&a?r.a.createElement(BE,null,r.a.createElement(FE,{withSafezone:!1,showOverflow:!0},r.a.createElement(HE,null,Array.from({length:a}).map(((e,t)=>r.a.createElement(zE,{key:t,videoElement:C,trackIndex:t})))))):null};const VE=Object(l.f)(Wo).withConfig({displayName:"displayLayer__DisplayPageArea",componentId:"sc-weg6dv-0"})(["position:absolute;"]);function DisplayPage({page:e,editingElement:t}){return e?e.elements.map((e=>t===e.id?null:r.a.createElement(ue,{key:e.id,element:e,isAnimatable:!0}))):null}function DisplayPageAnimationController({animationState:e,resetAnimationState:t,page:C}){const a=Object(te.t)((({actions:e})=>e.WAAPIAnimationMethods));return Object(u.y)((()=>{switch(e){case te.l.PLAYING_SELECTED:case te.l.PLAYING:return void a.play();case te.l.RESET:return void a.reset();case te.l.SCRUBBING:case te.l.PAUSED:return void a.pause();default:return}}),[e,a]),Object(u.y)((()=>t),[t,C]),null}DisplayPageAnimationController.propTypes={page:re.b.page,animationState:He.a.oneOf(Object.values(te.l)),resetAnimationState:He.a.func};var UE=Object(u.m)((function DisplayLayer(){var e,t,C;const{currentPage:a,animationState:n,updateAnimationState:l,selectedElements:i}=Object(F.o)((({state:e,actions:t})=>({currentPage:e.currentPage,animationState:e.animationState,selectedElements:e.selectedElements,updateAnimationState:t.updateAnimationState}))),o=Object(F.f)(F.a.PAGE_CONTAINER),{editingElement:c,setPageContainer:s,setFullbleedContainer:d}=Object(F.d)((({state:{editingElement:e},actions:{setPageContainer:t,setFullbleedContainer:C}})=>({editingElement:e,setPageContainer:t,setFullbleedContainer:C}))),p=(null==i||null===(e=i[0])||void 0===e?void 0:e.id)===(null==a||null===(t=a.elements)||void 0===t||null===(C=t[0])||void 0===C?void 0:C.id),m=Object(u.s)((()=>{l({animationState:te.l.RESET})}),[l]),f=Object(u.C)((()=>i.map((e=>e.id))),[i]);return r.a.createElement(te.m.Provider,{animations:null==a?void 0:a.animations,elements:null==a?void 0:a.elements,onWAAPIFinish:m,selectedElementIds:n===te.l.PLAYING_SELECTED?f:[]},r.a.createElement(DisplayPageAnimationController,{page:a,animationState:n,resetAnimationState:m}),r.a.createElement(Ro,{"data-testid":"DisplayLayer",pointerEvents:"none","aria-label":Object(h._x)("Display layer","compound noun","web-stories")},r.a.createElement(VE,{ref:Object(u.t)(s,o),fullbleedRef:d,background:null==a?void 0:a.backgroundColor,isBackgroundSelected:p,fullBleedContainerLabel:Object(h.__)("Fullbleed area (Display layer)","web-stories"),overlay:a&&r.a.createElement(TE,{pageAttachment:a.pageAttachment}),isControlled:!0},r.a.createElement(DisplayPage,{page:a,editingElement:c})),r.a.createElement(GE,null)))})),WE=C(419),YE=C(412),$E=C(125);var qE=function(e){const t=Object(YE.a)(),{selectedElementIds:C,selectedElements:a,arrangeSelection:n,clearSelection:r,deleteSelectedElements:l,updateSelectedElements:i,setSelectedElementsById:o,currentPage:c,selectedElementAnimations:s,animationState:d,updateAnimationState:p}=Object(Z.e)((({state:{selectedElementIds:e,selectedElements:t,currentPage:C,selectedElementAnimations:a,animationState:n},actions:{arrangeSelection:r,clearSelection:l,deleteSelectedElements:i,updateSelectedElements:o,setSelectedElementsById:c,updateAnimationState:s}})=>({currentPage:C,selectedElementIds:e,selectedElements:t,arrangeSelection:r,clearSelection:l,deleteSelectedElements:i,updateSelectedElements:o,setSelectedElementsById:c,selectedElementAnimations:a,animationState:n,updateAnimationState:s}))),{actions:{clearTransforms:m}}=Object(G.b)(),{isEditing:h,getNodeForElement:b,setEditingElement:g}=Object($E.c)((({state:{isEditing:e},actions:{getNodeForElement:t,setEditingElement:C}})=>({isEditing:e,getNodeForElement:t,setEditingElement:C}))),E=Object(u.G)(null);E.current=C,Object(u.y)((()=>{const t=e.current;if(!t)return;const C=t.ownerDocument,a=()=>{setTimeout((()=>{if(C.activeElement===C.body){const e=E.current,C=1===(null==e?void 0:e.length)?b(e[0]):null;if(""!==window.getSelection().toString())return;C?C.focus({preventScroll:!0}):t.focus({preventScroll:!0})}}),300)};return C.addEventListener("focusout",a,!0),()=>{C.removeEventListener("focusout",a,!0)}}),[e,b]),Object(ve.g)("delete",(()=>l()),[l]),Object(ve.g)("esc",(()=>{r(),m()}),[r,m]),Object(ve.g)({key:["mod+a"]},(()=>{const e=c.elements.map((({id:e})=>e));o({elementIds:e})}),[c,o]),Object(ve.g)({key:["up","down","left","right"],shift:!0},(({key:e,shiftKey:t})=>{var C;if(h)return;if(null!=a&&null!==(C=a[0])&&void 0!==C&&C.isBackground)return;const{dx:n,dy:r}=Object(WE.a)(e,t);i({properties:({x:e,y:t})=>({x:e+n,y:t+r})})}),[i,h,a]),Object(ve.g)({key:["mod+up","mod+down","mod+left","mod+right"],shift:!0},(e=>{const{key:t,shiftKey:C}=e;e.preventDefault();const a=function(e,t){if("ArrowUp"===e)return t?sC.n.FRONT:sC.n.FORWARD;if("ArrowDown"===e)return t?sC.n.BACK:sC.n.BACKWARD;return null}(t,C);a&&n({position:a})}),[n]),Object(ve.g)({key:"enter",clickable:!1},(()=>{if(1!==a.length)return;const{type:e,id:t}=a[0],{hasEditMode:C}=Object(Ce.g)(e);C&&g(t)}),[a,g]);const v=Object(u.s)((()=>{if(0===a.length)return;const{elements:e,animations:C}=a.filter((({isBackground:e})=>!e)).reduce((({elements:e,animations:t},C)=>{const{element:n,elementAnimations:r}=Object(Ce.d)({element:C,animations:s,existingElements:a});return{elements:[...e,n],animations:[...t,...r]}}),{elements:[],animations:[]});t(e,C)}),[t,a,s]);Object(ve.g)("clone",(()=>v()),[v]);const y=[te.l.PLAYING,te.l.PLAYING_SELECTED].includes(d);Object(ve.g)({key:["mod+k"]},(e=>{e.preventDefault(),p({animationState:y?te.l.RESET:te.l.PLAYING}),Object(f.g)("canvas_play_animations",{status:y?"stop":"play"})}),[y,p])},XE=C(102),KE=C(93);function QE(){return(QE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const JE={position:"absolute",top:0,left:0,right:0,bottom:0},ev=Object(l.e)(["position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;"]),tv=l.f.svg.withConfig({displayName:"frame__DropTargetSVG",componentId:"sc-w3ubct-0"})([""," z-index:",";"],ev,(({active:e})=>e?1:-1)),Cv=l.f.svg.withConfig({displayName:"frame__Filler",componentId:"sc-w3ubct-1"})(["",""],ev),av=l.f.path.withConfig({displayName:"frame__FillerPath",componentId:"sc-w3ubct-2"})(["pointer-events:all;"]),nv=l.f.path.withConfig({displayName:"frame__DropTargetPath",componentId:"sc-w3ubct-3"})(["transition:opacity 0.5s;pointer-events:visibleStroke;opacity:",";stroke:",";"],(({active:e})=>e?.3:0),(({theme:e})=>e.colors.border.selection)),rv=l.f.div.withConfig({displayName:"frame__Wrapper",componentId:"sc-w3ubct-4"})(["width:100%;height:100%;::before{transition:opacity 0.5s;opacity:",";display:block;content:'';position:absolute;width:calc(100% + 8px);height:calc(100% + 8px);border-radius:8px;left:-4px;top:-4px;border:1px solid ",";}"],(({hasBackgroundOutline:e})=>e?1:0),(({theme:e})=>e.colors.border.selection));function WithDropTarget({element:e,children:t,hover:C}){const a=Object(u.G)(null),{draggingResource:n,activeDropTargetId:l,isDropSource:i,registerDropTarget:o,unregisterDropTarget:c}=Object(F.h)((({state:{draggingResource:e,activeDropTargetId:t},actions:{isDropSource:C,registerDropTarget:a,unregisterDropTarget:n}})=>({draggingResource:e,activeDropTargetId:t,isDropSource:C,registerDropTarget:a,unregisterDropTarget:n}))),{id:s,resource:d,isBackground:p}=e,m=Object(nu.b)(e);if(Object(u.y)((()=>(o(s,a.current),()=>{c(s)})),[s,o,c]),!m)return t;const f=C&&!n||Boolean(n)&&i(n.type)&&n!==d,h=f&&!p,b=f&&p,g={vectorEffect:"non-scaling-stroke",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",d:null==m?void 0:m.path};return r.a.createElement(rv,{hasBackgroundOutline:b},t,r.a.createElement(tv,{viewBox:"0 0 1 "+1/m.ratio,width:"100%",height:"100%",preserveAspectRatio:"none",active:l===e.id},r.a.createElement(nv,QE({},g,{strokeWidth:"3",style:{opacity:h?1:0}})),r.a.createElement(nv,QE({ref:a,strokeWidth:"48"},g))))}function WithMask({element:e,fill:t,style:C,children:a,eventHandlers:n=null,flip:l,...i}){const[o,c]=Object(u.I)(!1),{isBackground:s}=e,d=Object(u.G)(null);$u({node:d.current,eventData:{...qu.SELECT_ELEMENT,label:e.type},eventType:"pointerdown"});const p=Object(nu.b)(e),m=l?{transform:Object(XE.a)(l)}:null;if(null==p||!p.type||s&&p.type!==KE.c.RECTANGLE)return r.a.createElement("div",QE({style:{...t?JE:{},...C,...m}},i),a);const f=`mask-${p.type}-${e.id}-frame`;return r.a.createElement("div",QE({ref:d,style:{...t?JE:{},...C,...m,...s?{}:{clipPath:`url(#${f})`}}},i,n,{onPointerOver:()=>c(!0),onPointerOut:()=>c(!1)}),r.a.createElement("svg",{width:0,height:0},r.a.createElement("defs",null,r.a.createElement("clipPath",{id:f,transform:`scale(1 ${p.ratio})`,clipPathUnits:"objectBoundingBox"},r.a.createElement("path",{d:p.path})))),r.a.createElement(Cv,{viewBox:"0 0 1 "+1/p.ratio,width:"100%",height:"100%",preserveAspectRatio:"none"},r.a.createElement(av,{fill:"none",d:null==p?void 0:p.path})),r.a.createElement(WithDropTarget,{element:e,hover:o},a))}const lv=Object(l.f)(Ke.a).withConfig({displayName:"frame__StyledTooltip",componentId:"sc-1p9hi92-0"})(["box-shadow:0px 6px 10px ",";align-items:center;p{display:flex;max-width:100%;}"],(({theme:e})=>Object(MC.c)(e.colors.standard.black,.1))),iv=l.f.div.withConfig({displayName:"frame__IconWrapper",componentId:"sc-1p9hi92-1"})(["background-color:",";width:24px;height:24px;border-radius:50%;margin-right:8px;display:inline-block;"],(({theme:e})=>e.colors.fg.secondary)),ov=l.f.img.withConfig({displayName:"frame__BrandIcon",componentId:"sc-1p9hi92-2"})(["width:100%;height:100%;border:none;"]),cv=l.f.span.withConfig({displayName:"frame__LinkDesc",componentId:"sc-1p9hi92-3"})(["padding-top:2px;flex:1;max-width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;"]);var sv=function WithLink({element:e,active:t,children:C,anchorRef:a}){const n=Object(Yp.b)(e),l=null!=n&&n.url&&t?r.a.createElement(r.a.Fragment,null,r.a.createElement(iv,null,(null==n?void 0:n.icon)&&r.a.createElement(ov,{src:n.icon,alt:Object(h.__)("Site Icon","web-stories")})),r.a.createElement(cv,null,n.desc||n.url)):null;return r.a.createElement(lv,{forceAnchorRef:a,placement:DC.a.TOP_START,title:l},C)};var dv=(e,t,C=null)=>{const[a,n]=Object(u.I)(null),[r,l]=Object(u.I)(null),i=Object(u.s)((C=>r=>{if(r.stopPropagation(),a!==C)return a&&e(r,a),n(C),void l(r);t(r,a),n(null)}),[e,t,a]);return Object(u.y)((()=>{if(!a)return;const t=setTimeout((()=>{n(null),e(r,a)}),C||uv);return()=>{clearTimeout(t)}}),[a,r,e,C]),i};const uv=200;function pv(){return(pv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const mv=l.f.div.withConfig({displayName:"frameElement__Wrapper",componentId:"sc-1ta1rzs-0"})([""," "," "," pointer-events:",";outline:1px solid transparent;transition:outline-color 0.5s;&:focus,&:active,&:hover{outline-color:",";}"],ae.h,ae.j,ae.i,(({maskDisabled:e})=>e?"initial":"none"),(({theme:e,hasMask:t})=>t?"transparent":e.colors.border.selection)),fv=l.f.div.withConfig({displayName:"frameElement__EmptyFrame",componentId:"sc-1ta1rzs-1"})(["position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;"]),NOOP=()=>{};var hv=function FrameElement({element:e}){const t=Object(F.d)((({actions:e})=>e.setEditingElement)),{id:C,type:a,flip:n}=e,{Frame:l,isMaskable:i,Controls:o}=Object(Ce.g)(a),c=Object(u.G)(),[s,d]=Object(u.I)(!1),p=Object(F.q)((({state:e})=>e.isAnythingTransforming)),{setNodeForElement:m,handleSelectElement:f,isEditing:h}=Object(F.d)((({state:e,actions:t})=>({setNodeForElement:t.setNodeForElement,handleSelectElement:t.handleSelectElement,isEditing:e.isEditing}))),{isSelected:b,isSingleElement:g,isBackground:E}=Object(F.o)((({state:e})=>{var t;return{isSelected:e.selectedElementIds.includes(C),isSingleElement:1===e.selectedElementIds.length,isBackground:(null===(t=e.currentPage)||void 0===t?void 0:t.elements[0].id)===C}})),v=Object(ee.a)((({actions:e})=>e.getBox));Object(u.B)((()=>{m(C,c.current)}),[C,m]);const y=v(e),[O,M]=Object(u.I)(!1);Object(G.c)(C,(e=>{var t;const C=c.current;void 0!==(null==e||null===(t=e.dropTargets)||void 0===t?void 0:t.hover)&&(C.style.opacity=e.dropTargets.hover?0:1),M(null!==e)}));const{isMedia:w}=Object(Ce.g)(a),L=Object(u.s)((e=>{b||f(C,e),t(C)}),[C,t,f,b]),_=dv(NOOP,L),j=Object(nu.b)(e),x=!(null!=j&&j.type)||E&&j.type!==KE.c.RECTANGLE,Z={onMouseDown:e=>{b||f(C,e),c.current.focus({preventScroll:!0}),E||e.stopPropagation()},onFocus:e=>{b||f(C,e)},onPointerEnter:()=>d(!0),onPointerLeave:()=>d(!1),onClick:w?_(C):null};return $u({node:x?c.current:null,eventData:{...qu.SELECT_ELEMENT,label:e.type},eventType:"pointerdown"}),r.a.createElement(sv,{element:e,active:!b&&s&&!p,anchorRef:c},o&&r.a.createElement(o,{isTransforming:O,isSelected:b,isSingleElement:g,isEditing:h,box:y,elementRef:c,element:e}),r.a.createElement(mv,pv({ref:c,"data-element-id":C},y,{tabIndex:0,"aria-labelledby":`layer-${C}`,hasMask:i,"data-testid":"frameElement",maskDisabled:x},x?Z:null),r.a.createElement(WithMask,{element:e,fill:!0,flip:n,eventHandlers:x?null:Z},l?r.a.createElement(l,{wrapperRef:c,element:e,box:y}):r.a.createElement(fv,null))))},bv=C(244);var gv=function({targetList:e,frames:t,setTransformStyle:C,onGroupEventStart:a,onGroupEventEnd:n,isDragging:r,setIsDragging:l}){const{draggingResource:i}=Object(V.b)((({state:{draggingResource:e}})=>({draggingResource:e}))),{nodesById:o,handleSelectElement:c}=Object(F.d)((({state:{nodesById:e},actions:{handleSelectElement:t}})=>({nodesById:e,handleSelectElement:t}))),s=Object(u.G)({}),d=r||Boolean(i);return{onDragGroup:({events:a})=>{a.forEach((({target:a,beforeTranslate:n},r)=>{const l=t[r],{element:i}=e[r];l.translate=n,C(i.id,a,l)}))},onDragGroupEnd:({targets:e,inputEvent:t})=>{l(!1),(e=>{if(Object(bv.a)(s.current,e))return!1;const t=Object.keys(o).find((t=>o[t].contains(e.target)));return t&&c(t,e),!0})(t)||n({targets:e})},onDragGroupStart:({events:e,inputEvent:t})=>{(e=>{const{timeStamp:t,clientX:C,clientY:a}=e;s.current={timeStamp:t,clientX:C,clientY:a}})(t),r||l(!0),a({events:e,isDrag:!0})},className:"default-moveable "+(d?"hide-handles":""),resizable:!d,rotatable:!d}};var Ev=function({onGroupEventEnd:e,targetList:t,setTransformStyle:C,frames:a}){const{editorToDataX:n,editorToDataY:r,dataToEditorY:l}=Object(ee.a)((e=>({editorToDataX:e.actions.editorToDataX,editorToDataY:e.actions.editorToDataY,dataToEditorY:e.actions.dataToEditorY})));return{onResizeGroup:({events:e})=>{e.forEach((({target:e,direction:i,width:o,height:c,drag:s},d)=>{const u=a[d],{element:p,updateForResizeEvent:m}=t[d];let f=c;const h=o;let b=null;m&&(b=m(p,i,n(h),r(f))),b&&b.height&&(f=l(b.height)),e.style.width=`${h}px`,e.style.height=`${f}px`,u.direction=i,u.resize=[h,f],u.translate=s.beforeTranslate,u.updates=b,C(p.id,e,u)}))},onResizeGroupStart:({events:e})=>{e.forEach(((e,t)=>{const C=a[t];e.setOrigin(["%","%"]),e.dragStart&&e.dragStart.set(C.translate)}))},onResizeGroupEnd:({targets:t})=>{e({targets:t,isResize:!0})}}};var vv=function({onGroupEventStart:e,setTransformStyle:t,onGroupEventEnd:C,targetList:a,frames:n}){return{onRotateGroup:({events:e})=>{e.forEach((({target:e,beforeRotate:C,drag:r},l)=>{const i=n[l],{element:o}=a[l];i.rotate=utils_normalizeRotationDegrees(C),i.translate=r.beforeTranslate,t(o.id,e,i)}))},onRotateGroupEnd:({targets:e})=>{C({targets:e,isRotate:!0})},onRotateGroupStart:({events:t})=>{e({events:t,isRotate:!0})},throttleRotate:Object(ve.f)("shift")?30:0}};function yv(){return(yv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Ov=["nw","ne","sw","se"];var Mv=function MultiSelectionMoveable({selectedElements:e,...t}){const C=Object(u.G)(),{updateElementsById:a,deleteElementsById:n,backgroundElement:l}=Object(F.o)((e=>{var t;return{updateElementsById:e.actions.updateElementsById,deleteElementsById:e.actions.deleteElementsById,backgroundElement:null!==(t=e.state.currentPage.elements[0])&&void 0!==t?t:{}}})),{nodesById:i,fullbleedContainer:o}=Object(F.d)((({state:{nodesById:e,fullbleedContainer:t}})=>({fullbleedContainer:t,nodesById:e}))),{editorToDataX:c,editorToDataY:s}=Object(ee.a)((e=>({editorToDataX:e.actions.editorToDataX,editorToDataY:e.actions.editorToDataY}))),{zoomSetting:d,scrollLeft:p,scrollTop:m}=Object(F.l)((({state:{zoomSetting:e,scrollLeft:t,scrollTop:C}})=>({zoomSetting:e,scrollLeft:t,scrollTop:C}))),{actions:{pushTransform:f}}=Object(G.b)();Xg(C),Object(u.y)((()=>{C.current&&C.current.updateRect()}),[e,C,i,p,m]),qg(C,[d]);const h=e.map((e=>({element:e,node:i[e.id],updateForResizeEvent:Object(Ce.g)(e.type).updateForResizeEvent}))),[b,g]=Object(u.I)(!1),E=(e,t,C)=>{t.style.transform=`translate(${C.translate[0]}px, ${C.translate[1]}px) rotate(${C.rotate}deg)`,f(e,C)},v=h?h.map((({element:e})=>({translate:[0,0],rotate:e.rotationAngle,direction:[0,0],resize:[0,0],updates:null}))):[],y=({events:e,isDrag:t,isRotate:C})=>{e.forEach(((e,a)=>{const n=v[a];t?e.set(n.translate):C&&e.set(n.rotate)}))},O=({targets:e,isRotate:t,isResize:r})=>{const l={},i=[];e.forEach(((e,C)=>{const{element:a,updateForResizeEvent:n}=h[C];if(Kg(e,o))return void i.push(a.id);const d=v[C],{direction:u}=d,p=e=>Math.abs(e)<=1?0:e,m={x:p(a.x+c(d.translate[0])),y:p(a.y+s(d.translate[1]))};t&&(m.rotationAngle=d.rotate);const[f,b]=d.resize;if(r&&(0!==f&&0!==b)){const e=c(f),t=s(b);m.width=e,m.height=t,n&&Object.assign(m,n(a,u,e,t))}l[a.id]=m})),a({elementIds:Object.keys(l),properties:e=>l[e.id]}),i.length>0&&n({elementIds:i}),h.forEach((({element:e,node:t},C)=>{v[C].direction=[0,0],v[C].translate=[0,0],v[C].resize=[0,0],v[C].updates=null,t.style.transform="",t.style.width="",t.style.height="",f(e.id,null)})),C.current&&C.current.updateRect()},M=Object.values(Object(Yg.a)(i,[...e.map((e=>e.id)),l.id])),w=$g({canSnap:!0,otherNodes:M}),L=gv({targetList:h,frames:v,setTransformStyle:E,onGroupEventStart:y,onGroupEventEnd:O,isDragging:b,setIsDragging:g}),_=Ev({onGroupEventEnd:O,targetList:h,setTransformStyle:E,frames:v}),j=vv({onGroupEventStart:y,setTransformStyle:E,onGroupEventEnd:O,targetList:h,frames:v});return h.some((({node:e})=>void 0===e))?null:r.a.createElement(zg.a,yv({},t,{className:"default-moveable",ref:C,zIndex:0,target:h.map((({node:e})=>e)),draggable:!0,resizable:!0,rotatable:!0,renderDirections:Ov},L,j,_,w))};function wv(){return(wv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var Lv=function Selection(e){var t,C;const a=Object(F.o)((({state:e})=>{var t,C,a;return(null===(t=e.selectedElements[0])||void 0===t?void 0:t.id)===(null===(C=e.currentPage.elements)||void 0===C||null===(a=C[0])||void 0===a?void 0:a.id)})),{selectedElements:n,isAnimating:l}=Object(F.o)((e=>({selectedElements:e.state.selectedElements,isAnimating:[te.l.PLAYING,te.l.PLAYING_SELECTED,te.l.SCRUBBING].includes(e.state.animationState)}))),{editingElement:i,lastSelectionEvent:o,nodesById:c}=Object(F.d)((({state:{editingElement:e,lastSelectionEvent:t,nodesById:C}})=>({editingElement:e,lastSelectionEvent:t,nodesById:C})));if(0===n.length)return null;if(a)return null;if(null===(t=n[0])||void 0===t||null===(C=t.resource)||void 0===C?void 0:C.isPlaceholder)return null;if(i||l)return null;if(1===n.length){const e=n[0],t=c[e.id];return t?r.a.createElement(oE,{selectedElement:e,targetEl:t,pushEvent:o}):null}return r.a.createElement(Mv,wv({},e,{selectedElements:n}))};const _v=l.f.div.withConfig({displayName:"pagenav__Wrapper",componentId:"sc-vi3y8w-0"})(["display:flex;align-items:center;color:",";& > *{pointer-events:initial;}"],(({theme:e})=>e.colors.fg.white)),jv=Object(l.f)(Xe.a.ArrowLeftLarge).withConfig({displayName:"pagenav__FlippableArrow",componentId:"sc-vi3y8w-1"})(["transform:rotate(","turn);"],(({$isLeft:e})=>e?0:.5));var xv=function PageNav({isNext:e=!0}){const{pages:t,currentPageIndex:C,setCurrentPage:a}=Object(F.o)((({state:{pages:e,currentPageIndex:t},actions:{setCurrentPage:C}})=>({pages:e,currentPageIndex:t,setCurrentPage:C}))),{isRTL:n}=Object(F.g)(),l=Object(u.G)(null),i=Object(u.s)((e=>e.stopPropagation()),[]),o=Object(u.s)((()=>{const n=e?t[C+1]:t[C-1];n&&a({pageId:n.id})}),[a,C,e,t]),{hasPageNavigation:c}=Object(F.l)((({state:{hasPageNavigation:e}})=>({hasPageNavigation:e})));if($u({node:l.current,eventData:qu.PAGE_NAVIGATION}),!c)return!1;const s=e&&C<t.length-1||!e&&C>0,d=n===e;return r.a.createElement(_v,null,r.a.createElement(b.a,{ref:l,variant:g.d.SQUARE,type:g.c.TERTIARY,size:g.a.MEDIUM,"aria-disabled":!s,"aria-label":e?Object(h.__)("Next Page","web-stories"):Object(h.__)("Previous Page","web-stories"),onClick:o,onMouseDown:i},r.a.createElement(jv,{$isLeft:d})))};const Zv=Object(l.f)(Wo).withConfig({displayName:"framesLayer__FramesPageArea",componentId:"sc-1dr1gni-0"})(["pointer-events:initial;"]),Av=sC.g/Q.h*100,Iv=l.f.div.withConfig({displayName:"framesLayer__DesignSpaceGuideline",componentId:"sc-1dr1gni-1"})(["border:1px solid ",";left:","%;right:","%;top:0;bottom:0;position:absolute;pointer-events:none;z-index:1;visibility:",";"],(({theme:e})=>e.colors.border.negativePress),Av,Av,(({isVisible:e})=>e?"visible":"hidden"));var Tv=Object(u.m)((function FramesLayer(){const{currentPage:e,isAnimating:t}=Object(F.o)((e=>({currentPage:e.state.currentPage,isAnimating:[te.l.PLAYING,te.l.SCRUBBING].includes(e.state.animationState)}))),{setDesignSpaceGuideline:C}=Object(F.d)((({actions:{setDesignSpaceGuideline:e}})=>({setDesignSpaceGuideline:e}))),{isAnythingTransforming:a}=Object(F.q)((e=>({isAnythingTransforming:e.state.isAnythingTransforming}))),n=Object(u.G)(null);qE(n);const{onOpenMenu:l}=Object(F.n)(),{setScrollOffset:i}=Object(F.l)((({actions:{setScrollOffset:e}})=>({setScrollOffset:e}))),o=Object(u.s)((e=>i({left:e.target.scrollLeft,top:e.target.scrollTop})),[i]);return Object(ve.h)(n,"mod+alt+shift+m",l),r.a.createElement(Ro,{ref:n,"data-testid":"FramesLayer",pointerEvents:"initial",tabIndex:"-1","aria-label":Object(h.__)("Frames layer","web-stories")},!t&&r.a.createElement(Zv,{fullBleedContainerLabel:Object(h.__)("Fullbleed area (Frames layer)","web-stories"),onContextMenu:l,onScroll:o},e&&e.elements.map((e=>r.a.createElement(hv,{key:e.id,element:e}))),r.a.createElement(Iv,{ref:C,isVisible:a})),r.a.createElement(Ho,null,r.a.createElement(xv,{isNext:!1})),r.a.createElement(Go,null,r.a.createElement(xv,null)),r.a.createElement(Lv,{onContextMenu:l}))})),Sv=Object(u.f)({state:{},actions:{}});var Rv=({children:e})=>{const[t,C]=Object(u.I)(!1),a=Object(u.s)((e=>{e.preventDefault(),Object(f.g)("shortcuts_menu_toggled",{status:t?"closed":"open"}),C((e=>!e))}),[t]),n=Object(u.s)((()=>{t&&(Object(f.g)("shortcuts_menu_toggled",{status:"closed"}),C(!1))}),[t]),l=Object(u.C)((()=>({state:{isOpen:t},actions:{toggle:a,close:n}})),[n,t,a]);return r.a.createElement(Sv.Provider,{value:l},e)};function kv(e){return Object(u.w)(Sv,null!=e?e:u.k)}var Pv=Object(u.f)({state:{},actions:{}});var Nv=function(e){return Object(u.w)(Pv,null!=e?e:u.k)};const Dv=Object(l.f)(Xe.a.ArrowLeft).withConfig({displayName:"carouselScroll__FlippableArrow",componentId:"sc-w59vla-0"})(["transform:rotate(","turn);"],(({$isLeft:e})=>e?0:.5));function CarouselScrollButton({isNext:e=!1}){const{hasOverflow:t,canScrollBack:C,canScrollForward:a,scrollBack:n,scrollForward:l}=Nv((({state:{hasOverflow:e,canScrollBack:t,canScrollForward:C},actions:{scrollBack:a,scrollForward:n}})=>({hasOverflow:e,canScrollBack:t,canScrollForward:C,scrollBack:a,scrollForward:n}))),{isRTL:i}=Object(F.g)();if(!t)return null;const o=e?a:C,c=e?l:n,s=e?Object(h.__)("Scroll Forward","web-stories"):Object(h.__)("Scroll Back","web-stories"),d=i===e;return r.a.createElement(b.a,{variant:g.d.SQUARE,type:g.c.PLAIN,size:g.a.SMALL,disabled:!o,onClick:c,"aria-label":s},r.a.createElement(Dv,{$isLeft:d}))}function CarouselScrollForward(){return r.a.createElement(CarouselScrollButton,{isNext:!0})}function CarouselScrollBack(){return r.a.createElement(CarouselScrollButton,null)}function zv(){return(zv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Bv=l.f.button.withConfig({displayName:"pagepreview__Page",componentId:"sc-i45m4c-0"})(["display:block;position:relative;cursor:",";padding:0;border:0;background-color:transparent;height:","px;width:","px;flex:none;outline:0;&::after{content:'';display:block;position:absolute;left:-4px;right:-4px;top:-4px;bottom:-4px;pointer-events:none;border-style:solid;border-width:1px;border-radius:8px;border-color:",";}",""],(({isInteractive:e})=>e?"pointer":"default"),(({height:e})=>e),(({width:e})=>e),(({isActive:e,theme:t})=>e?t.colors.border.defaultActive:"transparent"),(({isInteractive:e,isActive:t,theme:C})=>e&&Object(l.e)(["&:focus::after{border-color:",";}"],Object(MC.c)(C.colors.border.selection,t?1:.7)))),Fv=l.f.div.withConfig({displayName:"pagepreview__PreviewWrapper",componentId:"sc-i45m4c-1"})(["height:100%;position:relative;overflow:hidden;background-color:white;border-radius:4px;",""],(({background:e})=>Object(J.a)(e))),Hv=l.f.img.withConfig({displayName:"pagepreview__Image",componentId:"sc-i45m4c-2"})(["width:100%;"]);var Gv=function PagePreview({page:e,label:t,isCacheable:a=!1,cachedImage:n=null,setCachedImage:l=null,...i}){const{backgroundColor:o}=e,{width:c,height:s,isActive:d}=i,[m,f]=Object(u.I)(),h=Object(u.s)((e=>e&&f(e)),[]),b=Object(u.G)(),g=Object(p.b)("enableThumbnailCaching")&&a;return Object(u.y)((()=>{g&&d&&b.current!==e&&(l({pageId:e.id,cachedImage:null}),b.current=null)}),[e,l,d,g]),Object(u.y)((()=>{if(g&&!d&&m&&!n){const t=$((()=>{C.e(197).then(C.bind(null,1052)).then((t=>{t.toJpeg(m,{quality:1}).then((t=>l({pageId:e.id,cachedImage:t}))),b.current=e}))}),{timeout:5e3});return()=>q(t)}}),[g,d,m,n,l,e]),$u({node:m,eventData:qu.PAGE_PREVIEW_CLICK}),r.a.createElement(K.a,{pageSize:{width:c,height:s}},r.a.createElement(G.a,null,r.a.createElement(Bv,zv({ref:h,"aria-label":t},i),r.a.createElement(Fv,{background:o},n?r.a.createElement(Hv,{src:n,width:c,height:s,alt:t,decoding:"async"}):e.elements.map((e=>r.a.createElement(ue,{key:e.id,previewMode:!0,element:e})))))))};const Vv=l.f.div.withConfig({displayName:"carouselPage__Line",componentId:"sc-16n0jvo-0"})(["background:",";height:","px;width:","px;margin:0px;"],(({theme:e})=>e.colors.border.selection),(({height:e})=>e),4),Uv=l.f.li.attrs({role:"presentation"}).withConfig({displayName:"carouselPage__ItemContainer",componentId:"sc-16n0jvo-1"})(["display:flex;position:relative;margin:0;padding:0;"]),Wv=Object(l.f)(vp).withConfig({displayName:"carouselPage__PageSeparator",componentId:"sc-16n0jvo-2"})(["position:absolute;bottom:0;left:","px;width:","px;height:","px;display:flex;justify-content:center;",":first-of-type &:first-of-type,",":last-of-type &:last-of-type{width:","px;}",":first-of-type &:first-of-type{left:","px;justify-content:flex-start;}",":first-of-type &:last-of-type{left:","px;}",":last-of-type &:last-of-type{justify-content:flex-end;}"],(({width:e})=>e/2),(({width:e,margin:t})=>e+t),(({height:e})=>e),Uv,Uv,(({width:e,margin:t})=>(e+t+4)/2),Uv,(({margin:e})=>(e-4)/2),Uv,(({width:e,margin:t})=>t+e/2),Uv),Yv=Object(l.f)(hp).withConfig({displayName:"carouselPage__ReorderablePage",componentId:"sc-16n0jvo-3"})(["display:flex;z-index:1;margin-right:","px;margin-left:","px;"],(({margin:e})=>e),(({margin:e,position:t})=>0===t?e:0));var $v=function CarouselPage({pageId:e,index:t}){const{pageThumbWidth:C,pageThumbHeight:a,pageThumbMargin:n,clickPage:l,setPageRef:i,page:o,isCurrentPage:c,hasMultiplePages:s,setCachedImage:d,cachedImage:u}=Nv((({state:{pageThumbWidth:t,pageThumbHeight:C,pageThumbMargin:a,numPages:n,pages:r,currentPageId:l,cachedImages:i},actions:{clickPage:o,setPageRef:c,setCachedImage:s}})=>({pageThumbWidth:t,pageThumbHeight:C,pageThumbMargin:a,clickPage:o,setPageRef:c,page:r.find((({id:t})=>t===e)),isCurrentPage:e===l,hasMultiplePages:n>1,cachedImage:i[e]||null,setCachedImage:s})));return o&&o.id?r.a.createElement(Uv,{ref:e=>i(o,e),"data-testid":`carousel-page-preview-${e}`},0===t&&r.a.createElement(Wv,{position:0,width:C,height:a,margin:n},r.a.createElement(Vv,{height:a})),r.a.createElement(Yv,{position:t,margin:n},r.a.createElement(Gv,{tabIndex:c&&s?0:-1,onClick:()=>l(o),role:"option","data-page-id":o.id,label:c?Object(h.sprintf)(
|
140 |
/* translators: %s: page number. */
|
141 |
-
Object(h.__)("Page %s (current page)","web-stories"),
|
142 |
/* translators: %s: page number. */
|
143 |
-
Object(h.__)("Go to page %s","web-stories"),
|
144 |
/* translators: 1: current page number. 2: total page count. */
|
145 |
-
Object(h._n)("%1$d of %2$d page","%1$d of %2$d pages",n,"web-stories"),a,n),r.a.createElement(
|
146 |
/* translators: %d: zoom level percentage value. */
|
147 |
-
Object(h._x)("%d%%","zoom level","web-stories"),Math.round(100*t))}),[e,t]),l=Object(u.s)(((e,t)=>{Object.prototype.hasOwnProperty.call(
|
148 |
/* translators: %s: page number. */
|
149 |
-
Object(h.__)("Page %s (current page)","web-stories"),
|
150 |
/* translators: %s: page number. */
|
151 |
-
Object(h.__)("Page %s","web-stories"),
|
152 |
/* translators: 1: Shift key. */
|
153 |
-
Object(h.__)("<lkbd>%s</lkbd> <span>+ click</span>","web-stories"),Object(
|
154 |
/* translators: 1: Cmd/Ctrl key. 2: Up key. 3: Down key. */
|
155 |
-
Object(h.__)("<lkbd>%1$s</lkbd> <kbd>%2$s</kbd> <span>or</span> <kbd>%3$s</kbd>","web-stories"),Object(
|
156 |
/* translators: 1: Cmd/Ctrl key. 2: Shift key. 3: Up key. 4: Down key. */
|
157 |
-
Object(h.__)("<lkbd>%1$s</lkbd> <lkbd>%2$s</lkbd> <kbd>%3$s</kbd> <span>or</span> <kbd>%4$s</kbd>","web-stories"),Object(
|
158 |
/* translators: %s: Enter key. */
|
159 |
-
Object(h.__)("<kbd>%s</kbd> <span>or double-click</span>","web-stories"),Object(
|
160 |
/* translators: %s: Cmd/Ctrl key. */
|
161 |
-
Object(h.__)("<span>Hold</span> <lkbd>%s</lkbd>","web-stories"),Object(
|
162 |
/* translators: 1: Shift key. */
|
163 |
-
Object(h.__)("<lkbd>%s</lkbd> <span>+ arrow keys</span>","web-stories"),Object(ve.d)("shift"))))}]}]},Vy=Gy.header,Uy=Gy.landmarks.filter((e=>!e.disabled)),Wy=Gy.sections.map((e=>({...e,commands:e.commands.filter((e=>!e.disabled))})));function Yy(){return(Yy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const $y=l.f.dd.withConfig({displayName:"shortcutLabel__Wrapper",componentId:"sc-1k4jmir-0"})(["display:block;margin:0;kbd{"," display:flex;justify-content:",";align-items:center;margin:0;padding:0;color:",";background-color:transparent;& > kbd{display:flex;justify-content:center;align-items:center;padding:0 5px;height:24px;width:24px;border-radius:",";border:1px solid ",";color:",";}& > kbd.large-key{width:auto;}kbd + kbd{margin-left:2px;}kbd + span{margin-left:4px;}span + kbd{margin-left:4px;}}"],X.c.expandTextPreset((({paragraph:e},{X_SMALL:t})=>e[t])),(({alignment:e})=>e),(({theme:e})=>e.colors.fg.secondary),(({theme:e})=>e.borders.radius.medium),(({theme:e})=>e.colors.border.defaultNormal),(({theme:e})=>e.colors.fg.primary));var qy=function ShortCutLabel({keys:e,alignment:t="center",...C}){return r.a.createElement($y,Yy({alignment:t},C),e)};function Xy(){return(Xy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Ky=l.f.dl.withConfig({displayName:"headerShortcut__List",componentId:"sc-11poczp-0"})(["margin:24px;display:flex;flex-shrink:0;"]),Qy=l.f.dt.withConfig({displayName:"headerShortcut__Item",componentId:"sc-11poczp-1"})(["margin:0 12px 0 0;"]);var Jy=function HeaderShortcut(e){const{label:t,shortcut:C}=Vy;return r.a.createElement(Ky,null,r.a.createElement(Qy,null,r.a.createElement(Kt.a,Xy({as:"h2",size:lt.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL},e),t)),r.a.createElement(qy,{keys:C}))};const eO=l.f.dl.withConfig({displayName:"landmarkShortcuts__LandmarksWrapper",componentId:"sc-2cd1xa-0"})(["background-color:",";margin:0;padding:16px 24px;display:flex;justify-content:space-between;"],(({theme:e})=>e.colors.bg.secondary)),tO=l.f.div.withConfig({displayName:"landmarkShortcuts__Landmark",componentId:"sc-2cd1xa-1"})(["display:flex;flex-direction:column-reverse;"]),CO=Object(l.f)(iC.a).attrs({size:lt.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL,forwardedAs:"span"}).withConfig({displayName:"landmarkShortcuts__Label",componentId:"sc-2cd1xa-2"})(["text-align:center;margin-top:8px;white-space:nowrap;display:inline-block;"]);var aO=function LandmarkShortcuts(){return r.a.createElement(eO,null,Uy.map((({label:e,shortcut:t})=>r.a.createElement(tO,{key:e},r.a.createElement("dt",null,r.a.createElement(CO,null,e)),r.a.createElement(qy,{keys:t})))))};const nO=Object(l.f)(Kt.a).attrs({as:"h3",size:lt.b.TYPOGRAPHY.PRESET_SIZES.XX_SMALL}).withConfig({displayName:"shortcutMenuSection__Header",componentId:"sc-1gbjp6b-0"})(["margin-top:24px;color:",";"],(({theme:e})=>e.colors.fg.primary)),rO=l.f.dl.withConfig({displayName:"shortcutMenuSection__List",componentId:"sc-1gbjp6b-1"})(["display:grid;grid-template-columns:1fr;row-gap:12px;align-items:center;margin:12px 0 0;"]),lO=l.f.div.withConfig({displayName:"shortcutMenuSection__ListRow",componentId:"sc-1gbjp6b-2"})(["display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto;column-gap:5px;align-items:center;dd{grid-column:1;grid-row:1;}dt{grid-column:2;grid-row:1;}"]),iO=Object(l.f)(iC.a).attrs({size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL,forwardedAs:"span"}).withConfig({displayName:"shortcutMenuSection__Label",componentId:"sc-1gbjp6b-3"})(["display:inline-block;color:",";"],(({theme:e})=>e.colors.fg.secondary));var oO=function ShortcutMenuSection({title:e,commands:t}){const C=`header-${Object(Dn.a)()}`;return r.a.createElement(r.a.Fragment,null,r.a.createElement(nO,{id:C},e),r.a.createElement(rO,{title:e},t.map((({label:e,shortcut:t})=>r.a.createElement(lO,{key:e},r.a.createElement("dt",null,r.a.createElement(iO,null,e)),r.a.createElement(qy,{keys:t,alignment:"left"}))))))};const cO=l.f.div.withConfig({displayName:"regularShortcuts__ContentWrapper",componentId:"sc-1wykblb-0"})(["display:flex;flex-direction:column;margin:0 24px 24px;"]);var sO=function RegularShortcuts(){return r.a.createElement(cO,null,Wy.map((({title:e,commands:t})=>r.a.createElement(oO,{key:e,title:e,commands:t}))))};const dO="mod+/",uO=l.f.div.withConfig({displayName:"shortcutMenu__Container",componentId:"sc-1btxxuj-0"})(["position:absolute;left:0;bottom:0;width:352px;border-radius:",";background-color:",";border:","px solid ",";"],(({theme:e})=>e.borders.radius.small),(({theme:e})=>e.colors.bg.primary),1,(({theme:e})=>e.colors.border.defaultNormal)),pO=sC.a+sC.j+16-2,mO=l.f.div.withConfig({displayName:"shortcutMenu__FlexContent",componentId:"sc-1btxxuj-1"})(["display:flex;flex-direction:column;max-height:calc( 100vh - ","px - ","px );"],pO,(({bottomOffset:e})=>e)),fO=l.f.div.withConfig({displayName:"shortcutMenu__CloseContainer",componentId:"sc-1btxxuj-2"})(["position:absolute;right:4px;top:4px;"]),hO=l.f.div.withConfig({displayName:"shortcutMenu__ScrollableContent",componentId:"sc-1btxxuj-3"})(["overflow:auto;flex-shrink:1;",";"],X.c.focusableOutlineCSS),bO=`kb-header-${Object(Dn.a)()}`;var gO=function ShortcutMenu(){const e=Object(u.G)(),t=Object(u.G)(),{close:C,toggleMenu:a,isOpen:n}=kv((({actions:e,state:t})=>({toggleMenu:e.toggleMenu,close:e.close,isOpen:t.isOpen}))),[l,i]=Object(u.I)(0);return Object(u.B)((()=>{const e=t.current;if(!e)return;const C=()=>{const t=e.getBoundingClientRect(),C=e.ownerDocument.documentElement.getBoundingClientRect();i(C.height-t.y-t.height)};return C(),setTimeout(C),window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)}),[]),Object(u.y)((()=>{n&&e.current&&e.current.focus()}),[n]),Object(ve.h)(t,dO,a,[a]),Object(ve.h)(t,"esc",C),r.a.createElement(uO,{ref:t},r.a.createElement(fO,null,r.a.createElement(b.a,{ref:e,type:g.c.PLAIN,size:g.a.SMALL,variant:g.d.CIRCLE,onClick:C,"aria-label":Object(h.__)("Close Menu","web-stories")},r.a.createElement(Xe.a.Cross,null))),r.a.createElement(mO,{bottomOffset:l},r.a.createElement(Jy,{id:bO}),r.a.createElement(hO,{role:"presentation",tabIndex:0},r.a.createElement(aO,null),r.a.createElement(sO,null))))};const EO=Object(l.f)(dc).withConfig({displayName:"keyboardShortcutsMenu__StyledToggleButton",componentId:"sc-1x40vt8-0"})(["padding-left:","px;padding-right:","px;width:auto;display:block;"],3,3),vO=l.f.div.withConfig({displayName:"keyboardShortcutsMenu__Wrapper",componentId:"sc-1x40vt8-1"})(["z-index:",";"],Zo+1),yO=Object(l.f)(Xe.a.Keyboard).withConfig({displayName:"keyboardShortcutsMenu__MainIcon",componentId:"sc-1x40vt8-2"})(["height:32px;width:auto;display:block;"]);var OO=function KeyboardShortcutsMenu(){const e=Object(u.G)(),t=Object(u.G)(),{close:C,toggle:a,isOpen:n}=kv((({actions:{close:e,toggle:t},state:{isOpen:C}})=>({close:e,toggle:t,isOpen:C})));return Object(u.y)((()=>{var t,C;document.body.classList.contains(Se)&&!n&&(null==e||null===(t=e.current)||void 0===t||null===(C=t.focus)||void 0===C||C.call(t))}),[n]),Object(ve.g)(dO,a,[a]),Object(u.z)(t,C,[C]),r.a.createElement(Bt,null,r.a.createElement(vO,{ref:t},r.a.createElement(go,{popupId:"keyboard_shortcut_menu",isOpen:n,ariaLabel:Object(h.__)("Keyboard Shortcuts","web-stories")},r.a.createElement(gO,{toggleMenu:a})),r.a.createElement(EO,{ref:e,isOpen:n,"aria-owns":"keyboard_shortcut_menu",onClick:a,"aria-label":Object(h.__)("Keyboard Shortcuts","web-stories"),label:Object(h.__)("Keyboard Shortcuts","web-stories"),MainIcon:yO,shortcut:"mod+/"})))},MO=C(51);function wO(){var e;null===(e=document.querySelector(MO.b))||void 0===e||e.focus()}const LO=Object(l.e)(["color:",";"],(({theme:e})=>e.colors.fg.secondary)),_O=Object(l.f)(co).withConfig({displayName:"bottomNavigation__BottomNavBar",componentId:"sc-1lauf0u-0"})(["position:absolute;bottom:0;transition:transform ","ms ",";z-index:2;",""],MO.g,lt.a.default,(({isHidden:e})=>e&&Object(l.e)(["transform:translateY(100%);"]))),jO=l.f.div.withConfig({displayName:"bottomNavigation__BottomNavButtons",componentId:"sc-1lauf0u-1"})(["display:flex;padding:0 16px;white-space:nowrap;"]),xO=l.f.div.withConfig({displayName:"bottomNavigation__ArrowWrap",componentId:"sc-1lauf0u-2"})([""," margin:-5px -16px;"," svg{display:block;}"],LO,(({isRTL:e})=>e&&Object(l.e)(["transform:rotate(180deg);"])));function BottomNavigation({onAllTips:e,onPrev:t,onNext:C,hasBottomNavigation:a,isNextDisabled:n,isPrevDisabled:l}){const{isRTL:i}=Object(L.c)(),o=Object(u.G)(null),c=Object(u.G)(null),[s,d]=Object(u.I)({isPrevDisabled:l,isNextDisabled:n});return Object(u.y)((()=>{[l&&document.activeElement===o.current,n&&document.activeElement===c.current].forEach((e=>(e=>t=>{e&&t()})(e)(wO))),d({isPrevDisabled:l,isNextDisabled:n})}),[l,n]),r.a.createElement(_O,{"aria-hidden":!a,isHidden:!a},r.a.createElement(jO,null,r.a.createElement(so,{onClick:()=>{wO(),e()},type:g.c.PLAIN,size:g.a.SMALL,disabled:!a},r.a.createElement(xO,{isRTL:i},r.a.createElement(Xe.a.ArrowLeft,null)),r.a.createElement(ZO,null,Object(h.__)("All Tips","web-stories")))),r.a.createElement(jO,null,r.a.createElement(so,{ref:o,onClick:t,type:g.c.PLAIN,size:g.a.SMALL,disabled:!a||s.isPrevDisabled},Object(h.__)("Previous","web-stories")),r.a.createElement(so,{ref:c,onClick:C,type:g.c.PLAIN,size:g.a.SMALL,disabled:!a||s.isNextDisabled},Object(h.__)("Next","web-stories"))))}var ZO=Object(l.f)("span").withConfig({displayName:"bottomNavigation___StyledSpan",componentId:"sc-1lauf0u-3"})(["",""],LO);const AO=l.f.div.withConfig({displayName:"navigator__Layout",componentId:"sc-1i4k9x2-0"})([""," contain:content;"],X.c.fullSizeRelative),IO=l.f.div.withConfig({displayName:"navigator__Content",componentId:"sc-1i4k9x2-1"})([""]),TO=l.f.div.withConfig({displayName:"navigator__ContentInner",componentId:"sc-1i4k9x2-2"})(["position:relative;"]);var SO=Object(u.m)((function Navigator({children:e,isOpen:t,onClose:C,onNext:a,onPrev:n,onAllTips:l,hasBottomNavigation:i,isNextDisabled:o,isPrevDisabled:c}){const s=Object(u.G)(null),d=Object(u.G)(null);return Object(u.y)((()=>function(e,t){if(!e||!t)return()=>{};const{height:C}=e.getBoundingClientRect();t.style.height=`${C}px`,e.style.position="absolute",e.style.bottom=0,e.style.content="contain";let a=requestAnimationFrame((()=>{a=requestAnimationFrame((()=>{t.style.transition=`height ${MO.g}ms ${lt.a.default}`}))}));return()=>cancelAnimationFrame(a)}(s.current,d.current)),[]),Object(u.H)(s,(({height:e})=>{d.current&&(d.current.style.height=`${e}px`)}),[]),r.a.createElement(Xt,{isOpen:t},r.a.createElement(TopNavigation,{onClose:C,label:Object(h.__)("Quick Tips","web-stories"),popupId:MO.e}),r.a.createElement(AO,{ref:d},r.a.createElement(IO,{ref:s},r.a.createElement(TO,null,e))),r.a.createElement(BottomNavigation,{onNext:a,onPrev:n,onAllTips:l,hasBottomNavigation:i,isNextDisabled:o,isPrevDisabled:c}))})),RO=C(794);const kO=l.f.div.withConfig({displayName:"header__Panel",componentId:"sc-1z0sxca-0"})(["padding:24px 0 16px 0;border-bottom:1px solid ",";"],(({theme:e})=>e.colors.bg.tertiary)),PO=l.f.h1.withConfig({displayName:"header__Heading",componentId:"sc-1z0sxca-1"})([""," color:",";line-height:32px;margin:0 0 8px 0;"],X.c.expandTextPreset((({label:e},{MEDIUM:t})=>e[t])),(({theme:e})=>e.colors.fg.primary));function NO(){return r.a.createElement(kO,null,r.a.createElement(PO,{as:"h2"},Object(h.__)("Web Stories Help Center","web-stories")),r.a.createElement(iC.a,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL},Object(h.__)("Discover tips & resources to help you get the most out of your Web Stories.","web-stories")))}const DO=l.f.div.withConfig({displayName:"tips__Panel",componentId:"sc-a4c0mw-0"})(["padding:24px 0;"]),zO=Object(l.f)(b.a).withConfig({displayName:"tips__StyledButton",componentId:"sc-a4c0mw-1"})([""," display:flex;justify-content:space-between;width:100%;padding:6px 0;"],X.c.expandTextPreset((({label:e},{SMALL:t})=>e[t]))),BO=l.f.span.withConfig({displayName:"tips__ButtonText",componentId:"sc-a4c0mw-2"})(["vertical-align:middle;text-align:left;",""],(({unread:e,theme:t})=>e&&Object(l.e)(["&::before{content:' ';display:inline-block;height:10px;width:10px;margin-right:16px;border-radius:",";background-color:",";}"],t.borders.radius.round,t.colors.accent.primary))),FO=l.f.div.withConfig({displayName:"tips__ArrowWrap",componentId:"sc-a4c0mw-3"})(["width:32px;margin:-9px;transform-origin:50% 50%;transform:",";"],(({isRTL:e})=>e?"none":"rotate(180deg)")),HO=Object(l.f)(Xe.a.ArrowLeft).withConfig({displayName:"tips__StyledArrow",componentId:"sc-a4c0mw-4"})(["width:100%;"]);function Tip({children:e,onClick:t,unread:C=!0}){const{isRTL:a}=Object(L.c)();return r.a.createElement(zO,{size:g.a.SMALL,onClick:t},r.a.createElement(BO,{unread:C},e),r.a.createElement(FO,{isRTL:a},r.a.createElement(HO,null)))}function Tips({onTipSelect:e=(()=>{}),readTips:t}){const{state:{tips:C}}=Object(F.j)(),a=Object.entries(C);return r.a.createElement(DO,null,a.map((([C,a])=>r.a.createElement(Tip,{unread:!t[C],key:C,onClick:()=>{wO(),e(C)}},a.title))))}function GO(){return(GO=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const VO=1.2*MO.g,UO=Object(l.e)(["opacity:1;transform:none;"]),WO=Object(l.e)(["position:absolute;bottom:0;opacity:0.6;transform:scale(0.96);"]),YO={entering:UO,entered:UO,exiting:WO,exited:WO},$O=l.f.div.withConfig({displayName:"transitioner__Manager",componentId:"sc-1vsf3oe-0"})(["position:relative;color:",";opacity:0.6;transform-origin:50% 50%;transform:scale(0.96);transition:transform ","ms ",",opacity ","ms ",";z-index:",";",";"],(({theme:e})=>e.colors.fg.primary),VO,lt.a.default,VO,lt.a.default,MO.h.MENU,(({state:e})=>YO[e]));function Transitioner({children:e,...t}){return r.a.createElement(ScheduledTransition,GO({},t,{timeout:VO,mountOnEnter:!0,unmountOnExit:!0}),(t=>r.a.createElement($O,{state:t},e)))}const qO=l.f.div.withConfig({displayName:"menu__Container",componentId:"sc-1asuyqk-0"})(["padding:0 ","px;max-height:60vh;overflow-y:scroll;*{user-select:text;}"],MO.c);function Menu({onTipSelect:e=qt.a,readTips:t,components:C,...a}){const n=null==C?void 0:C.Footer;return r.a.createElement(Transitioner,a,r.a.createElement(qO,{"data-testid":"help_center_container"},r.a.createElement(NO,null),r.a.createElement(Tips,{readTips:t,onTipSelect:e}),n&&r.a.createElement(n,null)))}var XO=C(387);function KO(){return(KO=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const QO=MO.g-80,JO=l.f.div.withConfig({displayName:"transitioner__Opacity",componentId:"sc-iwbzf5-0"})([""]),eM=()=>Object(l.e)(["transition-delay:","ms;transform:none;","{opacity:1;}"],80,JO),tM=({isLeftToRightTransition:e})=>Object(l.e)(["position:absolute;bottom:0;","{opacity:0;}",""],JO,e?Object(l.e)(["transform:translateX(-100%);"]):Object(l.e)(["transform:translateX(100%);"])),CM={entering:eM,entered:eM,exiting:tM,exited:tM},aM=l.f.div.withConfig({displayName:"transitioner__Manager",componentId:"sc-iwbzf5-1"})(["position:relative;color:",";background-color:",";transition:transform ","ms ",";transform-origin:50% 50%;z-index:",";"," ","{opacity:0.6;transition:opacity ","ms ",";}",";"],(({theme:e})=>e.colors.fg.primary),(({theme:e})=>e.colors.bg.primary),QO,lt.a.default,MO.h.QUICK_TIP,(({isLeftToRightTransition:e})=>e?Object(l.e)(["transform:translateX(100%);"]):Object(l.e)(["transform:translateX(-100%);"])),JO,QO,lt.a.default,(({state:e,...t})=>{var C;return null===(C=CM[e])||void 0===C?void 0:C.call(CM,t)}));function nM({children:e,isLeftToRightTransition:t,...C}){return r.a.createElement(ScheduledTransition,KO({},C,{timeout:{enter:QO+80,exit:QO},mountOnEnter:!0,unmountOnExit:!0}),(C=>r.a.createElement(aM,{state:C,isLeftToRightTransition:t},r.a.createElement(JO,null,e))))}function rM(){return(rM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var lM=n.createElement("circle",{cx:67.5,cy:68.5,r:67.5,fill:"currentColor"}),iM=n.createElement("path",{d:"M67.5 93.146c13.889 0 25.148-11.259 25.148-25.147 0-13.889-11.26-25.147-25.147-25.147-13.889 0-25.148 11.258-25.148 25.147 0 13.888 11.26 25.147 25.148 25.147z",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),oM=n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M81.698 57.64a1.5 1.5 0 01.037 2.12l-17.93 18.563a1.5 1.5 0 01-2.157 0l-7.383-7.643a1.5 1.5 0 112.158-2.084l6.304 6.526 16.85-17.445a1.5 1.5 0 012.121-.037z",fill:"currentColor"});function SvgDoneCheckmark({title:e,titleId:t,...C}){return n.createElement("svg",rM({viewBox:"0 0 135 136",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t},C),e?n.createElement("title",{id:t},e):null,lM,iM,oM)}const cM=n.memo(SvgDoneCheckmark);function sM(){return(sM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const dM=l.f.div.withConfig({displayName:"quickTip__Panel",componentId:"sc-1i0xr4t-0"})(["width:100%;padding-bottom:","px;*{user-select:text;}"],48),uM=l.f.div.withConfig({displayName:"quickTip__Overflow",componentId:"sc-1i0xr4t-1"})(["position:relative;width:100%;max-height:70vh;padding:","px;strong{font-weight:700;}"],MO.c),pM=l.f.video.withConfig({displayName:"quickTip__Video",componentId:"sc-1i0xr4t-2"})(["height:180px;margin-bottom:","px;max-width:100%;"],MO.c),mM=l.f.h1.withConfig({displayName:"quickTip__Title",componentId:"sc-1i0xr4t-3"})([""," color:",";line-height:32px;margin:0 0 8px 0;"],X.c.expandTextPreset((({label:e},{MEDIUM:t})=>e[t])),(({theme:e})=>e.colors.fg.primary)),fM=Object(l.f)(iC.a).withConfig({displayName:"quickTip__Paragraph",componentId:"sc-1i0xr4t-4"})(["& + &{margin-top:8px;}"]),hM=l.f.div.withConfig({displayName:"quickTip__DoneContainer",componentId:"sc-1i0xr4t-5"})([""," height:180px;margin-bottom:","px;color:#f4f2ef;svg{display:block;path{color:#4285f4;}}"],X.c.centerContent,MO.c);function QuickTip({title:e,description:t,isLeftToRightTransition:C=!0,figureSrc:a,figureSrcImg:n,figureAlt:l,href:i,isDone:o=!1,...c}){const{cdnURL:s}=Object(F.g)();return r.a.createElement(nM,sM({},c,{isLeftToRightTransition:C}),r.a.createElement(dM,null,r.a.createElement(uM,null,Boolean(a)&&r.a.createElement(pM,{controls:!1,autoPlay:!0,loop:!0,muted:!0,noControls:!0,preload:"true",crossOrigin:"anonymous"},r.a.createElement("source",{src:`${s}${a}.webm`,type:"video/webm"}),r.a.createElement("source",{src:`${s}${a}.mp4`,type:"video/mp4"})),n&&r.a.createElement(pM,{as:"img",alt:l,src:`${s}${n}.png`,crossOrigin:"anonymous"}),o&&r.a.createElement(hM,null,r.a.createElement(cM,{height:135,width:135})),r.a.createElement(mM,null,e),t.map(((t,C)=>r.a.createElement(fM,{key:`${e}-${C}`,size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL},r.a.createElement(h.TranslateWithMarkup,{mapping:{a:r.a.createElement(rt.a,{size:lt.b.TYPOGRAPHY.PRESET_SIZES.SMALL,rel:"noreferrer noopener",target:"_blank",href:i}),screenreader:r.a.createElement(XO.a,null)}},t)))))))}function bM(){return(bM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var gM=Object(u.m)((function Companion({tipKey:e,onTipSelect:t,isLeftToRightTransition:C,readTips:a,components:n}){const{state:{tips:l}}=Object(F.j)(),i={...l,[MO.a[0]]:MO.a[1]},o=e&&i[e];return r.a.createElement(RO.a,null,o?r.a.createElement(QuickTip,bM({key:e,isDone:e===MO.a[0],transitionKey:e,isLeftToRightTransition:C},o)):r.a.createElement(Menu,{key:"menu",readTips:a,onTipSelect:t,components:n}))}));const EM=Object(l.f)(Xe.a.QuestionMarkOutline).withConfig({displayName:"toggle__MainIcon",componentId:"sc-1jpvivz-0"})(["height:32px;width:auto;display:block;"]),vM=Object(l.f)(dc).withConfig({displayName:"toggle__StyledToggleButton",componentId:"sc-1jpvivz-1"})(["padding-left:3px;padding-right:3px;display:block;"]);function yM({isOpen:e=!1,popupId:t="",onClick:C=(()=>{}),notificationCount:a=0}){return r.a.createElement(vM,{"aria-owns":t,"aria-label":a>0?Object(h.sprintf)(
|
1 |
+
(window.__webStories_webpackJsonp=window.__webStories_webpackJsonp||[]).push([[187],{102:function(e,t,C){"use strict";C.d(t,"a",(function(){return LayerText}));var a=C(0),n=C.n(a),r=C(3),l=C(133),i=C(40);const o=Object(r.f)(l.a).withConfig({displayName:"layerText__StyledText",componentId:"sc-c41ws6-0"})(["color:inherit;white-space:nowrap;text-overflow:' ';overflow:hidden;max-width:100%;"]);function LayerText(e){let{children:t}=e;return n.a.createElement(o,{forwardedAs:"span",size:i.b.TYPOGRAPHY.PRESET_SIZES.SMALL},t)}},103:function(e,t,C){"use strict";var a=C(1),n=C(423);t.a=function(e){return Object(a.w)(n.a,null!=e?e:a.k)}},104:function(e,t,C){"use strict";var a=C(290),n=C(1),r=C(10),l=C(809),i=C(573),o=C(579),c=C.n(o);function s(e){return c.a.getExtension(e)}var d=C(27),u=C(118),p=C(6),m=C(167);const f=e=>{let{size:t}=e;return t>=p.y},h={CODEC:["-vcodec","libx264"],SCALE:["-vf",`scale='min(${p.z.WIDTH},iw)':'min(${p.z.HEIGHT},ih)':'force_original_aspect_ratio=decrease',pad='width=ceil(iw/2)*2:height=ceil(ih/2)*2'`],FPS:["-r","24"],FASTSTART:["-movflags","+faststart"],COLOR_PROFILE:["-pix_fmt","yuv420p"],PRESET:["-preset","fast"],SEEK_TO_START:["-ss","00:00:01.000"],SINGLE_FRAME:["-frames:v","1"]},b=[...h.CODEC,...h.SCALE,...h.FPS,...h.FASTSTART,...h.COLOR_PROFILE,...h.PRESET];t.a=function(){var e,t;const{ffmpegCoreUrl:o,allowedTranscodableMimeTypes:c,capabilities:{hasUploadMediaAction:g}}=Object(d.c)(),{currentUser:E}=Object(u.c)((e=>{let{state:t}=e;return{currentUser:t.currentUser}})),v=Boolean(null===(e=window)||void 0===e?void 0:e.crossOriginIsolated),O=Object(n.s)((async e=>{const{createFFmpeg:t,fetchFile:a}=await C.e(196).then(C.t.bind(null,1051,7)),n=t({corePath:o,log:false});return await n.load(),n.FS("writeFile",e.name,await a(e)),n}),[o]),y=Object(n.s)((async e=>{const t=Object(r.c)("load_video_poster_ffmpeg");let C;try{C=await O(e);const n=Object(a.a)()+"."+p.u,r=Object(l.a)(e),o=Object(m.a)(r);await C.run(...h.SEEK_TO_START,"-i",e.name,...h.SINGLE_FRAME,...h.SCALE,...h.COLOR_PROFILE,...h.PRESET,n);const c=C.FS("readFile",n);return Object(i.a)(new Blob([c.buffer],{type:p.v}),o,p.v)}catch(e){throw console.error(e),Object(r.f)("video_poster_generation_ffmpeg",e.message),e}finally{try{C.exit()}catch(e){}t()}}),[O]),M=Object(n.s)((async e=>{const t=Object(r.c)("load_video_transcoding");let C;try{C=await O(e);const n=Object(a.a)()+"."+p.w,r=Object(l.a)(e)+"."+p.w;await C.run("-i",e.name,...b,n);const o=C.FS("readFile",n);return Object(i.a)(new Blob([o.buffer],{type:p.x}),r,p.x)}catch(e){throw console.error(e),Object(r.f)("video_transcoding",e.message),e}finally{try{C.exit()}catch(e){}t()}}),[O]),w=Object(n.s)((async(e,t,C)=>{const n=Object(r.c)("load_trim_video_transcoding");let o;try{o=await O(e);const r=(null==e?void 0:e.type)||p.x,c=s(r),d=Object(a.a)()+"."+c,u=Object(l.a)(e)+"-trimmed."+c;await o.run("-i",e.name,"-ss",t,"-to",C,d);const m=o.FS("readFile",d);return Object(i.a)(new Blob([m.buffer],{type:r}),u,r)}catch(e){throw console.log(e),Object(r.f)("trim_video_transcoding",e.message),e}finally{try{o.exit()}catch(e){}n()}}),[O]),L=Object(n.s)((async e=>{const t=Object(r.c)("load_mute_video_transcoding");let C;try{C=await O(e);const n=(null==e?void 0:e.type)||p.x,r=s(n),o=Object(a.a)()+"."+r,c=Object(l.a)(e)+"-muted."+r;await C.run("-i",e.name,"-vcodec","copy","-an",o);const d=C.FS("readFile",o);return Object(i.a)(new Blob([d.buffer],{type:n}),c,n)}catch(e){throw console.log(e),Object(r.f)("mute_video_transcoding",e.message),e}finally{try{C.exit()}catch(e){}t()}}),[O]),_=Object(n.s)((async e=>{const t=Object(r.c)("load_gif_conversion");let C;try{C=await O(e);const n=Object(a.a)()+"."+p.w,r=Object(l.a)(e)+"."+p.w;await C.run("-i",e.name,...b,n);const o=C.FS("readFile",n);return new i.a(new Blob([o.buffer],{type:p.x}),r,p.x)}catch(e){throw console.error(e),Object(r.f)("gif_conversion",e.message),e}finally{try{C.exit()}catch(e){}t()}}),[O]),j=Object(n.s)((e=>c.includes(e.type)),[c]),x=Boolean(null==E||null===(t=E.meta)||void 0===t?void 0:t.web_stories_media_optimization),Z=g&&x&&v;return Object(n.C)((()=>({isTranscodingEnabled:Z,canTranscodeFile:j,isFileTooLarge:f,transcodeVideo:M,stripAudioFromVideo:L,getFirstFrameOfVideo:y,convertGifToVideo:_,trimVideo:w})),[Z,j,M,L,y,_,w])}},109:function(e,t,C){"use strict";C.d(t,"b",(function(){return Z})),C.d(t,"c",(function(){return A})),C.d(t,"a",(function(){return x})),C.d(t,"e",(function(){return I})),C.d(t,"d",(function(){return T}));var a=C(0),n=C.n(a),r=C(1),l=C(127),i=C.n(l),o=C(818),c=C(99),s=C(20),d=C(523);var u=function(e,t){Object(r.y)((()=>{const C=t=>{var C;const{clipboardData:a}=t;Object(d.a)()||null!=a&&null!==(C=a.types)&&void 0!==C&&C.length||e(t)},a=e=>{Object(d.a)()||t(e)};return document.addEventListener("copy",C),document.addEventListener("cut",C),document.addEventListener("paste",a),()=>{document.removeEventListener("copy",C),document.removeEventListener("cut",C),document.removeEventListener("paste",a)}}),[e,t])},p=C(18);const m="_DOUBLEDASH_";var f=C(30),h=C(274),b=C(429),g=C(276);var E=function(e){return Object(r.s)((t=>{const C=Object(b.a)(t).toArray(),a=f.ContentState.createFromBlockArray(C),n=f.EditorState.createWithContent(a),r=Object(g.a)(n);return!!r&&(e("text",{...h.a,content:r}),!0)}),[e])},v=C(428),O=C(119);var y=function(){const{currentPage:e,addElements:t,updateCurrentPageProperties:C,deleteElementById:a,combineElements:n,addAnimations:l}=Object(s.e)((e=>{let{state:{currentPage:t,selectedElements:C},actions:{addElements:a,deleteSelectedElements:n,updateCurrentPageProperties:r,deleteElementById:l,combineElements:i,addAnimations:o}}=e;return{currentPage:t,selectedElements:C,addElements:a,deleteSelectedElements:n,updateCurrentPageProperties:r,deleteElementById:l,combineElements:i,addAnimations:o}}));return Object(r.r)((function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0===r.length)return!1;const o=r.find((e=>{let{isBackground:t}=e;return t}));let c=i;if(o){const t=e.elements[0];o.isDefaultBackground?(t.isDefaultBackground||a({elementId:t.id}),C({properties:{backgroundColor:o.backgroundColor}})):(c=i.map((e=>e.targets.includes(o.id)?{...e,targets:[t.id]}:e)),n({firstElement:o,secondId:t.id,shouldRetainAnimations:!1}))}const s=r.filter((e=>{let{isBackground:t}=e;return!t}));return s.length&&t({elements:s}),l({animations:c}),!0}),[t,e,C,n,a,l])};var M=function(){const e=y(),{currentPage:t,selectedElements:C,deleteSelectedElements:a,selectedElementAnimations:l}=Object(s.e)((e=>{let{state:{currentPage:t,selectedElements:C,selectedElementAnimations:a},actions:{deleteSelectedElements:n}}=e;return{currentPage:t,selectedElements:C,deleteSelectedElements:n,selectedElementAnimations:a}})),i=Object(v.a)(),o=Object(O.a)(),c=E(o),d=Object(r.s)((e=>{const{type:i}=e;0!==C.length&&(!function(e,t,C,a){if(!t.length||!a)return;const{clipboardData:l}=a,i={sentinel:"story-elements",items:t.map((t=>({...t,...t.isDefaultBackground?{backgroundColor:e.backgroundColor}:null,basedOn:t.id,id:void 0}))),animations:C},o=JSON.stringify(i).replace(/--/g,m),c=t.map((e=>{const{type:t}=e,{TextContent:C}=Object(p.g)(t);return C?C(e):t})).join("\n"),s=t.map((e=>{const{type:t,x:C,y:a,rotationAngle:l}=e,{Output:i}=Object(p.g)(t);return Object(r.o)(n.a.createElement(i,{element:e,box:{width:100,height:100,x:C,y:a,rotationAngle:l}}))})).join("\n");l.setData("text/plain",c),l.setData("text/html",`\x3c!-- ${o} --\x3e${s}`)}(t,C,l,e),"cut"===i&&a(),e.preventDefault())}),[t,a,C,l]),f=Object(r.r)((C=>{const{elements:a,animations:n}=function(e,t){let C={animations:[],elements:[]};for(let n=e.firstChild;n;n=n.nextSibling){var a;if(8!==n.nodeType||-1!==(null===(a=n.nodeValue)||void 0===a?void 0:a.indexOf("Fragment")))continue;const e=JSON.parse(n.nodeValue.replace(new RegExp(m,"g"),"--"));if("story-elements"!==e.sentinel)continue;const r=e.items.reduce(((C,a)=>{let{elements:n,animations:r}=C;const{element:l,elementAnimations:i}=Object(p.d)({element:{...a,id:a.basedOn},animations:e.animations,existingElements:t.elements});return{elements:[...n,l],animations:[...r,...i]}}),{animations:[],elements:[]});return C={animations:[...C.animations,...r.animations],elements:[...C.elements,...r.elements]},C}return C}(C,t);return e(a,n)}),[e,t]),h=Object(r.s)((e=>{const{clipboardData:t}=e;try{var C;const a=!(null!==(C=t.files)&&void 0!==C&&C.length)&&(t.getData("text/html")||t.getData("text/plain"));if(a){const t=document.createElement("template");t.innerHTML=a.replace(/<meta[^>]+>/g,"").replace(/<\/?html>/g,"").replace(/<\/?body>/g,"");let C=f(t.content);C||(C=c(t.innerHTML)),C&&e.preventDefault()}const{items:n}=t,r=[];for(let e=0;e<n.length;e++){const t=n[e].getAsFile();t&&r.push(t)}r.length>0&&i(r)}catch(e){}}),[f,c,i]);u(d,h)};function w(e,t){let{editingElement:C,editingElementState:a={}}=t;return{...e,editingElement:C,editingElementState:a}}var L=function(){const[e,t]=Object(r.E)(w,{editingElement:null,editingElementState:{}}),[C,a]=Object(r.I)({}),n=Object(r.s)((()=>{t({editingElement:null})}),[]),l=Object(r.s)((e=>{t({editingElement:e})}),[]),i=Object(r.s)(((e,C)=>{t({editingElement:e,editingElementState:C})}),[]),o=Object(r.s)(((e,t)=>a((C=>({...C,[e]:t})))),[a]),c=Object(r.G)(null);c.current=C;const s=Object(r.s)((e=>c.current[e]),[]),{editingElement:d,editingElementState:u}=e;return Object(r.C)((()=>({nodesById:C,editingElement:d,editingElementState:u,setEditingElementWithState:i,setEditingElementWithoutState:l,clearEditing:n,getNodeForElement:s,setNodeForElement:o})),[C,d,u,i,l,n,s,o])},_=C(359),j=Object(r.f)({actions:{},state:{}});const x={CANVAS_CONTAINER:"canvasContainer",PAGE_CONTAINER:"pageContainer"};var Z=function CanvasProvider(e){let{children:t}=e;const[C,a]=Object(r.I)({}),[l,d]=Object(r.I)(null),u=Object(r.G)(null),[p,m]=Object(r.I)(null),[f,h]=Object(r.I)(null),[b,g]=Object(r.I)(null),[E,v]=Object(r.I)(null),[O,y]=Object(r.I)(null),[w,x]=Object(r.I)(!1),[Z,A]=Object(r.I)(null),[I,T]=Object(r.I)(null),[S,k]=Object(r.I)(null),[R,P]=Object(r.I)(null),[N,D]=Object(r.I)(null),[B,z]=Object(r.I)(null),F=Object(r.C)((()=>new window.IntersectionObserver((e=>{for(const t of e){if(!t.target.dataset.rectObservationKey)return;a((e=>({...e,[t.target.dataset.rectObservationKey]:t.boundingClientRect})))}}))),[]);Object(r.y)((()=>()=>F.disconnect()),[F]);const H=Object(c.a)((e=>{let{state:{pageWidth:t,pageHeight:C}}=e;return{width:t,height:C}})),{nodesById:G,editingElement:V,editingElementState:U,setEditingElementWithState:W,setEditingElementWithoutState:Y,clearEditing:$,getNodeForElement:q,setNodeForElement:X}=L(),{elements:K,backgroundElementId:Q,selectedElementIds:J,toggleElementInSelection:ee,setSelectedElementsById:te}=Object(s.e)((e=>{var t;let{state:{currentPage:C,selectedElementIds:a},actions:{toggleElementInSelection:n,setSelectedElementsById:r}}=e;const l=(null==C?void 0:C.elements)||[];return{elements:l,backgroundElementId:null===(t=l[0])||void 0===t?void 0:t.id,selectedElementIds:a,toggleElementInSelection:n,setSelectedElementsById:r}})),Ce=Object(r.s)(((e,t)=>{V&&V!==e&&$(),u.current===e&&"focus"===t.type||(u.current=e,t.shiftKey?ee({elementId:e}):te({elementIds:[e]}),t.currentTarget.focus({preventScroll:!0}),Q!==e&&t.stopPropagation(),"mousedown"===t.type&&(d(t),t.target.ownerDocument.addEventListener("mouseup",(()=>window.setTimeout(d,0,null)),{once:!0,capture:!0})))}),[V,Q,$,ee,te]),ae=Object(r.s)((e=>{let{x:t,y:C,width:a,height:n}=e;const r=Object(_.a)(0,t,C,a,n),l=K.filter((e=>{let{isBackground:t}=e;return!t})).map((e=>{let{id:t,rotationAngle:C,x:a,y:n,width:l,height:o}=e;const c=Object(_.a)(C,a,n,l,o);return i.a.testPolygonPolygon(r,c)?t:null})).filter((e=>e));te({elementIds:l})}),[K,te]);Object(r.y)((()=>{!V||1===J.length&&J[0]===V||$(),u.current&&!J.includes(u.current)&&(u.current=null)}),[V,J,$]),M();const[ne,re]=Object(r.I)(null),le=Object(r.C)((()=>({state:{pageContainer:f,canvasContainer:p,fullbleedContainer:b,nodesById:G,editingElement:V,editingElementState:U,isEditing:Boolean(V),lastSelectionEvent:l,displayLinkGuidelines:w,pageAttachmentContainer:O,designSpaceGuideline:E,isEyedropperActive:S,eyedropperCallback:R,eyedropperImg:Z,eyedropperPixelData:I,pageCanvasData:N,pageCanvasPromise:B,boundingBoxes:C,clientRectObserver:F,onMoveableMount:ne},actions:{setPageContainer:h,setFullbleedContainer:g,getNodeForElement:q,setNodeForElement:X,setEditingElement:Y,setEditingElementWithState:W,clearEditing:$,handleSelectElement:Ce,selectIntersection:ae,setDisplayLinkGuidelines:x,setPageAttachmentContainer:y,setCanvasContainer:m,setDesignSpaceGuideline:v,setIsEyedropperActive:k,setEyedropperCallback:P,setEyedropperImg:A,setEyedropperPixelData:T,setPageCanvasData:D,setPageCanvasPromise:z,setMoveableMount:re}})),[f,p,b,G,V,U,l,w,O,E,S,R,Z,I,N,B,C,F,q,X,Y,W,$,Ce,ae,ne,re]);return n.a.createElement(j.Provider,{value:le},n.a.createElement(o.a,{pageSize:H},t))};var A=function(e){return Object(r.w)(j,null!=e?e:r.k)};function I(e){const t=Object(r.w)(j,(e=>{let{state:t}=e;return t.clientRectObserver})),C=Object(r.G)(null);return Object(r.s)((a=>{var n;C.current&&(null===(n=t.unobserve)||void 0===n||n.call(t,C.current));a&&(a.dataset.rectObservationKey=e,t.observe(a)),C.current=a}),[t,e])}function T(e){return Object(r.w)(j,(t=>{var C;let{state:a}=t;return null===(C=a.boundingBoxes)||void 0===C?void 0:C[e]}))}},110:function(e,t,C){"use strict";var a=C(386),n=C(262),r=C(53);t.a=function(e){let{id:t,targetRef:C,expectedStyle:l,resetOnNullTransform:i=!0}=e;Object(r.c)(t,(e=>{const t=void 0!==(null==C?void 0:C.current)?C.current:C;if(t)if(null===e)i&&(t.style.cssText="");else{const{color:C,style:i}=e;if(l&&l!==i)return;var r;if(C&&i)if("color"===i&&(null===(r=t.children)||void 0===r?void 0:r.length)>0){const e=Object(a.a)(Object(n.a)(C,i));for(const C of t.children)C.style.cssText=e}else t.style.cssText=Object(a.a)(Object(n.a)(C,i))}}))}},111:function(e,t,C){"use strict";C.d(t,"b",(function(){return a})),C.d(t,"a",(function(){return n})),C.d(t,"c",(function(){return r})),C.d(t,"d",(function(){return l}));const a=(e,t)=>"string"==typeof e&&e.startsWith(t),n=(e,t)=>e.slice(t.length+1),r=(e,t)=>`${e}-${t<0?"N":""}${Math.abs(t)}`,l=(e,t)=>{const C=n(t,e);return"N"===C.charAt(0)?-parseInt(C.slice(1)):parseInt(C)}},118:function(e,t,C){"use strict";C.d(t,"b",(function(){return o})),C.d(t,"a",(function(){return i})),C.d(t,"c",(function(){return c}));var a=C(0),n=C.n(a),r=C(1),l=C(42),i=Object(r.f)({state:{},actions:{}});var o=function CurrentUserProvider(e){let{children:t}=e;const[C,a]=Object(r.I)({}),{actions:{getCurrentUser:o,updateCurrentUser:c}}=Object(l.c)();Object(r.y)((()=>{let e=!0;return o&&!Object.keys(C).length&&o().then((t=>{e&&a(t)})),()=>{e=!1}}),[C,o]);const s=Object(r.s)((e=>c?c(e).then(a):null),[c]),d=Object(r.s)((()=>s({meta:{web_stories_media_optimization:!C.meta.web_stories_media_optimization}})),[C,s]),u={state:{currentUser:C},actions:{toggleWebStoriesMediaOptimization:d,updateCurrentUser:s}};return n.a.createElement(i.Provider,{value:u},t)};var c=function(e){return Object(r.w)(i,null!=e?e:r.k)}},119:function(e,t,C){"use strict";var a=C(1),n=C(18),r=C(20),l=C(99),i=C(6),o=C(136),c=C(240);t.a=function(){const{addElement:e}=Object(r.e)((e=>{let{actions:t}=e;return{addElement:t.addElement}})),{setZoomSetting:t}=Object(l.a)((e=>{let{actions:{setZoomSetting:t}}=e;return{setZoomSetting:t}})),C=Object(o.a)();return Object(a.s)(((a,r)=>{t(i.K.FIT);const l=function(e,t){return Object(n.b)(e,Object(c.a)(e,t))}(a,r),{id:o,resource:s}=l;return e({element:l}),"video"===a&&null!=s&&s.src&&!s.isPlaceholder&&setTimeout((()=>{const e=document.getElementById(`video-${o}`);e&&e.play().catch((()=>{}))})),C(),l}),[e,C,t])}},120:function(e,t,C){"use strict";var a=C(0),n=C.n(a),r=C(3),l=C(640),i=C(1);const o=Object(r.g)(["100%{transform:rotate(360deg)}"]),c=Object(r.g)(["0%{stroke-dasharray:1,200;stroke-dashoffset:0;}50%{stroke-dasharray:100,200;stroke-dashoffset:-15;}100%{stroke-dasharray:100,200;stroke-dashoffset:-125;}"]),s=r.f.div.attrs({role:"progressbar"}).withConfig({displayName:"circularProgress__Wrapper",componentId:"sc-1gdjtri-0"})(["width:",";height:",";animation:"," 1.4s linear infinite;"],(e=>{let{size:t}=e;return`${t}px`}),(e=>{let{size:t}=e;return`${t}px`}),o),d=r.f.svg.withConfig({displayName:"circularProgress__StyledSpinner",componentId:"sc-1gdjtri-1"})(["display:block;"]),u=r.f.circle.withConfig({displayName:"circularProgress__StyledCircle",componentId:"sc-1gdjtri-2"})(["animation:"," 1.4s ease-in-out infinite;stroke:",";"],c,(e=>{let{theme:t}=e;return`${t.colors.accent.secondary}`}));function CircularProgress(e){let{size:t,thickness:C}=e;const a=Object(i.G)();return n.a.createElement(l.a,{nodeRef:a,in:!0,appear:!0,timeout:0},n.a.createElement(s,{ref:a,size:t},n.a.createElement(d,{viewBox:`${t/2} ${t/2} ${t} ${t}`},n.a.createElement(u,{cx:t,cy:t,r:(t-C)/2,fill:"none",strokeWidth:C,stroke:"currentColor"}))))}CircularProgress.defaultProps={size:24,thickness:2},t.a=CircularProgress},121:function(e,t,C){"use strict";var a=C(1),n=C(8);t.a=function(){const e=Object(n.o)((e=>{let{state:{pages:t=[]}}=e;return t.reduce(((e,t)=>(e.push(...t.elements.filter((e=>{let{type:t,isExternal:C}=e;return["image","video","gif"].includes(t)&&!C})).map((e=>{let{resource:t}=e;return t.id}))),e)),[])})),{isCurrentResourceUploading:t,isCurrentResourceProcessing:C}=Object(n.m)((e=>{let{state:{isCurrentResourceUploading:t,isCurrentResourceProcessing:C}}=e;return{isCurrentResourceUploading:t,isCurrentResourceProcessing:C}}));return Object(a.C)((()=>Boolean(null==e?void 0:e.some((e=>t(e)||C(e))))),[e,t,C])}},122:function(e,t,C){"use strict";C.d(t,"a",(function(){return m})),C.d(t,"b",(function(){return f}));var a=C(0),n=C.n(a),r=C(1),l=C(149),i=C(49),o=C(10),c=C(407),s=C(6),d=C(42),u=C(267),p=C(404);var m=function FontProvider(e){let{children:t}=e;const C=Object(i.b)("customFonts"),[a,m]=Object(r.I)([]),[f,h]=Object(r.I)([]),[b,g]=Object(r.I)([]),[E,v]=Object(r.I)(null),{actions:{getFonts:O}}=Object(d.c)(),y=a.length>0?a:f;Object(r.y)((()=>{let e=!0;if(!E&&O&&C)try{(async()=>{const t=await O({service:"custom"});if(!e)return;const C=t.map((e=>({id:e.family,name:e.family,value:e.family,...e})));v(C)})()}catch(e){Object(o.f)("font_provider",e.message)}return()=>{e=!1}})),Object(r.y)((()=>{let e=!0;if(!f.length&&O)try{(async()=>{const t=await O({include:l.a.join(",")});if(!e)return;const C=t.map((e=>({id:e.family,name:e.family,value:e.family,...e})));h(C)})()}catch(e){Object(o.f)("font_provider",e.message)}return()=>{e=!1}}),[f,O]);const{maybeEnqueueFontStyle:M,maybeLoadFont:w}=Object(p.a)(),L=Object(r.s)((e=>{const t=y.find((t=>t.family===e));return t||{}}),[y]),_=Object(r.s)((async e=>{if(e.length<2)return m([]),[];const t=(await O({search:e,service:C?null:"builtin"})).map((e=>({...e,id:e.family,name:e.family,value:e.family})));return m(t),t}),[O,C]),j=Object(r.s)((e=>{const t=[{name:s.l[400],value:400}],C=L(e);let a=t;if(C){const{weights:e}=C;e&&(a=e.map((e=>({name:s.l[e],value:e}))))}return a}),[L]),x=Object(r.s)((e=>{const t=L(e);return null!=t&&t.fallbacks?t.fallbacks:[]}),[L]),Z=Object(r.s)((e=>{const t=[e];b.forEach((C=>{e.family!==C.family&&t.push(C)})),g(t.slice(0,5))}),[b]),A=Object(r.G)([]),I=Object(r.s)((e=>{const t=e.filter((e=>!A.current.includes(e)));if(null==t||!t.length)return;A.current=A.current.concat(t);const C=`https://fonts.googleapis.com/css?family=${encodeURIComponent(t.join("|"))}&subset=menu&display=swap`;Object(c.a)(C,"web-stories-google-fonts-menu-css").catch((()=>{A.current=A.current.filter((e=>!t.includes(e)))}))}),[]),T=Object(r.s)((e=>{for(const t of e){const e=y.find((e=>{let{family:C}=e;return C===t}));e&&w(e)}}),[y,w]),S={state:{fonts:a.length>0?a:f,curatedFonts:f,customFonts:E,recentFonts:b},actions:{getFontsBySearch:_,getFontByName:L,maybeEnqueueFontStyle:M,getFontWeight:j,getFontFallback:x,ensureMenuFontsLoaded:I,ensureCustomFontsLoaded:T,addRecentFont:Z}};return n.a.createElement(u.a.Provider,{value:S},t)};var f=function(e){return Object(r.w)(u.a,null!=e?e:r.k)}},123:function(e,t,C){"use strict";t.a=function(e){return e&&(e.horizontal||e.vertical)?`scale3d(${e.horizontal?"-":""}1, ${e.vertical?"-":""}1, 1)`:null}},124:function(e,t,C){"use strict";var a=C(275),n=C(412),r=C(413),l=C(816);var i=function(e){const{color:{r:t,g:C,b:a,a:n=1}}=e;return[t,C,a,Math.round(100*n)].map((e=>e.toString(16))).map((e=>e.padStart(2,"0"))).join("")},o=C(533),c=C(262),s=C(174),d=C(817),u=C(6),p=C(32),m=C(66),f=C(111);const h=e=>Object(l.a)(Object(f.a)(e,p.a)),b=e=>`${p.a}-${i(e)}`;var g={elementToStyle:function(e){const t="span"===e.tagName.toLowerCase(),C=e.style.color,a=Boolean(C);if(t&&a){const e=Object(o.a)(C);return b(e)}return null},stylesToCSS:function(e){const t=e.find((e=>Object(f.b)(e,p.a)));if(!t)return null;let C;try{C=h(t)}catch(e){return null}return Object(c.a)(C,"color")},autoFocus:!1,getters:{color:function(e){const t=Object(m.a)(e,p.a);if(t.length>1)return u.C;const C=t[0];return C===p.d?Object(s.a)(0,0,0):h(C)}},setters:{setColor:function(e,t){const C=Object(d.a)(Object(s.a)(0,0,0),t);return Object(m.b)(e,p.a,(()=>!C),(()=>b(t)))}}};function E(e){return Object(f.c)(p.c,e)}function v(e){return Object(f.d)(p.c,e)}var O={elementToStyle:function(e){const t="span"===e.tagName.toLowerCase(),C=parseFloat(e.style.letterSpacing),a=C&&!isNaN(C);return t&&a?E(100*C):null},stylesToCSS:function(e){const t=e.find((e=>Object(f.b)(e,p.c)));if(!t)return null;const C=v(t);return C?{letterSpacing:C/100+"em"}:null},autoFocus:!1,getters:{letterSpacing:function(e){const t=Object(m.a)(e,p.c);if(t.length>1)return u.C;const C=t[0];return C===p.d?0:v(C)}},setters:{setLetterSpacing:function(e,t){return Object(m.b)(e,p.c,(()=>0!==t),(()=>E(t)))}}},y=C(414);const M=[a.a,n.a,r.a,g,O,y.a];t.a=M},134:function(e,t,C){"use strict";var a=C(1),n=C(409);t.a=function(e){return Object(a.w)(n.a,null!=e?e:a.k)}},135:function(e,t,C){"use strict";var a=C(0),n=C.n(a),r=C(3),l=C(1),i=C(27),o=C(98),c=C(55);function s(e,t){return e.startsWith("left")?t?0:-1:e.startsWith("right")||e.endsWith("-start")?t?-1:0:e.endsWith("-end")?t?0:-1:-.5}function d(e){return e.startsWith("top")||e===c.a.RIGHT_END||e===c.a.LEFT_END?-1:e===c.a.RIGHT||e===c.a.LEFT?-.5:null}function u(e,t){const C=s(e,t),a=d(e);if(!C&&!a)return"";return`translate(${100*(C||0)}%, ${100*(a||0)}%)`}function p(e,t,C,a,n,r,l){var i,o;const u=C.current.getBoundingClientRect(),p=document.body.getBoundingClientRect(),m=null===(i=n.current)||void 0===i?void 0:i.getBoundingClientRect(),f=null==a||null===(o=a.current)||void 0===o?void 0:o.getBoundingClientRect();var h,b;m&&(m.height=Math.max(m.height,null===(h=n.current)||void 0===h?void 0:h.scrollHeight),m.width=Math.max(m.width,null===(b=n.current)||void 0===b?void 0:b.scrollWidth));const{height:g=0,width:E=0}=m||{},{x:v=0,y:O=0}=t||{},y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,C=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0;const l=n.left+((null==a?void 0:a.left)||C.left)-t,i=n.left+((null==a?void 0:a.left)||C.left)+C.width+t,o=n.left+((null==a?void 0:a.left)||C.left)+C.width/2;switch(e){case c.a.BOTTOM_START:case c.a.TOP_START:case c.a.LEFT:case c.a.LEFT_END:case c.a.LEFT_START:return r?i:l;case c.a.BOTTOM_END:case c.a.TOP_END:case c.a.RIGHT:case c.a.RIGHT_END:case c.a.RIGHT_START:return r?l:i;case c.a.BOTTOM:case c.a.TOP:return o;default:return 0}}(e,v,u,f,p,r),M=p.width-E-s(e)*E,w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,C=arguments.length>2?arguments[2]:void 0;switch(e){case c.a.BOTTOM:case c.a.BOTTOM_START:case c.a.BOTTOM_END:case c.a.LEFT_END:case c.a.RIGHT_END:return C.top+C.height+t;case c.a.TOP:case c.a.TOP_START:case c.a.TOP_END:case c.a.LEFT_START:case c.a.RIGHT_START:return C.top-t;case c.a.RIGHT:case c.a.LEFT:return C.top+C.height/2;default:return 0}}(e,O,u),L=p.height+p.y-g-d(e)*g;return{x:Math.max(0,Math.min(y,M)),y:Math.max(l,Math.min(w,L)),width:u.width,height:u.height}}const m=r.f.div.attrs((e=>{let{$offset:{x:t,y:C,width:a,height:n},fillWidth:r,fillHeight:l,placement:i,isRTL:o,invisible:c}=e;return{style:{transform:`translate(${t}px, ${C}px) ${u(i,o)}`,...r?{width:`${a}px`}:{},...l?{height:`${n}px`}:{},...c?{visibility:"hidden"}:{}}}})).withConfig({displayName:"popup__Container",componentId:"sc-1snaphs-0"})(["/*! @noflip */ left:0px;top:0px;position:fixed;z-index:2;overflow-y:auto;max-height:",";"],(e=>{let{topOffset:t}=e;return`calc(100vh - ${t}px)`}));t.a=function Popup(e){let{anchor:t,dock:C,children:a,renderContents:r,placement:s=c.a.BOTTOM,spacing:d,isOpen:u,invisible:f,fillWidth:h=!1,fillHeight:b=!1,onPositionUpdate:g=o.a}=e;const[E,v]=Object(l.I)(null),O=Object(l.G)(!1),y=Object(l.G)(null),{isRTL:M,styleConstants:{topOffset:w}={}}=Object(i.c)();Object(l.y)((()=>(O.current=!0,()=>{O.current=!1})),[]);const L=Object(l.s)((e=>{var a,n,r,l;O.current&&(null!=e&&null!==(a=e.target)&&void 0!==a&&a.nodeType&&null!==(n=y.current)&&void 0!==n&&n.contains(e.target)||v({offset:null!=t&&t.current?p(s,d,t,C,y,M,w):{},height:null===(r=y.current)||void 0===r||null===(l=r.getBoundingClientRect())||void 0===l?void 0:l.height}))}),[t,C,s,d,M,w]);return Object(l.y)((()=>{var e,t;null!=E&&E.height&&E.height!==(null===(e=y.current)||void 0===e||null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.height)&&L()}),[null==E?void 0:E.height,L]),Object(l.B)((()=>{if(u)return O.current=!0,L(),document.addEventListener("scroll",L,!0),()=>document.removeEventListener("scroll",L,!0)}),[u,L]),Object(l.B)((()=>{O.current&&g()}),[E,g]),Object(l.H)({current:document.body},L,[L]),E&&u?Object(l.h)(n.a.createElement(m,{ref:y,fillWidth:h,fillHeight:b,placement:s,isRTL:M,$offset:E.offset,topOffset:w,invisible:f},r?r({propagateDimensionChange:L}):a),document.body):null}},136:function(e,t,C){"use strict";var a=C(1),n=C(46);t.a=function(){const e=Object(a.s)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];setTimeout((()=>{const t=window.document;e&&t.activeElement&&t.activeElement!==t.body&&t.activeElement.blur();const C=new window.FocusEvent("focusout");t.dispatchEvent(C)}))}),[]);return Object(n.g)({key:"mod+option+2",editable:!0},(()=>e(!0)),[e]),e}},137:function(e,t,C){"use strict";var a=C(0),n=C.n(a),r=C(1),l=C(624),i=C(169);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}t.a=Object(r.j)((function MoveableWithRef(e,t){let{onContextMenu:C,...a}=e;return n.a.createElement(i.a,{onContextMenu:C,zIndex:10,pointerEvents:"initial",render:e=>{let{container:C}=e;return n.a.createElement(l.a,o({ref:t,container:C},a))}})}))},139:function(e,t,C){"use strict";t.a=function(e){const t=e.map((e=>JSON.stringify(e)));return Array.from(new Set(t)).map((e=>JSON.parse(e)))}},141:function(e,t,C){"use strict";C.d(t,"a",(function(){return a}));const a={family:"Roboto",weights:[100,300,400,500,700,900],styles:["italic","regular"],variants:[[0,100],[1,100],[0,300],[1,300],[0,400],[1,400],[0,500],[1,500],[0,700],[1,700],[0,900],[1,900]],fallbacks:["Helvetica Neue","Helvetica","sans-serif"],service:"fonts.google.com",metrics:{upm:2048,asc:1900,des:-500,tAsc:1536,tDes:-512,tLGap:102,wAsc:1946,wDes:512,xH:1082,capH:1456,yMin:-555,yMax:2163,hAsc:1900,hDes:-500,lGap:0}}},145:function(e,t,C){"use strict";function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e&&"object"==typeof e?Object.assign({},...t.map((t=>e&&t in e?{[t]:e&&e[t]}:{}))):{}}C.d(t,"a",(function(){return a}))},148:function(e,t,C){"use strict";C.d(t,"b",(function(){return f})),C.d(t,"a",(function(){return h}));var a=C(0),n=C.n(a),r=C(1),l=C(58),i=C(60),o=C(399),c=C(80);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const d={boxSizing:"border-box",visibility:"hidden",position:"fixed",contain:"layout paint",top:"-9999px",left:"-9999px",zIndex:-1,overflowWrap:"break-word",...!1},u={dataToStyleX:e=>`${e}px`,dataToStyleY:e=>`${e}px`},p="__WEB_STORIES_MEASURER__",m="__WEB_STORIES_LASTEL__";function f(e,t){const C=b(e);return g(C,{width:`${t}px`,height:null}),C.parentNode.offsetHeight}function h(e,t,C){const a=b(e);g(a,{width:`${t}px`,height:null,fontSize:null});let n,r=1,o=l.f;for(;o-r>1;){const t=Object(i.b)((r+o)/2),{marginOffset:l}=Object(c.a)({...e,fontSize:t});n=l,g(a,{fontSize:`${t}px`,margin:-l/2+"px 0"});a.offsetHeight-l>C?o=t:r=t}return g(a,{fontSize:`${r}px`,margin:-n/2+"px 0"}),{fontSize:r,marginOffset:n}}function b(e){let t=document.body[p];return t||(t=document.createElement("div"),t.id="__web-stories-text-measurer",t.className="web-stories-content",g(t,d),document.body.appendChild(t),document.body[p]=t),function(e,t){const C=e[m];if(e[m]=t,!e.firstElementChild||!C)return!0;return C!==t}(t,e)&&(t.innerHTML=Object(r.o)(n.a.createElement(o.a,s({element:e},u)),t)),t.firstElementChild}function g(e,t){for(const C in t)if(Object.prototype.hasOwnProperty.call(t,C)){const a=t[C];e.style[C]=null===a?"":a}}},149:function(e,t,C){"use strict";C.d(t,"a",(function(){return a})),C.d(t,"b",(function(){return n})),C.d(t,"c",(function(){return r}));const a=["Karla","Lato","Lora","Merriweather","Montserrat","Nunito","Oswald","Playfair Display","Poppins","Raleway","Roboto","Roboto Condensed","Source Serif Pro","Titillium Web","Work Sans","Alegreya","Arimo","EB Garamond","IBM Plex Mono","IBM Plex Serif","Inconsolata","Mulish","Noto Sans","Noto Serif","Open Sans","Open Sans Condensed","PT Mono","PT Sans","PT Serif","Roboto Mono","Source Sans Pro","Ubuntu","Anton","BioRhyme","Bungee","Bungee Shade","Cookie","Dancing Script","Monoton","Nothing You Could Do","Parisienne","Rock Salt","UnifrakturMaguntia"];var n=function(e,t){const C=function(e){const t=e.split(/[#?]/)[0].split(".").pop().trim();switch(t){case"woff":case"woff2":return t;case"ttf":return"truetype";case"otf":return"opentype";default:return null}}(t);return C?`@font-face {\n font-family: "${e}";\n src: url('${t}') format('${C}');\n font-weight: normal;\n font-display:swap;\n }`:null};var r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"swap";const C=new URL("https://fonts.googleapis.com/css2");C.searchParams.append("display",t);for(const{family:t,variants:a=[]}of e){const e=a.reduce(((e,t)=>{let[C,a]=t;return 1!==C||e.includes("ital")||e.push("ital"),a&&400!==a&&!e.includes("wght")&&e.push("wght"),e}),[]).sort();let n=t;const r=e.join(",");r&&(n+=":"+r);const l=a.sort(((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:e[1]-t[1])).map((t=>{let[C,a]=t;const n=[];return e.includes("ital")&&n.push(C),e.includes("wght")&&n.push(a),n})).join(";"),i="400"===l;l&&!i&&(n+="@"+l),C.searchParams.append("family",n)}return decodeURI(C.toString())}},16:function(e,t,C){"use strict";C.r(t),C.d(t,"TransformProvider",(function(){return U.a})),C.d(t,"useTransform",(function(){return U.b})),C.d(t,"useTransformHandler",(function(){return U.c})),C.d(t,"PreviewPage",(function(){return Ke})),C.d(t,"PreviewErrorBoundary",(function(){return Qe})),C.d(t,"ConfigProvider",(function(){return _.b})),C.d(t,"ConfigContext",(function(){return _.a})),C.d(t,"useConfig",(function(){return _.c})),C.d(t,"StoryProvider",(function(){return A.c})),C.d(t,"StoryContext",(function(){return A.b})),C.d(t,"useStory",(function(){return A.e})),C.d(t,"useStoryTriggers",(function(){return A.g})),C.d(t,"useStoryTriggerListener",(function(){return A.f})),C.d(t,"useStoryTriggersDispatch",(function(){return A.h})),C.d(t,"STORY_EVENTS",(function(){return A.a})),C.d(t,"storyReducers",(function(){return A.d})),C.d(t,"APIProvider",(function(){return j.b})),C.d(t,"APIContext",(function(){return j.a})),C.d(t,"useAPI",(function(){return j.c})),C.d(t,"RedoButton",(function(){return Redo})),C.d(t,"UndoButton",(function(){return Undo})),C.d(t,"PreviewButton",(function(){return tt.a})),C.d(t,"PublishButton",(function(){return EI})),C.d(t,"SwitchToDraftButton",(function(){return vI})),C.d(t,"UpdateButton",(function(){return OI})),C.d(t,"HeaderTitle",(function(){return MI})),C.d(t,"ExcerptPanel",(function(){return LI})),C.d(t,"PageAdvancementPanel",(function(){return II})),C.d(t,"SlugPanel",(function(){return PI})),C.d(t,"BackgroundAudioPanel",(function(){return DI})),C.d(t,"TaxonomiesPanel",(function(){return yT})),C.d(t,"Color",(function(){return jr})),C.d(t,"FilterToggle",(function(){return Rr})),C.d(t,"LinkIcon",(function(){return cl})),C.d(t,"LinkInput",(function(){return ml})),C.d(t,"Media",(function(){return ll})),C.d(t,"MediaUploadButton",(function(){return hl})),C.d(t,"Row",(function(){return dl})),C.d(t,"Switch",(function(){return Al})),C.d(t,"TextArea",(function(){return Gl})),C.d(t,"usePresubmitHandler",(function(){return Wl})),C.d(t,"DateTime",(function(){return mi})),C.d(t,"Required",(function(){return bi})),C.d(t,"RadioGroup",(function(){return Si})),C.d(t,"Select",(function(){return Fi})),C.d(t,"HierarchicalInput",(function(){return ao})),C.d(t,"makeFlatOptionTree",(function(){return $i})),C.d(t,"Panel",(function(){return es})),C.d(t,"MAX_HEIGHT_DEFAULT",(function(){return Qc})),C.d(t,"panelContext",(function(){return Xc})),C.d(t,"PanelTitle",(function(){return hs})),C.d(t,"PanelContent",(function(){return vs})),C.d(t,"SimplePanel",(function(){return ys})),C.d(t,"focusStyle",(function(){return eC})),C.d(t,"inputContainerStyleOverride",(function(){return tC})),C.d(t,"FlipControls",(function(){return oC})),C.d(t,"LinkRelations",(function(){return oo})),C.d(t,"getCommonValue",(function(){return so})),C.d(t,"getCommonObjectValue",(function(){return uo})),C.d(t,"useCommonColorValue",(function(){return po})),C.d(t,"useCommonObjectValue",(function(){return mo})),C.d(t,"ChecklistProvider",(function(){return rt})),C.d(t,"useChecklist",(function(){return lt})),C.d(t,"ChecklistCheckpointProvider",(function(){return ChecklistCheckpointProvider})),C.d(t,"useCheckpoint",(function(){return Tt})),C.d(t,"CheckpointContext",(function(){return It})),C.d(t,"ChecklistCountProvider",(function(){return ChecklistCountProvider})),C.d(t,"ChecklistCategoryProvider",(function(){return ChecklistCategoryProvider})),C.d(t,"useRegisterCheck",(function(){return Pt})),C.d(t,"useIsChecklistEmpty",(function(){return Nt})),C.d(t,"useCategoryCount",(function(){return Dt})),C.d(t,"Checklist",(function(){return Checklist})),C.d(t,"ElementLinkTappableRegionTooBig",(function(){return dA})),C.d(t,"ElementLinkTappableRegionTooSmall",(function(){return pA})),C.d(t,"ImageElementMissingAlt",(function(){return fA})),C.d(t,"ImageElementResolution",(function(){return EA})),C.d(t,"PageBackgroundTextLowContrast",(function(){return IA})),C.d(t,"getPagesWithFailedContrast",(function(){return AA})),C.d(t,"PageTooLittleText",(function(){return SA})),C.d(t,"PageTooManyLinks",(function(){return RA})),C.d(t,"PageTooMuchText",(function(){return NA})),C.d(t,"PublisherLogoMissing",(function(){return DA})),C.d(t,"PublisherLogoSize",(function(){return BA})),C.d(t,"StoryAmpValidationErrors",(function(){return zA})),C.d(t,"StoryMissingExcerpt",(function(){return FA})),C.d(t,"StoryMissingTitle",(function(){return HA})),C.d(t,"StoryPagesCount",(function(){return GA})),C.d(t,"StoryPosterAttached",(function(){return StoryPosterAttached})),C.d(t,"StoryPosterSize",(function(){return VA})),C.d(t,"StoryTitleLength",(function(){return UA})),C.d(t,"TextElementFontSizeTooSmall",(function(){return YA})),C.d(t,"VideoElementLength",(function(){return qA})),C.d(t,"VideoElementMissingCaptions",(function(){return KA})),C.d(t,"VideoElementMissingDescription",(function(){return JA})),C.d(t,"VideoElementMissingPoster",(function(){return tI})),C.d(t,"VideoElementResolution",(function(){return aI})),C.d(t,"VideoOptimization",(function(){return dI})),C.d(t,"ReviewChecklistDialog",(function(){return pI})),C.d(t,"ChecklistIcon",(function(){return mI})),C.d(t,"PPC_CHECKPOINT_STATE",(function(){return Ot})),C.d(t,"CHECKLIST_PRIORITY_COPY",(function(){return vt})),C.d(t,"ACCESSIBILITY_COPY",(function(){return gt})),C.d(t,"useIsChecklistMounted",(function(){return vc})),C.d(t,"ChecklistCard",(function(){return oA})),C.d(t,"CARD_TYPE",(function(){return SZ})),C.d(t,"GRID_VARIANT",(function(){return kZ})),C.d(t,"GRID_TEMPLATE_AREA",(function(){return RZ})),C.d(t,"MAX_THUMBNAILS_DISPLAYED",(function(){return PZ})),C.d(t,"ChecklistCardStyles",(function(){return a})),C.d(t,"DefaultCtaButton",(function(){return DefaultCtaButton})),C.d(t,"DefaultFooterText",(function(){return DefaultFooterText})),C.d(t,"CurrentUserProvider",(function(){return S.b})),C.d(t,"CurrentUserContext",(function(){return S.a})),C.d(t,"useCurrentUser",(function(){return S.c})),C.d(t,"OutputStory",(function(){return MT.a})),C.d(t,"getStoryMarkup",(function(){return wT.a})),C.d(t,"getStoryPropsToSave",(function(){return LT.a})),C.d(t,"useRefreshPostEditURL",(function(){return at.a})),C.d(t,"FontContext",(function(){return _T.a})),C.d(t,"useLoadFontFiles",(function(){return jT.a})),C.d(t,"StoryPropTypes",(function(){return ie.b})),C.d(t,"GlobalStyle",(function(){return m.a})),C.d(t,"theme",(function(){return m.b})),C.d(t,"CropMoveableGlobalStyle",(function(){return ke})),C.d(t,"CircularProgress",(function(){return WC.a})),C.d(t,"InterfaceSkeleton",(function(){return HS})),C.d(t,"Tooltip",(function(){return Je.a})),C.d(t,"Popup",(function(){return FC.a})),C.d(t,"useInspector",(function(){return lr})),C.d(t,"InspectorContext",(function(){return rr})),C.d(t,"useIsUploadingToStory",(function(){return G.a})),C.d(t,"highlightStyles",(function(){return dZ})),C.d(t,"highlightStates",(function(){return Fx})),C.d(t,"useHighlights",(function(){return Ic})),C.d(t,"EditorConfigProvider",(function(){return _.b})),C.d(t,"Dialog",(function(){return Ge.a}));var a={};C.r(a),C.d(a,"Wrapper",(function(){return DZ})),C.d(a,"Container",(function(){return BZ})),C.d(a,"Title",(function(){return zZ})),C.d(a,"Cta",(function(){return FZ})),C.d(a,"CheckboxCtaLabel",(function(){return HZ})),C.d(a,"CheckboxCtaContainer",(function(){return GZ})),C.d(a,"StyledOverflowThumbnail",(function(){return VZ})),C.d(a,"Footer",(function(){return UZ})),C.d(a,"CardListWrapper",(function(){return WZ})),C.d(a,"StyledVideoOptimizationIcon",(function(){return YZ}));var n=C(0),r=C.n(n),l=C(3),i=C(249),o=C.n(i),c=C(763),s=C(764),d=C(387),u=C(1),p=C(49),m=C(166),f=C(10),h=C(2),b=C(287),g=C(39);const E=l.f.div.withConfig({displayName:"errorActions__Message",componentId:"sc-mspoll-0"})(["color:#fff;font-size:16px;font-weight:300;line-height:1.6;padding:20px;button{margin-right:6px;}"]),v=l.f.textarea.withConfig({displayName:"errorActions__TextArea",componentId:"sc-mspoll-1"})(["width:100%;min-height:200px;"]),O=l.f.p.withConfig({displayName:"errorActions__P",componentId:"sc-mspoll-2"})(["margin:0 0 8px 0;"]),y=l.f.div.withConfig({displayName:"errorActions__Wrapper",componentId:"sc-mspoll-3"})(["display:flex;"]);var M=function ErrorActions(e){let{error:t,errorInfo:C}=e;const a=`${t}\n${C.componentStack}`;return r.a.createElement(E,null,r.a.createElement(O,null,Object(h.__)("Something went wrong!","web-stories")),r.a.createElement(O,null,Object(h.__)("The editor has crashed. Please try reloading the page and report the error using the button below.","web-stories")),r.a.createElement(O,null,Object(h.__)("Apologies for the inconvenience.","web-stories")),r.a.createElement(O,null,r.a.createElement(v,{value:a,onFocus:e=>e.target.setSelectionRange(0,a.length)})),r.a.createElement(y,null,r.a.createElement(b.a,{variant:g.d.RECTANGLE,type:g.c.QUATERNARY,size:g.a.SMALL,onClick:()=>{window.location.reload(!0)}},Object(h.__)("Reload","web-stories")),r.a.createElement(b.a,{variant:g.d.RECTANGLE,type:g.c.PRIMARY,size:g.a.SMALL,href:"https://wordpress.org/support/plugin/web-stories/#new-topic-0",target:"_blank",rel:"noreferrer"},Object(h.__)("Report Error","web-stories"))))};class w extends u.a{constructor(){var e,t,C;super(...arguments),C={error:null,errorInfo:null},(t="state")in(e=this)?Object.defineProperty(e,t,{value:C,enumerable:!0,configurable:!0,writable:!0}):e[t]=C}componentDidCatch(e,t){this.setState({error:e,errorInfo:t});const C=t?`${e.message}\n\n${t.componentName}\n${t.componentStack}`:e.message;Object(f.f)("editor_error_boundary",C,!0)}render(){const{error:e,errorInfo:t}=this.state;return e?r.a.createElement(M,{error:e,errorInfo:t}):this.props.children}}var L=w,_=C(27),j=C(42),x=C(279),Z=C(89),A=C(20),I=C(122),T=C(50),S=C(118),k=C(92),R=Object(u.f)({state:{},actions:{}});function P(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce(((e,t)=>{let[C,a]=t;return e[C]=a,e}),{})}function N(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.entries(e).reduce(((e,t)=>{let[C,a]=t;return e[C]={...a,...e[C]},e}),{...t})}function D(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return e.reduce(((e,C)=>(e[C[t]]=C,e)),{})}function B(){return(B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var z=function TaxonomyProvider(e){const[t,C]=Object(u.I)([]),[a,n]=Object(u.I)({}),[l,i]=Object(u.I)(!0),{actions:{clearHistory:o}}=Object(Z.b)(),{updateStory:c,isStoryLoaded:s,terms:d,hasTaxonomies:p}=Object(A.e)((e=>{var t;let{state:{pages:C,story:a},actions:{updateStory:n}}=e;return{updateStory:n,isStoryLoaded:C.length>0,terms:a.terms,hasTaxonomies:(null==a||null===(t=a.taxonomies)||void 0===t?void 0:t.length)>0}})),{getTaxonomyTerm:m,createTaxonomyTerm:f,getTaxonomies:h}=Object(j.c)((e=>{let{actions:t}=e;return t}));Object(u.y)((()=>{p&&async function(){try{const e=await h();C(e)}catch(e){console.error(e.message)}}()}),[p,h]);const b=Object(u.G)(!1);Object(u.y)((()=>{if(t.length>0&&s&&!b.current){const e=D(t,"slug"),C=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return P(Object.entries(e).map((e=>{let[C,a]=e;return[t(C),a]})))}(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((e,t)=>((t||[]).forEach((t=>{e[t.taxonomy]=e[t.taxonomy]||{},e[t.taxonomy][t.slug]=t})),e)),{})}(d),(t=>{var C;return null===(C=e[t])||void 0===C?void 0:C.restBase})),a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return P(Object.entries(e).map((e=>{let[C,a]=e;return[C,t(a)]})))}(C,(e=>Object.values(e).map((e=>e.id))));n(C),o(),c({properties:{terms:a}}),b.current=!0}}),[d,s,t,n,o,c]);const g=Object(u.s)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];c({properties:C=>{const a="function"==typeof t?t(C.terms[e.restBase]):t;return{...C,terms:{...C.terms,[e.restBase]:a}}}})}),[c]),E=Object(u.s)(((e,t)=>{g(e,(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.includes(t.id)?e:[...e,t.id]}))}),[g]),v=Object(u.s)((async function(e,t){let C=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=[];const r=null==e?void 0:e.restPath;if(!r)return[];try{a=await m(r,t)}catch(e){console.error(e.message)}if(a.length<1)return a;const l={[e.restBase]:D(a,"slug")};if(n((e=>N(e,l))),C&&t.search){const C=Object(k.a)(t.search),n=a.find((e=>e.slug===C));n&&E(e,n)}return a}),[m,E]),O=Object(u.s)((async function(e,t,C){var r;let l=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i={name:t};null!=C&&C.id&&(i.parent=C.id,i.slug=`${C.slug}-${Object(k.a)(i.name)}`);const o=(null==i?void 0:i.slug)||Object(k.a)(t),c=null===(r=a[e.restBase])||void 0===r?void 0:r[o];if(c)return void(l&&E(e,c));const s=null==e?void 0:e.restPath;if(s)try{const t=await f(s,i),C={[e.restBase]:{[t.slug]:t}};n((e=>N(e,C))),l&&E(e,t)}catch(C){"term_exists"===C.code&&v(e,{search:t},l)}}),[f,a,v,E]);Object(u.y)((()=>{if(l&&null!=t&&t.length){t.filter((e=>e.hierarchical)).forEach((e=>v(e,{per_page:-1}))),i(!1)}}),[v,l,t]);const y=Object(u.C)((()=>({state:{taxonomies:t,termCache:a,terms:Array.isArray(d)?{}:d},actions:{createTerm:O,addSearchResultsToCache:v,setTerms:g,addTermToSelection:E}})),[a,d,t,O,v,g,E]);return r.a.createElement(R.Provider,B({},e,{value:y}))};var F=function(e){return Object(u.w)(R,null!=e?e:u.k)},H=C(8),G=C(121);var V=function AutoSaveHandler(){const{autoSaveInterval:e}=Object(H.g)(),{state:{hasNewChanges:t}}=Object(H.k)(),{status:C,saveStory:a}=Object(H.o)((e=>{let{state:{story:{status:t}},actions:{saveStory:C}}=e;return{status:t,saveStory:C}})),n=Object(G.a)(),r="draft"===C||!C,l=Object(u.G)(a);return Object(u.y)((()=>{l.current=a}),[a]),Object(u.y)((()=>{if(!r||!t||!e||n)return;const C=setTimeout((()=>l.current()),1e3*e);return()=>clearTimeout(C)}),[e,r,t,n]),null},U=C(53),W=C(93),Y=C(168),$=Object(u.f)({actions:{},state:{}});var q=function(e){return Object(u.w)($,null!=e?e:u.k)};const X=window.requestIdleCallback||function(e,t){const C=(t=t||{}).timeout||1,a=performance.now();return setTimeout((function(){e({get didTimeout(){return!t.timeout&&performance.now()-a-1>C},timeRemaining:function(){return Math.max(0,performance.now()-a+1)}})}),1)},K=window.cancelIdleCallback||function(e){clearTimeout(e)};var Q=C(15),J=C(818),ee=C(58),te=C(262),Ce=C(758),ae=C(9),ne=C(18),re=C(36),le=C(373),ie=C(26),oe=C(110),ce=C(56);function se(){return(se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const de=l.f.div.attrs((e=>{let{previewMode:t,x:C,y:a,width:n,height:r,rotationAngle:l}=e;return t?{style:{position:"absolute",zIndex:1,left:`${C}px`,top:`${a}px`,width:`${n}px`,height:`${r}px`,transform:`rotate(${l}deg)`}}:{}})).withConfig({displayName:"displayElement__Wrapper",componentId:"sc-1uos4dq-0"})([""," "," "," contain:layout;transition:opacity 0.15s cubic-bezier(0,0,0.54,1);",""],(e=>{let{previewMode:t}=e;return!t&&re.h}),(e=>{let{previewMode:t}=e;return!t&&re.j}),(e=>{let{previewMode:t}=e;return!t&&re.i}),(e=>{let{isBackground:t,theme:C}=e;return t&&Object(l.e)(["border-radius:",";overflow:hidden;"],C.borders.radius.small)})),ue=l.f.div.withConfig({displayName:"displayElement__BackgroundOverlay",componentId:"sc-1uos4dq-1"})(["position:absolute;width:100%;height:100%;top:0;left:0;"]),pe=l.f.div.withConfig({displayName:"displayElement__ReplacementContainer",componentId:"sc-1uos4dq-2"})(["transition:opacity 0.25s cubic-bezier(0,0,0.54,1);pointer-events:none;opacity:",";height:100%;"],(e=>{let{hasReplacement:t}=e;return t?1:0}));function AnimationWrapper(e){let{children:t,id:C,isAnimatable:a}=e;return a?r.a.createElement(ae.m.WAAPIWrapper,{target:C},t):t}var me=Object(u.m)((function DisplayElement(e){let{element:t,previewMode:C,isAnimatable:a=!1}=e;const{getBox:n,dataToEditorX:l}=Object(Ce.a)((e=>({getBox:e.actions.getBox,dataToEditorX:e.actions.dataToEditorX}))),[i,o]=Object(u.I)(null),c=Boolean(i),{id:s,opacity:d,type:p,isBackground:m,overlay:f,border:h={},flip:b}=t,g=c?{...t,type:i.resource.type,resource:i.resource,scale:i.scale,focalX:i.focalX,focalY:i.focalY,flip:m?i.flip:b,overlay:m?i.overlay:f}:null,{Display:E}=Object(ne.g)(p),{Display:v}=Object(ne.g)(null==i?void 0:i.resource.type)||{},O=Object(u.G)(null),y=n(t);Object(U.c)(s,(e=>{const t=O.current;if(null===e)t.style.transform="",t.style.width="",t.style.height="";else{const{translate:C,rotate:a,resize:n,dropTargets:r}=e;t.style.transform=`translate(${null==C?void 0:C[0]}px, ${null==C?void 0:C[1]}px) rotate(${a}deg)`,n&&0!==n[0]&&0!==n[1]&&(t.style.width=`${n[0]}px`,t.style.height=`${n[1]}px`),void 0!==(null==r?void 0:r.hover)&&(t.style.opacity=r.hover?0:1),void 0!==(null==r?void 0:r.replacement)&&o(r.replacement||null)}}));const M=Object(u.G)(null);Object(oe.a)({id:s,targetRef:M,resetOnNullTransform:!1});const w=Object(ce.e)(h,C,l);return r.a.createElement(de,se({ref:O,"data-element-id":s,isBackground:t.isBackground,previewMode:C},y),r.a.createElement(AnimationWrapper,{id:s,isAnimatable:a},r.a.createElement(le.a,{element:t,fill:!0,box:y,style:{opacity:void 0!==d?d/100:null,...Object(ce.f)(t)?Object(ce.b)({...w,width:`${y.width}px`,height:`${y.height}px`}):null},previewMode:C,responsiveBorder:w},r.a.createElement(E,{element:t,previewMode:C,box:y})),!C&&r.a.createElement(pe,{hasReplacement:c},g&&r.a.createElement(le.a,{element:g,fill:!0,box:y,style:{opacity:d?d/100:null},previewMode:C},r.a.createElement(v,{element:g,box:y}))),m&&f&&!c&&r.a.createElement(ue,{ref:M,style:Object(te.a)(f)})))}));const fe=l.f.div.withConfig({displayName:"storyPageToDataUrl__Page",componentId:"sc-ym7rrl-0"})(["display:block;position:relative;padding:0;border:0;background-color:transparent;height:","px;width:","px;flex:none;outline:0;"],(e=>{let{height:t}=e;return t}),(e=>{let{width:t}=e;return t})),he=l.f.div.withConfig({displayName:"storyPageToDataUrl__PreviewWrapper",componentId:"sc-ym7rrl-1"})(["height:100%;position:relative;overflow:hidden;background-color:",";border-radius:4px;",""],(e=>{let{theme:t}=e;return t.colors.fg.white}),(e=>{let{background:t}=e;return Object(te.a)(t)})),be=Object(u.j)((function PageWithDependencies(e,t){let{page:C,width:a,height:n}=e;return r.a.createElement(l.c,{theme:Q.b},r.a.createElement(I.a,null,r.a.createElement(U.a,null,r.a.createElement(J.a,{pageSize:{width:a,height:n}},r.a.createElement(fe,{ref:t,height:n,width:a},r.a.createElement(he,{background:C.backgroundColor},C.elements.map((e=>r.a.createElement(me,{key:e.id,previewMode:!0,element:e})))))))))}));var ge=async function(e,t){let{width:a=400,...n}=t;const l=await C.e(197).then(C.bind(null,1056)),i=a*(1/ee.g),o=a*(1/ee.e),c=document.createElement("div");c.style.cssText=`\n contain: strict;\n position: absolute;\n top: 0;\n left: 0;\n width: ${a}px;\n height: ${o}px;\n opacity: 0;\n transform: translate(-100%, -100%);\n pointer-events: none;\n `;const s=await new Promise((t=>{Object(u.n)(r.a.createElement(be,{ref:e=>{e&&t(e)},page:e,width:a,height:i,containerHeight:o}),c)}));document.body.appendChild(c);const d=await l.toJpeg(s,{...n,width:a,height:a*(1/ee.g),canvasHeight:a*(1/ee.g),canvasWidth:a});return Object(u.q)(c),document.body.removeChild(c),d};var Ee=function PageDataUrlProvider(e){let{children:t}=e;const[C,a]=Object(u.I)({}),n=Object(u.G)([]),l=Object(u.G)(!1),i=Object(u.G)([null,null]),o=Object(u.s)((()=>{if(l.current=!0,!n.current.length)return void(l.current=!1);const[e,t]=n.current.shift(),C=X((async()=>{await t(),i.current=[null,null],o()}));i.current=[e,C]}),[]),c=Object(u.s)((e=>{n.current=n.current.filter((t=>{let[C]=t;return C!==e}));const[t,C]=i.current;e===t&&(K(C),i.current=[null,null],o())}),[o]),s=Object(u.s)((e=>(c(e.id),n.current.push([e.id,async()=>{const t=await ge(e,{});a((C=>({...C,[e.id]:t})))}]),l.current||o(),()=>{c(e.id)})),[o,c]),d=Object(u.C)((()=>({state:{dataUrls:C},actions:{queuePageImageGeneration:s}})),[s,C]);return r.a.createElement($.Provider,{value:d},t)},ve=C(84),Oe=C(566),ye=C(46);const Me="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAGElEQVQYV2NkYGD4////fwZGEMnIyMgAAEvqB/6wfXLSAAAAAElFTkSuQmCC",we=l.f.div.withConfig({displayName:"devTools__Container",componentId:"sc-1mo3vwv-0"})(["position:fixed;z-index:2147483646;bottom:0;left:0;display:flex;flex-direction:column;width:35%;height:50%;border:6px solid ",";background:",";color:",";"],(e=>{let{theme:t}=e;return t.colors.bg.secondary}),(e=>{let{theme:t}=e;return t.colors.bg.primary}),(e=>{let{theme:t}=e;return t.colors.fg.secondary})),Le=l.f.textarea.withConfig({displayName:"devTools__Textarea",componentId:"sc-1mo3vwv-1"})(["flex:1;border:0;background:",";color:",";white-space:nowrap;overflow:auto;"],(e=>{let{theme:t}=e;return t.colors.bg.primary}),(e=>{let{theme:t}=e;return t.colors.fg.secondary})),_e=l.f.div.withConfig({displayName:"devTools__Options",componentId:"sc-1mo3vwv-2"})(["display:flex;justify-content:space-between;padding:6px;"]),je=l.f.label.withConfig({displayName:"devTools__Label",componentId:"sc-1mo3vwv-3"})(["margin-right:6px;"]),xe=l.f.button.withConfig({displayName:"devTools__Button",componentId:"sc-1mo3vwv-4"})(["margin-left:6px;"]),Ze=e=>{const t=[];return[{...e,pages:e.pages.map((e=>({...e,elements:e.elements.map((e=>{const C={...e};return"resource"in e&&(C.resource={...e.resource},"video"===e.type&&(C.resource.mimeType="video/mp4",C.resource.src="data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAPEbW9vdgAAAGxtdmhkAAAAANrF/AXaxfwFAAAD6AAAB9AAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAABhpb2RzAAAAABCAgIAHAE///////wAAAzh0cmFrAAAAXHRraGQAAAAB2sX8BdrF/AUAAAABAAAAAAAAB9AAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAABQAAAAUAAAAAAKwbWRpYQAAACBtZGhkAAAAANrF/AXaxfwFAAAD6AAAB9BVxAAAAAAAIWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAAAAAAACZ21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAq3N0c2QAAAAAAAAAAQAAAJthdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABQAFABIAAAASAAAAAAAAAABDkpWVC9BVkMgQ29kaW5nAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAAM2F2Y0MBTUAK/+EAG2dNQArsxLzzzUBAQZAAAAMAEAAAAwFI8SJZoAEABWjpeyyAAAAAEmNvbHJuY2xjAAEAAQAGAAAAGHN0dHMAAAAAAAAAAQAAABQAAABkAAAAZHN0c3oAAAAAAAAAAAAAABQAAAC1AAAADAAAAAwAAAAMAAAADAAAAGcAAAAOAAAADQAAAAwAAADEAAAADwAAAA4AAAAMAAAAmgAAAA8AAAAMAAAADAAAABEAAAAOAAAADAAAABxzdHNjAAAAAAAAAAEAAAABAAAACgAAAAEAAAAgY282NAAAAAAAAAACAAAAAAAAA/QAAAAAAAAGKwAAAKhjdHRzAAAAAAAAABMAAAABAAAAyAAAAAEAAAH0AAAAAQAAAMgAAAABAAAAAAAAAAEAAABkAAAAAQAAAfQAAAABAAAAyAAAAAEAAAAAAAAAAQAAAGQAAAABAAAB9AAAAAEAAADIAAAAAQAAAAAAAAABAAAAZAAAAAEAAAH0AAAAAQAAAMgAAAABAAAAAAAAAAEAAABkAAAAAQAAAZAAAAACAAAAZAAAABRzdHNzAAAAAAAAAAEAAAABAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAAH0AAAAMgAAQAAAAAAAW1kYXQAAAAAAAADXAAAALFliIQAIf8tERhKDUPN//6tPIlfMgqs2j4bf1chdW+++2VwQdh75gd9Y8UGeNAnhlaisT01Zs49a/0nV0aO/GLhqiGwvWR/s1K9W3zBx2od2cS1bT/kb2rz7FeHrWTqTLX6Gx65Y6i33pdJ/uLJd1nt76ybxnGFuPrIHacdB39MBmZsd4t/m7wPBzhrJIjUCiCUcSaxJPxvEH+6DID5TqxsXtv0RS9+hTuYECGa+YWdx4EAAAAIQZokbEMfi4AAAAAIQZ5COIc/0YEAAAAIAZ5hNEEH1YAAAAAIAZ5jakEH1YEAAABjQZpoSahBaJlMCM/eVhjnGE9A+AdJ7SwN5vlKUC/otPa/5jefanvcx5sQZ4c8/3tiMqvDgQF8rydFoFe3gcpkTP4xG9DP5oXTv1DTSsVi1O/u9fkq6BMYR61X6/n148wbBk3hAAAACkGehi5RMJfxO6sAAAAJAZ6lKRDn87czAAAACAGep25Cn8WAAAAAwEGarDUILakymAT/lvijvmpe6mLGpu6rJNoev4/97f/3/AViMdt7WMTLeGSxGKwsecwmz+Z5NTf4Lgky4aLbYBjw9pUtNg4bov9E4yT+OadpewkQxiWZZozDDf98P4PN72xr+rkQJcODW8z2LOkQVijjHcWSmTAvF7/ANFm8TO5l9vC/tz7FvEis+ba+dTueI87l9hdLXQfWqKN+J9j1fj5cguj08byzEmWnKbLlqG1uTZmu0LDedc3Ugo76bySHIAAAAAtBnspklERc3+sNqQAAAAoBnukpEZ/3fsMPAAAACAGe625N/6+AAAAAlkGa8DUILakymARfBGYe5snAbMic1iEEu9W/yugK09WdqQ1/7ftt/lUz4i6orQg+4cIz2nHYVKTXCJJbyOrz/tGL+TWtNtUBVK2kbTsfCYF8ddhk+qL5Jr82IUEUALXNsKpx1hhGIJnvqqlGTOyyOpmwbHhNUa2TaBkzzVzuaVnuHnaL3sjfLR0XEc/T6ntUXHacPLf94QAAAAtBnw5klERd//FEowAAAAgBny1pFf+ngQAAAAgBny9uf+yhJAAAAA1BmzM1CC2pMpgE/xwwAAAACkGfUWSURFz/kYEAAAAIAZ9ybkv/mIA=",C.resource.poster=Me,t.push(C.id)),"image"===e.type&&(C.resource.mimeType="image/png",C.resource.src=Me)),C}))})))},t]},Ae=e=>{if(!e.length)return e;const t=e.match(/\/([^/?#]+)[^/]*$/);return t.length>1?`__WEB_STORIES_TEMPLATE_BASE_URL__/images/templates/%%templateName%%/${t[1]}`:e};var Ie=function DevTools(){const[e,t]=Object(u.I)(!1),[C,a]=Object(u.I)(!1),[n,l]=Object(u.I)(!1),[i,o]=Object(u.I)(!1),{showSnackbar:c}=Object(Oe.a)(),s=Object(u.G)(),{reducerState:d,restore:p}=Object(A.e)((e=>{let{internal:t}=e;return{reducerState:t.reducerState,restore:t.restore}})),{pages:m,current:f,selection:h,story:{globalStoryStyles:b}}=d,g={current:f,selection:h,story:{globalStoryStyles:b},version:ve.a,pages:m},E=n?Ze(g)[0]:i?(v=g,{...v,current:null,selection:[],story:{},pages:v.pages.map((e=>{var t;return{...e,elements:e.elements.map((e=>{const t={...e};return"resource"in e&&(t.resource={...e.resource},"video"===e.type&&(t.resource.id=0,t.resource.posterId=0,t.resource.src=Ae(t.resource.src),t.resource.poster=Ae(t.resource.poster)),"image"===e.type&&(t.resource.id=0,t.resource.sizes=[],t.resource.src=Ae(t.resource.src))),t})),pageTemplateType:null!==(t=null==e?void 0:e.pageTemplateType)&&void 0!==t?t:""}}))}):g;var v;const O=()=>t((e=>!e));Object(ye.g)({key:"mod+shift+alt+j",editable:!0},O);const y=JSON.stringify(E,null,2),M=C?window.btoa(y):y,[w,L]=Object(u.I)(M);return Object(u.y)((()=>L(M)),[M]),e?r.a.createElement(we,null,r.a.createElement(_e,null,r.a.createElement("div",null,r.a.createElement(je,{title:"For easier sharing thru various channels"},r.a.createElement("input",{type:"checkbox",checked:C,onChange:()=>a((e=>!e))}),"Base64"),r.a.createElement(je,{title:"Replace resources with dummy resources"},r.a.createElement("input",{type:"checkbox",checked:n,onChange:()=>l((e=>!e))}),"Dummy resources"),r.a.createElement(je,{title:"Export as Template"},r.a.createElement("input",{type:"checkbox",checked:i,onChange:()=>o((e=>!e))}),"Template")),r.a.createElement("div",null,r.a.createElement(xe,{title:"Load data from input",onClick:()=>{let e=w;try{e=window.atob(e)}catch(e){}const t=JSON.parse(e),C={...t,story:{...d.story,...t.story},capabilities:d.capabilities},[a,r]=n?Ze(C):[C];p(a),r.length>0&&r.forEach((e=>{const t=document.getElementById(`video-${e}`);t&&t.load()})),c({message:"Story restored from input",timeout:1200})}},"Load"),r.a.createElement(xe,{title:"Copy data to clipboard",onClick:()=>{s.current.select(),document.execCommand("copy"),s.current.setSelectionRange(0,0),c({message:"Copied to clipboard",timeout:1200})}},"Copy"),r.a.createElement(xe,{title:"Close DevTools",onClick:O},"X"))),r.a.createElement(Le,{ref:s,className:"mousetrap",value:w,onChange:e=>L(e.target.value)})):null},Te=C(4);const Se=Object(l.d)([".default-moveable .moveable-control,.default-moveable .moveable-line.moveable-rotation-line .moveable-control{background:"," !important;border:1px solid "," !important;}.default-moveable.type-text .moveable-direction.moveable-n,.default-moveable.type-text .moveable-direction.moveable-s{pointer-events:none;}.default-moveable .moveable-control.moveable-n{display:none !important;}.default-moveable .moveable-line{border:0;background:transparent !important;width:1px;height:1px;}.default-moveable .moveable-horizontal{border-bottom:1px dashed "," !important;}.default-moveable .moveable-vertical{border-right:1px dashed "," !important;}.default-moveable .moveable-gap{border-color:"," !important;}.default-moveable .moveable-target{border-style:solid !important;}.default-moveable .moveable-control.moveable-s,.default-moveable .moveable-control.moveable-e,.default-moveable .moveable-control.moveable-w{border-radius:4px;}.default-moveable .moveable-control.moveable-nw,.default-moveable .moveable-control.moveable-ne,.default-moveable .moveable-control.moveable-sw,.default-moveable .moveable-control.moveable-se{border-radius:2px;width:8px;height:8px;margin-left:-4px;margin-top:-4px;}.default-moveable .moveable-control.moveable-s{height:6px !important;width:16px !important;margin-top:-3px !important;}.default-moveable .moveable-control.moveable-e{height:16px !important;width:6px !important;margin-left:-3px !important;}.default-moveable .moveable-control.moveable-w{height:16px !important;width:6px !important;margin-left:-3px !important;}.default-moveable.moveable-control-box .moveable-line.moveable-direction{background:"," !important;width:1px;height:1px;}.default-moveable.moveable-control-box .moveable-line.moveable-rotation-line{background:"," !important;width:1px;height:12px;top:28px;}.default-moveable.moveable-control-box .moveable-control.moveable-rotation-control{border-radius:50px;width:29px;height:29px;margin-left:-14.5px;top:10.5px;}.default-moveable.moveable-control-box .moveable-control.moveable-rotation-control::after{content:'';position:absolute;width:28px;height:28px;left:-1px;top:-1px;background-image:url('","');background-size:100%;filter:invert(100%);}.default-moveable.hide-handles .moveable-line.moveable-rotation-line,.default-moveable.hide-handles .moveable-line.moveable-direction{display:none;}.default-moveable.visually-hide-handles .moveable-control.moveable-e,.default-moveable.visually-hide-handles .moveable-control.moveable-w,.default-moveable.visually-hide-handles .moveable-control.moveable-s,.default-moveable.visually-hide-handles .moveable-control.moveable-ne,.default-moveable.visually-hide-handles .moveable-control.moveable-nw,.default-moveable.visually-hide-handles .moveable-control.moveable-sw{opacity:0;}"],(e=>{let{theme:t}=e;return t.colors.bg.primary}),(e=>{let{theme:t}=e;return t.colors.border.selection}),(e=>{let{theme:t}=e;return t.colors.border.focus}),(e=>{let{theme:t}=e;return t.colors.border.focus}),(e=>{let{theme:t}=e;return t.colors.border.negativePress}),(e=>{let{theme:t}=e;return t.colors.border.selection}),(e=>{let{theme:t}=e;return t.colors.border.selection}),Te.b.ArrowCircle),ke=Object(l.d)([".crop-moveable .moveable-control{background:"," !important;border:none !important;}.crop-moveable .moveable-control.moveable-n,.crop-moveable .moveable-control.moveable-s,.crop-moveable .moveable-control.moveable-e,.crop-moveable .moveable-control.moveable-w{border:1px solid "," !important;border-radius:4px;}.crop-moveable .moveable-control.moveable-n,.crop-moveable .moveable-control.moveable-s{width:","px !important;height:","px !important;margin-left:-12px !important;}.crop-moveable .moveable-control.moveable-n{margin-top:-8px !important;}.crop-moveable .moveable-control.moveable-s{margin-top:0px !important;}.crop-moveable .moveable-control.moveable-e{margin-left:0 !important;}.crop-moveable .moveable-control.moveable-w{margin-top:0 !important;margin-left:-8px !important;}.crop-moveable .moveable-control.moveable-e,.crop-moveable .moveable-control.moveable-w{width:","px !important;height:","px !important;margin-top:-12px !important;}.crop-moveable .moveable-control.moveable-nw,.crop-moveable .moveable-control.moveable-ne,.crop-moveable .moveable-control.moveable-sw,.crop-moveable .moveable-control.moveable-se,.crop-moveable .moveable-control.moveable-nw::before,.crop-moveable .moveable-control.moveable-ne::before,.crop-moveable .moveable-control.moveable-sw::before,.crop-moveable .moveable-control.moveable-se::before,.crop-moveable .moveable-control.moveable-nw::after,.crop-moveable .moveable-control.moveable-ne::after,.crop-moveable .moveable-control.moveable-sw::after,.crop-moveable .moveable-control.moveable-se::after{left:initial !important;right:initial !important;top:initial !important;bottom:initial !important;background:"," !important;position:absolute !important;border-style:solid !important;border-color:"," !important;}.crop-moveable .moveable-control.moveable-nw::before,.crop-moveable .moveable-control.moveable-ne::before,.crop-moveable .moveable-control.moveable-sw::before,.crop-moveable .moveable-control.moveable-se::before,.crop-moveable .moveable-control.moveable-nw::after,.crop-moveable .moveable-control.moveable-ne::after,.crop-moveable .moveable-control.moveable-sw::after,.crop-moveable .moveable-control.moveable-se::after{content:'';}.crop-moveable .moveable-control.moveable-nw,.crop-moveable .moveable-control.moveable-ne,.crop-moveable .moveable-control.moveable-sw,.crop-moveable .moveable-control.moveable-se{width:","px !important;height:","px !important;}.crop-moveable .moveable-control.moveable-nw{top:-","px !important;left:-","px !important;border-width:1px 0 0 1px !important;border-radius:2px 0 0 0 !important;}.crop-moveable .moveable-control.moveable-ne{top:-","px !important;right:-","px !important;border-width:1px 1px 0 0 !important;border-radius:0 2px 0 0 !important;}.crop-moveable .moveable-control.moveable-sw{left:-","px !important;bottom:-","px !important;border-width:0 0 1px 1px !important;border-radius:0 0 0 2px !important;}.crop-moveable .moveable-control.moveable-se{right:-","px !important;bottom:-","px !important;border-width:0 1px 1px 0 !important;border-radius:0 0 2px 0 !important;}.crop-moveable .moveable-control.moveable-nw::before,.crop-moveable .moveable-control.moveable-ne::before,.crop-moveable .moveable-control.moveable-sw::before,.crop-moveable .moveable-control.moveable-se::before{width:","px !important;height:","px !important;top:0;}.crop-moveable .moveable-control.moveable-nw::before,.crop-moveable .moveable-control.moveable-sw::before{left:","px !important;border-width:1px 1px 1px 0;border-radius:0 2px 2px 0;}.crop-moveable .moveable-control.moveable-ne::before,.crop-moveable .moveable-control.moveable-se::before{right:","px !important;border-width:1px 0 1px 1px;border-radius:2px 0 0 2px;}.crop-moveable .moveable-control.moveable-nw::before,.crop-moveable .moveable-control.moveable-ne::before{top:-","px !important;}.crop-moveable .moveable-control.moveable-sw::before,.crop-moveable .moveable-control.moveable-se::before{bottom:-","px !important;}.crop-moveable .moveable-control.moveable-nw::after,.crop-moveable .moveable-control.moveable-ne::after,.crop-moveable .moveable-control.moveable-sw::after,.crop-moveable .moveable-control.moveable-se::after{width:","px !important;height:","px !important;}.crop-moveable .moveable-control.moveable-nw::after,.crop-moveable .moveable-control.moveable-ne::after{top:","px !important;border-width:0 1px 1px 1px;border-radius:0 0 2px 2px;}.crop-moveable .moveable-control.moveable-sw::after,.crop-moveable .moveable-control.moveable-se::after{bottom:","px !important;border-width:1px 1px 0 1px;border-radius:2px 2px 0 0;}.crop-moveable .moveable-control.moveable-nw::after,.crop-moveable .moveable-control.moveable-sw::after{left:-","px !important;}.crop-moveable .moveable-control.moveable-ne::after,.crop-moveable .moveable-control.moveable-se::after{right:-",'px !important;}.crop-moveable .moveable-line.moveable-direction[data-line-index="0"]{margin-top:-4px;}.crop-moveable .moveable-line.moveable-direction[data-line-index="3"]{margin-top:4px;}.crop-moveable .moveable-line.moveable-direction[data-line-index="1"]{margin-left:4px;}.crop-moveable .moveable-line.moveable-direction[data-line-index="2"]{margin-left:-4px;}.crop-moveable .moveable-direction.moveable-line{background:'," !important;width:2px;height:2px;pointer-events:none;}"],(e=>{let{theme:t}=e;return t.colors.bg.primary}),(e=>{let{theme:t}=e;return t.colors.border.selection}),24,8,8,24,(e=>{let{theme:t}=e;return t.colors.bg.primary}),(e=>{let{theme:t}=e;return t.colors.border.selection}),7,7,1,1,1,7,1,7,7,7,17,8,6,6,1,1,8,17,6,6,1,1,(e=>{let{theme:t}=e;return t.colors.border.selection})),Re=Object(l.d)([".react-calendar__tile--now.react-calendar__month-view__days__day:focus{background-color:#eeeec1;}"]),Pe="useskeyboard",Ne=".useskeyboard",De=Object(l.d)(["body:not(",") *:focus{outline:none !important;}"],Ne),Be=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Tab","Digit1","Digit2","Digit3"];var ze=()=>{const[e,t]=Object(u.I)(!1),C=C=>{!e&&Be.includes(C.code)&&t(!0)},a=()=>{e&&t(!1)};return document.addEventListener("keydown",C,!0),document.addEventListener("mousedown",a,!0),Object(u.y)((()=>function(){document.removeEventListener("keydown",C,!0),document.removeEventListener("mousedown",a,!0)})),Object(u.y)((()=>{document.body.classList.toggle(Pe,e)}),[e]),r.a.createElement(De,null)};var Fe={locale:{locale:"en-US",dateFormat:"F j, Y",timeFormat:"g:i a",gmtOffset:"0",timezone:"",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysInitials:["S","M","T","W","T","F","S"],weekStartsOn:1},allowedFileTypes:["gif","jpe","jpeg","jpg","m4v","mp4","png","svg","svgz","webm","webp"],allowedTranscodableMimeTypes:["video/3gpp","video/3gpp2","video/MP2T","video/mp4","video/mpeg","video/ogg","video/quicktime","video/webm","video/x-flv","video/x-h261","video/x-h263","video/x-m4v","video/x-matroska","video/x-mjpeg","video/x-ms-asf","video/x-msvideo","video/x-nut"],allowedImageFileTypes:["gif","jpe","jpeg","jpg","png","webp"],allowedImageMimeTypes:["image/webp","image/png","image/jpeg","image/gif"],allowedAudioFileTypes:["aac","m4a","m4b","mp3","oga","ogg","wav"],allowedAudioMimeTypes:["audio/mpeg","audio/aac","audio/wav","audio/ogg"],allowedMimeTypes:{image:["image/webp","image/png","image/jpeg","image/gif","image/svg+xml"],audio:[],video:["video/mp4","video/webm"]},isRTL:!1,storyId:1,cdnURL:"https://wp.stories.google/static/main/",maxUpload:314572800,capabilities:{hasUploadMediaAction:!1,canManageSettings:!1},metadata:{publisher:""},canViewDefaultTemplates:!0,showMedia3p:!0,encodeMarkup:!0,ffmpegCoreUrl:"https://wp.stories.google/static/main/js/@ffmpeg/core@0.10.0/dist/ffmpeg-core.js",apiCallbacks:{},MediaUpload:()=>null,styleConstants:{topOffset:0,leftOffset:0}};var He=function StoryEditor(e){let{config:t,initialEdits:C,children:a}=e;const n=Object(u.C)((()=>Object(c.a)(Fe,t)),[t]),{storyId:i,isRTL:f,flags:h}=n;return r.a.createElement(p.a,{features:h},r.a.createElement(l.a,{stylisPlugins:f?[o.a]:[]},r.a.createElement(l.c,{theme:m.b},r.a.createElement(L,null,r.a.createElement(_.b,{config:n},r.a.createElement(j.b,null,r.a.createElement(x.a,null,r.a.createElement(Z.a,{size:50},r.a.createElement(s.a,null,r.a.createElement(A.c,{storyId:i,initialEdits:C},r.a.createElement(z,null,r.a.createElement(S.b,null,r.a.createElement(I.a,null,r.a.createElement(T.b,null,r.a.createElement(V,null),r.a.createElement(U.a,null,r.a.createElement(W.a,null,r.a.createElement(Y.a,null,r.a.createElement(Ee,null,r.a.createElement(m.a,null),r.a.createElement(Ie,null),r.a.createElement(Se,null),r.a.createElement(ke,null),r.a.createElement(d.b,null),r.a.createElement(Re,null),r.a.createElement(ze,null),a))))))))))))))))))},Ge=C(74),Ve=C(5),Ue=C.n(Ve);var We=Object(u.m)((function PreviewPageElements(e){let{page:t}=e;return t.elements.map((e=>r.a.createElement(me,{previewMode:!0,key:e.id,page:t,element:e,isAnimatable:!0})))}));const Ye=l.f.div.withConfig({displayName:"previewPage__FullBleedPreviewWrapper",componentId:"sc-1r5t7dq-0"})(["height:",";width:100%;overflow:hidden;position:relative;display:flex;align-items:center;background-color:white;",";"],(e=>{let{pageSize:t}=e;return`${t.containerHeight}px`}),(e=>{let{background:t}=e;return Object(te.a)(t)})),$e=l.f.div.withConfig({displayName:"previewPage__PreviewSafeZone",componentId:"sc-1r5t7dq-1"})(["width:100%;height:",";overflow:visible;position:absolute;margin:0;"],(e=>{let{pageSize:t}=e;return`${t.height}px`}));function PreviewPageAnimationController(e){let{animationState:t}=e;const C=Object(ae.t)((e=>{let{actions:t}=e;return t.WAAPIAnimationMethods}));return Object(u.y)((()=>{switch(t){case ae.l.PLAYING:return C.play(),()=>{};case ae.l.RESET:return C.reset(),()=>{};case ae.l.SCRUBBING:case ae.l.PAUSED:return C.pause(),()=>{};default:return()=>{}}}),[t,C]),Object(u.y)((()=>()=>C.reset()),[C]),null}const qe=Object(u.m)(Object(u.j)((function PreviewPageDisplay(e,t){let{page:C,pageSize:a}=e;return r.a.createElement(Ye,{ref:t,pageSize:a,background:C.backgroundColor},r.a.createElement($e,{pageSize:a},r.a.createElement(We,{page:C})))}))),Xe=Object(u.j)((function PreviewPage(e,t){let{page:C,pageSize:a,animationState:n=ae.l.RESET,onAnimationComplete:i}=e;return r.a.createElement(l.a,{stylisPlugins:[]},r.a.createElement(ae.m.Provider,{animations:C.animations,elements:C.elements,onWAAPIFinish:i},r.a.createElement(qe,{ref:t,page:C,pageSize:a}),r.a.createElement(PreviewPageAnimationController,{animationState:n})))}));PreviewPageAnimationController.propTypes={animationState:Ue.a.oneOf(Object.values(ae.l))};var Ke=Xe;class Qe extends u.a{constructor(){var e,t,C;super(...arguments),C={hasError:!1},(t="state")in(e=this)?Object.defineProperty(e,t,{value:C,enumerable:!0,configurable:!0,writable:!0}):e[t]=C}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error(e,t)}render(){return this.state.hasError?r.a.createElement("div",null):this.props.children}}var Je=C(34);function et(){return(et=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}function HistoryButton(e){let{title:t,shortcut:C,children:a,...n}=e;return r.a.createElement(Je.a,{title:t,shortcut:C,hasTail:!0},r.a.createElement(b.a,et({variant:g.d.SQUARE,type:g.c.QUATERNARY,size:g.a.SMALL},n),a))}function Redo(){const{state:{canRedo:e},actions:{redo:t}}=Object(H.k)(),{isRTL:C}=Object(H.g)(),a=Object(u.s)((()=>t()),[t]);return r.a.createElement(HistoryButton,{title:Object(h.__)("Redo","web-stories"),shortcut:"shift+mod+z",disabled:!e,onClick:a,"aria-label":Object(h.__)("Redo Changes","web-stories")},C?r.a.createElement(Te.a.ArrowDownLeftCurved,null):r.a.createElement(Te.a.ArrowDownRightCurved,null))}function Undo(){const{state:{canUndo:e},actions:{undo:t}}=Object(H.k)(),{isRTL:C}=Object(H.g)(),a=Object(u.s)((()=>t()),[t]);return r.a.createElement(HistoryButton,{title:Object(h.__)("Undo","web-stories"),shortcut:"mod+z",disabled:!e,onClick:a,"aria-label":Object(h.__)("Undo Changes","web-stories")},C?r.a.createElement(Te.a.ArrowDownRightCurved,null):r.a.createElement(Te.a.ArrowDownLeftCurved,null))}var tt=C(569),Ct=C(43),at=C(269),nt=Object(u.f)({state:{},actions:{}});var rt=e=>{let{children:t}=e;const[C,a]=Object(u.I)(!1),[n,l]=Object(u.I)(),[i,o]=Object(u.I)(!1),c=Object(u.s)((e=>{l(e)}),[l]),s=Object(u.s)((()=>{Object(f.g)("checklist_toggled",{status:C?"closed":"open"}),a((e=>!e))}),[C]),d=Object(u.s)((()=>{Object(f.g)("checklist_toggled",{status:"closed"}),a(!1)}),[]),p=Object(u.s)((()=>{Object(f.g)("checklist_toggled",{status:"open"}),a(!0)}),[]),m=Object(u.C)((()=>({state:{isOpen:C,isChecklistMounted:i,openPanel:n},actions:{toggle:s,close:d,open:p,setIsChecklistMounted:o,setOpenPanel:c}})),[d,n,C,p,s,c,o,i]);return r.a.createElement(nt.Provider,{value:m},t)};function lt(e){return Object(u.w)(nt,null!=e?e:u.k)}var it=C(388),ot=C(40);const ct=70,st=Math.floor(1),dt=640,ut=853,pt=96,mt="checklist_companion",ft=Object(h.__)("Checklist","web-stories"),ht={ACCESSIBILITY:"accessibility",DESIGN:"design",PRIORITY:"priority"},bt={[ht.ACCESSIBILITY]:Object(h.__)("Accessibility","web-stories"),[ht.DESIGN]:Object(h.__)("Design","web-stories"),[ht.PRIORITY]:Object(h.__)("Priority","web-stories")},gt={fontSizeTooSmall:{title:Object(h.sprintf)(
|
2 |
/* translators: %d: minimum font size. */
|
3 |
Object(h.__)("Increase font size to %s or above","web-stories"),12),footer:Object(h.sprintf)(
|
4 |
/* translators: %d: minimum font size. */
|
5 |
Object(h.__)("Ensure legibility by selecting text size %d or greater","web-stories"),12)},imagesMissingAltText:{title:Object(h.__)("Add assistive text to images","web-stories"),footer:Object(h.__)("Optimize accessibility and indexability with meaningful text to better assist users.","web-stories")},linkTappableRegionTooBig:{title:Object(h.__)("Reduce link size","web-stories"),footer:Object(h.__)("Elements with links must not cover most of the page. Decrease the size of elements with links.","web-stories")},linkTappableRegionTooSmall:{title:Object(h.sprintf)(
|
6 |
/* translators: %s: minimum tappable region size width x minimum tappable region size height. */
|
7 |
+
Object(h.__)("Increase tap area size to at least %s","web-stories"),"48x48px"),footer:Object(h.__)("Optimize accessibility and indexability with meaningful text to better assist users","web-stories")},lowContrast:{title:Object(h.__)("Increase contrast between text and background color","web-stories"),footer:Object(h.__)("Ensure legibility of text and ease of reading by increasing color contrast","web-stories"),textPanel:Object(h.__)("This color or font size combination may be hard for some people to read.","web-stories"),backgroundPanel:Object(h.__)("This background color may make some text hard to read.","web-stories"),warningIcon:Object(h.__)("Low Warning","web-stories")},videoMissingCaptions:{title:Object(h.__)("Add video captions","web-stories"),footer:Object(h.__)("Keep the audience engaged even when they can't listen to the audio","web-stories")},videoMissingTitle:{title:Object(h.__)("Add video description","web-stories"),footer:Object(h.__)("Improves indexability and accessibility (for videos without captions)","web-stories")}},Et={storyTooShort:{title:Object(h.sprintf)(
|
8 |
/* translators: %d: maximum number of pages. */
|
9 |
Object(h._n)("Make Web Story at least %d page","Make Web Story at least %d pages",4,"web-stories"),4),footer:Object(h.sprintf)(
|
10 |
/* translators: 1: minimum number of pages. 2: maximum number of pages. */
|
32 |
/* translators: 1: minimum video resolution. 2: minimum video width x minimum video height in pixels. */
|
33 |
Object(h.__)("Consider using a minimum resolution of %1$s (%2$s) to represent portrait videos","web-stories"),"480p","852x480px")},videoTooLong:{title:Object(h.sprintf)(
|
34 |
/* translators: %d: maximum video length in minutes. */
|
35 |
+
Object(h._n)("Split videos into segments of %d minute or less","Split videos into segments of %d minutes or less",st,"web-stories"),st),footer:Object(h.__)("Shorter videos help readers navigate stories","web-stories")}},vt={storyMissingDescription:{title:Object(h.__)("Add Web Story description","web-stories"),footer:Object(h.__)("Incorporate a brief description for better user experience","web-stories")},storyMissingTitle:{title:Object(h.__)("Add Web Story title","web-stories"),footer:r.a.createElement(r.a.Fragment,null,r.a.createElement("li",null,Object(h.sprintf)(
|
36 |
/* translators: %d: maximum story title length in words. */
|
37 |
Object(h._n)("Keep under %d word","Keep under %d words",10,"web-stories"),10)),r.a.createElement("li",null,Object(h.sprintf)(
|
38 |
/* translators: %d: maximum story title length in characters. */
|
39 |
+
Object(h._n)("Don't exceed %d character","Don't exceed %d characters",ct,"web-stories"),ct)))},storyMissingPoster:{title:Object(h.__)("Add poster image","web-stories"),footer:r.a.createElement(r.a.Fragment,null,r.a.createElement("li",null,Object(h.__)("Use as a representation of the story","web-stories")),r.a.createElement("li",null,Object(h.__)("Avoid images with embedded text","web-stories")),r.a.createElement("li",null,Object(h.sprintf)(
|
40 |
/* translators: %s: image dimensions. */
|
41 |
Object(h.__)("Use an image that's at least %s","web-stories"),"640x853px")),r.a.createElement("li",null,Object(h.sprintf)(
|
42 |
/* translators: %s: aspect ratio. */
|
43 |
Object(h.__)("Maintain a %s aspect ratio","web-stories"),"3:4")))},videoMissingPoster:{title:Object(h.__)("Add poster image to every video","web-stories"),footer:Object(h.__)("Ensure a better experience by displaying a poster while users wait for the video to load","web-stories")},storyTitleTooLong:{title:Object(h.sprintf)(
|
44 |
/* translators: %d: maximum number of story characters. */
|
45 |
+
Object(h._n)("Shorten title to fewer than %d character","Shorten title to fewer than %d characters",ct,"web-stories"),ct),footer:Object(h.sprintf)(
|
46 |
/* translators: %d: maximum number of story characters. */
|
47 |
+
Object(h._n)("Limit story title to %d character or less","Limit story title to %d characters or less",ct,"web-stories"),ct)},logoTooSmall:{title:Object(h.sprintf)(
|
48 |
/* translators: %s: image dimensions. */
|
49 |
Object(h.__)("Increase size of publisher logo to at least %s","web-stories"),"96x96px"),footer:r.a.createElement(r.a.Fragment,null,r.a.createElement("li",null,Object(h.sprintf)(
|
50 |
/* translators: %s: image dimensions. */
|
62 |
/* translators: %s: aspect ratio. */
|
63 |
Object(h.__)("Maintain a %s aspect ratio","web-stories"),"3:4")))},videoNotOptimized:{title:Object(h.__)("Optimize videos","web-stories"),footer:Object(h.sprintf)(
|
64 |
/* translators: %s: video resolution (720p) */
|
65 |
+
Object(h.__)("Videos larger than %s can cause slower loading and higher bandwidth costs.","web-stories"),"720p")},storyMissingPublisherName:{title:Object(h.__)("Add Site Title","web-stories")},ampValidation:{title:Object(h.__)("Compatibility","web-stories"),footer:r.a.createElement(h.TranslateWithMarkup,{mapping:{a:r.a.createElement(it.a,{href:Object(h.__)("https://wp.stories.google/docs/","web-stories"),rel:"noreferrer",target:"_blank",onClick:e=>Object(f.e)(e,"click_checklist_amp_test"),size:ot.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL})}},Object(h.__)("Your story contains errors that can affect eligibility to appear on Google. Please see <a>our FAQ</a> for more information.","web-stories"))}},Ot={UNAVAILABLE:"unavailable",ONLY_RECOMMENDED:"recommended",ALL:"all"},yt={[Ot.UNAVAILABLE]:[],[Ot.ONLY_RECOMMENDED]:[ht.ACCESSIBILITY,ht.DESIGN],[Ot.ALL]:Object.values(ht)},Mt={[Ot.UNAVAILABLE]:null,[Ot.ONLY_RECOMMENDED]:ht.DESIGN,[Ot.ALL]:ht.PRIORITY},wt="story is no longer empty",Lt="publish button is pressed",_t="story 'recommended' section enabled",jt="story 'high priority' section enabled",xt="story is published, regardless of recommendations",Zt={[Ot.UNAVAILABLE]:{[wt]:Ot.ONLY_RECOMMENDED,[Lt]:Ot.ALL,[xt]:Ot.ALL,[_t]:Ot.ONLY_RECOMMENDED},[Ot.ONLY_RECOMMENDED]:{[jt]:Ot.ALL,[Lt]:Ot.ALL,[xt]:Ot.ALL},[Ot.ALL]:{}},At=(e,t)=>Zt[e][t]||e,It=Object(u.f)({state:{},actions:{}});function ChecklistCheckpointProvider(e){let{children:t}=e;const[C,a]=Object(u.E)(At,Ot.UNAVAILABLE),[n,l]=Object(u.I)(),[i,o]=Object(u.I)(),c=n>0||[Ot.UNAVAILABLE,Ot.ONLY_RECOMMENDED].includes(C),s=Object(H.o)((e=>{let{state:{story:t}}=e;return t.status}));Object(u.y)((()=>{"publish"===s&&a(xt)}),[s]),Object(H.p)(H.b.onSecondPageAdded,Object(u.s)((()=>{a(_t)}),[])),Object(H.p)(H.b.onFifthPageAdded,Object(u.s)((()=>{a(jt)}),[])),Object(H.p)(H.b.onInitialElementAdded,Object(u.s)((()=>{a(wt)}),[]));const d=Object(u.s)((e=>{l(e)}),[]),p=Object(u.s)((()=>{o(!0),a(Lt)}),[]),m=Object(u.s)((()=>{o(!1)}),[]),f=Object(u.C)((()=>({state:{checkpoint:C,shouldReviewDialogBeSeen:c,reviewDialogRequested:i},actions:{updateHighPriorityCount:d,onReviewDialogRequest:p,onResetReviewDialogRequest:m}})),[C,p,m,i,c,d]);return r.a.createElement(It.Provider,{value:f},t)}function Tt(e){return Object(u.w)(It,null!=e?e:u.k)}const St=Object(u.f)(null),kt=Object(u.f)(null),Rt={[ht.PRIORITY]:{},[ht.DESIGN]:{},[ht.ACCESSIBILITY]:{}};function ChecklistCountProvider(e){let{children:t}=e;const C=Object(u.I)(Rt);return r.a.createElement(St.Provider,{value:C},t)}function ChecklistCategoryProvider(e){var t;let{children:C,category:a}=e;const n=null===(t=Object(u.u)(St))||void 0===t?void 0:t[1];if(!n)throw new Error("Cannot use `ChecklistCategoryProvider` outside of `ChecklistCountProvider`");const l=Object(u.s)((e=>n((t=>({...t,[a]:{...t[a],...e}})))),[a,n]);return r.a.createElement(kt.Provider,{value:l},C)}function Pt(e,t){const C=Object(u.u)(kt);if(!C)throw new Error("Cannot use `useRegisterCheck` outside of `ChecklistCategoryProvider`");Object(u.y)((()=>C({[e]:t})),[e,C,t])}function Nt(){var e;const t=null===(e=Object(u.u)(St))||void 0===e?void 0:e[0];if(!t)throw new Error("Cannot use `useIsChecklistEmpty` outside of `ChecklistCountProvider`");return Object.values(t).map((e=>Object.values(e))).flatMap((e=>e)).filter((e=>e)).length>0}function Dt(e){var t;const C=null===(t=Object(u.u)(St))||void 0===t?void 0:t[0];if(!C)throw new Error("Cannot use `useCategoryCount` outside of `ChecklistCountProvider`");return Object.values(C[e]||{}).filter((e=>e)).length}var Bt=C(630);const zt=[o.a],Ft=[];var Ht=function DirectionAware(e){let{children:t}=e;const{isRTL:C}=Object(H.g)();return r.a.createElement(l.a,{stylisPlugins:C?zt:Ft},t)},Gt=C(395);function Vt(){return(Vt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Ut="entering",Wt="entered",Yt="exiting",$t={initial:"default",states:{default:{entering:Ut},entering:{entered:Wt},entered:{exiting:Yt},exiting:{exited:"exited"},exited:{entering:Ut}}},qt=(e,t)=>{var C;return(null===(C=$t.states[e])||void 0===C?void 0:C[t])||e},Xt=Object(u.j)(((e,t)=>{let{state:C,children:a}=e;const[n,r]=Object(u.E)(qt,C===Wt?C:$t.initial),[l,i]=Object(u.I)(C);Object(u.y)((()=>{const e=requestAnimationFrame((()=>i(C)));return()=>cancelAnimationFrame(e)}),[C]),Object(u.y)((()=>{r(l)}),[l]);const o=[Ut,Wt].includes(n)&&"exiting"===C,c=[Yt].includes(n)&&[Ut,Wt].includes(C)||o;return Object(u.e)(a(c?C:n),{ref:t})}));function ScheduledTransition(e){let{children:t,...C}=e;const a=Object(u.G)();return r.a.createElement(Gt.a,Vt({nodeRef:a},C),(e=>r.a.createElement(Xt,{ref:a,state:e},(e=>t(e)))))}var Kt=C(98);var Qt=l.f.div.withConfig({displayName:"navigationWrapper__NavigationWrapper",componentId:"sc-1qotgfl-0"})(["position:absolute;left:0;bottom:0;max-height:calc(100vh - ","px);width:","px;color:",";background-color:",";border:1px solid ",";border-radius:",";overflow:hidden;",""],161,310,(e=>{let{theme:t}=e;return t.colors.fg.primary}),(e=>{let{theme:t}=e;return t.colors.bg.primary}),(e=>{let{theme:t}=e;return t.colors.bg.tertiary}),(e=>{let{theme:t}=e;return t.borders.radius.small}),(e=>{let{isOpen:t}=e;return!t&&Object(l.e)(["&,*{height:0;visibility:hidden;}"])})),Jt=C(567);const eC=Object(l.e)(["",";"],(e=>{let{theme:t}=e;return Q.c.focusableOutlineCSS(t.colors.border.focus,t.colors.bg.secondary)})),tC=Object(l.e)([":focus-within{",";}"],(e=>{let{theme:t}=e;return Q.c.focusCSS(t.colors.border.focus,t.colors.bg.secondary)}));var CC=C(369),aC=C(370);function nC(){return(nC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}function ToggleButton(e){let{isToggled:t=!1,type:C=null,...a}=e;const n=C===g.c.QUATERNARY?C:t?g.c.SECONDARY:g.c.TERTIARY;return r.a.createElement(b.a,nC({},a,{type:n,"aria-pressed":t,isToggled:t}))}function LockToggle(e){let{isLocked:t=!1,...C}=e;return r.a.createElement(b.a,nC({},C,{"aria-pressed":t,type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE}),t?r.a.createElement(CC.a,null):r.a.createElement(aC.a,null))}const rC=l.f.div.withConfig({displayName:"flipControls__ControlsContainer",componentId:"sc-1gcq876-0"})(["display:flex;justify-content:left;align-items:flex-start;"]),lC=l.f.div.withConfig({displayName:"flipControls__Space",componentId:"sc-1gcq876-1"})(["width:8px;"]),iC=Object(l.f)(ToggleButton).withConfig({displayName:"flipControls__StyledToggleButton",componentId:"sc-1gcq876-2"})(["",";"],eC);var oC=function FlipControls(e){let{value:t,onChange:C}=e;const a=Object(u.s)((e=>!0===t[e]),[t]);return r.a.createElement(rC,null,r.a.createElement(Je.a,{title:Object(h.__)("Flip horizontally","web-stories")},r.a.createElement(iC,{variant:g.d.SQUARE,size:g.a.SMALL,isToggled:!0===t.horizontal,onClick:()=>C({...t,horizontal:!a("horizontal")}),"aria-label":Object(h.__)("Flip horizontally","web-stories")},r.a.createElement(Te.a.MirrorLeftright,null))),r.a.createElement(lC,null),r.a.createElement(Je.a,{title:Object(h.__)("Flip vertically","web-stories")},r.a.createElement(iC,{variant:g.d.SQUARE,size:g.a.SMALL,isToggled:!0===t.vertical,onClick:()=>C({...t,vertical:!a("vertical")}),"aria-label":Object(h.__)("Flip vertically","web-stories")},r.a.createElement(Te.a.MirrorUpdown,null))))},cC=C(133),sC=C(772);var dC=function(e){if(!e)return null;switch(e.type){case"radial":return Object(h.__)("Radial","web-stories");case"linear":return Object(h.__)("Linear","web-stories");case"solid":default:{const{color:{r:t,g:C,b:a}}=e;return function(e,t,C){const a=e=>e.toString(16).padStart(2,"0");return`${a(e)}${a(t)}${a(C)}`.toUpperCase()}(t,C,a)}}},uC=C(6),pC=e=>{let{onChange:t}=e;const{fullbleedContainer:a,eyedropperPixelData:n,setEyedropperCallback:r,setIsEyedropperActive:l,setEyedropperImg:i,setEyedropperPixelData:o}=Object(H.d)((e=>{let{state:{fullbleedContainer:t,eyedropperPixelData:C},actions:{setEyedropperCallback:a,setIsEyedropperActive:n,setEyedropperImg:r,setEyedropperPixelData:l}}=e;return{fullbleedContainer:t,setEyedropperCallback:a,eyedropperPixelData:C,setIsEyedropperActive:n,setEyedropperImg:r,setEyedropperPixelData:l}})),{zoomSetting:c,setZoomSetting:s}=Object(H.l)((e=>{let{state:{zoomSetting:t},actions:{setZoomSetting:C}}=e;return{zoomSetting:t,setZoomSetting:C}}));return{initEyedropper:Object(u.s)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return async()=>{if(!e&&c!==uC.K.FIT)return;e&&l(!0);n&&e||(e&&s(uC.K.FIT),await new Promise((e=>{setTimeout((()=>{C.e(197).then(C.bind(null,1056)).then((t=>{t.toCanvas(a,{preferredFontFormat:"woff2",pixelRatio:1}).then((t=>{const C=t.getContext("2d").getImageData(0,0,t.width,t.height).data;o(C),i(t.toDataURL()),e()})).catch((()=>{e()}))}))}))}))),r((()=>e=>{t(e),l(!1),i(null),o(null)}))}}),[a,t,n,c,l,r,i,o,s])}};var mC=function(e,t){if(!e)return null;const{type:C}=e;if(!C||"solid"===C){const{color:{r:C,g:a,b:n}}=e;return{color:{r:C,g:a,b:n,a:t}}}return{...e,alpha:t}},fC=C(288),hC=C.n(fC);function bC(e,t){let{allowEmpty:C,isFloat:a,min:n,max:r}=t;if(`${e}`.length>0){const t=a?parseFloat(e):parseInt(e);let C=t;return void 0!==n&&(C=Math.max(n,t)),void 0!==r&&(C=Math.min(r,t)),isNaN(C)?null:C}return C?"":null}const gC=e=>{let{allowEmpty:t,isFloat:C,max:a,min:n,onChange:r,value:l}=e;const i=Object(u.G)(null),o=Object(u.G)(l),c=Object(u.G)(!1),[s,d]=Object(u.I)(l),p=Object(u.C)((()=>({allowEmpty:t,isFloat:C,max:a,min:n})),[t,C,a,n]),m=Object(u.s)((e=>{let t=bC(o.current,p);if(!c.current){const e=bC(s,p);null!==e&&(t=e)}c.current=!1,null!==t&&(d(t),t!==o.current&&r(e,t))}),[s,r,p]),f=Object(u.s)((e=>{d(e.target.value)}),[]),h=Object(u.s)((e=>{const{altKey:t,key:C}=e;let l=function(e,t){let{allowEmpty:C,isFloat:a,max:n,min:r}=t;if(C&&0===`${e}`.length)return!0;const l=a?parseFloat(e):parseInt(e);return!(void 0!==r&&l<r||void 0!==n&&l>n||isNaN(l))}(s,p)?bC(s,p):0;const i=hC()(p.isFloat&&t?.1:1);"ArrowUp"===C?l=void 0!==a?Math.min(a,hC()(l).plus(i)):hC()(l).plus(i):"ArrowDown"===C&&(l=void 0!==n?Math.max(n,hC()(l).minus(i)):hC()(l).minus(i)),r(e,Number(l))}),[s,a,n,r,p]),b=Object(u.s)((()=>{var e;d(o.current),c.current=!0,i&&(null===(e=i.current)||void 0===e||e.blur())}),[]);return Object(u.y)((()=>{o.current=l,d(l)}),[l]),{currentValue:s,inputRef:i,handleBlur:m,handleChange:f,handleEsc:b,handleKeyUpAndDown:h,isIndeterminate:o.current===s}};var EC=C(376);function vC(){return(vC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const NumericInput=e=>{let{allowEmpty:t,isFloat:C,onChange:a,max:n,min:l,value:i="",isIndeterminate:o,...c}=e;const{currentValue:s,handleBlur:d,handleChange:u,handleEsc:p,handleKeyUpAndDown:m,inputRef:f,isIndeterminate:h}=gC({allowEmpty:t,isFloat:C,onChange:a,max:n,min:l,value:i,isIndeterminate:o});return Object(ye.h)(f,{key:["up","alt+up","down","alt+down"],editable:!0},m,[m]),Object(ye.h)(f,{key:["escape"],editable:!0},p,[p]),Object(ye.h)(f,{key:["enter"],editable:!0},d,[d]),r.a.createElement(EC.b,vC({ref:f,onBlur:d,onChange:u,value:String(s),isIndeterminate:h&&o},c))};var OC=function(e){if(!e||e===uC.C)return null;if(!("solid"===e.type||!e.type)){const{alpha:t=1}=e;return 100*t}const{color:{a:t=1}}=e;return Math.round(100*t)};const yC=Object(l.f)(NumericInput).withConfig({displayName:"opacityInput__Input",componentId:"sc-xy6710-0"})(["min-width:100px;div{background-color:transparent;}"]);var MC=function OpacityInput(e){let{value:t,onChange:C}=e;const[a,n]=Object(u.I)(""),l=Object(u.s)(((e,t)=>{n(t),isNaN(t)||C(t/100)}),[C]),i=Object(u.s)((()=>n(OC(t))),[t]);return Object(u.y)((()=>i()),[i,t]),r.a.createElement(yC,{"aria-label":Object(h.__)("Opacity","web-stories"),onChange:l,value:a,unit:Object(h._x)("%","Percentage","web-stories"),suffix:r.a.createElement(Te.a.ColorDrop,null),min:0,max:100,allowEmpty:!1,isFloat:!1,containerStyleOverride:tC})};var wC=function(e){if(!e.type||"solid"===e.type){const{color:t}=e;return{color:{...t,a:1}}}return t=e,C=["alpha"],Object.keys(t).filter((e=>!C.includes(e))).reduce(((e,C)=>({...e,[C]:t[C]})),{});var t,C};var LC=C(21);var _C=function(e){const t=(e||"").toUpperCase().trim().replace(/^#/,"");return/[^0-9a-f]/i.test(t)?null:6===t.length?t:1===t.length?t.repeat(6):2===t.length?t.repeat(3):3===t.length?t.replace(/./g,"$&$&"):4===t.length?`${t.substring(0,2).repeat(2)}${t.substring(2)}`:null};function jC(){return(jC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const xC=Object(u.j)((function Hex(e,t){let{value:C,placeholder:a,onChange:n,...l}=e;const[i,o]=Object(u.I)(""),c=Object(u.G)(null),s=Object(u.G)(!1),d=dC(C);Object(u.y)((()=>o(d)),[d]);const p=Object(u.s)((e=>{const t=e.target.value.trim().replace(/^#/,"");o(t)}),[]),m=Object(u.s)((()=>{var e;const t=null!==(e=_C(i))&&void 0!==e?e:d;if(o(t),t!==d){const{red:e,green:a,blue:r}=Object(LC.a)(`#${t}`),l=C.color.a;n({color:{r:e,g:a,b:r,a:l}})}}),[i,d,n,C]),f=Object(u.s)((()=>{m()}),[m]),h=Object(u.s)((()=>{s.current||m(),s.current=!1}),[m]),b=Object(u.s)((()=>{o(d),s.current=!0;(null!=t&&t.current?t:c).current.blur()}),[d,t]);return Object(ye.h)(c,{key:["escape"],editable:!0},b,[b]),Object(ye.h)(c,{key:["enter"],editable:!0},f,[f]),r.a.createElement(EC.b,jC({ref:t||c,value:i||"",onChange:p,onBlur:h,placeholder:a},l))}));function ZC(e){return void 0!==e.a&&e.a<1}var AC=function(e){const{color:t,alpha:C,stops:a}=e;if(t)return Boolean(ZC(t));if("number"==typeof C&&C<1)return!0;for(const e of a||[])if(ZC(e.color))return!0;return!1};var IC=function(e){return Boolean(null==e?void 0:e.type)&&"solid"!==e.type};function TC(){return(TC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const SC=l.f.div.withConfig({displayName:"swatch__Transparent",componentId:"sc-180wh7-0"})(["width:100%;height:100%;position:absolute;border-radius:100%;",""],Q.c.transparentBg),kC=l.f.button.withConfig({displayName:"swatch__SwatchButton",componentId:"sc-180wh7-1"})(["cursor:pointer;background-color:transparent;border-color:transparent;padding:0;border-width:0;display:block;width:","px;height:","px;border-radius:100%;overflow:hidden;position:relative;"," ",";::after{content:'';position:absolute;pointer-events:none;left:0;top:0;width:100%;height:100%;border-radius:50%;border:1px solid ",";}"],(e=>{let{isSmall:t}=e;return t?24:32}),(e=>{let{isSmall:t}=e;return t?24:32}),(e=>{let{disabled:t}=e;return t&&Object(l.e)(["opacity:0.4;cursor:default;pointer-events:none;"])}),(e=>{let{theme:t}=e;return Q.c.focusableOutlineCSS(t.colors.border.focus)}),(e=>{let{theme:t}=e;return t.colors.divider.primary})),RC=Object(l.f)(kC).attrs({as:"div",type:""}).withConfig({displayName:"swatch__SwatchPreview",componentId:"sc-180wh7-2"})([""]),PC=Object(l.e)(["display:block;width:100%;height:100%;font-size:13px;position:relative;svg{width:","px;height:","px;position:absolute;top:calc(50% - ","px);left:calc(50% - ","px);filter:drop-shadow(0px 0px 4px rgba(0,0,0,0.4));}"],32,32,16,16),NC=l.f.div.withConfig({displayName:"swatch__SwatchItem",componentId:"sc-180wh7-3"})([""," "," transform:rotate(","deg);svg{color:",";transform:rotate(","deg);}"],PC,(e=>{let{$pattern:t}=e;return Object(te.a)(t)}),(e=>{let{displaySplit:t}=e;return t?-45:0}),(e=>{let{theme:t}=e;return t.colors.fg.primary}),(e=>{let{displaySplit:t}=e;return t?45:0})),DC=l.f.div.withConfig({displayName:"swatch__OpaqueColorWrapper",componentId:"sc-180wh7-4"})(["height:","px;width:50%;overflow:hidden;position:absolute;left:0;top:0;"],(e=>{let{isSmall:t}=e;return t?24:32})),BC=l.f.div.withConfig({displayName:"swatch__OpaqueColor",componentId:"sc-180wh7-5"})(["height:","px;width:","px;position:absolute;top:0;left:0;",""],(e=>{let{isSmall:t}=e;return t?24:32}),(e=>{let{isSmall:t}=e;return t?24:32}),(e=>{let{pattern:t}=e;return Object(te.a)(t)}));function Swatch(e){let{pattern:t,isDisabled:C=!1,isSmall:a=!1,children:n,isPreview:l,className:i="",...o}=e;if(!t)return null;const c=AC(t),s=IC(t),d=c?wC(t):t,u=!a&&!s&&c,p=l?RC:kC;return r.a.createElement(p,TC({disabled:C,isSmall:a,className:i},o),c&&r.a.createElement(SC,null),r.a.createElement(NC,{$pattern:t,displaySplit:u},u&&r.a.createElement(DC,{isSmall:a},r.a.createElement(BC,{isSmall:a,pattern:d})),n))}var zC=C(25),FC=C(135),HC=C(640),GC=C(278),VC=C(73),UC=C(174),WC=C(120);function YC(){return(YC=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const $C=function(){let{r:e=0,g:t=0,b:C=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return`rgb(${e},${t},${C})`},qC=e=>{let{r:t,g:C,b:a,a:n}=e;const r=e=>255*(1-n)+n*e;return`rgb(${r(t)}, ${r(C)}, ${r(a)})`},XC=24,KC=l.f.div.attrs((e=>{let{currentColor:t={},withAlpha:C}=e;return{style:{background:C?qC(t):$C(t)}}})).withConfig({displayName:"pointer__PointerElement",componentId:"sc-1444lan-0"})(["width:","px;height:","px;transform:translate( "," );background:transparent;border:","px solid ",";border-radius:100%;position:relative;&:before{content:'';display:block;width:","px;height:","px;position:absolute;top:-","px;left:-","px;}"],XC,XC,(e=>{let{offsetX:t=0,offsetY:C=0,isRTL:a}=e;return`${(a?-1:1)*t}px, ${C}px`}),2,(e=>{let{theme:t}=e;return t.colors.fg.primary}),48,48,14,14);var QC=function Pointer(e){const{isRTL:t}=Object(H.g)();return r.a.createElement(KC,YC({},e,{isRTL:t}))};const JC=Object(u.l)((()=>C.e(199).then(C.t.bind(null,1053,7)).then((e=>({default:e.EditableInput}))))),ea=l.f.button.withConfig({displayName:"editablePreview__Preview",componentId:"sc-cdmcf1-0"})(["margin:0;padding:5px 7px;border:1px solid ",";border-radius:4px;background:transparent;color:",";width:100%;",";"],(e=>{let{theme:t}=e;return t.colors.border.defaultNormal}),(e=>{let{theme:t}=e;return t.colors.fg.primary}),eC),ta=l.f.div.withConfig({displayName:"editablePreview__Wrapper",componentId:"sc-cdmcf1-1"})(["input{",";}"],eC);function EditablePreview(e){let{label:t,value:C,width:a,format:n,onChange:l}=e;const[i,o]=Object(u.I)(!1),c=Object(u.s)((()=>o(!0)),[]),s=Object(u.s)((()=>o(!1)),[]),d=Object(u.G)(null),p=Object(u.G)(),m=Object(u.C)((()=>({input:{textAlign:"center",textTransform:"lowercase",width:"100%",padding:"6px 12px",border:"1px solid #5E6668",color:"#E4E5E6",borderRadius:"4px",background:"transparent",lineHeight:"18px"},wrap:{lineHeight:0,maxWidth:`${a}px`}})),[a]);Object(ye.h)(d,{key:"esc",editable:!0},s,[i]);if(Object(u.B)((()=>{const e=setTimeout((()=>{i&&p.current&&(p.current.input.focus(),p.current.input.select(),p.current.input.setAttribute("aria-label",t))}));return()=>clearTimeout(e)}),[i,t]),!i)return r.a.createElement(ea,{"aria-label":t,onClick:c,onFocus:c},r.a.createElement(cC.a,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},n(C)));const f="transparent"===C?"000000":C;return r.a.createElement(ta,{ref:d,tabIndex:-1,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||s()}},r.a.createElement(u.d,{fallback:null},r.a.createElement(JC,{value:f,ref:p,onChange:l,onChangeComplete:s,style:m})))}EditablePreview.defaultProps={label:"",value:""};var Ca=EditablePreview;const aa=Object(u.l)((()=>C.e(199).then(C.t.bind(null,1053,7)).then((e=>({default:e.Saturation}))))),na=Object(u.l)((()=>C.e(199).then(C.t.bind(null,1053,7)).then((e=>({default:e.Hue}))))),ra=Object(u.l)((()=>C.e(199).then(C.t.bind(null,1053,7)).then((e=>({default:e.Alpha}))))),la=l.f.div.withConfig({displayName:"currentColorPicker__Container",componentId:"sc-eqs4bc-0"})(["user-select:none;padding:0 ","px;"],16),ia=l.f.div.withConfig({displayName:"currentColorPicker__Body",componentId:"sc-eqs4bc-1"})(["padding-bottom:0;"]),oa=l.f.div.withConfig({displayName:"currentColorPicker__BodyFallback",componentId:"sc-eqs4bc-2"})(["height:","px;display:flex;align-items:center;justify-content:center;"],304),ca=l.f.div.withConfig({displayName:"currentColorPicker__SaturationWrapper",componentId:"sc-eqs4bc-3"})(["position:relative;height:","px;margin-bottom:16px;"],156),sa=Object(l.e)(["margin-bottom:16px;border:1px solid ",";height:","px;position:relative;border-radius:","px;background-clip:padding-box;"],(e=>{let{theme:t}=e;return t.colors.shadow.active}),28,50),da=l.f.div.withConfig({displayName:"currentColorPicker__HueWrapper",componentId:"sc-eqs4bc-4"})(["",""],sa),ua=l.f.div.withConfig({displayName:"currentColorPicker__AlphaWrapper",componentId:"sc-eqs4bc-5"})([""," div:first-child div:first-child div:first-child{background-image:conic-gradient( "," 0.25turn,transparent 0turn 0.5turn,"," 0turn 0.75turn,transparent 0turn 1turn ) !important;background-size:8px 8px !important;}"],sa,(e=>{let{theme:t}=e;return t.colors.fg.tertiary}),(e=>{let{theme:t}=e;return t.colors.fg.tertiary})),pa=l.f.div.withConfig({displayName:"currentColorPicker__Footer",componentId:"sc-eqs4bc-6"})(["height:","px;line-height:19px;position:relative;margin-top:7px;display:flex;gap:10px;margin-bottom:16px;"],36),ma=l.f.div.withConfig({displayName:"currentColorPicker__HexValue",componentId:"sc-eqs4bc-7"})(["width:","px;"],74),fa=l.f.div.withConfig({displayName:"currentColorPicker__Opacity",componentId:"sc-eqs4bc-8"})(["width:","px;"],52);function CurrentColorPicker(e){let{rgb:t,hsl:C,hsv:a,hex:n,onChange:l,showOpacity:i}=e;const o=String(Math.round(100*t.a)),c="#"===n[0]?n.substr(1):n,s=Object(u.s)((e=>("transparent"===e&&(e="000000"),`#${e}`)),[]),d=Object(u.s)((e=>`${e}%`),[]),p=Object(u.s)((e=>l({hex:e})),[l]),m=Object(u.s)((e=>l({...t,a:isNaN(e)?1:parseInt(e)/100})),[t,l]),{initEyedropper:f}=pC({onChange:l});return r.a.createElement(la,{"data-testid":"colorPicker"},r.a.createElement(ia,{showOpacity:i},r.a.createElement(u.d,{fallback:null},r.a.createElement(ca,null,r.a.createElement(aa,{radius:"8px",pointer:()=>r.a.createElement(QC,{offsetX:-12,offsetY:-12,currentColor:t}),hsl:C,hsv:a,onChange:l})),r.a.createElement(da,null,r.a.createElement(na,{direction:"horizontal",height:"28px",radius:"50px",pointer:()=>r.a.createElement(QC,{offsetX:-12,offsetY:1,currentColor:t}),hsl:C,onChange:l})),i&&r.a.createElement(ua,null,r.a.createElement(ra,{direction:"horizontal",height:"28px",radius:"50px",pointer:()=>r.a.createElement(QC,{offsetX:-12,offsetY:1,currentColor:t,withAlpha:!0}),rgb:t,hsl:C,onChange:l})))),r.a.createElement(pa,null,r.a.createElement(b.a,{variant:g.d.SQUARE,type:g.c.QUATERNARY,size:g.a.SMALL,"aria-label":Object(h.__)("Pick a color from canvas","web-stories"),onClick:f(),onPointerEnter:f(!1)},r.a.createElement(Te.a.Pipette,null)),r.a.createElement(ma,null,r.a.createElement(Ca,{label:Object(h.__)("Edit hex value","web-stories"),value:c,onChange:p,width:80,format:s})),i&&r.a.createElement(fa,null,r.a.createElement(Ca,{label:Object(h.__)("Edit opacity","web-stories"),value:o,width:52,format:d,onChange:m}))))}CurrentColorPicker.defaultProps={showOpacity:!0};var ha=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];function DynamicFetcher(e){const a=Object(u.G)(!1),[n,l]=Object(u.I)(null);return Object(u.y)((()=>(a.current=!0,C.e(199).then(C.bind(null,1054)).then((e=>{let{CustomPicker:C}=e;a.current&&l({component:C(...t)})})),()=>{a.current=!1})),[]),n?r.a.createElement(n.component,e):r.a.createElement(oa,null,r.a.createElement(WC.a,null))}return DynamicFetcher}(CurrentColorPicker),ba=C(533);const ga=154,Ea=16,va="solid",Oa="linear",ya="radial",Ma="DELETE_COLOR_PRESET_DIALOG_DISMISSED",wa=e=>Object(ba.a)(`#${e}`),La=[wa("00000000"),wa("000000"),wa("454545"),wa("B6B6B6"),wa("EEEEEE"),wa("FFFFFF"),wa("003BAD"),wa("0044C9"),wa("0354F2"),wa("1263FF"),wa("347EFF"),wa("6D9FFF"),wa("4B1283"),wa("5A189A"),wa("7B2CBF"),wa("9D4EDD"),wa("C77DFF"),wa("E0AAFF"),wa("E03568"),wa("FF477E"),wa("FF5C8A"),wa("FF7096"),wa("FF85A1"),wa("FF99AC"),wa("590D22"),wa("800F2F"),wa("A4133C"),wa("C9184A"),wa("FF4D6D"),wa("FF758F"),wa("DBCA09"),wa("FFD900"),wa("FFE747"),wa("FFEE70"),wa("FFF599"),wa("FFFFB7"),wa("E06E04"),wa("EA7D00"),wa("FF9500"),wa("FFA811"),wa("FFBC35"),wa("FFCC4A"),wa("607047"),wa("79895D"),wa("839568"),wa("A5B98B"),wa("C1D3AA"),wa("D4E4C0"),wa("603809"),wa("603808"),wa("6F4518"),wa("8B5E34"),wa("A47148"),wa("BC8A5F")],_a=l.f.button.attrs((e=>{let{position:t}=e;return{style:{right:t*ga-8+"px"}}})).withConfig({displayName:"gradientStop__Stop",componentId:"sc-1kqiqwc-0"})(["position:absolute;top:-","px;background:transparent;border:0;padding:0;&:focus{outline:none;}"],24),ja=Object(l.e)(["position:absolute;left:0;top:0;width:100%;height:100%;"]),xa=l.f.div.withConfig({displayName:"gradientStop__Background",componentId:"sc-1kqiqwc-1"})([""," ",""],ja,(e=>{let{color:t}=e;return Object(te.a)(t)})),Za=l.f.div.withConfig({displayName:"gradientStop__Transparent",componentId:"sc-1kqiqwc-2"})([""," width:100%;height:100%;position:absolute;top:0;"],Q.c.transparentBg),Aa=l.f.div.withConfig({displayName:"gradientStop__StopPointer",componentId:"sc-1kqiqwc-3"})(["transform:translate(",",0);width:","px;height:","px;border-radius:2px;overflow:hidden;"],(e=>{let{offset:t}=e;return`${t}px`}),14,14),Ia=l.f.div.withConfig({displayName:"gradientStop__IconWrapper",componentId:"sc-1kqiqwc-4"})(["position:absolute;left:-","px;top:-8px;color:",";svg{width:32px;height:32px;}"],10,(e=>{let{theme:t,isSelected:C}=e;return C?t.colors.fg.primary:t.colors.fg.tertiary}));const Ta=Object(u.j)((function GradientStopWithRef(e,t){let{position:C,index:a,isSelected:n,color:l,onSelect:i}=e;return r.a.createElement(_a,{ref:t,key:a,isSelected:n,position:C,onFocus:()=>i(a),onClick:()=>i(a),"aria-label":Object(h.sprintf)(
|
66 |
/* translators: %d: stop percentage */
|
67 |
+
Object(h.__)("Gradient stop at %d%%","web-stories"),Math.round(100-100*C))},r.a.createElement(Ia,{isSelected:n},r.a.createElement(Te.a.TailedRectangle,null)),r.a.createElement(Aa,{offset:-1},r.a.createElement(Za,null),r.a.createElement(xa,{color:l})))}));Ta.propTypes={position:Ue.a.number.isRequired,index:Ue.a.number.isRequired,isSelected:Ue.a.bool.isRequired,color:Ue.a.object.isRequired,onSelect:Ue.a.func.isRequired};var Sa=Ta;var ka=function(e,t){Object(ye.h)(e,"left",(()=>t(.01)),[t]),Object(ye.h)(e,"right",(()=>t(-.01)),[t])};var Ra=function(e,t,C,a){Object(ye.h)(e,"enter",(()=>{return t((e=function(e,t){const C=t===e.length-1;if(C&&e[t].position<1)return 1;if(0===t&&e[0].position>0)return 0;const a=C?e[t-1]:e[t],n=C?e[t]:e[t+1];return a.position+(n.position-a.position)/2}(C,a),n=4,Number(e.toFixed(n))));var e,n}),[t,C,a])};var Pa=function(e,t){Object(ye.h)(e,"delete",(()=>{e.current.focus(),t()}),[t,e])};var Na=function(e,t,C){const a=t.length,n=Object(u.C)((()=>Array.from({length:a}).map(u.i)),[a]);return Object(u.B)((()=>{e.current.contains(document.activeElement)&&n[C].current.focus()}),[C,n,a,e]),n};function Da(e){return e.pageX||e.clientX}var Ba=function(e,t){const[C,a]=Object(u.I)(null);return Object(u.B)((()=>{const C=e.current,n=C.getBoundingClientRect().left,r=e=>{if(e.target!==C)return;const r=(Da(e)-n+7)/ga;t(161/ga-r),a(null)},l=e=>{e.target===C?a(Da(e)-n):a(null)},i=e=>{e.target===C&&a(null)};return C.addEventListener("pointermove",l),C.addEventListener("pointerleave",i),C.addEventListener("pointerdown",r),()=>{C.removeEventListener("pointermove",l),C.removeEventListener("pointerleave",i),C.removeEventListener("pointerdown",r)}}),[e,t]),C};var za=function(e,t){const C=Object(u.G)(null);Object(u.B)((()=>{const a=e.current,n=e=>{const a=Da(e)-C.current;C.current=Da(e),t(-a/ga)},r=e=>{C.current=null,function(e){e.target.releasePointerCapture&&e.target.releasePointerCapture(e.pointerId)}(e),e.target.removeEventListener("pointermove",n),e.target.removeEventListener("pointerup",r)},l=e=>{e.target!==a&&(C.current=Da(e),function(e){e.target.setPointerCapture&&e.target.setPointerCapture(e.pointerId)}(e),e.target.addEventListener("pointermove",n),e.target.addEventListener("pointerup",r))};return a.addEventListener("pointerdown",l),()=>a.removeEventListener("pointerdown",l)}),[e,t])};const Fa=l.f.div.withConfig({displayName:"gradientLine__Line",componentId:"sc-1k22wp0-0"})([""," width:","px;height:","px;border-radius:2px;position:relative;&:focus{outline:none;}"],Q.c.transparentBg,ga,Ea),Ha=l.f.div.attrs((e=>{let{stops:t}=e;return{style:Object(te.a)({type:"linear",stops:t,rotation:.25})}})).withConfig({displayName:"gradientLine__Background",componentId:"sc-1k22wp0-1"})(["position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;"]),Ga=Object(l.f)(QC).attrs((e=>{let{x:t}=e;return{style:{left:`${t}px`},offsetX:-8}})).withConfig({displayName:"gradientLine__TempPointer",componentId:"sc-1k22wp0-2"})(["height:","px;width:","px;opacity:0.6;top:1px;pointer-events:none;"],14,14);var Va=function GradientLine(e){let{stops:t,currentStopIndex:C,onSelect:a,onAdd:n,onDelete:l,onMove:i}=e;const o=Object(u.G)();ka(o,i),Ra(o,n,t,C),Pa(o,l);const c=Na(o,t,C);za(o,i);const s=Ba(o,n);return r.a.createElement(Fa,{ref:o,"aria-label":Object(h.__)("Gradient line","web-stories"),tabIndex:"-1"},r.a.createElement(Ha,{stops:t}),t.map(((e,t)=>{let{position:n,color:l}=e;return r.a.createElement(Sa,{ref:e=>c[t].current=e,key:t,index:t,isSelected:t===C,position:n,onSelect:a,color:{color:l}},r.a.createElement(QC,{offsetX:-8}))})),s&&r.a.createElement(Ga,{"aria-label":Object(h.sprintf)(
|
68 |
/* translators: %d: stop percentage */
|
69 |
+
Object(h.__)("Temporary gradient stop at %d%%","web-stories"),Math.round(s/ga*100)),x:s}))};const Ua=l.f.div.withConfig({displayName:"gradientPicker__Wrapper",componentId:"sc-a6h8ls-0"})(["display:flex;justify-content:space-between;align-items:flex-end;padding:0 16px 16px;height:60px;"]),Wa=l.f.div.withConfig({displayName:"gradientPicker__Buttons",componentId:"sc-a6h8ls-1"})(["display:flex;gap:8px;"]),Ya=Object(l.f)(b.a).withConfig({displayName:"gradientPicker__SmallButton",componentId:"sc-a6h8ls-2"})(["width:24px;height:24px;padding:0;margin-bottom:-3px;svg{width:24px;height:24px;}"]);var $a=function GradientPicker(e){let{stops:t,currentStopIndex:C,type:a,onSelect:n,onAdd:l,onDelete:i,onMove:o,onRotate:c,onReverse:s}=e;const d=Object(h.__)("Reverse gradient stops","web-stories"),u=Object(h.__)("Rotate gradient","web-stories"),p="radial"!==a;return r.a.createElement(Ua,null,r.a.createElement(Va,{stops:t,currentStopIndex:C,onSelect:n,onAdd:l,onDelete:i,onMove:o}),r.a.createElement(Wa,null,r.a.createElement(Je.a,{hasTail:!0,title:d},r.a.createElement(Ya,{"aria-label":d,onClick:s,type:g.c.QUATERNARY,size:g.a.SMALL,variant:g.d.SQUARE},r.a.createElement(Te.a.ArrowsLeftright,null))),p&&r.a.createElement(Je.a,{hasTail:!0,title:u},r.a.createElement(Ya,{onClick:c,"aria-label":u,type:g.c.QUATERNARY,size:g.a.SMALL,variant:g.d.SQUARE},r.a.createElement(Te.a.ArrowRightCurved,{id:"gradient-rotator"})))))};function qa(){return(qa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Xa=l.f.div.withConfig({displayName:"header__Wrapper",componentId:"sc-3jvjbz-0"})(["display:flex;justify-content:space-between;align-items:center;height:","px;padding:4px 8px 4px 8px;position:relative;border-bottom:1px solid ",";"],44,(e=>{let{theme:t}=e;return t.colors.divider.tertiary})),Ka=l.f.div.withConfig({displayName:"header__Actions",componentId:"sc-3jvjbz-1"})(["display:flex;margin-left:auto;"]),Qa=Object(l.f)(b.a).withConfig({displayName:"header__StyledButton",componentId:"sc-3jvjbz-2"})(["margin-left:8px;",";"],eC);var Ja=function Header(e){let{children:t,handleClose:C,isEditMode:a=!1,setIsEditMode:n=(()=>{}),hasPresets:l=!1}=e;const i=Object(u.G)();Object(u.y)((()=>{var e;null===(e=i.current)||void 0===e||e.focus()}),[]);const o={type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE,onClick:e=>{e.stopPropagation(),n(!a)},isEditMode:a};return r.a.createElement(Xa,null,t,r.a.createElement(Ka,null,l&&r.a.createElement(Qa,qa({},o,{"aria-label":a?Object(h.__)("Exit edit mode","web-stories"):Object(h.__)("Edit colors","web-stories")}),a?Object(h.__)("Done","web-stories"):r.a.createElement(Te.a.Pencil,null)),r.a.createElement(Qa,{"aria-label":Object(h.__)("Close","web-stories"),onClick:C,type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE,ref:i},r.a.createElement(Te.a.Cross,null))))};const en=l.f.div.withConfig({displayName:"patternTypePicker__Wrapper",componentId:"sc-1mq6bg0-0"})(["display:flex;justify-content:flex-start;align-items:center;height:","px;padding:8px 16px 16px;position:relative;gap:8px;"],52);var tn=function PatternTypePicker(e){let{type:t,setToGradient:C,setToSolid:a}=e;const n=Object(u.s)((()=>C("linear")),[C]),l=Object(u.s)((()=>C("radial")),[C]);return r.a.createElement(en,null,r.a.createElement(ToggleButton,{"aria-label":Object(h.__)("Solid pattern type","web-stories"),onClick:a,type:g.c.QUATERNARY,size:g.a.SMALL,variant:g.d.SQUARE,isToggled:"solid"===t},r.a.createElement(Te.a.PatternSolid,null)),r.a.createElement(ToggleButton,{"aria-label":Object(h.__)("Linear gradient pattern type","web-stories"),onClick:n,type:g.c.QUATERNARY,size:g.a.SMALL,variant:g.d.SQUARE,isToggled:"linear"===t},r.a.createElement(Te.a.PatternLinear,null)),r.a.createElement(ToggleButton,{"aria-label":Object(h.__)("Radial gradient pattern type","web-stories"),onClick:l,type:g.c.QUATERNARY,size:g.a.SMALL,variant:g.d.SQUARE,isToggled:"radial"===t},r.a.createElement(Te.a.PatternRadial,null)))};var Cn=function(e,t){const C=e.findIndex((e=>{let{position:C}=e;return C>t}));if(-1===C)return{index:e.length,color:e[e.length-1].color};if(0===C)return{index:0,color:e[0].color};const a=e[C-1],n=e[C],r=(t-a.position)/(n.position-a.position),{color:{r:l,g:i,b:o,a:c=1}}=a,{color:{r:s,g:d,b:u,a:p=1}}=n,m=(e,t)=>e+(t-e)*r,f={r:Math.round(m(l,s)),g:Math.round(m(i,d)),b:Math.round(m(o,u)),a:m(c,p)};return{index:C,color:1===f.a?{r:f.r,g:f.g,b:f.b}:f}};function an(e){return e.map((e=>{let{color:{r:t,g:C,b:a,a:n},position:r}=e;return{color:Object(UC.a)(t,C,a,n).color,position:r}}))}var nn=function(e){const{regenerate:t,type:C}=e;if(!t)return null;switch(C){case va:return function(e){let{currentColor:{r:t,g:C,b:a,a:n}}=e;return Object(UC.a)(t,C,a,n)}(e);case Oa:return function(e){let{stops:t,rotation:C,alpha:a}=e;const n={type:Oa,stops:an(t)};return 0!==C&&(n.rotation=C),1!==a&&void 0!==a&&(n.alpha=a),n}(e);case ya:return function(e){let{stops:t,center:C,size:a,alpha:n}=e;const r={type:ya,stops:an(t)};return!C||.5===C.x&&.5===C.y||(r.center=C),!a||1===a.w&&1===a.h||(r.size=a),1!==n&&void 0!==n&&(r.alpha=n),r}(e);default:return null}};const rn={type:va,regenerate:!1,stops:[],currentColor:{r:0,g:0,b:0,a:0},currentStopIndex:0,rotation:.5,alpha:1,center:{x:.5,y:.5},size:{w:1,h:1}},ln={load:(e,t)=>{var C;let{payload:a}=t;const{type:n,color:r,stops:l,rotation:i,center:o,size:c,alpha:s}=a,d=n&&n!==va&&(e.type!==n||(null==l?void 0:l.length)!==(null===(C=e.stops)||void 0===C?void 0:C.length))?{currentColor:l[0].color,currentStopIndex:0}:{};switch(n){case Oa:return{...e,...d,type:n,regenerate:!1,stops:l,alpha:isNaN(s)?e.alpha:s,rotation:isNaN(i)?0:i};case ya:return{...e,...d,type:n,regenerate:!1,stops:l,center:void 0!==o?o:e.center,size:void 0!==c?c:e.size,alpha:isNaN(s)?e.alpha:s};case va:default:return{...e,type:va,regenerate:!1,currentColor:r}}},setToSolid:e=>({...e,type:va,regenerate:!0}),setToGradient:(e,t)=>{let{payload:C}=t;const a=e.stops&&e.stops.length>=2?e.stops:[{color:e.currentColor,position:0},{color:e.currentColor,position:1}];return{...e,regenerate:!0,type:C,stops:a}},addStopAt:(e,t)=>{let{payload:C}=t;if(C=Number(C.toFixed(2)),e.stops.some((e=>{let{position:t}=e;return t===C})))return e;const{index:a,color:n}=Cn(e.stops,C),r=[...e.stops.slice(0,a),{color:n,position:C},...e.stops.slice(a)];return{...e,regenerate:!0,currentColor:n,currentStopIndex:a,stops:r}},moveCurrentStopBy:(e,t)=>{let{payload:C}=t;const a=e.currentStopIndex,n=e.stops[a].position,r=Math.max(0,Math.min(1,Number((n+C).toFixed(2))));if(r===n)return e;const l=[...e.stops.slice(0,a),{...e.stops[a],position:r},...e.stops.slice(a+1)];l.sort(((e,t)=>e.position-t.position));const i=l.findIndex((e=>{let{position:t}=e;return t===r}));return{...e,regenerate:!0,stops:l,currentStopIndex:i}},removeCurrentStop:e=>{if(2===e.stops.length)return e;const t=e.currentStopIndex,C=[...e.stops];C.splice(t,1);const a=t===C.length?t-1:t;return{...e,regenerate:!0,stops:C,currentColor:C[a].color,currentStopIndex:a}},updateCurrentColor:(e,t)=>{let{payload:{rgb:C}}=t;const a={...C},n={...e,regenerate:!0,currentColor:a};return e.type!==va&&(n.stops=[...e.stops.slice(0,e.currentStopIndex),{...e.stops[e.currentStopIndex],color:a},...e.stops.slice(e.currentStopIndex+1)]),n},rotateClockwise:e=>({...e,rotation:(e.rotation+.25)%1,regenerate:!0}),selectStop:(e,t)=>{let{payload:C}=t;const a=Math.max(0,Math.min(e.stops.length-1,C)),n=e.stops[a].color;return{...e,currentStopIndex:a,currentColor:n}},reverseStops:e=>{const t=e.stops.map((e=>{let{color:t,position:C}=e;return{color:t,position:1-C}})).reverse(),C=t.length-e.currentStopIndex-1;return{...e,stops:t,currentStopIndex:C,regenerate:!0}}};var on=function(){const[e,t]=Object(u.F)(rn,ln),C=nn(e);return{state:{...e,generatedColor:C},actions:t}},cn=C(139);const sn=Object(l.f)(b.a).withConfig({displayName:"addCustomColor__StyledButton",componentId:"sc-4t2ps2-0"})(["flex-basis:100%;margin:0 16px 16px;"]);var dn=function AddCustomColor(e){let{color:t,onSave:C}=e;const{updateStory:a,globalStoryStyles:n}=Object(VC.a)((e=>{let{state:{story:{globalStoryStyles:t}},actions:{updateStory:C}}=e;return{globalStoryStyles:t,updateStory:C}})),l=Object(u.s)((()=>{a({properties:{globalStoryStyles:{...n,colors:Object(cn.a)([...n.colors,t].filter(Boolean))}}}),C()}),[C,t,n,a]);return r.a.createElement(sn,{onClick:l,type:g.c.SECONDARY,size:g.a.SMALL,variant:g.d.RECTANGLE},Object(h.__)("Add to Saved Colors","web-stories"))};const un=l.f.div.withConfig({displayName:"customColorPicker__Body",componentId:"sc-89nah9-0"})(["display:flex;flex-direction:column;"]);var pn=function CustomColorPicker(e){let{color:t,allowsGradient:C,allowsOpacity:a,handleColorChange:n,handleClose:l,hideCustomPicker:i,allowsSavedColors:o}=e;const{state:{type:c,stops:s,currentStopIndex:d,currentColor:p,generatedColor:m},actions:{load:f,updateCurrentColor:E,reverseStops:v,selectStop:O,addStopAt:y,removeCurrentStop:M,rotateClockwise:w,moveCurrentStopBy:L,setToSolid:_,setToGradient:j}}=on();return Object(u.y)((()=>{m&&n(m)}),[n,m]),Object(u.y)((()=>{f(t||Object(UC.a)(0,0,0))}),[t,f]),r.a.createElement(r.a.Fragment,null,r.a.createElement(Ja,{handleClose:l},r.a.createElement(b.a,{"aria-label":Object(h.__)("Go back","web-stories"),onClick:i,type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE},r.a.createElement(Te.a.ArrowLeft,null))),C&&r.a.createElement(tn,{type:c,setToGradient:j,setToSolid:_}),r.a.createElement(un,null,"solid"!==c&&r.a.createElement($a,{stops:s,currentStopIndex:d,onSelect:O,onReverse:v,onAdd:y,onDelete:M,onRotate:w,onMove:L,type:c}),r.a.createElement(ha,{color:p,onChange:E,showOpacity:a}),o&&r.a.createElement(dn,{color:m||t,onSave:i})))},mn=C(241);function fn(e){const t=e.getBoundingClientRect();return{x:t.left+t.width/2,y:t.top+t.height/2}}function hn(e,t){return(e?"ArrowRight"===t||"ArrowUp"===t||"PageUp"===t:"ArrowLeft"===t||"ArrowUp"===t||"PageUp"===t)?"previousSibling":"nextSibling"}function bn(e,t){let C=e[t];for(;C&&C.disabled;)C=C[t];return C}function gn(e,t){const C=fn(e);let a=null,n=null,r=null;for(let o=bn(e,t);o;o=bn(o,t)){const e=fn(o);if(Math.floor(e.y)===Math.floor(C.y))continue;if(a&&Math.floor(e.y)>Math.floor(n.y))break;const t=(l=C,i=e,Math.pow(l.x-i.x,2)+Math.pow(l.y-i.y,2));(!r||t<r)&&(r=t,n=e,a=o)}var l,i;return a}function En(e){let{ref:t}=e,C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const{isRTL:a}=Object(_.c)(),n=Object(u.s)((e=>{let{key:t,target:C}=e;const n=C,r=hn(a,t),l=e=>{n.tabIndex=-1,e.tabIndex=0,e.focus(),e.scrollIntoView("previousSibling"===r)};if("ArrowLeft"===t||"ArrowRight"===t){const e=bn(n,r);e&&l(e)}else if("ArrowUp"===t||"ArrowDown"===t){const e=gn(n,r);if(e)n.tabIndex=-1,e.tabIndex=0,e.focus();else if("ArrowUp"===t){l(n.parentNode.firstChild)}else{l(n.parentNode.lastChild)}}else if("Home"===t){l(n.parentNode.firstChild)}else if("End"===t){l(n.parentNode.lastChild)}else if("PageDown"===t||"PageUp"===t){let e=n;for(let t=0;bn(e,r)&&t<5;e=bn(e,r))t++;l(e)}}),[a]);Object(ye.h)(t,{key:["up","down","left","right","pageup","pagedown","home","end"]},n,[t,n,...C])}var vn=C(817),On=C(386),yn=C(80),Mn=C(79),wn=C(145);const Ln=["backgroundColor","backgroundTextMode","font","fontSize","lineHeight","padding","textAlign"];function _n(e,t,C){const a=t.colors,n=C?"color":"background";return a.find((t=>{try{return Object(vn.a)(t,e,n)}catch(e){return!1}}))}function jn(e,t){const{color:C,backgroundColor:a,font:n,fontWeight:r,backgroundTextMode:l,textAlign:i,letterSpacing:o,lineHeight:c,isItalic:s,isUnderline:d,padding:u,fontSize:p}=e;let m={textAlign:i,letterSpacing:o/100+"em",fontWeight:r,textDecoration:d?"underline":null,fontStyle:s?"italic":null,fontFamily:Object(yn.b)(n),...Object(te.a)(C,"color")};return t||(m={...m,fontSize:p,lineHeight:c,padding:u,backgroundTextMode:l}),l===uC.b.NONE||t&&l===uC.b.HIGHLIGHT||(m={...m,...Object(te.a)(a,"background")}),m}function xn(e){return e!==uC.C?e:null}function Zn(e){const{color:t,fontWeight:C,isItalic:a,isUnderline:n,letterSpacing:r}=Object(Mn.b)(e);return{color:t!==uC.C?t:Object(UC.a)(0,0,0),fontWeight:xn(C),isItalic:xn(a),isUnderline:xn(n),letterSpacing:xn(r)}}function An(e,t,C,a){return{colors:uC.G.STYLE===C?[]:e.map((e=>{let{content:t,backgroundColor:C}=e;return a?C:Object(Mn.b)(t).color})).filter((e=>e!==uC.C)).filter((e=>e&&!_n(e,t,!0))),textStyles:uC.G.COLOR===C?[]:e.map((e=>({...Object(wn.a)(e,Ln),...Zn(e.content)}))).filter((e=>!function(e,t){const C=t.textStyles,a=Object(On.a)(jn(e));return C.find((e=>a===Object(On.a)(jn(e))))}(e,t)))}}function In(e,t){return{colors:e.map((e=>{let{backgroundColor:t}=e;return t||null})).filter((e=>e&&!_n(e,t,!1)))}}var Tn=function(e){var t,C,a;let{presetType:n,isBackgroundColor:r}=e;const{currentPage:l,currentStoryStyles:i={colors:[]},selectedElements:o,globalStoryStyles:c={colors:[],textStyles:[]},updateStory:s}=Object(H.o)((e=>{let{state:{currentPage:t,selectedElements:C,story:{globalStoryStyles:a,currentStoryStyles:n}},actions:{updateStory:r}}=e;return{currentPage:t,currentStoryStyles:n,selectedElements:C,globalStoryStyles:a,updateStory:r}})),{colors:d,textStyles:p}=c,{colors:m}=i,f=function(e,t){return t.length>0&&t.every((t=>{let{type:C}=t;return e===C}))}("text",o),h=(null==o||null===(t=o[0])||void 0===t?void 0:t.id)===(null==l||null===(C=l.elements)||void 0===C||null===(a=C[0])||void 0===a?void 0:a.id),b=Object(u.s)(((e,t)=>{return f?{...e,...An(o,t,n,r)}:h?{...e,...(C=l,a=t,{colors:[C.backgroundColor].filter((e=>e&&!_n(e,a,!1)))})}:{...e,...In(o,t)};var C,a}),[l,h,f,n,o,r]),g=Object(u.s)((e=>{s({properties:{currentStoryStyles:{colors:Object(cn.a)([...m,...e.colors])}}})}),[m,s]),E=Object(u.s)((e=>{s({properties:{globalStoryStyles:{textStyles:Object(cn.a)([...p,...e.textStyles]),colors:Object(cn.a)([...d,...e.colors])}}})}),[d,p,s]),v=Object(u.s)((function(e){var t,C;let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=a?i:c;if((null===(t=(e=b(e,n)).colors)||void 0===t?void 0:t.length)>0||(null===(C=e.textStyles)||void 0===C?void 0:C.length)>0)return a?g(e,n):E(e,n),e}),[b,i,c,E,g]);return{addGlobalPreset:e=>(e.stopPropagation(),v({textStyles:[],colors:[]})),addLocalPreset:e=>(e.stopPropagation(),v({colors:[]},!0))}};function Sn(){return(Sn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const kn=l.f.button.withConfig({displayName:"colorAdd__AddColorAction",componentId:"sc-1s3q8di-0"})(["cursor:pointer;background-color:transparent;color:",";border-color:",";border-width:1px;border-style:dashed;border-radius:50%;height:","px;width:","px;padding:0;svg{height:100%;width:100%;}:hover{border-color:",";}",";"],(e=>{let{theme:t}=e;return t.colors.fg.primary}),(e=>{let{theme:t}=e;return t.colors.border.defaultNormal}),32,32,(e=>{let{theme:t}=e;return t.colors.border.defaultHover}),eC);var Rn=function ColorAdd(e){let{isLocal:t=!1,isGlobal:C=!1,isBackground:a=!1,...n}=e;const{addGlobalPreset:l,addLocalPreset:i}=Tn({presetType:uC.G.COLOR,isBackgroundColor:a});if(!t&&!C)return null;const o=t?Object(h.__)("Add local color","web-stories"):Object(h.__)("Add global color","web-stories");return r.a.createElement(kn,Sn({tabIndex:"0",onClick:t?i:l,"aria-label":o},n),r.a.createElement(Te.a.Plus,null))};function Pn(){return(Pn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Nn=Object(l.e)(["",";"],(e=>{let{theme:t}=e;return Q.c.focusableOutlineCSS(t.colors.border.focus,t.colors.bg.secondary)})),Dn=l.f.div.attrs({role:"listbox"}).withConfig({displayName:"basicColorList__SwatchList",componentId:"sc-10h6tzp-0"})(["display:flex;max-width:100%;flex-wrap:wrap;gap:6px;"]),Bn=Object(l.f)(Swatch).attrs((e=>{let{isSelected:t}=e;return{role:"option","aria-selected":t}})).withConfig({displayName:"basicColorList__StyledSwatch",componentId:"sc-10h6tzp-1"})(["",";",""],Nn,(e=>{let{isSelected:t,theme:C}=e;return t&&Object(l.e)(["border:2px solid ",";"],C.colors.border.defaultActive)}));function zn(e){if(!e)return"";const t=Object(te.a)(e);return t.backgroundColor||t.backgroundImage}function ConditionalTooltip(e){let{tooltip:t,children:C}=e;return t?r.a.createElement(Je.a,{title:t},C):C}var Fn=function BasicColorList(e){let{color:t,colors:C,handleClick:a,allowsOpacity:n,allowsGradient:l,isLocal:i=!1,isGlobal:o=!1,isEditMode:c,changedStyle:s,...d}=e;const p=zn(t),m=Object(u.G)(null);En({ref:m});const f=C.map(zn).findIndex((e=>p===e));let b=0;const g=i?Object(h.__)("local","web-stories"):Object(h.__)("global","web-stories"),E="background"===s;return r.a.createElement(r.a.Fragment,null,C.length>0&&r.a.createElement(Dn,Pn({ref:m},d),C.map(((e,t)=>{const C=!n&&AC(e),o=!l&&IC(e),s=(C||o)&&!c;let d=null;s&&!c&&(d=C?Object(h.__)("Page background colors cannot have an opacity.","web-stories"):Object(h.__)("Gradient not allowed for Text","web-stories"));const u=zn(e),m=c?Object(h.sprintf)(
|
70 |
/* translators: First %s is the color type, second %s is the color as a string */
|
71 |
+
Object(h.__)("Delete %1$s color: %2$s","web-stories"),g,u):u,E=p===u;let v=t===b?0:-1;return f>=0?v=E?0:-1:s&&t===b&&(b++,v=-1),r.a.createElement(ConditionalTooltip,{key:u,tooltip:d},r.a.createElement(Bn,{onClick:()=>a(e,i),pattern:e,isSelected:E,isDisabled:s,tabIndex:v,title:m},c&&r.a.createElement(Te.a.Cross,null)))})),(i||o)&&r.a.createElement(Rn,{isLocal:i,isGlobal:o,isBackground:E})),!C.length&&(i||o)&&r.a.createElement(Rn,{isLocal:i,isGlobal:o,isBackground:E}))},Hn=C(290);const Gn=l.f.label.withConfig({displayName:"confirmationDialog__Label",componentId:"sc-bvt4vo-0"})(["margin-left:12px;"]),Vn=l.f.footer.withConfig({displayName:"confirmationDialog__CheckboxWrapper",componentId:"sc-bvt4vo-1"})(["display:flex;margin-top:12px;padding:14px 0 0 9px;border-top:1px solid ",";"],(e=>{let{theme:t}=e;return t.colors.divider.primary}));var Un=function ConfirmationDialog(e){let{onClose:t,onPrimary:C}=e;const[a,n]=Object(u.I)(mn.b.getItemByKey(mn.a[Ma])),l=`cb-${Object(Hn.a)()}`;return r.a.createElement(Ge.a,{isOpen:!0,onClose:t,secondaryText:Object(h.__)("Cancel","web-stories"),onPrimary:C,primaryText:Object(h.__)("Delete","web-stories")},r.a.createElement(cC.a,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("This is a global color. Deleting this color will remove it from the Saved Colors across all stories and the color will no longer be available to any other users on the site.","web-stories")),r.a.createElement(Vn,null,r.a.createElement(sC.a,{id:l,checked:a,onChange:()=>{mn.b.setItemByKey(mn.a[Ma],!a),n(!a)}}),r.a.createElement(Gn,{htmlFor:l},r.a.createElement(cC.a,{as:"span",size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Don't ask for confirmation again.","web-stories")))))};var Wn=function(e){let{onEmpty:t=(()=>{})}=e;const{currentStoryStyles:C,globalStoryStyles:a,updateStory:n}=Object(H.o)((e=>{let{state:{story:{globalStoryStyles:t,currentStoryStyles:C}},actions:{updateStory:a}}=e;return{currentStoryStyles:C,globalStoryStyles:t,updateStory:a}})),{colors:r}=a||{},{colors:l}=C||{},i=(null==l?void 0:l.length)>0,o=Object(u.s)((e=>{const C=r.filter((t=>t!==e));n({properties:{globalStoryStyles:{...a||{},colors:C}}}),0!==C.length||i||t()}),[r,n,i,a,t]);return{deleteLocalColor:Object(u.s)((e=>{const C=l.filter((t=>t!==e));n({properties:{currentStoryStyles:{colors:C}}}),0===C.length&&0===r.length&&t()}),[r,l,n,t]),deleteGlobalColor:o}};const Yn=l.f.div.withConfig({displayName:"basicColorPicker__Body",componentId:"sc-c2cm2c-0"})(["display:flex;flex-direction:column;margin:8px 16px 16px;"]),$n=l.f.div.withConfig({displayName:"basicColorPicker__SavedColors",componentId:"sc-c2cm2c-1"})(["border-bottom:1px solid ",";padding-bottom:24px;"],(e=>{let{theme:t}=e;return t.colors.border.defaultNormal})),qn=l.f.div.withConfig({displayName:"basicColorPicker__DefaultColors",componentId:"sc-c2cm2c-2"})(["padding-bottom:24px;"]),Xn=Object(l.f)(cC.a).attrs({size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL}).withConfig({displayName:"basicColorPicker__Label",componentId:"sc-c2cm2c-3"})(["color:",";margin:16px 0 10px;"],(e=>{let{theme:t}=e;return t.colors.fg.secondary})),Kn=Object(l.f)(Xn).withConfig({displayName:"basicColorPicker__DefaultText",componentId:"sc-c2cm2c-4"})(["margin:0 0 0 8px;color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.primary})),Qn=Object(l.f)(b.a).withConfig({displayName:"basicColorPicker__StyledButton",componentId:"sc-c2cm2c-5"})(["display:flex;justify-content:center;align-items:center;gap:4px;flex-basis:100%;"]),Jn=Object(l.f)(cC.a).withConfig({displayName:"basicColorPicker__StyledText",componentId:"sc-c2cm2c-6"})(["padding:5px 10px;"]),er=Object(l.f)(Te.a.PlusOutline).withConfig({displayName:"basicColorPicker__StyledPlus",componentId:"sc-c2cm2c-7"})(["width:32px;margin:-8px 0;"]),tr=l.f.div.withConfig({displayName:"basicColorPicker__EyedropperWrapper",componentId:"sc-c2cm2c-8"})(["display:flex;"]);var Cr=function BasicColorPicker(e){let{color:t,handleColorChange:C,allowsOpacity:a,allowsGradient:n,allowsSavedColors:l,showCustomPicker:i,handleClose:o,showDialog:c,setShowDialog:s,changedStyle:d}=e;const{savedColors:p,storyColors:m}=Object(VC.a)((e=>{var t,C,a,n;return{savedColors:(null===(t=e.state.story)||void 0===t||null===(C=t.globalStoryStyles)||void 0===C?void 0:C.colors)||[],storyColors:(null===(a=e.state.story)||void 0===a||null===(n=a.currentStoryStyles)||void 0===n?void 0:n.colors)||[]}})),[f,E]=Object(u.I)(!1),[v,O]=Object(u.I)(null),y=m.length>0||p.length>0,{initEyedropper:M}=pC({onChange:e=>C({color:e})}),{deleteLocalColor:w,deleteGlobalColor:L}=Wn({onEmpty:()=>E(!1)}),_=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!f)return void C(e);if(t)return void w(e);const a=mn.b.getItemByKey(mn.a[Ma]);a?L(e):(s(!0),O(e))};return r.a.createElement(r.a.Fragment,null,r.a.createElement(Ja,{handleClose:o,isEditMode:f,setIsEditMode:E,hasPresets:y},r.a.createElement(Kn,null,Object(h.__)("Color","web-stories"))),r.a.createElement(Yn,null,r.a.createElement(tr,null,r.a.createElement(b.a,{variant:g.d.SQUARE,type:g.c.QUATERNARY,size:g.a.SMALL,"aria-label":Object(h.__)("Pick a color from canvas","web-stories"),onClick:M(),onPointerEnter:M(!1)},r.a.createElement(Te.a.Pipette,null)),r.a.createElement(Jn,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Sample color","web-stories"))),r.a.createElement($n,null,l&&r.a.createElement(r.a.Fragment,null,r.a.createElement(Xn,{id:"colorpicker-story-colors-title"},Object(h.__)("Current story","web-stories")),r.a.createElement(Fn,{color:t,colors:m,handleClick:_,isLocal:!0,allowsOpacity:a,allowsGradient:n,"aria-labelledby":"colorpicker-story-colors-title",isEditMode:f,"data-testid":"saved-story-colors",changedStyle:d}),r.a.createElement(Xn,{id:"colorpicker-saved-colors-title"},Object(h.__)("Saved colors","web-stories")),r.a.createElement(Fn,{color:t,colors:p,isGlobal:!0,handleClick:_,allowsOpacity:a,allowsGradient:n,"aria-labelledby":"colorpicker-saved-colors-title",isEditMode:f,changedStyle:d}))),r.a.createElement(qn,null,r.a.createElement(Xn,{id:"colorpicker-default-colors-title"},Object(h.__)("Default","web-stories")),r.a.createElement(Fn,{color:t,colors:La,handleClick:e=>{C(e),E(!1)},allowsOpacity:a,allowsGradient:n,"aria-labelledby":"colorpicker-default-colors-title",isEditMode:!1})),r.a.createElement(Qn,{onClick:i,type:g.c.SECONDARY,size:g.a.SMALL,variant:g.d.RECTANGLE},Object(h.__)("Custom","web-stories"),r.a.createElement(er,null))),c&&r.a.createElement(Un,{onClose:()=>s(!1),onPrimary:()=>{L(v),O(null),s(!1)}}))};const ar=l.f.div.withConfig({displayName:"colorPicker__Container",componentId:"sc-1xsejx6-0"})(["border-radius:8px;background:",";width:256px;user-select:none;display:flex;flex-direction:column;align-items:stretch;overflow:hidden;&.picker-appear{opacity:0.01;margin-top:-10px;&.picker-appear-active{opacity:1;margin-top:0;transition:300ms ease-out;transition-property:opacity,margin-top;}}"],(e=>{let{theme:t}=e;return t.colors.bg.secondary}));var nr=function ColorPicker(e){let{onChange:t,isEyedropperActive:C=!1,color:a=null,allowsGradient:n=!1,allowsOpacity:l=!0,allowsSavedColors:i=!1,onClose:o=(()=>{}),changedStyle:c="background",onDimensionChange:s=(()=>{})}=e;const[d,p]=Object(u.I)(!1),[m,f]=Object(u.I)(IC(a)),b=Object(u.s)((()=>{f(!0),s()}),[s]),g=Object(u.s)((()=>{f(!1),s()}),[s]),{actions:{pushTransform:E}}=Object(U.b)(),{selectedElementIds:v=[]}=Object(VC.a)((e=>{let{state:{selectedElementIds:t}}=e;return{selectedElementIds:t}})),O=Object(u.x)(t,100,{leading:!0}),y=Object(u.s)((e=>{O(e),v.forEach((t=>{E(t,{color:e,style:c,staticTransformation:!0})}))}),[O,v,c,E]),M=Object(u.G)();Object(u.z)(M,(()=>{C||d||o()}),[C,d]);const w=Object(u.G)(document.activeElement),L=Object(u.s)((e=>{w.current&&w.current.focus(),o(e)}),[o]);Object(ye.h)(M,"esc",L),Object(GC.a)({ref:M});const _=m?pn:Cr;return r.a.createElement(HC.a,{nodeRef:M,in:!0,appear:!0,classNames:"picker",timeout:300},r.a.createElement(ar,{role:"dialog","aria-label":Object(h.__)("Color and gradient picker","web-stories"),ref:M},r.a.createElement(_,{color:a,allowsGradient:n,allowsOpacity:l,handleColorChange:y,showCustomPicker:b,hideCustomPicker:g,handleClose:L,allowsSavedColors:i,showDialog:d,setShowDialog:p,changedStyle:c})))},rr=Object(u.f)({state:{},actions:{},tabs:{},refs:{}});var lr=function(e){return Object(u.w)(rr,null!=e?e:u.k)};function ir(){return(ir=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const or=l.f.div.withConfig({displayName:"colorInput__Preview",componentId:"sc-1h4cp44-0"})(["height:36px;color:",";cursor:pointer;position:relative;width:100%;padding:0;"],(e=>{let{theme:t}=e;return t.colors.fg.primary})),cr=Object(l.f)(xC).withConfig({displayName:"colorInput__Input",componentId:"sc-1h4cp44-1"})(["min-width:100px;div{background-color:transparent;}input{padding-left:26px;}"]),sr=Object(l.f)(Je.a).withConfig({displayName:"colorInput__Tooltip",componentId:"sc-1h4cp44-2"})(["width:100%;height:100%;"]),dr=Object(l.e)(["position:absolute;top:0;left:0;border-radius:50px;width:24px;height:24px;"]),ur=Object(l.e)(["overflow:hidden;border:1px solid ",";outline:none;background:transparent;"],(e=>{let{theme:t}=e;return t.colors.border.defaultNormal})),pr=Object(l.f)(or).attrs({as:"button",type:"button"}).withConfig({displayName:"colorInput__ColorButton",componentId:"sc-1h4cp44-3"})(["border-radius:4px;"," &:focus{box-shadow:0px 0px 0 2px ",",0px 0px 0 4px ",";border-color:",";}"],ur,(e=>{let{theme:t}=e;return t.colors.bg.primary}),(e=>{let{theme:t}=e;return t.colors.border.focus}),(e=>{let{theme:t}=e;return t.colors.border.defaultHover})),mr=l.f.div.withConfig({displayName:"colorInput__ColorPreview",componentId:"sc-1h4cp44-4"})([""," top:6px;left:6px;padding:0;background:transparent;cursor:pointer;"],dr),fr=l.f.div.withConfig({displayName:"colorInput__TextualPreview",componentId:"sc-1h4cp44-5"})(["padding:6px 12px 6px 38px;text-align:left;flex-grow:1;height:32px;"]),hr=Object(l.f)(Swatch).withConfig({displayName:"colorInput__StyledSwatch",componentId:"sc-1h4cp44-6"})(["",";"],eC),br=()=>C.e(199).then(C.bind(null,1054)),gr={x:20};var Er=Object(u.j)((function ColorInput(e,t){var C;let{onChange:a,allowsGradient:n=!1,allowsOpacity:l=!0,allowsSavedColors:i=!1,value:o=null,label:c=null,changedStyle:s}=e;const d=o===uC.C;o=d?"":o;const p=d||!o?{color:{r:0,g:0,b:0,a:0}}:wC(o),m=dC(o),[f,b]=Object(u.I)(!1),g=Object(u.G)(null),{isEyedropperActive:E}=Object(H.d)((e=>{let{state:{isEyedropperActive:t}}=e;return{isEyedropperActive:t}})),{refs:{inspector:v}}=lr(),O=null===(C=o)||void 0===C?void 0:C.type,y=!O||"solid"===O,M={onClick:()=>b(!0),"aria-label":c,onPointerEnter:()=>br(),onFocus:()=>br()};Object(u.J)((()=>()=>b(!1)));const w=Object(u.s)((()=>b(!1)),[]),L=Object(h.__)("Open color picker","web-stories");return r.a.createElement(r.a.Fragment,null,y?r.a.createElement(or,{ref:g},r.a.createElement(cr,{ref:t,"aria-label":c,value:d?null:o,onChange:a,isIndeterminate:d,placeholder:d?uC.B:"",containerStyleOverride:tC}),r.a.createElement(mr,null,r.a.createElement(sr,{title:L,hasTail:!0},r.a.createElement(hr,ir({isSmall:!0,pattern:p},M))))):r.a.createElement(sr,{title:L,hasTail:!0},r.a.createElement(pr,ir({ref:g},M),r.a.createElement(mr,null,r.a.createElement(Swatch,{isSmall:!0,isPreview:!0,role:"status",tabIndex:"-1",pattern:p})),r.a.createElement(fr,null,r.a.createElement(cC.a,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},m)))),r.a.createElement(FC.a,{anchor:g,dock:v,isOpen:f,placement:zC.a.LEFT_START,spacing:gr,invisible:E,renderContents:e=>{let{propagateDimensionChange:t}=e;return r.a.createElement(nr,{color:d?null:o,isEyedropperActive:E,onChange:a,allowsGradient:n,allowsOpacity:l,allowsSavedColors:i,onClose:w,changedStyle:s,onDimensionChange:t})}}))}));const vr=Object(l.e)(["display:flex;align-items:center;width:100%;"]),Or=l.f.section.withConfig({displayName:"color__Container",componentId:"sc-c7i660-0"})(["",""],vr),yr=l.f.div.withConfig({displayName:"color__ColorInputsWrapper",componentId:"sc-c7i660-1"})(["",""],vr),Mr=l.f.div.withConfig({displayName:"color__Space",componentId:"sc-c7i660-2"})(["width:8px;height:1px;margin:6px;background-color:",";"],(e=>{let{theme:t}=e;return t.colors.divider.primary})),wr=l.f.div.withConfig({displayName:"color__InputWrapper",componentId:"sc-c7i660-3"})(["width:calc(53% - 10px);"]),Lr=l.f.div.withConfig({displayName:"color__OpacityWrapper",componentId:"sc-c7i660-4"})(["width:calc(47% - 10px);"]),_r=Object(l.f)(b.a).attrs({variant:g.d.SQUARE,type:g.c.TERTIARY,size:g.a.SMALL}).withConfig({displayName:"color__EyeDropperButton",componentId:"sc-c7i660-5"})(["margin-right:8px;",";"],eC);var jr=Object(u.j)((function Color(e,t){let{onChange:C,allowsGradient:a=!1,allowsOpacity:n=!0,allowsSavedColors:l=!1,value:i=null,label:o=null,changedStyle:c=null,hasEyedropper:s=!1}=e;const d=Object(u.s)((e=>C(mC(i,e))),[i,C]),p=Object(h.sprintf)(
|
72 |
/* translators: %s: color input label name. */
|
73 |
+
Object(h.__)("Color input: %s","web-stories"),o),m=i!==uC.C&&Boolean(dC(i)),{initEyedropper:f}=pC({onChange:e=>C({color:e})}),b=Object(h.__)("Pick a color from canvas","web-stories");return r.a.createElement(Or,{"aria-label":p},s&&r.a.createElement(Je.a,{title:b,hasTail:!0},r.a.createElement(_r,{"aria-label":b,onClick:f(),onPointerEnter:f(!1)},r.a.createElement(Te.a.Pipette,null))),r.a.createElement(yr,null,r.a.createElement(wr,null,r.a.createElement(Er,{ref:t,onChange:C,allowsGradient:a,allowsOpacity:n,value:i,label:o,allowsSavedColors:l,changedStyle:c})),n&&m&&r.a.createElement(r.a.Fragment,null,r.a.createElement(Mr,null),r.a.createElement(Lr,null,r.a.createElement(MC,{value:i,onChange:d})))))}));function xr(){return(xr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Zr=Object(l.e)(["width:100%;height:100%;position:absolute;top:0;left:0;border-radius:",";"],(e=>{let{theme:t}=e;return t.borders.radius.small})),Ar=l.f.div.withConfig({displayName:"filterToggle__Overlay",componentId:"sc-1xtaed1-0"})(["",";"],Zr),Ir=l.f.div.withConfig({displayName:"filterToggle__Filter",componentId:"sc-1xtaed1-1"})(["",";",";"],Zr,(e=>{let{filter:t}=e;return Object(te.a)(t)})),Tr=l.f.button.withConfig({displayName:"filterToggle__Button",componentId:"sc-1xtaed1-2"})((e=>{let{theme:t}=e;return Object(l.e)(["border-radius:",";width:100%;height:48px;position:relative;display:flex;align-items:center;justify-content:space-around;box-sizing:border-box;padding:0;margin:0;background:transparent;border:none;cursor:pointer;",";img{width:100%;height:100%;border-radius:",";}","{",";}&:active > ","{box-shadow:0px 0px 0 2px ",",0px 0px 0 3px ",";}&:disabled{pointer-events:none;","{background-color:",";}}transition:background-color ",",color ",";"],t.borders.radius.small,eC,t.borders.radius.small,Ar,(e=>{let{isToggled:C}=e;return C&&`\n box-shadow:\n 0px 0px 0 2px ${t.colors.bg.secondary},\n 0px 0px 0 3px ${t.colors.fg.primary}`}),Ar,t.colors.bg.secondary,t.colors.fg.primary,Ar,t.colors.opacity.black64,g.b,g.b)})),Sr=l.f.div.withConfig({displayName:"filterToggle__Wrapper",componentId:"sc-1xtaed1-3"})(["width:60px;"]),kr=Object(l.f)(cC.a).attrs({forwardedAs:"span",size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL}).withConfig({displayName:"filterToggle__StyledText",componentId:"sc-1xtaed1-4"})(["color:",";margin-top:8px;text-align:center;width:100%;display:block;"],(e=>{let{theme:t}=e;return t.colors.border.defaultActive}));var Rr=function FilterToggle(e){let{isToggled:t,filter:C=null,children:a,label:n,...l}=e;return r.a.createElement(Sr,null,r.a.createElement(Tr,xr({},l,{isToggled:t,"aria-pressed":t}),a,r.a.createElement(Ir,{filter:C}),r.a.createElement(Ar,null)),n&&r.a.createElement(kr,null,n))};const Pr={CIRCLE:"circle",RECTANGLE:"rectangle"};var Nr=C(372),Dr=C(790),Br=C(151),zr=C(75);function Fr(){return(Fr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var Hr=n.createElement("path",{d:"M33 52L.5 93h99L75 60 58 82z",fill:"currentColor",opacity:.2}),Gr=n.createElement("circle",{cx:79,cy:13,fill:"currentColor",opacity:.1,r:13});function SvgLandscape(e){let{title:t,titleId:C,...a}=e;return n.createElement("svg",Fr({fill:"none",viewBox:"0 0 100 93",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":C},a),t?n.createElement("title",{id:C},t):null,Hr,Gr)}const Vr=n.memo(SvgLandscape);function Ur(){return(Ur=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Wr=l.f.section.withConfig({displayName:"mediaInput__MediaRectangle",componentId:"sc-1aevzta-0"})(["width:100%;height:100%;background-color:",";border-radius:4px;position:relative;"],(e=>{let{theme:t}=e;return t.colors.bg.primary})),Yr=Object(l.f)(Wr).withConfig({displayName:"mediaInput__MediaCircle",componentId:"sc-1aevzta-1"})(["border-radius:100px;height:100%;width:100%;"]),$r=l.f.div.withConfig({displayName:"mediaInput__ImageWrapper",componentId:"sc-1aevzta-2"})(["border-radius:","px;overflow:hidden;height:100%;display:flex;"],(e=>{let{variant:t}=e;return t===Pr.CIRCLE?100:4})),qr=l.f.div.withConfig({displayName:"mediaInput__DefaultImageWrapper",componentId:"sc-1aevzta-3"})(["padding:8px;"]),Xr=Object(l.f)(Vr).withConfig({displayName:"mediaInput__DefaultImage",componentId:"sc-1aevzta-4"})(["width:100%;height:100%;display:block;color:",";"],(e=>{let{theme:t}=e;return t.colors.standard.white})),Kr=l.f.img.withConfig({displayName:"mediaInput__Img",componentId:"sc-1aevzta-5"})(["width:100%;height:100%;object-fit:cover;"]),Qr=Object(l.e)(["min-width:100px;margin-top:0;li{display:block;}"]),Jr=Object(l.f)(b.a).withConfig({displayName:"mediaInput__Button",componentId:"sc-1aevzta-6"})(["background-color:",";position:absolute;bottom:-8px;right:-8px;&:hover{background-color:",";}"],(e=>{let{theme:t}=e;return t.colors.interactiveBg.secondaryNormal}),(e=>{let{theme:t}=e;return t.colors.interactiveBg.secondaryHover})),el={[Pr.RECTANGLE]:Wr,[Pr.CIRCLE]:Yr},tl=Object(l.g)(["0%,20%{color:transparent;text-shadow:6px 0 0 transparent,12px 0 0 transparent;}40%{color:white;text-shadow:6px 0 0 transparent,12px 0 0 transparent;}60%{text-shadow:6px 0 0 ",",12px 0 0 transparent;}80%,100%{text-shadow:6px 0 0 ",",12px 0 0 ",";}"],(e=>{let{theme:t}=e;return t.colors.standard.white}),(e=>{let{theme:t}=e;return t.colors.standard.white}),(e=>{let{theme:t}=e;return t.colors.standard.white})),Cl=l.f.div.withConfig({displayName:"mediaInput__LoadingDots",componentId:"sc-1aevzta-7"})(["position:absolute;top:0px;left:0px;width:100%;height:100%;pointer-events:none;border-radius:50%;flex-direction:column;justify-content:center;align-items:center;display:flex;&:after{pointer-events:none;color:",";content:'.';font-weight:bold;animation:"," 1s steps(5,end) infinite;margin-left:-12px;}"],(e=>{let{theme:t}=e;return t.colors.standard.white}),tl),al=Object(u.j)((function Media(e,t){let{className:C,onBlur:a,alt:n=Object(h.__)("Preview image","web-stories"),value:l,ariaLabel:i=Object(h.__)("Choose an image","web-stories"),variant:o=Pr.RECTANGLE,isLoading:c,menuOptions:s=[],onMenuOption:d,openMediaPicker:p,canUpload:m=!0,menuProps:f={},imgProps:b={},...E}=e;const v=(null==s?void 0:s.length)>0,[O,y]=Object(u.I)(!1),M=Object(u.C)((()=>`list-${Object(Hn.a)()}`),[]),w=Object(u.C)((()=>`button-${Object(Hn.a)()}`),[]),L=Object(u.G)(null),_=el[o],j=[{group:s}];return r.a.createElement(_,Ur({className:C},E),r.a.createElement($r,{variant:o},l?r.a.createElement(Kr,{src:l,alt:n,crossOrigin:"anonymous",decoding:"async",width:(null==b?void 0:b.width)||null,height:(null==b?void 0:b.height)||null}):r.a.createElement(qr,null,r.a.createElement(Xr,null)),c&&r.a.createElement(Cl,null)),m&&r.a.createElement(Br.a,{title:v?null:Object(h.__)("Open media picker","web-stories")},r.a.createElement(Jr,Ur({ref:e=>{"function"==typeof t?t(e):t&&(t.current=e),L.current=e},id:w,variant:g.d.SQUARE,type:g.c.TERTIARY,size:g.a.SMALL,"aria-label":i,onClick:v?()=>y(!0):p,"aria-owns":v?M:null,"aria-pressed":O,"aria-expanded":O},E),r.a.createElement(Nr.a,null))),r.a.createElement(zr.a,{placement:zC.a.BOTTOM_END,anchor:L,isOpen:O},r.a.createElement(Dr.a,Ur({parentId:w,listId:M,hasMenuRole:!0,options:j,onMenuItemClick:(e,t)=>{d(e,t),y(!1)},onDismissMenu:()=>y(!1),menuStylesOverride:Qr},f))))}));function nl(){return(nl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const rl=Object(l.f)(al).withConfig({displayName:"media__StyledInput",componentId:"sc-17cx4v4-0"})(["button:focus{","}"],(e=>{let{theme:t}=e;return Q.c.focusCSS(t.colors.border.focus,t.colors.bg.secondary)})),MediaInputField=e=>{let{open:t,dropdownOptions:C,onChange:a,forwardedRef:n,value:l,...i}=e;const o=Object(u.s)(((e,C)=>{switch(C){case"edit":t(e);break;case"remove":case"reset":a(null)}}),[a,t]);return r.a.createElement(rl,nl({onMenuOption:o,menuOptions:C,openMediaPicker:t,ref:n,value:l===uC.C?null:l},i))};var ll=Object(u.j)((function(e,t){let{buttonInsertText:C=Object(h.__)("Choose an image","web-stories"),menuOptions:a=[],onChange:n,onChangeErrorText:l=Object(h.__)("Unable to use this file type, please select a valid image type.","web-stories"),title:i=Object(h.__)("Choose an image","web-stories"),type:o="image",value:c,cropParams:s,...d}=e;const{MediaUpload:p}=Object(H.g)(),m=Object(u.s)((e=>{const C=[{label:Object(h.__)("Edit","web-stories"),value:"edit"},{label:Object(h.__)("Remove","web-stories"),value:"remove"},{label:Object(h.__)("Reset","web-stories"),value:"reset"}],l=c===uC.C?[]:C.filter((e=>{let{value:t}=e;return a.includes(t)}));return r.a.createElement(MediaInputField,nl({open:e,onChange:n,dropdownOptions:l,forwardedRef:t,value:c},d))}),[n,a,t,c,d]);return r.a.createElement(p,{title:i,buttonInsertText:C,onSelect:n,onSelectErrorMessage:l,type:o,cropParams:s,render:m})}));function il(){return(il=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const ol=Object(l.f)(ll).withConfig({displayName:"linkIcon__StyledMedia",componentId:"sc-1078kj7-0"})(["width:54px;height:54px;"]);var cl=function LinkIcon(e){let{handleChange:t,icon:C,isLoading:a=!1,...n}=e;const{allowedImageMimeTypes:l,allowedImageFileTypes:i,capabilities:{hasUploadMediaAction:o}}=Object(H.g)(),c=Object(u.C)((()=>{let e=Object(h.__)("No image file types are currently supported.","web-stories");return i.length&&(e=Object(h.sprintf)(
|
74 |
/* translators: %s: list of allowed file types. */
|
75 |
+
Object(h.__)("Please choose only %s as an icon.","web-stories"),Object(h.translateToExclusiveList)(i))),e}),[i]),s=o?["edit","remove"]:["remove"];return r.a.createElement(ol,il({value:C||"",cropParams:{width:96,height:96},onChange:t,onChangeErrorText:c,title:Object(h.__)("Select as link icon","web-stories"),ariaLabel:Object(h.__)("Edit link icon","web-stories"),buttonInsertText:Object(h.__)("Select as link icon","web-stories"),type:l,isLoading:a,variant:Pr.CIRCLE,canUpload:C&&!o||o,menuOptions:C?s:[]},n))},sl=C(759);var dl=l.f.div.withConfig({displayName:"row__Row",componentId:"sc-1olml0k-0"})(["display:flex;flex-direction:row;justify-content:flex-start;align-items:center;margin-bottom:16px;"," ",""],(e=>{let{spaceBetween:t=!0}=e;return t&&"justify-content: space-between;"}),(e=>{let{expand:t=!0}=e;return t&&"flex: 1;"}));function ul(){return(ul=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const pl={MIN:2,MAX:2048};var ml=Object(u.j)((function LinkInput(e,t){let{onChange:C,onBlur:a,onFocus:n,value:l="",hint:i,hasError:o,...c}=e;const s=(l||"").trim(),d=Object(sl.a)(Object(sl.b)(s)),u=s.length>0&&!d;return r.a.createElement(dl,null,r.a.createElement(EC.b,ul({ref:t,placeholder:Object(h.__)("Web address","web-stories"),onChange:e=>C(e.target.value),onBlur:()=>{if(null!=s&&s.length){const e=Object(sl.b)(s);e!==s&&C(e)}a&&a()},onFocus:n,value:l||"",minLength:pl.MIN,maxLength:pl.MAX,hasError:u||o,hint:u?Object(h.__)("Invalid web address.","web-stories"):i,containerStyleOverride:tC},c)))})),fl=C(104);var hl=function MediaUploadButton(e){let{onInsert:t,renderButton:C,buttonInsertText:a}=e;const{allowedTranscodableMimeTypes:n,allowedFileTypes:l,allowedMimeTypes:{image:i,video:o},MediaUpload:c}=Object(H.g)(),{canTranscodeResource:s,resetWithFetch:d,postProcessingResource:p,optimizeVideo:m,optimizeGif:f}=Object(H.m)((e=>{let{state:{canTranscodeResource:t},actions:{resetWithFetch:C,postProcessingResource:a,optimizeVideo:n,optimizeGif:r}}=e;return{canTranscodeResource:t,resetWithFetch:C,postProcessingResource:a,optimizeVideo:n,optimizeGif:r}})),{isTranscodingEnabled:b}=Object(fl.a)(),{showSnackbar:g}=Object(Oe.a)(),E=Object(u.C)((()=>b?[...n,...i,...o]:[...i,...o]),[i,o,b,n]),v=Object(u.C)((()=>n.filter((e=>!o.includes(e)))),[n,o]);let O=Object(h.__)("No file types are currently supported.","web-stories");l.length&&(O=Object(h.sprintf)(
|
76 |
/* translators: %s: list of allowed file types. */
|
77 |
+
Object(h.__)("Please choose only %s to insert into page.","web-stories"),Object(h.translateToExclusiveList)(l)));const y=Object(u.s)((e=>{try{b&&s(e)&&(v.includes(e.mimeType)&&m({resource:e}),"image/gif"===e.mimeType&&f({resource:e})),t(e),p(e)}catch(e){g({message:e.message,dismissible:!0})}}),[b,s,t,f,m,p,g,v]);return r.a.createElement(c,{onSelect:y,onSelectErrorMessage:O,onClose:d,type:E,render:C,buttonInsertText:a})},bl=C(7),gl=C.n(bl);function El(){return(El=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const vl="ON",Ol="OFF",yl=l.f.h3.withConfig({displayName:"switch__VisuallyHiddenRadioGroupLabel",componentId:"sc-1kebe5q-0"})(["",";"],Q.c.visuallyHidden),Ml=l.f.span.withConfig({displayName:"switch__SlidingButton",componentId:"sc-1kebe5q-1"})(["position:absolute;display:block;top:0;left:0;width:50%;height:","px;border-radius:100px;transition:all 0.15s ease-out;z-index:0;",""],32,(e=>{let{hasOffset:t}=e;return t&&"left: 50%"})),wl=l.f.div.withConfig({displayName:"switch__SwitchContainer",componentId:"sc-1kebe5q-2"})(["position:relative;height:","px;display:flex;flex-direction:row;justify-content:center;align-items:center;appearance:none;background:",";border-radius:100px;color:",";cursor:pointer;",";"],32,(e=>{let{theme:t}=e;return t.colors.divider.secondary}),(e=>{let{theme:t}=e;return t.colors.fg.primary}),(e=>{let{disabled:t,theme:C}=e;return t?Object(l.e)(["cursor:default;background:",";","{background-color:",";}"],C.colors.divider.tertiary,Ml,C.colors.interactiveBg.disable):Object(l.e)([":hover ","{background-color:",";}"],Ml,C.colors.interactiveBg.primaryHover)})),Ll=l.f.input.attrs({type:"radio"}).withConfig({displayName:"switch__HiddenRadioButton",componentId:"sc-1kebe5q-3"})(["position:absolute;height:0;width:0;padding:0;min-width:unset;appearance:none;border:0;box-shadow:none;margin:-1px;outline:none;overflow:hidden;opacity:0;"]),_l=Object(l.f)(cC.a).attrs({forwardedAs:"label",size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL}).withConfig({displayName:"switch__RadioButtonLabel",componentId:"sc-1kebe5q-4"})(["display:flex;align-items:center;justify-content:center;flex:1;height:","px;width:50%;padding:0px 6px;z-index:1;color:",";background-color:",";border-radius:100px;cursor:pointer;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;transition:all 0.15s ease-out;",":focus-within ~ span{",";}"],32,(e=>{let{isActive:t,theme:C}=e;return t?C.colors.inverted.fg.primary:C.colors.fg.secondary}),(e=>{let{isActive:t,theme:C}=e;return t&&C.colors.interactiveBg.primaryNormal}),(e=>{let{disabled:t,theme:C}=e;return t&&Object(l.e)(["cursor:default;color:",";"],C.colors.fg.disable)}),Q.c.focusCSS),jl=Object(u.j)((function(e,t){let{className:C,disabled:a,groupLabel:n,id:l,offLabel:i,onChange:o,onLabel:c,value:s,...d}=e;const p=Object(u.C)((()=>({group:l||Object(Hn.a)(),offInput:Object(Hn.a)(),onInput:Object(Hn.a)()})),[l]),m=Object(u.s)((e=>{o(e,e.target.value===vl)}),[o]);return r.a.createElement(wl,{ref:t,className:C,role:"radiogroup","aria-labelledby":p.group,"aria-disabled":a,disabled:a},r.a.createElement(yl,{id:p.group},n),r.a.createElement(_l,{htmlFor:p.onInput,isActive:s,disabled:a},c,r.a.createElement(Ll,El({checked:s,disabled:a,id:p.onInput,onChange:m,value:vl},d))),r.a.createElement(_l,{htmlFor:p.offInput,isActive:!s,disabled:a},i,r.a.createElement(Ll,El({checked:!s,disabled:a,id:p.offInput,onChange:m,value:Ol},d))),r.a.createElement(Ml,{hasOffset:!s}))}));jl.displayName="Switch";gl.a.string,gl.a.bool,gl.a.string.isRequired,gl.a.string,gl.a.string.isRequired,gl.a.string.isRequired,gl.a.func.isRequired,gl.a.string.isRequired,gl.a.bool;function xl(){return(xl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}jl.defaultProps={value:!1};const Zl=Object(l.f)(jl).withConfig({displayName:"switch__StyledSwitch",componentId:"sc-xytur2-0"})(["label:focus-within ~ span{",";}"],(e=>{let{theme:t}=e;return`box-shadow: 0px 0px 0 2px ${t.colors.bg.secondary}, 0px 0px 0 4px ${t.colors.border.focus} !important;`}));var Al=function(e){let{offLabel:t=Object(h.__)("Off","web-stories"),onChange:C,onLabel:a=Object(h.__)("On","web-stories"),value:n,...l}=e;const i=Object(u.G)(null),o=Object(u.s)((e=>{C(e,!n)}),[C,n]);return Object(ye.h)(i,["space","enter","left","right","up","down"],o,[o,n]),r.a.createElement(Zl,xl({ref:i,offLabel:t,onChange:C,onLabel:a,value:n},l))},Il=C(155);function Tl(){return(Tl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Sl=l.f.div.withConfig({displayName:"textArea__Container",componentId:"sc-sryd46-0"})(["position:relative;width:100%;min-width:100px;"]),kl=Object(l.f)(cC.a).attrs({size:ot.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL,forwardedAs:"span"}).withConfig({displayName:"textArea__CounterText",componentId:"sc-sryd46-1"})(["color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.tertiary})),Rl=Object(l.f)(cC.a).withConfig({displayName:"textArea__Label",componentId:"sc-sryd46-2"})(["margin-bottom:12px;"]),Pl=Object(l.f)(cC.a).withConfig({displayName:"textArea__Hint",componentId:"sc-sryd46-3"})(["margin-top:12px;color:",";"],(e=>{let{hasError:t,theme:C}=e;return C.colors.fg[t?"negative":"tertiary"]})),Nl=l.f.div.withConfig({displayName:"textArea__InputContainer",componentId:"sc-sryd46-4"})((e=>{let{focused:t,hasError:C,theme:a,styleOverride:n}=e;return Object(l.e)(["box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border:1px solid ",";border-radius:",";overflow:hidden;",";:focus-within{",";}",";"],a.colors.border[C?"negativeNormal":"defaultNormal"],a.borders.radius.small,t&&!C&&Object(l.e)(["border-color:",";"],a.colors.border.defaultActive),Object(Il.a)(a.colors.border.focus),n)})),Dl=l.f.textarea.withConfig({displayName:"textArea__StyledTextArea",componentId:"sc-sryd46-5"})((e=>{let{theme:t}=e;return Object(l.e)(["height:100%;width:100%;padding:0;background-color:inherit;border:none;outline:none;color:",";resize:none;",";",";:disabled{color:",";border-color:",";}:active{color:",";}::placeholder{color:",";}"],t.colors.fg.primary,Q.c.scrollbarCSS,Q.c.expandPresetStyles({preset:t.typography.presets.paragraph[ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL],theme:t}),t.colors.fg.disable,t.colors.border.disable,t.colors.fg.primary,t.colors.fg.tertiary)})),Bl=l.f.div.withConfig({displayName:"textArea__Counter",componentId:"sc-sryd46-6"})(["text-align:right;align-self:flex-end;span{color:",";}"],(e=>{let{theme:t}=e;return t.colors.fg.tertiary})),zl=Object(u.j)(((e,t)=>{let{className:C,disabled:a,hasError:n,hint:l,id:i,label:o,onBlur:c,onFocus:s,value:d,showCount:p=!1,maxLength:m,isIndeterminate:f=!1,containerStyleOverride:h="",...b}=e;const g=Object(u.C)((()=>i||Object(Hn.a)()),[i]),E=p&&m>0,[v,O]=Object(u.I)(!1),[y,M]=Object(u.I)(!1);let w=d;return f&&(w=""),r.a.createElement(Sl,{className:C},o&&r.a.createElement(Rl,{htmlFor:g,forwardedAs:"label",disabled:a},o),r.a.createElement(Nl,{focused:v,hasError:n,styleOverride:h},r.a.createElement(Dl,Tl({id:g,disabled:a,ref:e=>{"function"==typeof t?t(e):t&&(t.current=e),e&&v&&!y&&(e.select(),M(!0))},onFocus:e=>{null==s||s(e),O(!0),M(!1)},onBlur:e=>{null==c||c(e),O(!1)},value:w,maxLength:m},b)),E&&r.a.createElement(Bl,null,r.a.createElement(kl,null,`${d.length}/${m}`))),l&&r.a.createElement(Pl,{hasError:n},l))}));function Fl(){return(Fl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}zl.displayName="TextArea";const Hl=Object(u.j)(((e,t)=>{let{className:C,placeholder:a,value:n,disabled:l,rows:i,onChange:o,onBlur:c,...s}=e;const[d,p]=Object(u.I)(n),m=Object(u.s)((e=>{d!==n&&o(e)}),[d,o,n]);Object(u.y)((()=>{p(n)}),[n]);const f=Object(u.s)((e=>{m(e),c&&c(e)}),[c,m]);return r.a.createElement(zl,Fl({placeholder:a,value:d},s,{containerStyleOverride:tC,onChange:e=>p(e.target.value),onBlur:f,ref:t}))}));Hl.displayName="TextArea",Hl.defaultProps={showTextLimit:!0,rows:2};var Gl=Hl,Vl=Object(u.f)({isMultiple:!1,registerPresubmitHandler:()=>{}});var Ul=function(e){return Object(u.w)(Vl,null!=e?e:u.k)};var Wl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const{registerPresubmitHandler:C}=Ul();Object(u.y)((()=>C(e)),[C].concat(t||[]))};const Yl=l.f.div.withConfig({displayName:"timeZone__Wrapper",componentId:"sc-1n80l1r-0"})(["white-space:nowrap;"]),$l=Object(l.f)(cC.a).withConfig({displayName:"timeZone__StyledText",componentId:"sc-1n80l1r-1"})(["color:",";line-height:30px;"],(e=>{let{theme:t}=e;return t.colors.fg.disable}));var ql=function TimeZone(e){let{date:t}=e;const{timezone:C,gmtOffset:a}=Object(Ct.h)(),n=(new Date).getTimezoneOffset()/60*-1;if(Number(a)===n)return null;const{timeZone:l}=Object(Ct.f)(),i=null!=C&&C.length?Object(Ct.c)(t,"T"):`UTC${l}`,o="UTC"===i?Object(h.__)("Coordinated Universal Time","web-stories"):C;return r.a.createElement(Yl,null,r.a.createElement(Je.a,{hasTail:!0,title:o,placement:zC.a.TOP},r.a.createElement($l,{forwardedAs:"span",size:ot.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL},i)))};const Xl=l.f.div.withConfig({displayName:"timePicker__TimeWrapper",componentId:"sc-14og2kb-0"})(["margin-bottom:1em;padding:0 20px;"]),Kl=l.f.fieldset.withConfig({displayName:"timePicker__Fieldset",componentId:"sc-14og2kb-1"})(["margin-top:0.5em;position:relative;"]),Ql=l.f.legend.withConfig({displayName:"timePicker__Legend",componentId:"sc-14og2kb-2"})(["position:absolute;top:-999em;left:-999em;"]),Jl=l.f.div.withConfig({displayName:"timePicker__InputRow",componentId:"sc-14og2kb-3"})(["display:flex;"]),ei=Object(l.e)(["min-height:30px;box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;border-radius:4px;border:1px solid #006edc;height:28px;vertical-align:middle;background-color:",";color:#32373c;"],(e=>{let{theme:t}=e;return t.colors.standard.white})),ti=l.f.input.withConfig({displayName:"timePicker__NumberInput",componentId:"sc-14og2kb-4"})([""," padding:0;margin-right:4px;text-align:center;width:50%;max-width:50px;::-webkit-inner-spin-button,::-webkit-outer-spin-button{margin:0;appearance:none;}"],ei),Ci=l.f.span.withConfig({displayName:"timePicker__TimeSeparator",componentId:"sc-14og2kb-5"})(["padding:0 3px 0 0;color:#555d66;"]),ai=l.f.button.withConfig({displayName:"timePicker__Button",componentId:"sc-14og2kb-6"})(["display:inline-flex;text-decoration:none;font-size:13px;margin:0;border:0;cursor:pointer;transition:box-shadow 0.1s linear;padding:0 10px;line-height:2;height:30px;border-radius:3px;white-space:nowrap;border-width:1px;border-style:solid;color:#006edc;border-color:#006edc;background:#f3f5f6;&:focus{outline:2px solid transparent;background:#f3f5f6;color:rgb(0,93,140);border-color:",";box-shadow:0 0 0 1px ",";text-decoration:none;}",""],(e=>{let{theme:t}=e;return t.colors.fg.linkHover}),(e=>{let{theme:t}=e;return t.colors.fg.linkHover}),(e=>{let{isToggled:t}=e;return t&&"\n background: #edeff0;\n border-color: #8f98a1;\n box-shadow: inset 0 2px 5px -3px #555d66;\n "})),ni=l.f.div.withConfig({displayName:"timePicker__InputGroup",componentId:"sc-14og2kb-7"})(["flex-basis:100%;"]),ri=Object(l.f)(ai).withConfig({displayName:"timePicker__AMButton",componentId:"sc-14og2kb-8"})(["margin-right:-1px;border-radius:3px 0 0 3px;"]),li=Object(l.f)(ai).withConfig({displayName:"timePicker__PMButton",componentId:"sc-14og2kb-9"})(["margin-left:-1px;border-radius:0 3px 3px 0;"]);var ii=function TimePicker(e){let{onChange:t,is12Hour:C,localData:a,setLocalData:n}=e;const l=e=>t=>{n({...a,[e]:parseInt(t.target.value)})},i=()=>C?12:23,o=()=>C?1:0,c=e=>{const{am:t}=a;return C?"AM"===t?e%12:(e%12+12)%24:e},s=function(e){let C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n({...a,...C,date:e}),t(e.toISOString())},d=e=>()=>{const{am:t,date:C,hours:n}=a;if(t===e)return;const r=C;"PM"===e?r.setHours((n%12+12)%24):r.setHours(n%12),s(r,{am:e})},p=Object(u.G)();Object(u.y)((()=>{p.current.focus()}),[]);const m="AM"===a.am,f="PM"===a.am;return r.a.createElement(Xl,null,r.a.createElement(Kl,null,r.a.createElement(Ql,null,Object(h.__)("Time","web-stories")),r.a.createElement(Jl,null,r.a.createElement(ni,null,r.a.createElement(ti,{ref:p,"aria-label":Object(h.__)("Hours","web-stories"),type:"number",step:1,min:o(),max:i(),value:parseInt(a.hours),onChange:l("hours"),onBlur:()=>{const{hours:e,date:t}=a,C=parseInt(e);if(!(isNaN(C)||C<o()||C>i())&&t.getHours()!==c(e)){const C=t;C.setHours(c(e)),s(C)}}}),r.a.createElement(Ci,null,":"),r.a.createElement(ti,{"aria-label":Object(h.__)("Minutes","web-stories"),type:"number",min:0,max:59,value:parseInt(a.minutes),onChange:l("minutes"),onBlur:()=>{const{minutes:e,date:t}=a,C=parseInt(e);if(!(isNaN(C)||C<0||C>59)&&t.getMinutes()!==e){const C=t;C.setMinutes(e),s(C)}}})),C&&r.a.createElement(ni,null,r.a.createElement(ri,{"aria-pressed":m,type:"button",isToggled:m,onClick:d("AM")},Object(h.__)("AM","web-stories")),r.a.createElement(li,{"aria-pressed":f,type:"button",isToggled:f,tabIndex:"-1",onClick:d("PM")},Object(h.__)("PM","web-stories"))),r.a.createElement(ql,{date:null==a?void 0:a.date}))))};C(644);const oi=Object(u.l)((()=>C.e(198).then(C.bind(null,1055)))),ci=l.f.div.withConfig({displayName:"datePicker__CalendarWrapper",componentId:"sc-9qun1q-0"})(["min-height:236px;"]),si=l.f.div.withConfig({displayName:"datePicker__FallbackCalendar",componentId:"sc-9qun1q-1"})(["height:256px;width:350px;display:flex;align-items:center;justify-content:center;"]);var di=function DatePicker(e){let{currentDate:t,onChange:C,onViewChange:a}=e;const n=Object(u.G)(),l=Object(u.C)((()=>new Date(t)),[t]),i=Object(u.s)((e=>{e.setHours(l.getHours()),e.setMinutes(l.getMinutes()),C(e.toISOString(),!0)}),[l,C]),o=Object(u.s)((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(n.current){const t=[...n.current.querySelectorAll(".react-calendar__navigation button")];t[0].tabIndex="0",t.shift();for(const e of t)e.tabIndex="-1";const C=[...n.current.querySelectorAll(".react-calendar__viewContainer button")];let a=!1;for(const t of C)t.classList.contains("react-calendar__tile--now")?(t.tabIndex="0",e&&t.focus(),a=!0):t.tabIndex="-1";a||(C[0].tabIndex="0",C[0].focus())}}),[n]);return Object(u.y)((()=>{const e=setTimeout((()=>{o()}));return()=>{clearTimeout(e)}}),[o]),r.a.createElement(u.d,{fallback:r.a.createElement(si,null,r.a.createElement(WC.a,null))},r.a.createElement(ci,{ref:n},r.a.createElement(oi,{value:l,onChange:i,onViewChange:a,onActiveStartDateChange:()=>o(!0),nextAriaLabel:Object(h._x)("Next","This label can apply to next month, year and/or decade","web-stories"),prevAriaLabel:Object(h._x)("Previous","This label can apply to previous month, year and/or decade","web-stories"),next2AriaLabel:Object(h._x)("Jump forward","This label can apply to month, year and/or decade","web-stories"),prev2AriaLabel:Object(h._x)("Jump backwards","This label can apply to month, year and/or decade","web-stories")})))};const ui=l.f.div.withConfig({displayName:"dateTime__DateTimeWrapper",componentId:"sc-15cbv9f-0"})(["border-radius:4px;box-shadow:0 3px 30px rgba(25,30,35,0.1);border:1px solid ",";background-color:",";width:100%;padding:4px;"],(e=>{let{theme:t}=e;return Object(LC.c)(t.colors.standard.black,.2)}),(e=>{let{theme:t}=e;return t.colors.standard.white})),pi=Object(l.f)(b.a).withConfig({displayName:"dateTime__StyledButton",componentId:"sc-15cbv9f-1"})(["color:#006edc;margin:5px 0;"]);var mi=function DateTime(e){let{value:t,onChange:C,onViewChange:a,is12Hour:n=!0,forwardedRef:l,onClose:i,canReset:o=!1}=e;const c=t?new Date(t):new Date,s=c.getHours(),[d,p]=Object(u.I)({minutes:c.getMinutes(),am:s<12?"AM":"PM",hours:n?s%12||12:s,date:c}),m=Object(u.G)(document.activeElement),f=Object(u.s)((e=>{m.current&&m.current.focus(),i(e)}),[i]);return Object(ye.h)(l,{key:["esc"],editable:!0},f),En({ref:l}),Object(GC.a)({ref:l}),r.a.createElement(ui,{ref:l},r.a.createElement(ii,{localData:d,setLocalData:p,onChange:C,is12Hour:n}),r.a.createElement(di,{currentDate:t,onChange:C,onViewChange:a}),o&&r.a.createElement(pi,{size:g.a.SMALL,onClick:()=>{C(null),i()},"aria-label":Object(h.__)("Reset publish time","web-stories")},Object(h.__)("Reset","web-stories")))};const fi=l.f.div.withConfig({displayName:"required__RequiredWrapper",componentId:"sc-19c61h7-0"})(["display:flex;flex-direction:row;justify-content:flex-start;align-items:center;"]),hi=Object(l.f)(cC.a).attrs({as:"span",size:ot.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL}).withConfig({displayName:"required__StyledText",componentId:"sc-19c61h7-1"})(["color:",";font-size:12px;"],(e=>{let{theme:t}=e;return t.colors.fg.secondary}));var bi=function Required(){return r.a.createElement(fi,null,r.a.createElement(hi,null,Object(h._x)("Required","Required form input","web-stories")))},gi=C(94);function Ei(){return(Ei=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const vi=24,Oi=l.f.div.withConfig({displayName:"radio__Container",componentId:"sc-dphfhc-0"})(["display:flex;align-items:center;min-height:","px;padding:8px 0;"],44),yi=l.f.div.withConfig({displayName:"radio__RadioInputContainer",componentId:"sc-dphfhc-1"})(["position:relative;height:","px;width:","px;"],vi,vi),Mi=l.f.div.withConfig({displayName:"radio__LabelContainer",componentId:"sc-dphfhc-2"})(["display:flex;flex-direction:column;margin:0 12px;gap:","px;"],8),wi=l.f.span.withConfig({displayName:"radio__RadioBorder",componentId:"sc-dphfhc-3"})((e=>{let{theme:t}=e;return Object(l.e)(["display:inline-block;height:","px;width:","px;border:","px solid ",";border-radius:",";pointer-events:none;transition:all 0.15s;"],vi,vi,1,t.colors.border.defaultNormal,t.borders.radius.round)})),Li=l.f.span.withConfig({displayName:"radio__InnerButton",componentId:"sc-dphfhc-4"})((e=>{let{theme:t}=e;return Object(l.e)(["pointer-events:none;display:none;:after{content:'';position:absolute;height:","px;width:","px;top:50%;left:50%;transform:translate(-50%,-50%);background-color:",";border-radius:",";}"],16,16,t.colors.fg.primary,t.borders.radius.round)})),_i=l.f.input.attrs({type:"radio"}).withConfig({displayName:"radio__HiddenInput",componentId:"sc-dphfhc-5"})(["position:absolute;height:","px;width:","px;margin:0;opacity:0;cursor:pointer;:hover ~ ","{border-color:",";}:focus{outline:none;}:focus ~ ",",&."," ~ ","{",";border-color:",";}:active ~ ","{box-shadow:0 0 0 8px ",";}:checked ~ ","{display:block;}:disabled{cursor:auto;~ ","{border-color:",";}~ ","::after{background-color:",";}}"],vi,vi,wi,(e=>{let{theme:t}=e;return t.colors.border.defaultHover}),wi,gi.b,wi,(e=>{let{theme:t}=e;return Q.c.focusCSS(t.colors.border.focus)}),(e=>{let{theme:t}=e;return t.colors.border.defaultHover}),wi,(e=>{let{theme:t}=e;return t.colors.shadow.active}),Li,wi,(e=>{let{theme:t}=e;return t.colors.border.disable}),Li,(e=>{let{theme:t}=e;return t.colors.fg.disable})),ji=Object(l.f)(cC.a).attrs({forwardedAs:"span",size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL}).withConfig({displayName:"radio__Hint",componentId:"sc-dphfhc-6"})(["color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.secondary})),xi=Object(u.j)((function RadioButton(e,t){let{className:C,hint:a,id:n,label:l,...i}=e;const o=Object(u.C)((()=>n||Object(Hn.a)()),[n]);return r.a.createElement(Oi,{className:C},r.a.createElement(yi,null,r.a.createElement(_i,Ei({id:o,ref:t},i)),r.a.createElement(wi,null),r.a.createElement(Li,null)),r.a.createElement(Mi,null,r.a.createElement(cC.a,{htmlFor:o,as:"label",size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},l),a&&r.a.createElement(ji,null,a)))}));var Zi=function(e){const t=Object(u.s)((t=>{const C=e.current;if(!C)return;const a=Array.from(C.querySelectorAll('input[type="radio"]')),n=a.indexOf(document.activeElement);if(-1===n)return;const r=n+t;r<0||r>=a.length||(a[r].focus(),a[r].click())}),[e]),C=Object(u.s)((()=>t(-1)),[t]);Object(ye.h)(e,["up","left"],C,[C]);const a=Object(u.s)((()=>t(1)),[t]);Object(ye.h)(e,["down","right"],a,[a])};function Ai(){return(Ai=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Ii=l.f.h3.withConfig({displayName:"radioGroup__VisuallyHiddenLabel",componentId:"sc-k5v4js-0"})(["",";"],Q.c.visuallyHidden),Ti=Object(l.f)(xi).withConfig({displayName:"radioGroup__StyledRadio",componentId:"sc-k5v4js-1"})(["input:focus + span,input&."," + span{",";}"],Q.a.FOCUS_VISIBLE_SELECTOR,(e=>{let{theme:t}=e;return`box-shadow: 0px 0px 0 2px ${t.colors.bg.secondary}, 0px 0px 0 4px ${t.colors.border.focus} !important;`}));var Si=function RadioGroup(e){let{className:t,groupLabel:C,id:a,name:n,options:l,value:i,...o}=e;const c=Object(u.C)((()=>a||Object(Hn.a)()),[a]),s=Object(u.G)(null);return Zi(s),r.a.createElement("div",{className:t,ref:s,role:"radiogroup","aria-labelledby":c},r.a.createElement(Ii,{id:c},C),l.map((e=>{let{helper:t="",label:C,value:a,disabled:l}=e;return r.a.createElement(Ti,Ai({key:a,name:n,value:a,checked:a===i,label:C,hint:t,disabled:l},o))})))},ki=C(563);function Ri(){return(Ri=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Pi=l.f.div.withConfig({displayName:"select__Container",componentId:"sc-1pv4s6p-0"})(["position:relative;width:100%;"]),Ni=Object(l.f)(ki.a).withConfig({displayName:"select__StyledDropDown",componentId:"sc-1pv4s6p-1"})(["background-color:transparent;border:0;width:auto;"]),Di=Object(l.e)(["top:-14px;right:unset;width:auto;"]),Bi=Object(l.e)(["border:none;width:auto;margin-right:auto;padding-left:0;",";"],eC),zi=Object(l.e)(["margin-right:-12px;"]);var Fi=function Select(e){return r.a.createElement(Pi,null,r.a.createElement(Ni,Ri({isInline:!0,hasSearch:!1,menuStylesOverride:Di,selectButtonStylesOverride:Bi,selectValueStylesOverride:zi},e)))},Hi=C(773);const Gi=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.map((t=>{const C=e[t.id];return{...t,options:C&&C.length?Gi(e,C):[]}}))},Vi=e=>{const t=e.map((e=>({options:[],parent:0,...e}))),C=(a="parent",t.reduce(((e,t)=>(e[t[a]]?e[t[a]].push(t):e[t[a]]=[t],e)),{}));var a;return Gi(C,C[0])},Ui=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const{options:C,...a}=e;let n=[];if(C)for(let e=0;e<C.length;e++)n=n.concat(Ui(C[e],t));const r=e.label.toLowerCase().includes(t.trim().toLowerCase()),l={...a,options:n};return r||n.length?[l]:[]},Wi=(e,t)=>e.reduce(((e,C)=>e.concat(Ui(C,t))),[]);function Yi(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.flatMap((e=>{let{options:C,...a}=e;return[{...a,$level:t},...Yi(C,t+1)]}))}function $i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const C=Vi(e),a=Wi(C,t);return Yi(a)}function qi(){return(qi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Xi=l.f.div.withConfig({displayName:"hierarchical__Container",componentId:"sc-1pgjcwl-0"})(["margin-bottom:8px;display:block;"]),Ki=Object(l.f)(cC.a).attrs({forwardedAs:"label",size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL}).withConfig({displayName:"hierarchical__Label",componentId:"sc-1pgjcwl-1"})(["margin:0 12px;"]),Qi=l.f.div.withConfig({displayName:"hierarchical__Border",componentId:"sc-1pgjcwl-2"})(["padding-top:4px;margin-top:-4px;border:1px solid ",";border-top:none;border-radius:",";"],(e=>{let{theme:t}=e;return t.colors.border.defaultNormal}),(e=>{let{theme:t}=e;return`0 0 ${t.borders.radius.small} ${t.borders.radius.small}`})),Ji=l.f.ul.withConfig({displayName:"hierarchical__CheckboxArea",componentId:"sc-1pgjcwl-3"})(["max-height:175px;padding:12px 12px 0 12px;overflow-y:scroll;margin-top:4px;margin-bottom:0;",";:focus-within{",";}"],Q.c.scrollbarCSS,(e=>{let{theme:t}=e;return Q.c.focusCSS(t.colors.border.focus,t.colors.bg.secondary)})),eo=l.f.li.withConfig({displayName:"hierarchical__CheckboxContainer",componentId:"sc-1pgjcwl-4"})(["display:flex;align-items:center;margin-bottom:8px;margin-left:","px;"],(e=>{let{$level:t}=e;return 20*t})),to=Object(l.f)(cC.a).withConfig({displayName:"hierarchical__NoResultsText",componentId:"sc-1pgjcwl-5"})(["margin-bottom:12px;color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.secondary})),Co=e=>`hierarchical_term_option_${e}`,Option=e=>{let{optionRefs:t={current:{}},$level:C=0,...a}=e;const{id:n,label:l,onBlur:i,onChange:o,onFocus:c,checked:s,value:d}=a,u=Co(a.id),p=`hierarchical_term_${a.label}`;return r.a.createElement(eo,{"aria-selected":s,role:"treeitem",$level:C},r.a.createElement(sC.a,{id:u,ref:e=>{t.current[n]=e},value:d,checked:s,name:p,onChange:e=>o(e,a),onBlur:i,onFocus:c,tabIndex:-1}),r.a.createElement(Ki,{htmlFor:u},l))};var ao=e=>{let{className:t,inputValue:C,onInputChange:a,label:n,noOptionsText:l,options:i,onChange:o,...c}=e;const s=Object(Hi.a)("assertive"),d=Object(u.x)(s,500),p=Object(u.G)(null),m=Object(u.G)(null),[f,b]=Object(u.I)(-1),g=Object(u.G)({}),E=Object(u.s)((e=>{if(document.activeElement===p.current){if(!i.length)return;var t;if(p.current.contains(e.relatedTarget))return void(null===(t=m.current)||void 0===t||t.focus());if(-1===f){var C;const e=null===(C=i.find((e=>e.checked)))||void 0===C?void 0:C.id;b(e||0)}else{var a;null===(a=g.current[f])||void 0===a||a.focus()}}}),[f,i]),v=Object(u.s)((e=>{const t=i.findIndex((e=>e.id===f));switch(e.key){case Bt.b.UP:t>0&&b(i[t-1].id);break;case Bt.b.DOWN:t<i.length-1&&b(i[t+1].id)}}),[i,f]),O=Object(u.s)((e=>{a(e.target.value)}),[a]),y=Object(u.s)(((e,t)=>{o(e,{id:t.id,checked:!t.checked})}),[o]),M=Object(u.D)(C);Object(u.y)((()=>{if(M!==C){const e=i.length,t=Object(h.sprintf)(
|
78 |
/* Translators: %d: Number of results. */
|
79 |
+
Object(h._n)("%d result found.","%d results found.","web-stories","web-stories"),e);d(t)}}),[d,i,C,M]),Object(ye.h)(p,{key:["up","down","shift+up","shift+down"]},v,[v]),Object(u.y)((()=>{var e,t;null!==(e=p.current)&&void 0!==e&&e.contains(document.activeElement)&&(null===(t=g.current[f])||void 0===t||t.focus())}),[f]);const w=Boolean(i.length)||Boolean(C.length);return r.a.createElement(Xi,{className:t},r.a.createElement(EC.b,qi({ref:m,value:C,onChange:O,label:n,type:"search",placeholder:Object(h.__)("Search","web-stories")},c)),w&&r.a.createElement(Qi,null,r.a.createElement(Ht,null,r.a.createElement(Ji,{id:"checkbox_list",ref:p,tabIndex:0,onFocus:E,role:"tree","aria-activedescendant":-1!==f?Co(f):void 0,"aria-multiselectable":!0},i.length?i.map((e=>r.a.createElement(Option,qi({key:e.id},e,{onChange:y,optionRefs:g})))):r.a.createElement(to,{role:"treeitem",size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},l)))))};const no=[{key:"sponsored",title:Object(h.__)("Sponsored","web-stories")},{key:"nofollow",title:Object(h.__)("Nofollow","web-stories")}],ro=l.f.div.withConfig({displayName:"linkRelations__CheckboxWrapper",componentId:"sc-123e3hl-0"})(["display:flex;padding:9px 0;"]),lo=l.f.label.withConfig({displayName:"linkRelations__Label",componentId:"sc-123e3hl-1"})(["margin-left:12px;"]),io=Object(l.f)(cC.a).withConfig({displayName:"linkRelations__StyledText",componentId:"sc-123e3hl-2"})(["color:",";padding:8px 0;"],(e=>{let{theme:t}=e;return t.colors.fg.secondary}));var oo=function LinkRelations(e){let{rel:t,onChangeRel:C}=e;const a=Object(h.__)("https://developers.google.com/search/docs/advanced/guidelines/qualify-outbound-links?hl=en","web-stories"),n=Object(u.s)((e=>{const a=t.includes(e)?t.filter((t=>t!==e)):[...t,e];C(a)}),[C,t]);return r.a.createElement(dl,null,r.a.createElement("div",null,r.a.createElement(io,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Qualify outbound links","web-stories")),no.map((e=>{let{key:C,title:a}=e;return r.a.createElement(ro,{key:C},r.a.createElement(sC.a,{id:C,name:C,checked:null==t?void 0:t.includes(C),onChange:()=>n(C)}),r.a.createElement(lo,{htmlFor:C},r.a.createElement(cC.a,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL,as:"span"},a)))})),r.a.createElement(it.a,{rel:"noopener noreferrer",target:"_blank",href:a,size:ot.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL},Object(h.__)("Learn more","web-stories"))))};function co(e,t){return void 0===e?t:e}var so=function(e,t){let C=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const a="function"==typeof t?t:e=>e[t],n=co(a(e[0]),C),r=e.every((e=>co(a(e),C)===n));return r?n:uC.C};var uo=function(e,t,C){const a={},n=e.map((e=>e[t]||C));return Object.keys(C).forEach((e=>{a[e]=so(n,e)})),a};var po=function(e,t){return Object(u.C)((()=>{const C=e.map((e=>e[t]));if(0===C.length)return null;if(1===C.length)return C[0];const a={};return C.forEach((e=>{const t=Object(On.a)(Object(te.a)(e));t in a||(a[t]=e)})),1===Object.keys(a).length?Object.values(a)[0]:uC.C}),[e,t])};var mo=function(e,t,C){const a=uo(e,t,C),n=Object.keys(C).map((e=>a[e]));return Object(u.C)((()=>a),n)};const fo=l.f.div.withConfig({displayName:"components__NavBar",componentId:"sc-1m7fu09-0"})(["display:flex;justify-content:space-between;align-items:center;width:100%;height:","px;background-color:",";",""],48,(e=>{let{theme:t}=e;return t.colors.bg.secondary}),Q.c.expandTextPreset(((e,t)=>{let{label:C}=e,{MEDIUM:a}=t;return C[a]}))),ho=Object(l.f)(b.a).withConfig({displayName:"components__NavButton",componentId:"sc-1m7fu09-1"})([""," ",";svg{width:32px;}* + *{margin-left:12px;}"],Q.c.expandTextPreset(((e,t)=>{let{label:C}=e,{MEDIUM:a}=t;return C[a]})),eC),bo=l.f.div.withConfig({displayName:"topNavigation__TopNavButtons",componentId:"sc-rirhnw-0"})(["padding-right:15px;"]),go=Object(l.f)(Jt.a).attrs({as:"h2",size:ot.b.TYPOGRAPHY.PRESET_SIZES.XX_SMALL}).withConfig({displayName:"topNavigation__Label",componentId:"sc-rirhnw-1"})(["padding-left:24px;font-weight:",";"],(e=>{let{theme:t}=e;return t.typography.weight.regular}));function TopNavigation(e){let{onClose:t,label:C,popupId:a}=e;return r.a.createElement(fo,null,r.a.createElement(go,null,C),r.a.createElement(bo,null,r.a.createElement(ho,{"aria-label":Object(h.__)("Close","web-stories"),onClick:()=>{!function(e){var t;null===(t=document.querySelector(`[aria-owns=${e}]`))||void 0===t||t.focus()}(a),t()},type:g.c.PLAIN,size:g.a.SMALL,variant:g.d.CIRCLE},r.a.createElement(Te.a.Cross,null))))}const Eo=Object(l.e)(["opacity:1;transform:none;"]),vo=Object(l.e)(["opacity:0;transform:translateX(-20px);"]),Oo={entering:Eo,entered:Eo,exiting:vo,exited:vo},yo=l.f.div.withConfig({displayName:"secondaryPopup__Controller",componentId:"sc-b3cg46-0"})(["position:absolute;top:-12px;left:0px;opacity:0;transform:translateX(-20px);transition:opacity ","ms ",",transform ","ms ",";",""],300,ot.a.default,300,ot.a.default,(e=>{let{state:t}=e;return Oo[t]}));var Mo=function Popup(e){let{isOpen:t,popupId:C,children:a,ariaLabel:n,shouldKeepMounted:l,onEnter:i=Kt.a,onExited:o=Kt.a}=e;return r.a.createElement(ScheduledTransition,{in:t,timeout:300,mountOnEnter:!l,unmountOnExit:!l,onEnter:i,onExited:o},(e=>r.a.createElement(yo,{id:C,role:"dialog","aria-label":n,state:e},a)))},wo=C(374);const Lo=ot.b.ICON_SIZE,_o=Lo+8,jo=ot.b.ICON_SIZE+6+2,xo=2*(ot.b.LARGE_BUTTON_SIZE+2)+jo+16+16;var Zo=function(){const{carouselState:e}=Object(H.l)((e=>{let{state:{carouselState:t}}=e;return{carouselState:t}}));return e===uC.d.CLOSED?52:116},Ao=C(99);var Io=function(e){let{containerRef:t}=e;const{zoomLevel:C,setZoomLevel:a}=Object(Ao.a)((e=>{let{state:{zoomLevel:t},actions:{setZoomLevel:C}}=e;return{zoomLevel:t,setZoomLevel:C}})),n=Object(u.x)((e=>a(e)),25);Object(u.B)((()=>{if(!t.current)return;const e=e=>Math.min(3,Math.max(.25,e-e%.25)),a=a=>{const{ctrlKey:r,deltaY:l}=a,i=t.current.childNodes[0];if(r&&i.contains(a.target)&&l){n(e(l>0?C-.25:C+.25)),a.preventDefault()}},r=e=>{t.current.childNodes[0].contains(e.target)&&e.preventDefault()},l=a=>{const r=t.current.childNodes[0],{scale:l}=a;if(r.contains(a.target)&&l){n(e(l<1?C-.25:C+.25)),a.preventDefault()}};return document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("gesturestart",r),document.addEventListener("gestureend",r),document.addEventListener("gesturechange",l),()=>{document.removeEventListener("wheel",a,{passive:!1}),document.removeEventListener("gesturestart",r),document.removeEventListener("gestureend",r),document.removeEventListener("gesturechange",l)}}),[t,n,C])};function To(){return(To=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const So=2,ko=3,Ro=ot.b.LARGE_BUTTON_SIZE+8,Po=l.f.section.withConfig({displayName:"layout__LayerGrid",componentId:"sc-1n0mp4m-0"})([""," position:absolute;top:0;left:0;right:0;bottom:0;"," display:grid;grid:'h h h h h h h' ","px '. . . . . . .' minmax(16px,1fr) '. b . p . f .' var(--viewport-height-px) '. . . . . . .' 1fr 'w w w w w w w' ","px '. . . . . . .' ","px / 1fr var(--page-nav-width) var(--page-nav-gap) var(--viewport-width-px) var(--page-nav-gap) var(--page-nav-width) 1fr;height:100%;"],wo.a,(e=>{let{zIndex:t}=e;return"number"==typeof t?`z-index: ${t};`:""}),uC.n,(e=>{let{footerHeight:t}=e;return t}),16),No=l.f.div.withConfig({displayName:"layout__Area",componentId:"sc-1n0mp4m-1"})([""," grid-area:",";overflow:",";position:relative;width:100%;height:100%;",";"],wo.a,(e=>{let{area:t}=e;return t}),(e=>{let{showOverflow:t}=e;return t?"visible":"hidden"}),(e=>{let{zIndex:t}=e;return void 0!==t?`z-index: ${t}`:null})),Do=Object(l.f)(No).attrs({area:"p"}).withConfig({displayName:"layout__PageAreaContainer",componentId:"sc-1n0mp4m-2"})(["position:relative;display:flex;justify-content:",";align-items:",";overflow:",";",""],(e=>{let{hasHorizontalOverflow:t}=e;return t?"flex-start":"center"}),(e=>{let{hasVerticalOverflow:t}=e;return t?"flex-start":"center"}),(e=>{let{showOverflow:t}=e;return t?"visible":"var(--overflow-x) var(--overflow-y)"}),(e=>{let{isControlled:t,hasVerticalOverflow:C,hasHorizontalOverflow:a,showOverflow:n}=e;return t&&`\n overflow: ${n?"visible":"hidden"};\n width: calc(\n 100% - ${C?Q.c.SCROLLBAR_WIDTH:0}px\n );\n height: calc(\n 100% - ${a?Q.c.SCROLLBAR_WIDTH:0}px\n );\n `})),Bo=Object(u.j)((function Layer(e,t){let{children:C,...a}=e;const n=Zo();return r.a.createElement(Po,To({ref:t,footerHeight:n},a),C)})),zo=l.f.div.withConfig({displayName:"layout__PaddedPage",componentId:"sc-1n0mp4m-3"})(["padding:calc(0.5 * var(--page-padding-px));"]),Fo=l.f.div.withConfig({displayName:"layout__PageClip",componentId:"sc-1n0mp4m-4"})(["",""],(e=>{let{hasHorizontalOverflow:t,hasVerticalOverflow:C}=e;return(t||C)&&`\n overflow: hidden;\n width: ${t?"calc(var(--page-width-px) + var(--page-padding-px))":`calc(var(--viewport-width-px) - ${Q.c.SCROLLBAR_WIDTH}px)`};\n flex-basis: ${t?"calc(var(--page-width-px) + var(--page-padding-px))":`calc(var(--viewport-width-px) - ${Q.c.SCROLLBAR_WIDTH}px)`};\n height: ${C?"calc(var(--fullbleed-height-px) + var(--page-padding-px))":`calc(var(--viewport-height-px) - ${Q.c.SCROLLBAR_WIDTH}px)`};\n flex-shrink: 0;\n flex-grow: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n `})),Ho=l.f.div.withConfig({displayName:"layout__FullbleedContainer",componentId:"sc-1n0mp4m-5"})([""," overflow:visible;position:relative;width:var(--page-width-px);height:var(--fullbleed-height-px);display:flex;justify-content:center;align-items:center;border-radius:5px;",";",""],(e=>{let{background:t}=e;return Object(te.a)(t)}),(e=>{let{isControlled:t}=e;return t&&"\n left: var(--scroll-left-px);\n top: var(--scroll-top-px);\n "}),(e=>{let{isBackgroundSelected:t,theme:C}=e;return t&&`\n &:before {\n content: '';\n position: absolute;\n top: -4px;\n left: -4px;\n right: -4px;\n bottom: -4px;\n border: ${C.colors.border.selection} 1px solid;\n border-radius: ${C.borders.radius.medium};\n }\n `})),Go=l.f.div.withConfig({displayName:"layout__PageAreaWithoutOverflow",componentId:"sc-1n0mp4m-6"})(["overflow:",";position:relative;width:var(--page-width-px);height:var(--fullbleed-height-px);display:flex;justify-content:center;align-items:center;"],(e=>{let{showOverflow:t}=e;return t?"initial":"hidden"})),Vo=l.f.div.withConfig({displayName:"layout__PageAreaSafeZone",componentId:"sc-1n0mp4m-7"})(["width:var(--page-width-px);height:var(--page-height-px);overflow:visible;position:relative;"]),Uo=Object(l.f)(No).attrs({area:"h"}).withConfig({displayName:"layout__HeadArea",componentId:"sc-1n0mp4m-8"})([""]),Wo=(Object(l.f)(No).attrs({area:"m"}).withConfig({displayName:"layout__MenuArea",componentId:"sc-1n0mp4m-9"})([""]),Object(l.f)(No).withConfig({displayName:"layout__NavArea",componentId:"sc-1n0mp4m-10"})(["display:flex;align-items:center;justify-content:center;"])),Yo=Object(l.f)(Wo).attrs({area:"b"}).withConfig({displayName:"layout__NavPrevArea",componentId:"sc-1n0mp4m-11"})([""]),$o=Object(l.f)(Wo).attrs({area:"f"}).withConfig({displayName:"layout__NavNextArea",componentId:"sc-1n0mp4m-12"})([""]),qo=l.f.div.withConfig({displayName:"layout__PageMenuArea",componentId:"sc-1n0mp4m-13"})(["grid-area:p;position:absolute;right:calc(-24px + var(--page-padding-px));top:calc(0.5 * var(--page-padding-px));min-height:calc(100% - var(--page-padding-px));"]),Xo=Object(l.f)(No).attrs({area:"w",showOverflow:!0}).withConfig({displayName:"layout__FooterArea",componentId:"sc-1n0mp4m-14"})([""]);const Ko=Object(u.j)((function PageArea(e,t){let{children:C,fullbleedRef:a=Object(u.i)(),fullBleedContainerLabel:n=Object(h.__)("Fullbleed area","web-stories"),overlay:l=[],background:i,isControlled:o=!1,className:c="",showOverflow:s=!1,isBackgroundSelected:d=!1,pageAreaRef:p=Object(u.i)(),withSafezone:m=!0,...f}=e;const{hasVerticalOverflow:b,hasHorizontalOverflow:g,zoomSetting:E,scrollLeft:v,scrollTop:O}=Object(H.l)((e=>{let{state:{hasVerticalOverflow:t,hasHorizontalOverflow:C,zoomSetting:a,scrollLeft:n,scrollTop:r}}=e;return{hasVerticalOverflow:t,hasHorizontalOverflow:C,zoomSetting:a,scrollLeft:n,scrollTop:r}})),y=Object(u.G)();y.current={top:O,left:v},Object(u.y)((()=>{o||(a.current.scrollTop=y.current.top,a.current.scrollLeft=y.current.left)}),[o,E,a]);const M=Object(u.G)(null);return Io({containerRef:M}),r.a.createElement(Do,To({showOverflow:s,isControlled:o,hasHorizontalOverflow:g,hasVerticalOverflow:b,className:c,"data-scroll-container":!0},f),r.a.createElement(Fo,{hasHorizontalOverflow:g,hasVerticalOverflow:b},r.a.createElement(zo,{ref:M},r.a.createElement(Ho,{"aria-label":n,role:"region",ref:a,"data-testid":"fullbleed",background:i,isControlled:o,isBackgroundSelected:d},r.a.createElement(Go,{ref:p,showOverflow:s},m?r.a.createElement(Vo,{ref:t,"data-testid":"safezone"},C):C,l)))))})),Qo={NORMAL:"normal",DANGER:"danger"},Jo=l.f.div.attrs({role:"tablist"}).withConfig({displayName:"styles__Tablist",componentId:"sc-oyok4o-0"})(["background:",";"],(e=>{let{theme:t}=e;return t.colors.bg.primary}));Jo.propTypes={"aria-label":Ue.a.string.isRequired};const ec=Object(l.f)(Jt.a).attrs({as:"h3",size:ot.b.TYPOGRAPHY.PRESET_SIZES.XXX_SMALL}).withConfig({displayName:"styles__PanelText",componentId:"sc-oyok4o-1"})(["transition:background-color 300ms ease-in;"]),tc=l.f.div.withConfig({displayName:"styles__TabButtonWrapper",componentId:"sc-oyok4o-2"})(["position:relative;height:60px;width:100%;padding:5px 4px;&,:hover,:focus-within,.","{background-color:",";}"],Q.a.FOCUS_VISIBLE_SELECTOR,(e=>{let{theme:t}=e;return t.colors.bg.secondary})),Cc=Object(l.f)(b.a).attrs({variant:g.d.PLAIN}).withConfig({displayName:"styles__TabButton",componentId:"sc-oyok4o-3"})(["position:absolute;display:flex;justify-content:space-between;width:calc(100% - 8px);height:calc(100% - 10px);padding:16px;border-radius:0;&,:hover,:focus,.","{background-color:",";}",";","{opacity:0.8;}",";"],Q.a.FOCUS_VISIBLE_SELECTOR,(e=>{let{theme:t}=e;return t.colors.bg.secondary}),(e=>{let{theme:t}=e;return Q.c.focusableOutlineCSS(t.colors.border.focus,t.colors.bg.secondary)}),ec,(e=>{let{status:t}=e;return t===Qo.DANGER&&Object(l.e)(["&,","{color:",";}","{background-color:",";}"],ec,(e=>{let{theme:t}=e;return t.colors.fg.negative}),lc,(e=>{let{theme:t}=e;return t.colors.fg.negative}))})),ac=l.f.div.withConfig({displayName:"styles__PanelWrapper",componentId:"sc-oyok4o-4"})(["width:100%;background:",";&:not(:first-child) > ","{box-shadow:0px -1px 0 0 ",";margin-top:1px;}",";"],(e=>{let{theme:t}=e;return t.colors.bg.primary}),Cc,(e=>{let{theme:t}=e;return t.colors.divider.tertiary}),(e=>{let{isExpanded:t,theme:C}=e;return t&&Object(l.e)(["& ",",& ","{:not(:last-child){box-shadow:none;}",";","{opacity:1;}&,:hover,:focus{background-color:",";}svg{transform:rotate(0);}}","{height:560px;","{visibility:visible;}}"],Cc,tc,Q.c.focusableOutlineCSS,ec,C.colors.bg.primary,ic,oc)})),nc=l.f.div.withConfig({displayName:"styles__ButtonText",componentId:"sc-oyok4o-5"})(["display:flex;align-items:center;justify-content:center;margin-left:-12px;"]),rc=l.f.div.withConfig({displayName:"styles__IconContainer",componentId:"sc-oyok4o-6"})(["height:32px;width:32px;color:",";svg{transform:rotate(-90deg);transition:transform 300ms ease-in-out;}"],(e=>{let{theme:t}=e;return t.colors.fg.primary})),lc=l.f.div.withConfig({displayName:"styles__Badge",componentId:"sc-oyok4o-7"})(["display:flex;align-items:center;justify-content:center;height:20px;width:20px;border-radius:",";background-color:",";","{color:",";line-height:20px;}"],(e=>{let{theme:t}=e;return t.borders.radius.round}),(e=>{let{theme:t}=e;return t.colors.fg.primary}),ec,(e=>{let{theme:t}=e;return t.colors.inverted.fg.primary})),ic=l.f.div.withConfig({displayName:"styles__ScrollableContent",componentId:"sc-oyok4o-8"})(["height:0;max-height:",";overflow-y:",";transition:height 300ms ease-in;"],(e=>{let{maxHeight:t}=e;return t?`calc(${t})`:"none"}),(e=>{let{maxHeight:t}=e;return t?"scroll":"hidden"})),oc=l.f.div.withConfig({displayName:"styles__TabPanel",componentId:"sc-oyok4o-9"})(["padding:0;visibility:hidden;overflow:hidden;background:",";transition:all 300ms ease-in;margin:0 0 16px 16px;",";"],(e=>{let{theme:t}=e;return t.colors.bg.primary}),Q.c.scrollbarCSS);var cc=e=>{let{badgeCount:t=0,children:C,className:a,id:n,isExpanded:l,onClick:i,maxHeight:o,status:c=Qo.NORMAL,title:s}=e;const d=Object(u.C)(Hn.a,[]),p=n||d;return r.a.createElement(ac,{className:a,isExpanded:l},r.a.createElement(tc,null,r.a.createElement(Cc,{"aria-controls":p,"aria-selected":l,onClick:i,role:"tab",status:c},r.a.createElement(nc,null,r.a.createElement(rc,null,r.a.createElement(Te.a.ChevronDownSmall,null)),r.a.createElement(ec,{id:`${s}-${p}`,"aria-label":Object(h.sprintf)(
|
80 |
/* translators: 1: number of issues. 2: type of issue, for example "High Priority". */
|
81 |
+
Object(h._n)("%1$d %2$s issue","%1$d %2$s issues",t,"web-stories"),t,s)},s)),r.a.createElement(lc,null,r.a.createElement(ec,{"aria-hidden":!0},t)))),r.a.createElement(ic,{"aria-hidden":!l,maxHeight:o},r.a.createElement(oc,{id:p,"aria-labelledby":`${s}-${p}`,role:"tabpanel"},C)))},sc=C(81);function dc(){return(dc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const uc=Object(l.f)(b.a).withConfig({displayName:"toggleButton__Button",componentId:"sc-1de7s10-0"})(["height:36px;width:","px;display:inline-block;border:1px solid ",";padding:2px 0;color:",";",""],(e=>{let{isSquare:t}=e;return t?36:58}),(e=>{let{theme:t}=e;return t.colors.border.defaultNormal}),(e=>{let{theme:t}=e;return t.colors.fg.primary}),(e=>{let{isOpen:t,theme:C}=e;return t&&Object(l.e)(["border-color:",";background-color:",";"],C.colors.bg.secondary,C.colors.bg.secondary)})),pc=l.f.div.withConfig({displayName:"toggleButton__Wrapper",componentId:"sc-1de7s10-1"})(["width:100%;height:100%;display:flex;justify-content:space-around;align-items:center;"]),mc=Object(l.f)(cC.a).attrs({as:"span"}).withConfig({displayName:"toggleButton__NotificationCount",componentId:"sc-1de7s10-2"})(["margin:-2px 0 -2px;padding-right:6px;line-height:20px;color:",";"],(e=>{let{theme:t}=e;return t.colors.violet[20]})),fc=Object(u.j)(((e,t)=>{let{isOpen:C=!1,notificationCount:a,MainIcon:n,label:l,shortcut:i,...o}=e;const c=a>0;return r.a.createElement(Br.a,{hasTail:!0,title:l,placement:zC.a.TOP,shortcut:i},r.a.createElement(uc,dc({ref:t,"aria-haspopup":!0,"aria-pressed":C,"aria-expanded":C,isOpen:C,isSquare:!c,type:g.c.TERTIARY,variant:g.d.RECTANGLE,size:g.a.MEDIUM},o),r.a.createElement(pc,null,r.a.createElement(n,null),c&&r.a.createElement(mc,null,a))))}));fc.displayName="ToggleButton";const hc=Object(l.f)(Te.a.Checkbox).withConfig({displayName:"toggle__MainIcon",componentId:"sc-1kcse2p-0"})(["height:32px;width:auto;display:block;"]),bc=Object(l.f)(fc).withConfig({displayName:"toggle__StyledToggleButton",componentId:"sc-1kcse2p-1"})(["display:block;"]);function Toggle(e){let{isOpen:t=!1,popupId:C="",onClick:a=sc.a}=e;const n=Dt(ht.PRIORITY),{checkpoint:l}=Tt((e=>{let{state:{checkpoint:t}}=e;return{checkpoint:t}})),i=Object(u.C)((()=>l===Ot.ALL?n:0),[l,n]);return r.a.createElement(bc,{"aria-owns":C,onClick:a,isOpen:t,MainIcon:hc,label:Object(h.__)("Checklist","web-stories"),"aria-label":i>0?Object(h.sprintf)(
|
82 |
/* translators: %s: number of unaddressed issues. */
|
83 |
+
Object(h._n)("Checklist: %s unaddressed issue","Checklist: %s unaddressed issues",i,"web-stories"),i):Object(h.__)("Checklist","web-stories"),notificationCount:i})}const gc=Object(l.f)(cc).withConfig({displayName:"styles__StyledTablistPanel",componentId:"sc-1rujego-0"})(["height:",";visibility:",";button{display:",";}"],(e=>{let{badgeCount:t}=e;return 0===t?0:"auto"}),(e=>{let{badgeCount:t}=e;return 0===t?"hidden":"visible"}),(e=>{let{badgeCount:t}=e;return 0===t?"none":"auto"})),Ec=Object(l.f)(cC.a).attrs({size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL}).withConfig({displayName:"styles__PanelText",componentId:"sc-1rujego-1"})(["color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.secondary}));function vc(){return lt((e=>{let{state:t}=e;return t.isChecklistMounted}))}function DesignPanel(e){let{badgeCount:t=0,isOpen:C,maxHeight:a,onClick:n,title:l,children:i}=e;return vc()?r.a.createElement(gc,{badgeCount:t,isExpanded:Boolean(t)&&C,onClick:n,maxHeight:a,title:l},r.a.createElement(Ec,null,Object(h.__)("Follow best practices for Web Stories.","web-stories")),i):i}function DesignChecks(e){return r.a.createElement(ChecklistCategoryProvider,{category:ht.DESIGN},r.a.createElement(DesignPanel,e,e.children))}function AccessibilityPanel(e){let{children:t,badgeCount:C,isOpen:a,onClick:n,maxHeight:l,title:i}=e;return vc()?r.a.createElement(gc,{badgeCount:C,isExpanded:Boolean(C)&&a,onClick:n,maxHeight:l,title:i},r.a.createElement(Ec,null,Object(h.__)("Make your Web Story accessible.","web-stories")),t):t}function AccessibilityChecks(e){return r.a.createElement(ChecklistCategoryProvider,{category:ht.ACCESSIBILITY},r.a.createElement(AccessibilityPanel,e,e.children))}function PriorityPanel(e){let{children:t,badgeCount:C=0,isOpen:a,onClick:n,maxHeight:l,title:i}=e;return vc()?r.a.createElement(gc,{badgeCount:C,isExpanded:Boolean(C)&&a,onClick:n,maxHeight:l,status:Qo.DANGER,title:i},r.a.createElement(Ec,null,Object(h.__)("Make this Web Story easier to discover.","web-stories")),t):t}function PriorityChecks(e){const t=Dt(ht.PRIORITY),{updateHighPriorityCount:C}=Tt((e=>{let{actions:{updateHighPriorityCount:t}}=e;return{updateHighPriorityCount:t}}));return Object(u.y)((()=>{C(t)}),[C,t]),r.a.createElement(ChecklistCategoryProvider,{category:ht.PRIORITY},r.a.createElement(PriorityPanel,e,e.children))}const Oc=l.f.div.withConfig({displayName:"emptyContent__Wrapper",componentId:"sc-83zuqv-0"})(["display:grid;grid-template-rows:113px 64px;width:308px;margin:0 auto 32px;& > *{display:flex;align-self:center;justify-self:center;color:",";}p{width:226px;text-align:center;}"],(e=>{let{theme:t}=e;return t.colors.fg.secondary})),yc=l.f.div.withConfig({displayName:"emptyContent__IconContainer",componentId:"sc-83zuqv-1"})(["height:50px;width:50px;"]),EmptyContent=()=>r.a.createElement(Oc,null,r.a.createElement(yc,null,r.a.createElement(Te.a.CheckmarkCircle,null)),r.a.createElement(cC.a,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("You are all set for now. Return to this checklist as you build your Web Story for tips on how to improve it.","web-stories")));var Mc=()=>{const e=Dt(ht.ACCESSIBILITY),t=Dt(ht.DESIGN),C=Dt(ht.PRIORITY),{checkpoint:a}=Tt((e=>{let{state:{checkpoint:t}}=e;return{checkpoint:t}}));return e+t+C===0||a===Ot.UNAVAILABLE?r.a.createElement(EmptyContent,null):null};const wc=l.f.div.withConfig({displayName:"checklist__Wrapper",componentId:"sc-ai4sw8-0"})(["z-index:",";"],ko+1),Lc=Object(l.f)(Qt).withConfig({displayName:"checklist__StyledNavigationWrapper",componentId:"sc-ai4sw8-1"})([""]),_c=Object(u.j)((function ThroughputPopup(e,t){let{isOpen:C,children:a,close:n}=e;const{isChecklistMounted:l,setIsChecklistMounted:i}=lt((e=>{let{state:{isChecklistMounted:t},actions:{setIsChecklistMounted:C}}=e;return{isChecklistMounted:t,setIsChecklistMounted:C}}));return r.a.createElement(Mo,{popupId:mt,isOpen:C,ariaLabel:ft,shouldKeepMounted:!0,onEnter:()=>i(!0),onExited:()=>i(!1)},l?r.a.createElement(Lc,{ref:t,isOpen:C},r.a.createElement(TopNavigation,{onClose:n,label:ft,popupId:mt}),r.a.createElement(Jo,{id:"pre-publish-checklist","data-isexpanded":C,"aria-label":Object(h.__)("Potential Story issues by category","web-stories")},a),r.a.createElement(Mc,null)):a)}));function Checklist(e){let{items:t={}}=e;const{close:C,openPanel:a,toggle:n,isOpen:l,isChecklistMounted:i,setOpenPanel:o}=lt((e=>{let{actions:{close:t,toggle:C,setOpenPanel:a},state:{isOpen:n,isChecklistMounted:r,openPanel:l}}=e;return{close:t,toggle:C,isOpen:n,isChecklistMounted:r,openPanel:l,setOpenPanel:a}})),c=Dt(ht.PRIORITY),s=Dt(ht.DESIGN),d=Dt(ht.ACCESSIBILITY),{checkpoint:p}=Tt((e=>{let{state:{checkpoint:t}}=e;return{checkpoint:t}})),m=Object(u.G)(),f=Object(u.s)((e=>()=>o((t=>t===e?null:e))),[o]);Object(u.y)((()=>{if(i){var e;const t=null===(e=m.current)||void 0===e?void 0:e.querySelector(Bt.a.join(", "));null==t||t.focus()}}),[i]),Object(u.y)((()=>{p&&o(Mt[p])}),[p,o]);const h=yt[p],b=h.includes(ht.PRIORITY)?c:0,g=h.includes(ht.DESIGN)?s:0,E=h.includes(ht.ACCESSIBILITY)?d:0,v=(e=>{if(e)return`100vh - ${48+60*e+92+69}px`})([b,g,E].filter((e=>Boolean(e))).length),{Priority:O,Design:y,Accessibility:M}=t;return r.a.createElement(Ht,null,r.a.createElement(wc,{role:"region","aria-label":ft},r.a.createElement(_c,{ref:m,close:C,isOpen:l},O&&r.a.createElement(PriorityChecks,{badgeCount:b,isOpen:l&&a===ht.PRIORITY,onClick:f(ht.PRIORITY),maxHeight:v,title:bt[ht.PRIORITY]},r.a.createElement(O,null)),y&&r.a.createElement(DesignChecks,{badgeCount:g,isOpen:l&&a===ht.DESIGN,onClick:f(ht.DESIGN),maxHeight:v,title:bt[ht.DESIGN]},r.a.createElement(y,null)),M&&r.a.createElement(AccessibilityChecks,{badgeCount:E,isOpen:l&&a===ht.ACCESSIBILITY,onClick:f(ht.ACCESSIBILITY),maxHeight:v,title:bt[ht.ACCESSIBILITY]},r.a.createElement(M,null))),r.a.createElement(Toggle,{isOpen:l,onClick:n,popupId:mt})))}const jc=Object(l.g)(["50%{background-color:",";}"],Object(LC.c)(Q.b.colors.standard.white,.3)),xc=Object(l.e)(["background-color:",";animation:"," 0.3s ease-in-out 2;"],Object(LC.c)(Q.b.colors.standard.white,0),jc),Zc=Object(l.e)(["",";"],Q.c.focusCSS);var Ac=Object(u.f)({});var Ic=function(e){return Object(u.w)(Ac,null!=e?e:u.k)};const Tc="design",Sc="document";function kc(e,t){var C;return!(null==e||null===(C=e.dataTransfer)||void 0===C||!C.types)&&(Array.isArray(e.dataTransfer.types)?e.dataTransfer.types.includes(t):e.dataTransfer.types.contains(t))}var Rc=Object(u.f)({});const Pc=l.f.div.withConfig({displayName:"dropTarget__DropTargetComponent",componentId:"sc-12rok6t-0"})(["position:relative;width:100%;height:100%;"]),Nc=l.f.div.withConfig({displayName:"dropTarget__Content",componentId:"sc-12rok6t-1"})(["position:relative;width:100%;height:100%;"]),Dc=l.f.div.withConfig({displayName:"dropTarget__Glasspane",componentId:"sc-12rok6t-2"})(["position:absolute;z-index:1000;top:0;left:0;width:100%;height:100%;"]);function Bc(e){e.preventDefault(),e.stopPropagation()}function UploadDropTarget(e){let{disabled:t,label:C,labelledBy:a,onDrop:n,children:l}=e;const[i,o]=Object(u.I)(!1),c=Object(u.s)((e=>{const{dataTransfer:C}=e;(function(e){return kc(e,"Files")})(e)&&(Bc(e),t?C.effectAllowed="none":(C.effectAllowed="copy",o(!0)))}),[t]),s=Object(u.s)((e=>{Bc(e),o(!1)}),[]),d=Object(u.s)((e=>{Bc(e),o(!1),!t&&n&&n([...e.dataTransfer.files])}),[t,n]);return r.a.createElement(Pc,{onDragEnter:c,onDrop:d,onDragOver:Bc},i&&r.a.createElement(Dc,{onDragEnter:c,onDragLeave:s,onDragOver:Bc,onDrop:d,"aria-label":C,"aria-labelledby":a}),r.a.createElement(Rc.Provider,{value:{isDragging:i}},r.a.createElement(Nc,null,l)))}UploadDropTarget.defaultProps={disabled:!1,label:null,labelledBy:null,onDrop:null};var zc=UploadDropTarget;var Fc=function(e){return Object(u.w)(Rc,null!=e?e:u.k)};function Hc(){return(Hc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Gc=l.f.div.withConfig({displayName:"overlay__Overlay",componentId:"sc-u0s4sf-0"})(["position:absolute;z-index:999;top:0;left:0;width:100%;height:100%;background-color:",";"],(e=>{let{theme:t}=e;return Object(LC.c)(t.colors.bg.primary,.6)}));var Vc=Object(u.j)((function UploadDropTargetOverlayWithRef(e,t){const{isDragging:C}=Fc((e=>({isDragging:e.isDragging})));return C?r.a.createElement(Gc,Hc({ref:t},e)):null}));const Uc=Object(l.f)(Vc).withConfig({displayName:"message__Container",componentId:"sc-1cdb29v-0"})(["display:flex;align-items:center;justify-content:center;"]),Wc=l.f.div.withConfig({displayName:"message__Box",componentId:"sc-1cdb29v-1"})(["width:100%;max-width:240px;padding:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;"]),Yc=Object(l.f)(cC.a).withConfig({displayName:"message__Text",componentId:"sc-1cdb29v-2"})(["color:",";margin-bottom:14px;margin-top:0px;"],(e=>{let{theme:t}=e;return t.colors.standard.white})),$c=Object(l.f)(Te.a.ArrowCloud).withConfig({displayName:"message__Icon",componentId:"sc-1cdb29v-3"})(["height:52px;width:52px;color:",";"],(e=>{let{theme:t}=e;return t.colors.standard.white}));var qc=Object(u.m)((function UploadDropTargetMessage(e){let{message:t,...C}=e;const{allowedFileTypes:a}=Object(_.c)();let n=Object(h.__)("No file types are currently supported.","web-stories");return a.length&&(n=Object(h.sprintf)(
|
84 |
/* translators: %s is a list of allowed file extensions. */
|
85 |
+
Object(h.__)("You can upload %s.","web-stories"),Object(h.translateToExclusiveList)(a))),r.a.createElement(Uc,C,r.a.createElement(Wc,null,r.a.createElement($c,null),r.a.createElement(Yc,{isBold:!0,size:ot.b.TYPOGRAPHY.PRESET_SIZES.MEDIUM},t),r.a.createElement(Yc,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},n)))}));var Xc=Object(u.f)({state:{},actions:{}});function Kc(){return(Kc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Qc=999999999,Jc=l.f.section.withConfig({displayName:"panel__Wrapper",componentId:"sc-1vyy7rt-0"})(["display:flex;flex-direction:column;position:relative;border-bottom:1px solid ",";",""],(e=>{let{theme:t}=e;return t.colors.divider.tertiary}),(e=>{let{noBorder:t}=e;return t&&"border-bottom: none;"}));var es=function(e){let{name:t,children:C,resizable:a=!1,showDragHandle:n,showFocusStyles:l,canCollapse:i=!0,collapsedByDefault:o=!0,initialHeight:c=null,maxHeight:s=Qc,ariaLabel:d=null,ariaHidden:p=!1,isPersistable:m=!0,...h}=e;const b=0===s?Qc:s,{selectedElementIds:g}=Object(A.e)((e=>{let{state:{selectedElementIds:t}}=e;return{selectedElementIds:t}})),E=Object(u.C)((()=>m?mn.b.getItemByKey(`${mn.a.PANEL}:${t}`):null),[t,m]),[v,O]=Object(u.I)((()=>{var e;return!!m&&(null!==(e=null==E?void 0:E.isCollapsed)&&void 0!==e?e:o)})),[y,M]=Object(u.I)(Math.min(null==E?void 0:E.expandToHeight,b)||c),[w,L]=Object(u.I)(Math.min(null==E?void 0:E.height,b)||c),[_,j]=Object(u.I)(!1),[x,Z]=Object(u.I)(!1),I=Object(u.s)((e=>{L(Math.min(e,b))}),[b]),T=Object(u.s)((e=>{M(Math.min(e,b))}),[b]),S=Object(u.s)((()=>j(!0)),[]),k=Object(u.s)((()=>{i&&(O(!0),Z(!0),a&&I(0),Object(f.g)("panel_toggled",{name:t,status:"collapsed"}))}),[a,i,t,I]),R=Object(u.s)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];O(!1),Z(!0),e&&a&&I(y),Object(f.g)("panel_toggled",{name:t,status:"expanded"})}),[a,y,t,I]);Object(u.y)((()=>{m||R(!0)}),[R,m,g]),Object(u.y)((()=>{a&&w<=10&&!v&&k()}),[k,w,a,v]),Object(u.y)((()=>{x||E||!a||(I(c),T(c))}),[x,c,a,E,t,T,I]),Object(u.y)((()=>{b<w&&I(b),b<y&&T(b)}),[y,w,b,I,T]),Object(u.y)((()=>{m&&x&&mn.b.setItemByKey(`${mn.a.PANEL}:${t}`,{height:w,isCollapsed:v,expandToHeight:y})}),[t,v,w,y,x,m]);const P=Object(u.s)((e=>{a&&(Z(!0),I(Math.min(e(w),b)),v&&e(w)>10&&R(!1))}),[R,w,v,b,a,I,Z]),N=Object(u.s)((()=>{Z(!1),v&&R(!0)}),[R,v]),D=`panel-${t}-${Object(Hn.a)()}`,B=`panel-title-${t}-${Object(Hn.a)()}`,z={state:{height:w,resizable:a,showDragHandle:n,showFocusStyles:l,isCollapsed:v,panelContentId:D,panelTitleId:B,panelTitleReadable:`panel-title-${t}`,ariaHidden:p},actions:{setHeight:P,setExpandToHeight:T,collapse:k,expand:R,resetHeight:N,confirmTitle:S}},F=Xc.Provider,H=Object(u.C)((()=>_?{"aria-labelledby":B}:{"aria-label":d}),[_,B,d]);return r.a.createElement(Jc,Kc({},H,{"aria-hidden":p},h),r.a.createElement(F,{value:z},C))},ts=C(774);var Cs=function(e,t,C){const a=Object(u.G)(),[n,r]=Object(u.I)(!1),l=Object(u.s)((e=>{const C=a.current-e.pageY;t(C),a.current=e.pageY}),[t]),i=Object(u.s)((e=>{e.target.releasePointerCapture(e.pointerId),r(!1),C()}),[C]),o=Object(u.s)((e=>{e.target.setPointerCapture(e.pointerId),a.current=e.pageY,r(!0)}),[]);Object(u.B)((()=>{const t=e.current;return t.addEventListener("pointerdown",o),n&&(t.addEventListener("pointermove",l),t.addEventListener("pointerup",i)),()=>{t.removeEventListener("pointerdown",o),n&&(t.removeEventListener("pointermove",l),t.removeEventListener("pointerup",i))}}),[n,i,l,o,e])};var as=function(e,t){Object(ye.i)(e,"up",(()=>t(20)),[t]),Object(ye.i)(e,"down",(()=>t(-20)),[t])};function ns(){return(ns=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const rs=l.f.div.withConfig({displayName:"handle__Handle",componentId:"sc-ffqbiq-0"})(["border:0;padding:0;height:","px;display:flex;flex-direction:column;justify-content:center;align-items:center;cursor:row-resize;user-select:none;position:absolute;",";",";left:0;right:0;width:100%;",";"],8,(e=>{let{$position:t}=e;return"top"===t&&"top: 0"}),(e=>{let{$position:t}=e;return"bottom"===t&&"bottom: 0"}),(e=>{let{$showFocusStyles:t}=e;return t&&Object(l.e)(["border-bottom:1px solid transparent;&:focus{border-color:",";}"],(e=>{let{theme:t}=e;return t.colors.border.focus}))})),ls=l.f.div.withConfig({displayName:"handle__DragBar",componentId:"sc-ffqbiq-1"})(["position:absolute;width:35px;height:3px;top:","px;background:",";border-radius:",";cursor:inherit;"],4,(e=>{let{theme:t}=e;return t.colors.bg.quaternary}),(e=>{let{theme:t}=e;return t.borders.radius.small}));function DragHandle(e){let{height:t,minHeight:C,maxHeight:a,handleHeightChange:n,handleExpandToHeightChange:l,handleDoubleClick:i,position:o,showDragHandle:c,showFocusStyles:s=!0,...d}=e;const p=Object(u.G)();return Cs(p,n,l),as(p,n),r.a.createElement(rs,ns({ref:p,onClick:e=>e.stopPropagation(),onDoubleClick:i,tabIndex:0,$position:o,role:"slider","aria-orientation":"vertical","aria-valuenow":t,"aria-valuemin":C,"aria-valuemax":a,"aria-label":Object(h.__)("Set panel height","web-stories"),$showFocusStyles:s},d),c&&r.a.createElement(ls,null))}DragHandle.defaultProps={position:"top"};var is=DragHandle;function os(){return(os=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const cs=Object(l.f)(Jt.a).attrs({as:"h2"}).withConfig({displayName:"title__Header",componentId:"sc-1tphhj5-0"})(["color:",";background-color:",";"," margin:0;position:relative;display:flex;flex-direction:row;user-select:none;align-items:center;justify-content:space-between;padding:",";"],(e=>{let{theme:t}=e;return t.colors.fg.secondary}),(e=>{let{isSecondary:t,theme:C}=e;return t&&C.colors.interactiveBg.secondaryNormal}),(e=>{let{hasResizeHandle:t}=e;return t&&"padding-top: 0;"}),(e=>{let{isCollapsed:t}=e;return t?"14px 16px":"14px 16px 6px 16px"})),ss=l.f.span.withConfig({displayName:"title__Heading",componentId:"sc-1tphhj5-1"})(["color:",";display:flex;align-items:space-between;",";"],(e=>{let{theme:t,isCollapsed:C}=e;return C?t.colors.fg.secondary:t.colors.fg.primary}),(e=>{let{theme:t}=e;return Q.c.expandPresetStyles({preset:t.typography.presets.headline[ot.b.TYPOGRAPHY.PRESET_SIZES.XX_SMALL],theme:t})})),ds=Object(l.f)(ts.b).withConfig({displayName:"title__StyledNotificationBubble",componentId:"sc-1tphhj5-2"})(["margin-left:12px;"]),us=l.f.div.withConfig({displayName:"title__HeaderActions",componentId:"sc-1tphhj5-3"})(["display:flex;align-items:center;"]),ps=l.f.div.withConfig({displayName:"title__IconWrapper",componentId:"sc-1tphhj5-4"})(["position:relative;width:32px;height:32px;svg{position:relative;z-index:1;}"]),ms=l.f.button.withConfig({displayName:"title__Collapse",componentId:"sc-1tphhj5-5"})(["border:none;border-radius:",";background:transparent;color:",";height:32px;display:flex;padding:0 4px 0 0;align-items:center;justify-content:flex-start;cursor:pointer;margin-left:-12px;transition:",";&:hover,&.",",&[","]{color:",";}",";svg{width:32px;height:32px;",";}:hover ",":after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);height:16px;width:16px;border-radius:",";background:",";}"],(e=>{let{theme:t}=e;return t.borders.radius.small}),(e=>{let{theme:t,isCollapsed:C}=e;return C?t.colors.fg.secondary:t.colors.fg.primary}),g.b,Q.a.FOCUS_VISIBLE_SELECTOR,Q.a.FOCUS_VISIBLE_DATA_ATTRIBUTE,(e=>{let{theme:t}=e;return t.colors.fg.primary}),eC,(e=>{let{$isCollapsed:t,theme:C}=e;return t&&Object(l.e)(["color:",";transform:rotate(-90deg);"],C.colors.fg.secondary)}),ps,(e=>{let{theme:t}=e;return t.borders.radius.round}),(e=>{let{theme:t}=e;return t.colors.bg.quaternary}));function fs(e){let{children:t,isCollapsed:C,toggle:a,...n}=e;return r.a.createElement(ms,os({onClick:e=>{e.stopPropagation(),a()},$isCollapsed:C},n),t)}function Title(e){let{ariaLabel:t,children:C,isPrimary:a,isSecondary:n,secondaryAction:l,isResizable:i,canCollapse:o,maxHeight:c,count:s,...d}=e;const{state:{isCollapsed:p,height:m,resizable:f,showDragHandle:h,showFocusStyles:b,panelContentId:g,panelTitleId:E,ariaHidden:v},actions:{collapse:O,expand:y,setHeight:M,setExpandToHeight:w,resetHeight:L,confirmTitle:_}}=Object(u.u)(Xc),{state:{inspectorContentHeight:j}}=lr();Object(u.y)(_,[_]);const x=c||Math.round(.7*j),Z=Object(u.s)((e=>f?M((t=>Math.max(0,Math.min(x,t+e)))):null),[f,M,x]),A=Object(u.s)((()=>{f&&m>=10&&w(m)}),[w,m,f]),I=p?y:O,T=0===s||Boolean(s);return r.a.createElement(cs,os({isPrimary:a,isSecondary:n,hasResizeHandle:i&&!p,isCollapsed:p},d),i&&r.a.createElement(is,{height:m,minHeight:0,maxHeight:x,handleHeightChange:Z,handleExpandToHeightChange:A,handleDoubleClick:L,tabIndex:v?-1:0,showDragHandle:h,showFocusStyles:b}),r.a.createElement(fs,{toggle:I,disabled:!o,tabIndex:v?-1:0,"aria-label":t,"aria-expanded":!p,"aria-controls":g,isCollapsed:p},r.a.createElement(ps,null,o&&r.a.createElement(Te.a.ChevronDownSmall,null)),r.a.createElement(ss,{isCollapsed:p,id:E,size:ot.b.TYPOGRAPHY.PRESET_SIZES.XX_SMALL},C),T&&r.a.createElement(ds,{"data-testid":"panel-badge",notificationCount:s,variant:ts.a.PRIMARY,"aria-hidden":!0})),l&&r.a.createElement(us,null,l))}Title.defaultProps={isPrimary:!1,isSecondary:!1,isResizable:!1,canCollapse:!0};var hs=Title;function bs(){return(bs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const gs=l.f.div.withConfig({displayName:"content__Container",componentId:"sc-1juzn5p-0"})(["padding:",";overflow:auto;background-color:",";"],(e=>{let{padding:t}=e;return t||"8px 12px 8px"}),(e=>{let{isSecondary:t,theme:C}=e;return t?C.colors.interactiveBg.secondaryNormal:"transparent"}));function Es(e){let{children:t,...C}=e;const{state:{isCollapsed:a,height:n,resizable:l,panelContentId:i}}=Object(u.u)(Xc),o={height:l?`${n}px`:"auto"};return a?null:r.a.createElement(gs,bs({style:o},C,{id:i}),t)}Es.defaultProps={isPrimary:!1};var vs=Es;function Os(){return(Os=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var ys=function SimplePanel(e){let{children:t,name:C,ariaLabel:a,title:n,className:l,...i}=e;return r.a.createElement(es,Os({name:C},i),r.a.createElement(hs,{ariaLabel:null!=a?a:"string"==typeof n?n:""},n),r.a.createElement(vs,{className:l},t))};function Ms(){return(Ms=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const ws=Object(l.f)(b.a).withConfig({displayName:"directionRadioInput__StyledButton",componentId:"sc-1g0wivz-0"})(["z-index:0;width:28px;height:28px;"," svg{transform-origin:50% 50%;transform:",";}"],(e=>{let{selected:t,disabled:C,theme:a}=e;return t&&!C&&Object(l.e)(["background-color:",";"],a.colors.interactiveBg.secondaryPress)}),(e=>{let{direction:t}=e;switch(t){case ae.g.RIGHT_TO_LEFT:return"rotate(270deg)";case ae.g.TOP_TO_BOTTOM:return"rotate(180deg)";case ae.g.LEFT_TO_RIGHT:return"rotate(90deg)";case ae.i.COUNTER_CLOCKWISE:return"rotateX(180deg) rotateZ(90deg)";case ae.j.SCALE_OUT_BOTTOM_LEFT:return"rotate(-135deg)";case ae.j.SCALE_IN_TOP_LEFT:return"rotate(135deg)";case ae.j.SCALE_OUT_TOP_RIGHT:return"rotate(-315deg)";case ae.j.SCALE_IN_BOTTOM_RIGHT:return"rotate(315deg)";default:return"rotate(0deg)"}})),Ls=Object(l.f)((e=>{let{className:t,direction:C,...a}=e;return r.a.createElement(ws,Ms({variant:g.d.SQUARE,type:g.c.TERTIARY,size:g.a.SMALL,className:t,direction:C},a),[...Object.values(ae.g),...Object.values(ae.j)].includes(C)&&r.a.createElement(Te.a.ArrowUp,null))})).withConfig({displayName:"directionRadioInput__DirectionIndicator",componentId:"sc-1g0wivz-1"})([""]),_s=l.f.fieldset.withConfig({displayName:"directionRadioInput__Fieldset",componentId:"sc-1g0wivz-2"})(["position:relative;height:91px;width:88px;margin-top:1px;border-right:1px solid ",";"],(e=>{let{theme:t}=e;return t.colors.border.defaultNormal})),js=l.f.div.withConfig({displayName:"directionRadioInput__Figure",componentId:"sc-1g0wivz-3"})(["position:absolute;top:50%;left:50%;width:8px;height:8px;background-color:",";border-radius:2px;transform:translate(-50%,-50%);"],(e=>{let{theme:t}=e;return t.colors.fg.primary})),xs=l.f.label.withConfig({displayName:"directionRadioInput__Label",componentId:"sc-1g0wivz-4"})(["position:absolute;cursor:",";",""],(e=>{let{disabled:t}=e;return t?"default":"pointer"}),(e=>{let{direction:t}=e;switch(t){case ae.g.RIGHT_TO_LEFT:return Object(l.e)(["top:50%;right:","px;transform:translateY(-50%);"],3);case ae.g.TOP_TO_BOTTOM:return Object(l.e)(["top:","px;left:50%;transform:translateX(-50%);"],3);case ae.g.LEFT_TO_RIGHT:return Object(l.e)(["top:50%;left:","px;transform:translateY(-50%);"],3);case ae.i.COUNTER_CLOCKWISE:return Object(l.e)(["bottom:","px;right:","px;transform:translate(-10%,-10%);"],3,3);case ae.j.SCALE_OUT_BOTTOM_LEFT:return Object(l.e)(["bottom:","px;left:","px;"],3,3);case ae.j.SCALE_IN_TOP_LEFT:return Object(l.e)(["top:","px;left:","px;"],3,3);case ae.j.SCALE_OUT_TOP_RIGHT:return Object(l.e)(["top:","px;right:","px;"],3,3);case ae.j.SCALE_IN_BOTTOM_RIGHT:return Object(l.e)(["bottom:","px;right:","px;"],3,3);default:return Object(l.e)(["bottom:","px;left:50%;transform:translateX(-50%);"],3)}})),Zs=l.f.legend.withConfig({displayName:"directionRadioInput__HiddenLegend",componentId:"sc-1g0wivz-5"})(["position:absolute;opacity:0;clip-path:polygon(0 0);cursor:pointer;"]),As=l.f.div.withConfig({displayName:"directionRadioInput__RadioGroup",componentId:"sc-1g0wivz-6"})(["position:absolute;top:0;right:0;bottom:0;left:0;"]),Is={[ae.g.RIGHT_TO_LEFT]:Object(h._x)("right to left","animation direction","web-stories"),[ae.g.LEFT_TO_RIGHT]:Object(h._x)("left to right","animation direction","web-stories"),[ae.g.TOP_TO_BOTTOM]:Object(h._x)("top to bottom","animation direction","web-stories"),[ae.g.BOTTOM_TO_TOP]:Object(h._x)("bottom to top","animation direction","web-stories"),[ae.i.CLOCKWISE]:Object(h._x)("clockwise","rotation direction","web-stories"),[ae.i.COUNTER_CLOCKWISE]:Object(h._x)("counterclockwise","rotation direction","web-stories"),[ae.j.SCALE_IN]:Object(h._x)("scale in","scale direction","web-stories"),[ae.j.SCALE_OUT]:Object(h._x)("scale out","scale direction","web-stories")},Ts=e=>{switch(e){case ae.j.SCALE_IN_TOP_LEFT:case ae.j.SCALE_IN_BOTTOM_RIGHT:return ae.j.SCALE_IN;case ae.j.SCALE_OUT_BOTTOM_LEFT:case ae.j.SCALE_OUT_TOP_RIGHT:return ae.j.SCALE_OUT;default:return e}},Ss=e=>[...ae.k.SCALE_IN,...ae.k.SCALE_OUT].includes(e),ks=function(){var e,t;let C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(null==C||null===(e=C.replace(/([a-z])([A-Z])/g,"$1 $2"))||void 0===e||null===(t=e.toLocaleLowerCase())||void 0===t?void 0:t.split(" "))||[]},Rs=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return null===(e=ks(t))||void 0===e?void 0:e[0]},Ps=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=ks(e);return t[t.length-1]},Ns=[ae.g.TOP_TO_BOTTOM,ae.g.RIGHT_TO_LEFT,ae.g.BOTTOM_TO_TOP,ae.g.LEFT_TO_RIGHT],Ds=[ae.j.SCALE_IN_TOP_LEFT,ae.j.SCALE_OUT_TOP_RIGHT,ae.j.SCALE_IN_BOTTOM_RIGHT,ae.j.SCALE_OUT_BOTTOM_LEFT],Bs=(e,t,C)=>{const a=C?t.reverse():t;return e.sort(((e,t)=>a.indexOf(e)-a.indexOf(t)))},DirectionRadioInput=e=>{let{value:t,directions:C=[],onChange:a,disabled:n=[],tooltip:l}=e;const i=Object(u.G)(),{isRTL:o}=Object(_.c)(),c=Object(u.C)((()=>{const e=[];if(C.includes(ae.j.SCALE_OUT)||C.includes(ae.j.SCALE_IN)){const t=[];C.includes(ae.j.SCALE_OUT)&&t.push(...ae.k.SCALE_OUT),C.includes(ae.j.SCALE_IN)&&t.push(...ae.k.SCALE_IN),e.push(...Bs(t,Ds,o))}else e.push(...Bs(C,Ns,o));return e}),[C,o]);return Zi(i),r.a.createElement(_s,null,r.a.createElement(js,null),r.a.createElement(Zs,null,Object(h.__)("Which Direction?","web-stories")),r.a.createElement(As,{ref:i},c.map((e=>{const C=null==n?void 0:n.includes(Ts(e));return r.a.createElement(xs,{key:e,"aria-label":Is[e],htmlFor:e,direction:e,disabled:C},r.a.createElement(Br.a,{title:C?l:"",placement:Ss(e)?Ps(e):Rs(e)},r.a.createElement(Ls,{direction:e,selected:t===e||(null==e?void 0:e.includes(t)),disabled:C,onClick:()=>a(Ts(e))})))}))))},zs=Object(l.e)(["border-radius:0;border-color:"," transparent transparent transparent;"],(e=>{let{theme:t}=e;return t.colors.border.defaultNormal})),Fs=Object(l.f)(NumericInput).withConfig({displayName:"effectInput__StyledInput",componentId:"sc-1gnssiy-0"})(["height:","px;div{height:calc(100% + 1px);"," &:focus-within{border-radius:",";}}"],45,zs,(e=>{let{theme:t}=e;return t.borders.radius.small})),Hs=Object(l.f)(ki.a).withConfig({displayName:"effectInput__StyledDropDown",componentId:"sc-1gnssiy-1"})(["button{height:46px;"," &:hover{","}&.",",&[","]{border-radius:",";}}"],zs,zs,Q.a.FOCUS_VISIBLE_SELECTOR,Q.a.FOCUS_VISIBLE_DATA_ATTRIBUTE,(e=>{let{theme:t}=e;return t.borders.radius.small}));var Gs=function EffectInput(e){var t;let{effectProps:C,effectConfig:a,field:n,onChange:l,disabledOptions:i,tooltip:o}=e;const c=Object(u.s)((e=>l(e,!0)),[l]),s=null!==(t=a[n])&&void 0!==t?t:C[n].defaultValue,d=C[n].type===ae.h.FLOAT;switch(C[n].type){case ae.h.DROPDOWN:return r.a.createElement(Hs,{options:(C[n].values||[]).map((e=>{let{name:t,...C}=e;return{...C,label:t,disabled:i.includes(C.value)}})),placeholder:Object(h.__)("Select a value","web-stories"),ariaLabel:Object(h.__)("Select effect value","web-stories"),isKeepMenuOpenOnSelection:!1,selectedValue:s,onMenuItemClick:e=>l(e.target.value,!0)});case ae.h.DIRECTION_PICKER:return r.a.createElement(DirectionRadioInput,{value:s,directions:C[n].values,onChange:c,disabled:i,tooltip:o});default:return r.a.createElement(Fs,{"aria-label":C[n].label,suffix:C[n].label,unit:C[n].unit,value:s,min:0,onChange:e=>l(d?parseFloat(e.target.value):parseInt(e.target.value),!0),isFloat:d,containerStyleOverride:tC})}};function Vs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(!e.zoomDirection||!e.panDir)&&(e.zoomDirection?e.zoomDirection:e.scaleDirection?e.scaleDirection:e.flyInDir?e.flyInDir:e.rotateInDir?e.rotateInDir:e.whooshInDir?e.whooshInDir:!!e.panDir&&e.panDir)}const Us=l.f.div.withConfig({displayName:"effectPanel__AnimationGrid",componentId:"sc-s89nzp-0"})(["display:grid;grid-template-columns:auto auto;"]),Ws=l.f.div.withConfig({displayName:"effectPanel__AnimationGridField",componentId:"sc-s89nzp-1"})((e=>{let{isRotationComponent:t,isHalfWidthField:C}=e;return[{gridColumn:"1/3"},t&&{gridRow:"1/3",gridColumn:"auto"},C&&{gridColumn:"auto"}]}));var Ys=function EffectPanel(e){let{animation:{id:t,type:C,...a},onChange:n,disabledTypeOptionsMap:l}=e;const{props:i}=Object(ae.p)(C),o=Object(u.s)(((e,r)=>{n({id:t,type:C,...a,...e},r)}),[t,C,a,n]),c=Object(u.C)((()=>Object.keys(i).reduce(((e,t)=>i[t].type===ae.h.DIRECTION_PICKER||i[t].type===ae.h.ROTATION_PICKER||e),!1)),[i]),s=Object.keys(i).map(((e,t)=>{var n,s;return r.a.createElement(Ws,{key:e,isRotationComponent:c&&0===t,isHalfWidthField:c&&(1===t||2===t)},r.a.createElement(Gs,{effectProps:i,effectConfig:a,field:e,onChange:(t,C)=>o({[e]:t},C),disabledOptions:(null===(n=l[C])||void 0===n?void 0:n.options)||[],tooltip:null===(s=l[C])||void 0===s?void 0:s.tooltip}))}));return r.a.createElement(Us,null,s)};const $s=l.f.div.withConfig({displayName:"effectChooserElements__BaseAnimationCell",componentId:"sc-13qk6mh-0"})(["display:none;transform-origin:50% 50%;"]),qs=Object(l.g)(["0%{transform:translateY(-100%);animation-timing-function:cubic-bezier(.75,.05,.86,.08);}15%{transform:translateY(0%);animation-timing-function:cubic-bezier(.22,.61,.35,1);}26%{transform:translateY(-62%);animation-timing-function:cubic-bezier(.75,.05,.86,.08);}37%{transform:translateY(-0%);animation-timing-function:cubic-bezier(.22,.61,.35,1);}41.5%{transform:translateY(-30%);animation-timing-function:cubic-bezier(.75,.05,.86,.08);}50%,100%{transform:translateY(0%);animation-timing-function:cubic-bezier(.22,.61,.35,1);}"]),Xs=Object(l.f)($s).withConfig({displayName:"effectChooserElements__DropAnimation",componentId:"sc-13qk6mh-1"})(["animation:"," 3.2s linear infinite;"],qs),Ks=Object(l.g)(["0%{opacity:0;}50%,100%{opacity:1;}"]),Qs=Object(l.f)($s).withConfig({displayName:"effectChooserElements__FadeInAnimation",componentId:"sc-13qk6mh-2"})(["animation:"," 2.5s linear infinite;"],Ks),Js=Object(l.g)(["0%{transform:translateX(-100%);}50%,100%{transform:translateX(0%);}"]),ed=Object(l.f)($s).withConfig({displayName:"effectChooserElements__FlyInLeftAnimation",componentId:"sc-13qk6mh-3"})(["animation:"," 2s linear infinite;"],Js),td=Object(l.g)(["0%{transform:translateX(100%);}50%,100%{transform:translateX(0%);}"]),Cd=Object(l.f)($s).withConfig({displayName:"effectChooserElements__FlyInRightAnimation",componentId:"sc-13qk6mh-4"})(["animation:"," 2s linear infinite;"],td),ad=Object(l.g)(["0%{transform:translateY(-100%);}50%,100%{transform:translateY(0%);}"]),nd=Object(l.f)($s).withConfig({displayName:"effectChooserElements__FlyInTopAnimation",componentId:"sc-13qk6mh-5"})(["animation:"," 2s linear infinite;"],ad),rd=Object(l.g)(["0%{transform:translateY(100%);}50%,100%{transform:translateY(0%);}"]),ld=Object(l.f)($s).withConfig({displayName:"effectChooserElements__FlyInBottomAnimation",componentId:"sc-13qk6mh-6"})(["animation:"," 2s linear infinite;"],rd),id=Object(l.g)(["0%{transform:scale(1);}12.5%{transform:scale(0.75);}37.5%{transform:scale(1.25);}50%,100%{transform:scale(1);}"]),od=Object(l.f)($s).withConfig({displayName:"effectChooserElements__PulseAnimation",componentId:"sc-13qk6mh-7"})(["animation:"," 2s cubic-bezier(0.4,0,0.2,1) infinite;"],id),cd=Object(l.g)(["0%{transform:translateX(-100%) rotate(-360deg);}50%,100%{transform:translateX(0%);}"]),sd=Object(l.f)($s).withConfig({displayName:"effectChooserElements__RotateInLeftAnimation",componentId:"sc-13qk6mh-8"})(["animation:"," 2s linear infinite;"],cd),dd=Object(l.g)(["0%{transform:translateX(100%) rotate(360deg);}50%,100%{transform:translateX(0%);}"]),ud=Object(l.f)($s).withConfig({displayName:"effectChooserElements__RotateInRightAnimation",componentId:"sc-13qk6mh-9"})(["animation:"," 2s linear infinite;"],dd),pd=Object(l.g)(["0%{transform:rotate(-540deg) scale(0.1);opacity:0;}50%,100%{transform:none;opacity:1;}"]),md=Object(l.f)($s).withConfig({displayName:"effectChooserElements__TwirlInAnimation",componentId:"sc-13qk6mh-10"})(["animation:"," 2s cubic-bezier(0.2,0.75,0.4,1) infinite;"],pd),fd=Object(l.g)(["0%{transform:translateX(-100%);opacity:0;}50%,100%{transform:translateX(0%);opacity:1;}"]),hd=Object(l.f)($s).withConfig({displayName:"effectChooserElements__WhooshInLeftAnimation",componentId:"sc-13qk6mh-11"})(["animation:"," 2s cubic-bezier(0,0,0.2,1) infinite;"],fd),bd=Object(l.g)(["0%{transform:translateX(100%);opacity:0;}50%,100%{transform:translateX(0%);opacity:1;}"]),gd=Object(l.f)($s).withConfig({displayName:"effectChooserElements__WhooshInRightAnimation",componentId:"sc-13qk6mh-12"})(["animation:"," 2s cubic-bezier(0,0,0.2,1) infinite;"],bd),Ed=Object(l.g)(["0%{transform:translateX(-100%) scale(1.5);}50%,100%{transform:translateX(200%) scale(1.5);}"]),vd=Object(l.f)($s).withConfig({displayName:"effectChooserElements__PanLeftAnimation",componentId:"sc-13qk6mh-13"})(["animation:"," 3s linear infinite;"],Ed),Od=Object(l.g)(["0%{transform:translateX(100%) scale(1.5);}50%,100%{transform:translateX(-200%) scale(1.5);}"]),yd=Object(l.f)($s).withConfig({displayName:"effectChooserElements__PanRightAnimation",componentId:"sc-13qk6mh-14"})(["animation:"," 3s linear infinite;"],Od),Md=Object(l.g)(["0%{transform:translateY(-100%) scale(1.5);}50%,100%{transform:translateY(200%) scale(1.5);}"]),wd=Object(l.f)($s).withConfig({displayName:"effectChooserElements__PanTopAnimation",componentId:"sc-13qk6mh-15"})(["animation:"," 3s linear infinite;"],Md),Ld=Object(l.g)(["0%{transform:translateY(100%) scale(1.5);}50%,100%{transform:translateY(-200%) scale(1.5);}"]),_d=Object(l.f)($s).withConfig({displayName:"effectChooserElements__PanBottomAnimation",componentId:"sc-13qk6mh-16"})(["animation:"," 3s linear infinite;"],Ld),jd=Object(l.g)(["0%{opacity:0;transform:scale(0);}50%,100%{opacity:1;transform:scale(1);}"]),xd=Object(l.f)($s).withConfig({displayName:"effectChooserElements__ZoomInAnimation",componentId:"sc-13qk6mh-17"})(["animation:"," 2s linear infinite;"],jd),Zd=Object(l.g)(["0%{opacity:0;transform:scale(2);}50%,100%{opacity:1;transform:scale(1);}"]),Ad=Object(l.f)($s).withConfig({displayName:"effectChooserElements__ZoomOutAnimation",componentId:"sc-13qk6mh-18"})(["animation:"," 2s linear infinite;"],Zd),Id=Object(l.g)(["0%{opacity:0;transform:translate3d(-50%,0,0) scale(2);}50%,100%{opacity:1;transform:none;}"]),Td=Object(l.f)($s).withConfig({displayName:"effectChooserElements__PanAndZoomAnimation",componentId:"sc-13qk6mh-19"})(["animation:"," 2s linear infinite;"],Id),Sd=(e,t)=>Dd.includes(e)?e:t?`${e} ${t}`.trim():e,kd="none",Rd="dynamicPropertyValue",Pd={HALF:"half",QUARTER:"quarter"},Nd=[],Dd=[ae.d.PAN_AND_ZOOM.value],Bd={NO_ANIMATION:{value:kd,label:Object(h._x)("None","animation effect","web-stories")},[Sd(ae.d.PAN.value,ae.g.LEFT_TO_RIGHT)]:{value:Sd(ae.d.PAN.value,ae.g.LEFT_TO_RIGHT),label:Object(h._x)("Pan Left","animation effect","web-stories"),animation:{ariaLabel:Object(h.sprintf)(
|
86 |
/* translators: %s: animation effect. */
|
87 |
+
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Pan Left","animation effect","web-stories")),value:ae.d.PAN.value,panDirection:ae.g.LEFT_TO_RIGHT,gridSpace:Pd.QUARTER,Effect:vd,size:16}},[Sd(ae.d.PAN.value,ae.g.RIGHT_TO_LEFT)]:{value:Sd(ae.d.PAN.value,ae.g.RIGHT_TO_LEFT),label:Object(h._x)("Pan Right","animation effect","web-stories"),animation:{ariaLabel:Object(h.sprintf)(
|
88 |
/* translators: %s: animation effect. */
|
89 |
+
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Pan Right","animation effect","web-stories")),value:ae.d.PAN.value,panDirection:ae.g.RIGHT_TO_LEFT,gridSpace:Pd.QUARTER,Effect:yd,size:16}},[Sd(ae.d.PAN.value,ae.g.BOTTOM_TO_TOP)]:{value:Sd(ae.d.PAN.value,ae.g.BOTTOM_TO_TOP),label:Object(h._x)("Pan Up","animation effect","web-stories"),animation:{ariaLabel:Object(h.sprintf)(
|
90 |
/* translators: %s: animation effect. */
|
91 |
+
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Pan Up","animation effect","web-stories")),value:ae.d.PAN.value,panDirection:ae.g.BOTTOM_TO_TOP,gridSpace:Pd.QUARTER,Effect:_d,size:16}},[Sd(ae.d.PAN.value,ae.g.TOP_TO_BOTTOM)]:{value:Sd(ae.d.PAN.value,ae.g.TOP_TO_BOTTOM),label:Object(h._x)("Pan Down","animation effect","web-stories"),animation:{ariaLabel:Object(h.sprintf)(
|
92 |
/* translators: %s: animation effect. */
|
93 |
+
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Pan Down","animation effect","web-stories")),value:ae.d.PAN.value,panDirection:ae.g.TOP_TO_BOTTOM,gridSpace:Pd.QUARTER,Effect:wd,size:16}},[Sd(ae.d.ZOOM.value,ae.j.SCALE_IN)]:{value:Sd(ae.d.ZOOM.value,ae.j.SCALE_IN),label:Object(h._x)("Zoom In","animation effect","web-stories"),animation:{ariaLabel:Object(h.sprintf)(
|
94 |
/* translators: %s: animation effect. */
|
95 |
+
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Zoom In","animation effect","web-stories")),value:ae.d.ZOOM.value,zoomDirection:ae.j.SCALE_IN,gridSpace:Pd.HALF,Effect:xd,size:14}},[Sd(ae.d.ZOOM.value,ae.j.SCALE_OUT)]:{value:Sd(ae.d.ZOOM.value,ae.j.SCALE_OUT),label:Object(h._x)("Zoom Out","animation effect","web-stories"),animation:{ariaLabel:Object(h.sprintf)(
|
96 |
/* translators: %s: animation effect. */
|
97 |
+
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Zoom Out","animation effect","web-stories")),value:ae.d.ZOOM.value,zoomDirection:ae.j.SCALE_OUT,gridSpace:Pd.HALF,Effect:Ad,size:20}},[ae.d.PAN_AND_ZOOM.value]:{value:ae.d.PAN_AND_ZOOM.value,label:ae.d.PAN_AND_ZOOM.name,animation:{ariaLabel:Object(h.sprintf)(
|
98 |
/* translators: %s: animation effect. */
|
99 |
+
Object(h.__)('"%s" Effect',"web-stories"),ae.d.PAN_AND_ZOOM.name),value:ae.d.PAN_AND_ZOOM.value,zoomDirection:Rd,Effect:Td,size:26}}},zd={NO_ANIMATION:{value:kd,label:Object(h._x)("None","animation effect","web-stories")},[ae.a.DROP.value]:{value:ae.a.DROP.value,label:ae.a.DROP.name,animation:{ariaLabel:Object(h.sprintf)(
|
100 |
/* translators: %s: animation effect. */
|
101 |
+
Object(h.__)('"%s" Effect',"web-stories"),ae.a.DROP.name),value:ae.a.DROP.value,Effect:Xs}},[ae.a.FADE_IN.value]:{value:ae.a.FADE_IN.value,label:ae.a.FADE_IN.name,animation:{ariaLabel:Object(h.sprintf)(
|
102 |
/* translators: %s: animation effect. */
|
103 |
+
Object(h.__)('"%s" Effect',"web-stories"),ae.a.FADE_IN.name),value:ae.a.FADE_IN.value,Effect:Qs}},[Sd(ae.a.FLY_IN.value,ae.g.LEFT_TO_RIGHT)]:{value:Sd(ae.a.FLY_IN.value,ae.g.LEFT_TO_RIGHT),label:ae.a.FLY_IN.name,animation:{ariaLabel:Object(h.sprintf)(
|
104 |
/* translators: %s: animation effect. */
|
105 |
+
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Fly In from Left","animation effect","web-stories")),value:ae.a.FLY_IN.value,flyInDirection:ae.g.LEFT_TO_RIGHT,gridSpace:Pd.QUARTER,Effect:ed,size:16}},[Sd(ae.a.FLY_IN.value,ae.g.TOP_TO_BOTTOM)]:{value:Sd(ae.a.FLY_IN.value,ae.g.TOP_TO_BOTTOM),label:ae.a.FLY_IN.name,animation:{ariaLabel:Object(h.sprintf)(
|
106 |
/* translators: %s: animation effect. */
|
107 |
+
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Fly In from Top","animation effect","web-stories")),value:ae.a.FLY_IN.value,flyInDirection:ae.g.TOP_TO_BOTTOM,gridSpace:Pd.QUARTER,Effect:nd,size:16}},[Sd(ae.a.FLY_IN.value,ae.g.BOTTOM_TO_TOP)]:{value:Sd(ae.a.FLY_IN.value,ae.g.BOTTOM_TO_TOP),label:ae.a.FLY_IN.name,animation:{ariaLabel:Object(h.sprintf)(
|
108 |
/* translators: %s: animation effect. */
|
109 |
+
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Fly In from Bottom","animation effect","web-stories")),value:ae.a.FLY_IN.value,flyInDirection:ae.g.BOTTOM_TO_TOP,gridSpace:Pd.QUARTER,Effect:ld,size:16}},[Sd(ae.a.FLY_IN.value,ae.g.RIGHT_TO_LEFT)]:{value:Sd(ae.a.FLY_IN.value,ae.g.RIGHT_TO_LEFT),label:ae.a.FLY_IN.name,animation:{ariaLabel:Object(h.sprintf)(
|
110 |
/* translators: %s: animation effect. */
|
111 |
+
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Fly In from Right","animation effect","web-stories")),value:ae.a.FLY_IN.value,flyInDirection:ae.g.RIGHT_TO_LEFT,gridSpace:Pd.QUARTER,Effect:Cd,size:16}},[ae.a.PULSE.value]:{value:ae.a.PULSE.value,label:ae.a.PULSE.name,animation:{ariaLabel:Object(h.sprintf)(
|
112 |
/* translators: %s: animation effect. */
|
113 |
+
Object(h.__)('"%s" Effect',"web-stories"),ae.a.PULSE.name),value:ae.a.PULSE.value,Effect:od}},[Sd(ae.a.ROTATE_IN.value,ae.g.LEFT_TO_RIGHT)]:{value:Sd(ae.a.ROTATE_IN.value,ae.g.LEFT_TO_RIGHT),label:Object(h._x)("Rotate","animation effect","web-stories"),animation:{ariaLabel:Object(h.sprintf)(
|
114 |
/* translators: %s: animation effect. */
|
115 |
+
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Rotate In from Left","animation effect","web-stories")),value:ae.a.ROTATE_IN.value,rotateInDirection:ae.g.LEFT_TO_RIGHT,gridSpace:Pd.HALF,Effect:sd,size:18}},[Sd(ae.a.ROTATE_IN.value,ae.g.RIGHT_TO_LEFT)]:{value:Sd(ae.a.ROTATE_IN.value,ae.g.RIGHT_TO_LEFT),label:Object(h._x)("Rotate","animation effect","web-stories"),animation:{ariaLabel:Object(h.sprintf)(
|
116 |
/* translators: %s: animation effect. */
|
117 |
+
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Rotate In from Right","animation effect","web-stories")),value:ae.a.ROTATE_IN.value,rotateInDirection:ae.g.RIGHT_TO_LEFT,gridSpace:Pd.HALF,Effect:ud,size:18}},[ae.a.TWIRL_IN.value]:{value:ae.a.TWIRL_IN.value,label:ae.a.TWIRL_IN.name,animation:{ariaLabel:Object(h.sprintf)(
|
118 |
/* translators: %s: animation effect. */
|
119 |
+
Object(h.__)('"%s" Effect',"web-stories"),ae.a.TWIRL_IN.name),value:ae.a.TWIRL_IN.value,Effect:md,size:26}},[Sd(ae.a.WHOOSH_IN.value,ae.g.LEFT_TO_RIGHT)]:{value:Sd(ae.a.WHOOSH_IN.value,ae.g.LEFT_TO_RIGHT),label:ae.a.WHOOSH_IN.name,animation:{ariaLabel:Object(h.sprintf)(
|
120 |
/* translators: %s: animation effect. */
|
121 |
+
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Whoosh In from Left","animation effect","web-stories")),value:ae.a.WHOOSH_IN.value,whooshInDirection:ae.g.LEFT_TO_RIGHT,gridSpace:Pd.HALF,Effect:hd,size:20}},[Sd(ae.a.WHOOSH_IN.value,ae.g.RIGHT_TO_LEFT)]:{value:Sd(ae.a.WHOOSH_IN.value,ae.g.RIGHT_TO_LEFT),label:ae.a.WHOOSH_IN.name,animation:{ariaLabel:Object(h.sprintf)(
|
122 |
/* translators: %s: animation effect. */
|
123 |
+
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Whoosh In from Right","animation effect","web-stories")),value:ae.a.WHOOSH_IN.value,whooshInDirection:ae.g.RIGHT_TO_LEFT,gridSpace:Pd.HALF,Effect:gd,size:20}},[Sd(ae.a.ZOOM.value,ae.j.SCALE_IN)]:{value:Sd(ae.a.ZOOM.value,ae.j.SCALE_IN),label:Object(h._x)("Scale In","animation effect","web-stories"),animation:{ariaLabel:Object(h.sprintf)(
|
124 |
/* translators: %s: animation effect. */
|
125 |
+
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Scale In","animation effect","web-stories")),value:ae.a.ZOOM.value,scaleDirection:ae.j.SCALE_IN,gridSpace:Pd.HALF,Effect:xd,size:14}},[Sd(ae.a.ZOOM.value,ae.j.SCALE_OUT)]:{value:Sd(ae.a.ZOOM.value,ae.j.SCALE_OUT),label:Object(h.__)("Scale Out","web-stories"),animation:{ariaLabel:Object(h.sprintf)(
|
126 |
/* translators: %s: animation effect. */
|
127 |
+
Object(h.__)('"%s" Effect',"web-stories"),Object(h._x)("Scale Out","animation effect","web-stories")),value:ae.a.ZOOM.value,scaleDirection:ae.j.SCALE_OUT,gridSpace:Pd.HALF,Effect:Ad,size:20}}},Fd={ariaLabel:Ue.a.string,value:Ue.a.string.isRequired,Effect:Ue.a.any,gridSpace:Ue.a.oneOf(Object.values(Pd)),size:Ue.a.number,scaleDirection:Ue.a.oneOf(Object.values(ae.j)),panDirection:Ue.a.oneOf(Object.values(ae.g)),zoomDirection:Ue.a.oneOf(Object.values(ae.j)),flyInDirection:Ue.a.oneOf(Object.values(ae.g)),rotateInDirection:Ue.a.oneOf(Object.values(ae.g)),whooshInDirection:Ue.a.oneOf(Object.values(ae.g))},Hd={value:Ue.a.string.isRequired,label:Ue.a.string.isRequired,animation:Ue.a.shape(Fd)};Ue.a.oneOf([...Object.values(ae.g),...Object.values(ae.j),!1]);var Gd=(e,t)=>{const C=Object.entries(t).filter((e=>{let[t]=e;return-1===Dd.indexOf(t)})).map((e=>{let[t,C]=e;return[t,C.options]})).reduce(((e,t)=>{let[C,a]=t;return[...e,...(a||[]).map((e=>Sd(C,e)))]}),[]);return Object.keys(e).filter((e=>C.includes(e)))};var Vd=e=>Object.values(e).includes(Rd);var Ud=e=>{var t;let{animation:C,disabledOptions:a=[]}=e;const n=C.panDirection&&!a.includes(C.panDirection)?C.panDirection:(null===(t=Object.values(ae.g).filter((e=>!a.includes(e))))||void 0===t?void 0:t[0])||void 0;switch(C.value){case ae.d.PAN_AND_ZOOM.value:return{...C,zoomDirection:a.includes(ae.j.SCALE_IN)?ae.j.SCALE_OUT:ae.j.SCALE_IN,panDirection:n};default:return C}};var Wd=e=>{var t;let{animation:C,disabledTypeOptionsMap:a}=e;return Vd(C)?Ud({animation:C,disabledOptions:null===(t=a[C.value])||void 0===t?void 0:t.options}):C};const Yd=l.f.div.withConfig({displayName:"styles__ContentWrapper",componentId:"sc-1d71y2l-0"})(["display:inline-block;"]),$d=l.f.li.withConfig({displayName:"styles__AnimationListItem",componentId:"sc-1d71y2l-1"})(["border:none;background:",";border-radius:",";height:","px;position:relative;grid-column-start:",";overflow:hidden;font-family:'Teko',sans-serif;font-size:","px;line-height:1;color:",";text-transform:uppercase;transition:background 0.1s linear;margin:0;& > div{height:100%;display:flex;align-items:center;justify-content:center;text-align:center;}&[aria-disabled='true']{background:",";}&:hover:not([aria-disabled='true']){cursor:pointer;}&:hover:not([aria-disabled='true']),&:focus:not([aria-disabled='true']){background:",";","{display:inline-block;}","{display:none;}}"," ",";"],(e=>{let{active:t,theme:C}=e;return t?C.colors.interactiveBg.secondaryPress:C.colors.interactiveBg.secondaryNormal}),(e=>{let{theme:t}=e;return t.borders.radius.small}),56,(e=>{let{gridSpace:t}=e;return(e=>{switch(e){case Pd.HALF:return"span 2";case Pd.QUARTER:return"span 1";default:return"span 4"}})(t)}),(e=>{let{size:t=28}=e;return t}),(e=>{let{theme:t}=e;return t.colors.fg.primary}),(e=>{let{theme:t}=e;return t.colors.interactiveBg.disable}),(e=>{let{active:t,theme:C}=e;return t?C.colors.interactiveBg.secondaryPress:C.colors.interactiveBg.secondaryHover}),$s,Yd,(e=>{let{noEffect:t}=e;return t&&Object(l.e)(["height:36px;font-size:14px;text-transform:none;","{display:inline-block !important;}"],Yd)}),eC),qd=Object(l.e)(["display:inline-block;margin-top:0;padding:16px 4px 16px 16px;ul{display:grid;justify-content:center;gap:12px 4px;grid-template-columns:repeat(4,1fr);position:relative;}"]),Xd=e=>{let{theme:t}=e;return Object(l.e)(["margin:-1px -1px 0 -1px;width:calc(100% + 2px);border-color:transparent transparent "," transparent;height:","px;&:hover{border-color:transparent transparent "," transparent;}",""],t.colors.border.defaultNormal,45,t.colors.border.defaultNormal,eC)};function Kd(){return(Kd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Qd=Object(u.j)(((e,t)=>{var C,a,n,l,i;let{option:o,...c}=e;return r.a.createElement($d,Kd({ref:t,"aria-label":(null===(C=o.animation)||void 0===C?void 0:C.ariaLabel)||o.label,disabled:o.disabled,"aria-disabled":o.disabled,size:null===(a=o.animation)||void 0===a?void 0:a.size,gridSpace:null===(n=o.animation)||void 0===n?void 0:n.gridSpace,noEffect:!(null!==(l=o.animation)&&void 0!==l&&l.Effect)},c),r.a.createElement(Br.a,{title:(null==o?void 0:o.tooltip)||""},r.a.createElement(Yd,null,o.label),(null===(i=o.animation)||void 0===i?void 0:i.Effect)&&r.a.createElement(o.animation.Effect,null,o.label)))}));var Jd=Qd;Qd.displayName="DropDownItem",Qd.propTypes={option:Ue.a.shape(Hd)};var eu=Object(u.j)((function EffectChooserDropdown(e,t){let{onAnimationSelected:C,onNoEffectSelected:a,isBackgroundEffects:n=!1,selectedEffectType:i,disabledTypeOptionsMap:o,direction:c,selectButtonStylesOverride:s}=e;const{enableExperimentalAnimationEffects:d}=Object(p.c)(),m=Object(u.C)((()=>Sd(i,c)),[i,c]),f=Object(u.C)((()=>n&&Gd(Bd,o)),[o,n]),b=n?zC.a.BOTTOM:zC.a.TOP,g=n?Bd:zd,E=Object(u.C)((()=>d?Object.values(g):Object.values(g).filter((e=>{let{value:t}=e;return-1===Nd.indexOf(t)}))),[g,d]),v=Object(u.C)((()=>null==E?void 0:E.map((e=>{var t,C;const a=n&&f.includes(e.value);return{...e,disabled:a,tooltip:a&&(null===(t=o[null===(C=e.animation)||void 0===C?void 0:C.value])||void 0===t?void 0:t.tooltip)}}))),[E,n,f,o]),O=Object(u.s)(((e,t)=>{var n;if(e.preventDefault(),t===kd)return void(Boolean(m)&&a());const r=null===(n=g[t])||void 0===n?void 0:n.animation,l=Wd({animation:r,disabledTypeOptionsMap:o});C({animation:l.value,panDir:null==l?void 0:l.panDirection,zoomDirection:null==l?void 0:l.zoomDirection,flyInDir:null==l?void 0:l.flyInDirection,rotateInDir:null==l?void 0:l.rotateInDirection,whooshInDir:null==l?void 0:l.whooshInDirection,scaleDirection:null==l?void 0:l.scaleDirection})}),[g,o,C,m,a]),y=m&&m!==kd?Xd:eC,M=Object(l.e)([""," ",""],y,void 0!==s&&s);return r.a.createElement(ki.a,{ref:t,options:v,placeholder:Object(h._x)("None","animation effect","web-stories"),selectedValue:m,ariaLabel:Object(h.__)("Animation: Effect Chooser","web-stories"),menuStylesOverride:qd,renderItem:Jd,onMenuItemClick:O,placement:b,isKeepMenuOpenOnSelection:!0,selectButtonStylesOverride:M})}));const tu="animation",Cu=Object(l.f)(dl).withConfig({displayName:"animation__StyledRow",componentId:"sc-1j3eshx-0"})(["margin-bottom:-1px;"]),au=Object(l.f)(cC.a).withConfig({displayName:"animation__Note",componentId:"sc-1j3eshx-1"})(["color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.secondary})),nu=l.f.div.withConfig({displayName:"animation__GroupWrapper",componentId:"sc-1j3eshx-2"})([""," margin-bottom:16px;"],(e=>{let{hasAnimation:t,theme:C}=e;return t&&`\n border: 1px solid ${C.colors.border.defaultNormal};\n border-radius: ${C.borders.radius.small};\n `})),ru=Object(h.__)("The background image is too small to animate. Double click on the bg & scale the image before applying the animation.","web-stories");var lu=function AnimationPanel(e){var t,C;let{selectedElements:a,selectedElementAnimations:n,pushUpdateForObject:l,updateAnimationState:i}=e;const o=Object(u.G)(!1),{highlight:c,resetHighlight:s}=Ic((e=>({highlight:e[Fx.ANIMATION],resetHighlight:e.onFocusOut,cancelHighlight:e.cancelEffect}))),d=1===a.length&&a[0].isBackground,p=Object(u.C)((()=>{const e=a.map((e=>e.animation)).filter(Boolean);return n.map((t=>({...e.find((e=>e.id===t.id))||t}))).filter((e=>!e.delete))}),[a,n]),m=Object(u.s)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Object(u.p)(e,p[0])||(l(tu,e,null,t),o.current=!0)}),[l,p]),f=Object(u.s)((e=>{var t,C,a,r;let{animation:i,...c}=e;if(!i)return;const s=(null===(t=n[0])||void 0===t?void 0:t.id)||Object(Hn.a)(),d=Object(ae.o)(i),u=(null===(C=n[0])||void 0===C?void 0:C.type)===i?{duration:null===(a=n[0])||void 0===a?void 0:a.duration,delay:null===(r=n[0])||void 0===r?void 0:r.delay}:{};l(tu,{id:s,type:i,...d,...u,...c},null,!0),o.current=!0}),[n,l]),b=document.activeElement,g=Object(u.x)((()=>{o.current&&(i({animationState:ae.l.PLAYING_SELECTED}),o.current=!1)}),300);Object(u.y)(g,[n,i,b,g]);const E=Object(u.s)((()=>{l(tu,{...p[0],delete:!0},null,!0)}),[l,p]),v=Object(u.C)((()=>{var e;if(null!==(e=a[0])&&void 0!==e&&e.isBackground){var t;const e=["media","image","video","gif"].includes(a[0].type)&&Object(ae.r)({element:a[0]}),C=Object(ae.s)((null===(t=a[0])||void 0===t?void 0:t.scale)||0,[ae.f,ae.e]);return{[ae.d.PAN.value]:{tooltip:ru,options:[!e.bottom&&ae.g.TOP_TO_BOTTOM,!e.left&&ae.g.RIGHT_TO_LEFT,!e.top&&ae.g.BOTTOM_TO_TOP,!e.right&&ae.g.LEFT_TO_RIGHT].filter(Boolean)},[ae.d.ZOOM.value]:{tooltip:ru,options:[C<=.01&&ae.j.SCALE_IN,C>=.99&&ae.j.SCALE_OUT].filter(Boolean)},[ae.d.PAN_AND_ZOOM.value]:{tooltip:ru,options:[!e.bottom&&ae.g.TOP_TO_BOTTOM,!e.left&&ae.g.RIGHT_TO_LEFT,!e.top&&ae.g.BOTTOM_TO_TOP,!e.right&&ae.g.LEFT_TO_RIGHT,C<=.01&&ae.j.SCALE_IN,C>=.99&&ae.j.SCALE_OUT].filter(Boolean)}}}return{}}),[a]),O=(y=null===(t=p[0])||void 0===t?void 0:t.type,(null===(M=[...Object.values(ae.a),...Object.values(ae.b),...Object.values(ae.d)].find((e=>e.value===y)))||void 0===M?void 0:M.name)||"");var y,M;return a.length>1?r.a.createElement(ys,{name:"animation",title:Object(h.__)("Animation","web-stories")},r.a.createElement(dl,null,r.a.createElement(au,{forwardedAs:"span",size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Group animation support coming soon.","web-stories")))):r.a.createElement(iu,{name:"animation",title:Object(h.__)("Animation","web-stories"),onAnimationEnd:()=>s(),isPersistable:!c,$_css:(null==c?void 0:c.showEffect)&&dZ.FLASH},r.a.createElement(nu,{hasAnimation:O},r.a.createElement(Cu,null,r.a.createElement(eu,{ref:e=>{e&&null!=c&&c.focus&&null!=c&&c.showEffect&&e.focus()},onAnimationSelected:f,onNoEffectSelected:E,isBackgroundEffects:d,disabledTypeOptionsMap:v,direction:Vs(p[0]),selectedEffectType:null===(C=p[0])||void 0===C?void 0:C.type,selectButtonStylesOverride:(null==c?void 0:c.focus)&&dZ.OUTLINE})),p[0]&&r.a.createElement(Ys,{animation:p[0],onChange:m,disabledTypeOptionsMap:v})))},iu=Object(l.f)(ys).withConfig({displayName:"animation___StyledSimplePanel",componentId:"sc-1j3eshx-3"})(["",""],(e=>e.$_css)),ou=C(62);const cu={left:0,right:0,top:0,bottom:0,lockedWidth:!0,color:Object(UC.a)(0,0,0)},su=Object(l.e)(["position:relative;:focus-within{z-index:1;",";}"],(e=>{let{theme:t}=e;return Q.c.focusCSS(t.colors.border.focus,t.colors.bg.secondary)})),du=Object(l.e)(["width:29px;height:29px;"]);var uu=Object(l.f)(NumericInput).withConfig({displayName:"stackableInput__StackableInput",componentId:"sc-bgp531-0"})(["svg{","}& > div{border-radius:0;margin-left:-1px;padding:2px 7px 2px 12px;",";}"],du,su);const pu=l.f.div.withConfig({displayName:"stackableGroup__StackableContainer",componentId:"sc-ogfpu5-0"})(["display:flex;max-width:",";& > ","{border-radius:0;&:first-of-type > div{border-top-left-radius:4px;border-bottom-left-radius:4px;margin-left:0;}&:last-of-type > div{border-top-right-radius:4px;border-bottom-right-radius:4px;}}"],(e=>{let{locked:t}=e;return t?"106px":"none"}),uu);var mu=function StackableGroup(e){let{children:t,locked:C,className:a}=e;return r.a.createElement(pu,{locked:C,className:a},t)};function fu(){return(fu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const hu=l.f.div.withConfig({displayName:"borderWidth__BorderInputsFlexContainer",componentId:"sc-tay5fw-0"})(["display:flex;gap:7px;margin-bottom:16px;"]),bu=Object(l.f)(LockToggle).withConfig({displayName:"borderWidth__StyledLockToggle",componentId:"sc-tay5fw-1"})(["",";"],eC),gu=l.f.div.withConfig({displayName:"borderWidth__ToggleWrapper",componentId:"sc-tay5fw-2"})(["padding-top:2px;"," align-self:stretch;"],(e=>{let{locked:t}=e;return t&&"\n padding-left: 8px;\n "})),Eu=Object(l.f)(Te.a.Border).withConfig({displayName:"borderWidth__BorderTop",componentId:"sc-tay5fw-3"})(["transform:rotate(90deg);"]),vu=Object(l.f)(Te.a.Border).withConfig({displayName:"borderWidth__BorderBottom",componentId:"sc-tay5fw-4"})(["transform:rotate(-90deg);"]),Ou=Object(l.f)(Te.a.Border).withConfig({displayName:"borderWidth__BorderRight",componentId:"sc-tay5fw-5"})(["transform:scaleX(-1);"]);var yu=function WidthControls(e){let{selectedElements:t,pushUpdateForObject:C}=e;const a=mo(t,"border",cu),n=t.every(ou.b),l=!0===a.lockedWidth||!n,i=Object(u.s)((e=>(t,a)=>{C("border",l?{left:a,top:a,right:a,bottom:a}:{[e]:a},cu,!0)}),[C,l]),o=Object(u.s)((e=>{C("border",e,cu,!0)}),[C]),c=l?Object(h.__)("Border","web-stories"):Object(h.__)("Left border","web-stories"),s=Object(u.s)((e=>({isIndeterminate:uC.C===e,placeholder:uC.C===e?uC.B:null})),[]);return r.a.createElement(hu,null,r.a.createElement(mu,{locked:l},r.a.createElement(uu,fu({value:a.left,onChange:i("left"),"aria-label":c,suffix:!l&&r.a.createElement(Te.a.Border,null)},s(a.left))),!l&&r.a.createElement(r.a.Fragment,null,r.a.createElement(uu,fu({value:a.top,onChange:i("top"),"aria-label":Object(h.__)("Top border","web-stories"),labelText:Object(h.__)("Top","web-stories"),suffix:r.a.createElement(Eu,null)},s(a.top))),r.a.createElement(uu,fu({value:a.right,onChange:i("right"),"aria-label":Object(h.__)("Right border","web-stories"),labelText:Object(h.__)("Right","web-stories"),suffix:r.a.createElement(Ou,null)},s(a.right))),r.a.createElement(uu,fu({value:a.bottom,onChange:i("bottom"),"aria-label":Object(h.__)("Bottom border","web-stories"),labelText:Object(h.__)("Bottom","web-stories"),suffix:r.a.createElement(vu,null)},s(a.bottom))))),n&&r.a.createElement(gu,{locked:l},r.a.createElement(Je.a,{title:Object(h.__)("Toggle consistent border","web-stories")},r.a.createElement(bu,{isLocked:l,onClick:()=>{let e={lockedWidth:!l};l||(e={...e,top:a.left,right:a.left,bottom:a.left}),o(e)},"aria-label":Object(h.__)("Toggle consistent border","web-stories")}))))};var Mu=function BorderStylePanel(e){const{selectedElements:t,pushUpdate:C}=e,a=mo(t,"border",cu),{color:n,left:l,top:i,right:o,bottom:c}=a,s=t.every((e=>Object(ou.a)(e))),d=Object(u.s)(((e,t)=>C({border:{...a,[t]:e}},!0)),[a,C]);if(!s)return null;const p=t.every(ou.b),m=[l,i,o,c].some((e=>e>0));return r.a.createElement(ys,{name:"borderStyle",title:Object(h.__)("Border","web-stories")},r.a.createElement(yu,e),m&&r.a.createElement(dl,null,r.a.createElement(jr,{value:n,onChange:e=>{d(e,"color")},label:Object(h.__)("Border color","web-stories"),changedStyle:"border-color",hasEyedropper:!0,allowsOpacity:p})))};const wu=l.f.div.withConfig({displayName:"captionsPanelContent__InputRow",componentId:"sc-17hyw65-0"})(["display:flex;flex-grow:1;margin-right:8px;"]),Lu=Object(l.f)(EC.b).withConfig({displayName:"captionsPanelContent__StyledFileInput",componentId:"sc-17hyw65-1"})((e=>{let{$isIndeterminate:t,theme:C}=e;return Object(l.e)(["",";",";"],eC,!t&&Object(l.e)(["* > input:disabled{color:",";}"],C.colors.fg.primary))})),_u=Object(l.f)(b.a).withConfig({displayName:"captionsPanelContent__StyledButton",componentId:"sc-17hyw65-2"})(["",";"],(e=>{let{theme:t}=e;return Q.c.focusableOutlineCSS(t.colors.border.focus,t.colors.bg.secondary)}));var ju=function CaptionsPanelContent(e){let{isIndeterminate:t=!1,tracks:C=[],captionText:a=Object(h.__)("Upload a file","web-stories"),handleChangeTrack:n,handleRemoveTrack:l,renderUploadButton:i,clearFileText:o=Object(h.__)("Remove file","web-stories")}=e;const{capabilities:{hasUploadMediaAction:c},MediaUpload:s}=Object(_.c)();return c||C.length?r.a.createElement(r.a.Fragment,null,t&&r.a.createElement(dl,null,r.a.createElement(Lu,{value:uC.B,disabled:!0,"aria-label":Object(h.__)("Filename","web-stories"),onChange:()=>l(),$isIndeterminate:t})),C.map((e=>{let{id:t,trackName:C}=e;return r.a.createElement(dl,{key:`row-filename-${t}`},r.a.createElement(wu,null,r.a.createElement(Lu,{value:C,"aria-label":Object(h.__)("Filename","web-stories"),onChange:()=>l(t),disabled:!0})),r.a.createElement(Je.a,{hasTail:!0,title:o},r.a.createElement(_u,{"aria-label":o,type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE,onClick:()=>l(t)},r.a.createElement(Te.a.Trash,null))))})),!C.length&&!t&&r.a.createElement(dl,{expand:!0},r.a.createElement(s,{onSelect:n,onSelectErrorMessage:Object(h.__)("Please choose a VTT file to use as caption.","web-stories"),type:["text/vtt"],title:a,buttonInsertText:Object(h.__)("Select caption","web-stories"),render:i}))):null};const xu=Object(l.f)(b.a).withConfig({displayName:"captions__StyledButton",componentId:"sc-17zds0n-0"})(["",";"],(e=>{let{theme:t}=e;return Q.c.focusableOutlineCSS(t.colors.border.focus,t.colors.bg.secondary)})),Zu=Object(l.f)(xu).withConfig({displayName:"captions__UploadButton",componentId:"sc-17zds0n-1"})(["padding:12px 8px;"]);var Au=Object(l.f)(Zu).withConfig({displayName:"captions___StyledUploadButton",componentId:"sc-17zds0n-2"})(["",""],(e=>e.$_css));const Iu={MAX:1e3};var Tu=function CaptionsPanel(e){let{selectedElements:t,pushUpdate:C}=e;const a=so(t,"tracks",[]),n=a===uC.C,{capabilities:{hasUploadMediaAction:l}}=Object(H.g)();Wl((e=>{var t;let{resource:C}=e;return{resource:{...C,alt:null===(t=C.alt)||void 0===t?void 0:t.slice(0,Iu.MAX)}}}),[]);const i=Object(u.s)((e=>{let t=[];if(e){const C=a.findIndex((t=>{let{id:C}=t;return C===e}));t=[...a.slice(0,C),...a.slice(C+1)]}C({tracks:t},!0)}),[a,C]),o=Object(u.s)((e=>{let{src:t="",id:n}=e;const r={track:t,trackId:n,trackName:t.split("/").pop(),id:Object(Hn.a)(),kind:"captions",srclang:"",label:""};C({tracks:[...a,r]},!0)}),[a,C]),{highlight:c,resetHighlight:s}=Ic((e=>({highlight:e[Fx.CAPTIONS],resetHighlight:e.onFocusOut,cancelHighlight:e.cancelEffect}))),d=Object(u.s)((e=>r.a.createElement(Au,{onAnimationEnd:()=>s(),ref:e=>{e&&null!=c&&c.focus&&null!=c&&c.showEffect&&e.focus()},onClick:e,type:g.c.SECONDARY,size:g.a.SMALL,variant:g.d.RECTANGLE,$_css:(null==c?void 0:c.showEffect)&&dZ.OUTLINE},Object(h.__)("Upload a file","web-stories"))),[s,null==c?void 0:c.focus,null==c?void 0:c.showEffect]);return l||a.length?r.a.createElement(Su,{onAnimationEnd:()=>s(),name:"caption",title:Object(h.__)("Caption and Subtitles","web-stories"),isPersistable:!c,$_css2:(null==c?void 0:c.showEffect)&&dZ.FLASH},r.a.createElement(ju,{isIndeterminate:n,tracks:n?[]:a,handleChangeTrack:o,handleRemoveTrack:i,renderUploadButton:d})):null},Su=Object(l.f)(ys).withConfig({displayName:"captions___StyledSimplePanel",componentId:"sc-17zds0n-3"})(["",""],(e=>e.$_css2)),ku=C(629),Ru=C(60);var Pu=function(){const[e,t]=Object(u.I)([]);return{setUpdatedSelectedElementsWithFrame:t,handleAlign:(t,C,a)=>{a((a=>{const{id:n}=a,r=e.find((e=>e.id===n)),{width:l=0,height:i=0,frameWidth:o=0,frameHeight:c=0}=r||{},s="left"===t||"right"===t?(o-l)/2:(c-i)/2;return"left"===t||"right"===t?{x:"left"===t?C.startX+s:C.endX-l-s}:{y:"top"===t?C.startY+s:C.endY-i-s}}),!0)},handleAlignCenter:(e,t)=>{const C=(e.endX+e.startX)/2;t((e=>{const{width:t}=e;return{x:C-t/2}}),!0)},handleAlignMiddle:(e,t)=>{const C=(e.endY+e.startY)/2;t((e=>{const{height:t}=e;return{y:C-t/2}}),!0)},handleHorizontalDistribution:(t,C)=>{const a=[...e];a.sort(((e,t)=>(e.frameX+e.frameWidth)/2-(t.frameX+t.frameWidth)/2));const n=a.reduce(((e,t)=>e+t.frameWidth),0),r=t.width-n,l=Object(Ru.b)(r/(a.length-1)),i={};let o=0;a.forEach(((e,t)=>{const{id:C,x:n,width:r,frameWidth:c}=e;0===t||t===a.length-1?(i[C]={x:n},o=n):i[C]={x:o+(c-r)/2},o+=c+l})),C((e=>{let{id:t}=e;return i[t]}),!0)},handleVerticalDistribution:(t,C)=>{const a=[...e];a.sort(((e,t)=>(e.frameY+e.frameHeight)/2-(t.frameY+t.frameHeight)/2));const n=a.reduce(((e,t)=>e+t.frameHeight),0),r=t.height-n,l=Object(Ru.b)(r/(a.length-1)),i={};let o=0;a.forEach(((e,t)=>{const{id:C,y:n,height:r,frameHeight:c}=e;0===t||t===a.length-1?(i[C]={y:n},o=n):i[C]={y:o+(c-r)/2},o+=c+l})),C((e=>{let{id:t}=e;return i[t]}),!0)}}};const Nu=l.f.div.withConfig({displayName:"alignment__ElementRow",componentId:"sc-812g1l-0"})(["display:flex;flex-direction:row;justify-content:center;align-items:center;padding:16px;overflow:auto;overflow:overlay;"]),Du=["distributeHorizontally","distributeVertically","alignLeft","alignCenter","alignRight","alignTop","alignMiddle","alignBottom"],Bu={startX:0,startY:0,endX:ee.h,endY:ee.f,width:ee.h,height:ee.f},zu=Object(l.f)(b.a).attrs({variant:g.d.SQUARE,type:g.c.TERTIARY,size:g.a.SMALL}).withConfig({displayName:"alignment__AlignmentButton",componentId:"sc-812g1l-1"})(["position:relative;:focus{z-index:1;}",";"],(e=>{let{theme:t}=e;return Q.c.focusableOutlineCSS(t.colors.border.focus,"#1d1f20")})),Fu=Object(l.f)(es).withConfig({displayName:"alignment__StyledPanel",componentId:"sc-812g1l-2"})(["background-color:",";border-bottom:1px solid ",";"],(e=>{let{theme:t}=e;return t.colors.opacity.black24}),(e=>{let{theme:t}=e;return t.colors.divider.secondary}));var Hu=function ElementAlignmentPanel(e){let{selectedElements:t,pushUpdate:C}=e;const{isRTL:a}=Object(H.g)(),n=1===t.length?Bu:Object(ku.b)(t),l=Object(u.C)((()=>t.map((e=>{const{id:t,x:C,y:a,width:n,height:r,rotationAngle:l}=e;let i=C,o=a,c=n,s=r;if(l){const e=Object(ku.a)(l,C,a,n,r);i=e.x,o=e.y,c=e.width,s=e.height}return{id:t,x:C,y:a,width:n,height:r,frameX:i,frameY:o,frameWidth:c,frameHeight:s}}))),[t]),{setUpdatedSelectedElementsWithFrame:i,handleAlign:o,handleAlignCenter:c,handleAlignMiddle:s,handleHorizontalDistribution:d,handleVerticalDistribution:p}=Pu();Object(u.y)((()=>i(l)),[l,i]);const m=t.length>2,f=Object(u.G)(),[b,g]=Object(u.I)(null),E=Object(u.s)((e=>()=>{const t=Du.findIndex((e=>e===b)),C=Du[t+e];C&&(g(C),f.current.querySelector(`#${C}`).focus())}),[b,g]);return Object(ye.h)(f,"left",(()=>E(a?1:-1)),[E,a]),Object(ye.h)(f,"right",(()=>E(a?-11:1)),[E,a]),Object(ye.h)(f,{key:"mod+{",shift:!0},(()=>o("left")),[o]),Object(ye.h)(f,{key:"mod+h",shift:!0},c,[c]),Object(ye.h)(f,{key:"mod+}",shift:!0},(()=>o("right")),[o]),r.a.createElement(Fu,{name:"alignment",canCollapse:!1,ariaLabel:Object(h.__)("Alignment","web-stories")},r.a.createElement(Nu,{ref:f},r.a.createElement(Je.a,{title:Object(h.__)("Distribute horizontally","web-stories")},r.a.createElement(zu,{disabled:!m,onClick:()=>d(n,C),"aria-label":Object(h.__)("Distribute horizontally","web-stories"),id:Du[0],onFocus:()=>g(Du[0])},r.a.createElement(Te.a.DistributeHorizontal,null))),r.a.createElement(Je.a,{title:Object(h.__)("Distribute vertically","web-stories")},r.a.createElement(zu,{disabled:!m,onClick:()=>p(n,C),"aria-label":Object(h.__)("Distribute vertically","web-stories"),id:Du[1],onFocus:()=>g(Du[1])},r.a.createElement(Te.a.DistributeVertical,null))),r.a.createElement(Je.a,{title:Object(h.__)("Align left","web-stories"),shortcut:"mod+{"},r.a.createElement(zu,{onClick:()=>o("left",n,C),"aria-label":Object(h.__)("Align left","web-stories"),id:Du[2],onFocus:()=>g(Du[2])},r.a.createElement(Te.a.AlignLeft,null))),r.a.createElement(Je.a,{title:Object(h.__)("Align center","web-stories"),shortcut:"mod+H"},r.a.createElement(zu,{onClick:()=>c(n,C),"aria-label":Object(h.__)("Align center","web-stories"),id:Du[3],onFocus:()=>g(Du[3])},r.a.createElement(Te.a.AlignCenter,null))),r.a.createElement(Je.a,{title:Object(h.__)("Align right","web-stories"),shortcut:"mod+}"},r.a.createElement(zu,{onClick:()=>o("right",n,C),"aria-label":Object(h.__)("Align right","web-stories"),id:Du[4],onFocus:()=>g(Du[4])},r.a.createElement(Te.a.AlignRight,null))),r.a.createElement(Je.a,{title:Object(h.__)("Align top","web-stories")},r.a.createElement(zu,{onClick:()=>o("top",n,C),"aria-label":Object(h.__)("Align top","web-stories"),id:Du[5],onFocus:()=>g(Du[5])},r.a.createElement(Te.a.AlignTop,null))),r.a.createElement(Je.a,{title:Object(h.__)("Align vertical center","web-stories")},r.a.createElement(zu,{onClick:()=>s(n,C),"aria-label":Object(h.__)("Align vertical center","web-stories"),id:Du[6],onFocus:()=>g(Du[6])},r.a.createElement(Te.a.AlignMiddle,null))),r.a.createElement(Je.a,{title:Object(h.__)("Align bottom","web-stories")},r.a.createElement(zu,{onClick:()=>o("bottom",n,C),"aria-label":Object(h.__)("Align bottom","web-stories"),id:Du[7],onFocus:()=>g(Du[7])},r.a.createElement(Te.a.AlignBottom,null)))))},Gu=C(69);var Vu=function(e,t,C){switch(C){case Gu.b.NONE:return null;case Gu.b.SOLID:return function(e,t){switch(t){case Gu.b.NONE:return{color:{r:0,g:0,b:0,a:.5}};case Gu.b.LINEAR:case Gu.b.RADIAL:{const{stops:t}=e,C=t.sort(((e,t)=>{var C,a;return(null!==(C=t.color.a)&&void 0!==C?C:1)-(null!==(a=e.color.a)&&void 0!==a?a:1)})),{color:{r:a,g:n,b:r}}=C[0];return{color:{r:a,g:n,b:r,a:.5}}}default:return e}}(e,t);case Gu.b.LINEAR:return function(e,t){switch(t){case Gu.b.NONE:return{type:"linear",rotation:0,stops:[{color:{r:0,g:0,b:0,a:0},position:0},{color:{r:0,g:0,b:0,a:1},position:1}],alpha:.7};case Gu.b.SOLID:{const{color:{r:t,g:C,b:a,a:n}}=e;return{type:"linear",rotation:0,stops:[{color:{r:t,g:C,b:a,a:0},position:.4},{color:{r:t,g:C,b:a,a:1},position:1}],alpha:n}}case Gu.b.RADIAL:{const{stops:t,alpha:C}=e;return{type:"linear",rotation:0,stops:t,alpha:C}}default:return e}}(e,t);case Gu.b.RADIAL:return function(e,t){switch(t){case Gu.b.NONE:return{type:"radial",size:{w:.67,h:.67},stops:[{color:{r:0,g:0,b:0,a:0},position:0},{color:{r:0,g:0,b:0,a:1},position:1}],alpha:.7};case Gu.b.SOLID:{const{color:{r:t,g:C,b:a,a:n}}=e;return{type:"radial",size:{w:.67,h:.67},stops:[{color:{r:t,g:C,b:a,a:0},position:0},{color:{r:t,g:C,b:a,a:1},position:1}],alpha:n}}case Gu.b.LINEAR:{const{stops:t,alpha:C}=e;return{type:"radial",size:{w:.67,h:.67},stops:t,alpha:C}}default:return e}}(e,t);default:return e}};var Uu=function FilterPanel(e){let{selectedElements:t,pushUpdate:C}=e;const a=po(t,"overlay"),n=a===uC.C,l=a?a.type||Gu.b.SOLID:Gu.b.NONE,i=Object(u.s)((e=>C({overlay:e},!0)),[C]),o=l!==Gu.b.RADIAL&&l!==Gu.b.LINEAR,{LayerIcon:c}=Object(ne.g)(t[0].type);return r.a.createElement(ys,{name:"filter",title:Object(h.__)("Filters","web-stories")},!n&&r.a.createElement(dl,null,Object.keys(Gu.a).map((e=>{const{label:C}=Gu.a[e];return r.a.createElement(Rr,{key:e,element:t[0],label:C,isToggled:l===e,onClick:()=>i(Vu(a,l,e)),filter:Vu(a,Gu.b.NONE,e),"aria-label":Object(h.sprintf)(
|
128 |
/* translators: %s: Filter type */
|
129 |
+
Object(h.__)("Filter: %s","web-stories"),C)},r.a.createElement(c,{element:t[0]}))}))),l!==Gu.b.NONE&&r.a.createElement(dl,null,r.a.createElement(jr,{label:Object(h.__)("Color","web-stories"),value:a,onChange:i,allowsGradient:!0,hasEyedropper:o})))};const Wu=Object(l.f)(cC.a).withConfig({displayName:"imageAccessibility__StyledText",componentId:"sc-147toy8-0"})(["color:",";margin-bottom:10px;"],(e=>{let{theme:t}=e;return t.colors.fg.secondary})),Yu={alt:null},$u={MAX:1e3};var qu=function ImageAccessibilityPanel(e){let{selectedElements:t,pushUpdate:C}=e;const a=mo(t,"resource",Yu),n=so(t,"alt",a.alt),{highlight:l,resetHighlight:i,cancelHighlight:o}=Ic((e=>({highlight:e[Fx.ASSISTIVE_TEXT],resetHighlight:e.onFocusOut,cancelHighlight:e.cancelEffect})));return r.a.createElement(Xu,{onAnimationEnd:()=>i(),name:"imageAccessibility",title:Object(h.__)("Accessibility","web-stories"),isPersistable:!l,$_css:l&&dZ.FLASH},r.a.createElement(Wu,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Add a brief description of the image.","web-stories")),r.a.createElement(dl,null,r.a.createElement(Gl,{ref:e=>{e&&null!=l&&l.focus&&null!=l&&l.showEffect&&(e.addEventListener("keydown",o,{once:!0}),e.focus())},placeholder:n===uC.C?uC.B:"",value:n||"",onChange:e=>{var t,a;return C({alt:(null==e||null===(t=e.target)||void 0===t||null===(a=t.value)||void 0===a?void 0:a.trim())||null},!0)},"aria-label":Object(h.__)("Assistive text","web-stories"),maxLength:$u.MAX,rows:2,isIndeterminate:n===uC.C})))},Xu=Object(l.f)(ys).withConfig({displayName:"imageAccessibility___StyledSimplePanel",componentId:"sc-147toy8-1"})(["",""],(e=>e.$_css));const Ku={},Qu=["click","pointerdown","pointerup"];let Ju;var ep=function(e){let{node:t,eventData:C,eventType:a="click"}=e;Ju||"undefined"==typeof PerformanceObserver||(Ju=new PerformanceObserver((e=>{for(const a of e.getEntries()){var t,C;!Qu.includes(a.name)||null===(t=Ku[a.startTime])||void 0===t||!t.category||null!==(C=Ku[a.startTime])&&void 0!==C&&C.isReported||(Ku[a.startTime].isReported=!0,Object(f.i)(Ku[a.startTime].category,a.duration,Ku[a.startTime].label,a.name))}})),Ju.observe({entryTypes:["event"]}));const{label:n,category:r}=C;Object(u.y)((()=>{if(!t)return;const e=t,C=e=>{Ku[e.timeStamp]={category:r,time:e.timeStamp},n&&(Ku[e.timeStamp].label=n)};return e.addEventListener(a,C),()=>{e.removeEventListener(a,C)}}),[r,n,t,a])};const tp={PAGE_NAVIGATION:{category:"page",label:"arrow_navigate"},PAGE_PREVIEW_CLICK:{category:"page",label:"carousel_navigate"},PAGE_ADD:{category:"page",label:"add_new"},PAGE_DELETE:{category:"page",label:"delete"},SELECT_ELEMENT:{category:"select_element"},LIBRARY_PANEL_CLICK:{category:"library_panel"},DESIGN_PANEL_CLICK:{category:"design_panel"},INSERT_ELEMENT:{category:"insert_element"},DELETE_ELEMENT:{category:"delete_element"},SET_BACKGROUND_MEDIA:{category:"background",label:"set_media_as_bg"}};function Cp(){return(Cp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const ap=l.f.ul.attrs({role:"tablist","aria-orientation":"horizontal"}).withConfig({displayName:"tabview__Tabs",componentId:"sc-10d408-0"})(["display:flex;flex-direction:row;align-items:stretch;width:100%;max-width:100%;justify-content:space-between;margin:0;padding:0;list-style:none;border-bottom:1px solid ",";"],(e=>{let{theme:t}=e;return t.colors.divider.secondary})),np=l.f.li.attrs((e=>{let{isActive:t}=e;return{tabIndex:t?0:-1,role:"tab","aria-selected":t}})).withConfig({displayName:"tabview__TabElement",componentId:"sc-10d408-1"})(["cursor:pointer;border:none;background:none;padding:0 4px;margin:","px 12px 9px;height:","px;display:flex;align-items:center;justify-content:center;position:relative;transition:color 0.2s ease;color:",";border-radius:",";",";:hover{color:",";}"," svg{display:block;width:32px;height:32px;margin:0 -4px;transform-origin:center center;transition:transform 0.3s ease,color 0.2s ease;color:",";border-radius:",";pointer-events:none;}svg.alert{width:","px;margin-left:4px;color:",";}span,svg:not(.alert){",";}&:hover span,&:hover svg:not(.alert),&:active span,&:active svg:not(.alert){color:",";}&.",",&[data-focus-visible-added]{svg:not(.alert){background-color:",";}}"],10,32,(e=>{let{theme:t,isActive:C}=e;return C?t.colors.fg.primary:t.colors.fg.tertiary}),(e=>{let{theme:t}=e;return t.borders.radius.small}),(e=>{let{theme:t}=e;return Q.c.focusableOutlineCSS(t.colors.border.focus,t.colors.bg.secondary)}),(e=>{let{theme:t}=e;return t.colors.fg.primary}),(e=>{let{isActive:t,theme:C}=e;return t&&Object(l.e)(["::after{content:'';position:absolute;background-color:",";height:2px;border-radius:1px;bottom:-10px;left:4px;right:4px;}"],C.colors.border.selection)}),(e=>{let{theme:t}=e;return t.colors.fg.tertiary}),(e=>{let{theme:t}=e;return t.borders.radius.small}),28,(e=>{let{theme:t}=e;return t.colors.fg.primary}),(e=>{let{isActive:t,theme:C}=e;return t&&`color: ${C.colors.fg.primary}`}),(e=>{let{theme:t}=e;return t.colors.fg.primary}),Q.a.FOCUS_VISIBLE_SELECTOR,(e=>{let{theme:t}=e;return t.colors.interactiveBg.tertiaryHover})),rp=Object(l.f)(Jt.a).attrs({as:"p",size:ot.b.TYPOGRAPHY.PRESET_SIZES.XXX_SMALL}).withConfig({displayName:"tabview__TabText",componentId:"sc-10d408-2"})(["color:inherit;"]),tabview_noop=()=>{};const lp=Object(u.j)((function UnreffedTab(e,t){var C;let{children:a,tooltip:n=null,placement:l,refId:i,tabRefs:o,...c}=e;const{id:s}=c,d=s.includes("library")?tp.LIBRARY_PANEL_CLICK:tp.DESIGN_PANEL_CLICK;ep({node:null===(C=o[i])||void 0===C?void 0:C.current,eventData:{...d,label:`${i}_tab`}});const u=r.a.createElement(np,Cp({ref:t},c),a);return null!==n?r.a.createElement(Je.a,{title:n,placement:l,isDelayed:!0},u):u}));var ip=function TabView(e){let{getTabId:t=(e=>e),getAriaControlsId:C,onTabChange:a=tabview_noop,onTabRefUpdated:n=tabview_noop,tabs:l=[],label:i="",shortcut:o="",tab:c,tabRefs:s,...d}=e;const{isRTL:p}=Object(H.g)(),m=Object(u.G)(),f=Object(u.G)(),h=Object(u.G)({}),b=Object(u.s)((e=>{var t,C;if(null!=s&&null!==(t=s[e])&&void 0!==t&&t.current)null===(C=s[e].current)||void 0===C||C.focus();else if(null!=h&&h.current[e]){var a;null===(a=h.current[e])||void 0===a||a.focus()}f.current=e}),[s]),g=Object(u.s)((e=>{b(e),a(e)}),[b,a]);Object(ye.g)({key:o,editable:!0},(()=>g(c)),[g,c]);const E=Object(u.s)((e=>{const t=l[(e+l.length)%l.length];b(t.id)}),[l,b]),v=Object(u.s)((e=>{const t=p?-e:e,C=l.findIndex((e=>{let{id:t}=e;return t===f.current}));E(C+t)}),[p,l,E]);return Object(ye.h)(m,"left",(()=>v(-1)),[v]),Object(ye.h)(m,"right",(()=>v(1)),[v]),Object(ye.h)(m,["up","down"],(()=>{}),[]),Object(ye.h)(m,"home",(()=>E(0)),[E]),Object(ye.h)(m,"end",(()=>E(-1)),[E]),Object(ye.h)(m,{key:["enter","space"],allowDefault:!0},(e=>{"tab"===e.target.getAttribute("role")&&(g(f.current),e.preventDefault())}),[g],{}),r.a.createElement(ap,Cp({"aria-label":i,ref:m},d),l.map((e=>{let{id:a,title:l,icon:i,...o}=e;return r.a.createElement(lp,Cp({key:a,ref:e=>{s?s[a].current=e:h.current[a]=e,n(e,a)},id:t(a),isActive:c===a,"aria-controls":C?C(a):null,"aria-selected":c===a,onClick:()=>g(a),onFocus:()=>{f.current=c},refId:a,tabRefs:s},o),Boolean(l)&&r.a.createElement(rp,null,l),Boolean(i)&&r.a.createElement(i,{isActive:a===c}))})))},op=Object(u.f)({state:{},actions:{}});
|
130 |
/* translators: %d: new position. */
|
131 |
+
const cp=Object(h.__)("Reordering. Press Escape to abort. Release mouse to drop in position %d.","web-stories");var sp=function(e,t){const[C,a]=Object(u.I)(!1),[n,r]=Object(u.I)(null),[l,i]=Object(u.I)(null),[o,c]=Object(u.I)(null),s=Object(Hi.a)("assertive"),d=Object(u.s)((e=>{let{position:t,onStartReordering:C=(()=>{})}=e;return e=>{e.shiftKey||e.metaKey||(C(),i(t),c(e.target))}}),[]),p=Object(u.G)(null);return Object(u.y)((()=>{p.current=n}),[n]),Object(u.y)((()=>{if(!o)return;const t=t=>{if(t.preventDefault(),null!==p.current){const t=p.current;e(l,t>l?t-1:t)}c(null)},C=()=>a(!0),n=e=>{"Escape"===e.key&&(c(null),e.stopPropagation())};return o.ownerDocument.addEventListener("pointerup",t),o.ownerDocument.addEventListener("keydown",n,!0),o.addEventListener("pointermove",C),()=>{r(null),a(!1),o.removeEventListener("pointermove",C),o.ownerDocument.removeEventListener("pointerup",t),o.ownerDocument.removeEventListener("keydown",n,!0)}}),[o,l,r,a,e]),Object(u.y)((()=>{if(C&&n){const e=t-n,C=Object(h.sprintf)(cp,e);s(C)}}),[C,n,t,s]),{isReordering:C,currentSeparator:n,setCurrentSeparator:r,handleStartReordering:d}};const dp=l.f.div.withConfig({displayName:"reorderableScroller__Scroller",componentId:"sc-lvxibs-0"})(["z-index:3;opacity:0;position:sticky;"]),up=Object(l.f)(dp).withConfig({displayName:"reorderableScroller__HorizontalScroller",componentId:"sc-lvxibs-1"})(["padding-left:","px;height:100%;",""],(e=>{let{size:t}=e;return t}),(e=>{let{direction:t,size:C}=e;return-1===t?`\n left: 0px;\n margin-right: -${C}px;\n `:`\n right: 0px;\n margin-left: -${C}px;\n `})),pp=Object(l.f)(dp).withConfig({displayName:"reorderableScroller__VerticalScroller",componentId:"sc-lvxibs-2"})(["padding-top:","px;width:100%;",""],(e=>{let{size:t}=e;return t}),(e=>{let{direction:t,size:C}=e;return-1===t?`\n top: 0px;\n margin-bottom: -${C}px;\n `:`\n bottom: 0px;\n margin-top: -${C}px;\n `}));var mp=Object(u.m)((function ReorderableScroller(e){let{direction:t,size:C}=e;const{state:{canScrollEnd:a,canScrollStart:n,mode:l},actions:{startScroll:i}}=Object(u.u)(op),[o,c]=Object(u.I)(!1),s=Object(u.s)((()=>c(!0)),[]),d=Object(u.s)((()=>c(!1)),[]);Object(u.y)((()=>{if(o)return i(t)}),[t,i,o]);const p=-1===t&&n||1===t&&a;if(Object(u.y)((()=>{p||c(!1)}),[p]),!p)return null;const m="horizontal"===l?up:pp;return r.a.createElement(m,{size:C,direction:t,onPointerEnter:s,onPointerLeave:d,mode:l})}));var fp=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"horizontal",t=arguments.length>1?arguments[1]:void 0,C=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;const[n,r]=Object(u.I)(!1),[l,i]=Object(u.I)(!1),[o,c]=Object(u.I)(0),s=Object(u.r)((()=>{const t=C.current;if(t)if("horizontal"===e){const e=t.scrollWidth-t.clientWidth;e<=0?(r(!1),i(!1)):(r(t.scrollLeft>0),i(t.scrollLeft<e))}else{const e=t.scrollHeight-t.clientHeight;e<=0?(r(!1),i(!1)):(r(t.scrollTop>0),i(t.scrollTop<e))}}),[e,C]),d=Object(u.s)((e=>(c(e),()=>c(0))),[c]),p=t&&n,m=t&&l;return Object(u.y)((()=>{if(0===o||!(p&&o<0||m&&o>0))return;let t=!0;const n=()=>{const r=Math.max(Math.min(.2*a,10),0);"horizontal"===e?C.current.scrollLeft+=o*r:C.current.scrollTop+=o*r,s(),t&&window.requestAnimationFrame(n)};return n(),()=>{t=!1}}),[o,s,p,m,a,e,C]),Object(u.y)((()=>s()),[t,s]),{startScroll:d,canScrollEnd:m,canScrollStart:p}};function hp(){return(hp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const bp=l.f.div.attrs({role:"listbox"}).withConfig({displayName:"reorderable__ReorderableContainer",componentId:"sc-plmujd-0"})(["display:flex;"]);var gp=Object(u.j)((function Reorderable(e,t){let{children:C,onPositionChange:a,getItemSize:n,scrollSize:l=null,mode:i="horizontal",...o}=e;const c=Object(u.G)(null),s=t||c,{isReordering:d,currentSeparator:p,setCurrentSeparator:m,handleStartReordering:f}=sp(a,C.length),{startScroll:h,canScrollEnd:b,canScrollStart:g}=fp(i,d,s,n()),E={state:{isReordering:d,currentSeparator:p,containerRef:s,mode:i,canScrollEnd:b,canScrollStart:g},actions:{setCurrentSeparator:m,handleStartReordering:f,startScroll:h}},v=l||n();return r.a.createElement(op.Provider,{value:E},r.a.createElement(bp,hp({ref:s},o),r.a.createElement(mp,{direction:-1,size:v}),C,r.a.createElement(mp,{direction:1,size:v})))}));var Ep=function(e){return Object(u.w)(op,null!=e?e:u.k)};function vp(){return(vp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Op=l.f.div.withConfig({displayName:"reorderableItem__Container",componentId:"sc-5aswet-0"})(["z-index:1;"]);var yp=function ReorderableItem(e){let{children:t,position:C,onStartReordering:a,disabled:n,...l}=e;const i=Ep((e=>{let{actions:t}=e;return t.handleStartReordering}));return r.a.createElement(Op,vp({},n?null:{onPointerDown:i({position:C,onStartReordering:a})},l),t)};function Mp(){return(Mp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const wp=l.f.div.withConfig({displayName:"reorderableSeparator__Wrapper",componentId:"sc-1tnz6qo-0"})(["opacity:0;position:relative;z-index:",";&:hover{opacity:",";}"],(e=>{let{isReordering:t}=e;return t?2:-1}),(e=>{let{isReordering:t}=e;return t?1:0})),Lp=l.f.div.withConfig({displayName:"reorderableSeparator__Line",componentId:"sc-1tnz6qo-1"})(["height:4px;margin:0 0 -4px;background:",";width:100%;"],(e=>{let{theme:t}=e;return t.colors.accent.secondary}));var _p=function ReorderableSeparator(e){let{position:t,children:C=r.a.createElement(Lp,null),...a}=e;const n=Object(u.G)(null),{isReordering:l,setCurrentSeparator:i}=Ep((e=>{let{state:t,actions:C}=e;return{isReordering:t.isReordering,setCurrentSeparator:C.setCurrentSeparator}})),o=Object(u.s)((()=>{l&&i(t)}),[i,l,t]);return r.a.createElement(wp,Mp({onPointerOver:o,ref:n,isReordering:l},a),C)},jp=C(136);var xp=C(102);var Zp=function(e){const{id:t}=e,{isSelected:C,toggleLayer:a}=Object(H.o)((e=>{let{state:C,actions:a}=e;return{isSelected:C.selectedElementIds.includes(t),toggleLayer:a.toggleLayer}})),n=Object(jp.a)();return{isSelected:C,handleClick:Object(u.s)((e=>{e.preventDefault(),e.stopPropagation(),a({elementId:t,metaKey:e.metaKey,shiftKey:e.shiftKey}),n()}),[a,t,n])}};const Ap=l.f.div.withConfig({displayName:"layer__ActionsContainer",componentId:"sc-aphr0z-0"})(["position:absolute;display:none;align-items:center;height:100%;top:0;right:0;padding-right:6px;column-gap:6px;--background-color:",";--background-color-opaque:",";background-color:var(--background-color);::before{position:absolute;content:'';width:32px;height:100%;top:0;left:0;transform:translateX(-100%);background:linear-gradient( to right,var(--background-color-opaque),var(--background-color) );pointer-events:none;}"],(e=>{let{theme:t}=e;return t.colors.interactiveBg.secondaryNormal}),(e=>{let{theme:t}=e;return Object(LC.c)(t.colors.interactiveBg.secondaryNormal,0)})),Ip=l.f.div.attrs({"data-testid":"layer-option"}).withConfig({displayName:"layer__LayerContainer",componentId:"sc-aphr0z-1"})(["position:relative;height:","px;width:100%;overflow:hidden;:is(:hover,:focus-within) ","{display:inline-flex;}"],35,Ap),Tp=Object(l.f)(b.a).attrs({type:g.c.PLAIN,tabIndex:-1,role:"option"}).withConfig({displayName:"layer__LayerButton",componentId:"sc-aphr0z-2"})(["position:relative;display:grid;grid-template-columns:36px 1fr;border:0;padding:0;background:transparent;height:100%;width:100%;overflow:hidden;align-items:center;user-select:none;border-radius:0;padding-left:12px;transition:revert;",":hover{background:",";}:hover + *{--background-color:",";--background-color-opaque:",";}:active{background:",";}:active + *{--background-color:",";--background-color-opaque:",";}"],(e=>{let{isSelected:t,theme:C}=e;return t&&Object(l.e)(["background:",";+ *{--background-color:",";--background-color-opaque:",";--selected-hover-color:",";}"],C.colors.interactiveBg.secondaryPress,C.colors.interactiveBg.secondaryPress,Object(LC.c)(C.colors.interactiveBg.secondaryPress,0),C.colors.interactiveBg.tertiaryHover)}),(e=>{let{theme:t}=e;return t.colors.interactiveBg.secondaryHover}),(e=>{let{theme:t}=e;return t.colors.interactiveBg.secondaryHover}),(e=>{let{theme:t}=e;return Object(LC.c)(t.colors.interactiveBg.secondaryHover,0)}),(e=>{let{theme:t}=e;return t.colors.interactiveBg.secondaryPress}),(e=>{let{theme:t}=e;return t.colors.interactiveBg.secondaryPress}),(e=>{let{theme:t}=e;return Object(LC.c)(t.colors.interactiveBg.secondaryPress,0)})),Sp=l.f.div.withConfig({displayName:"layer__LayerIconWrapper",componentId:"sc-aphr0z-3"})(["display:flex;align-items:center;justify-content:flex-start;color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.primary})),kp=l.f.div.withConfig({displayName:"layer__LayerDescription",componentId:"sc-aphr0z-4"})(["position:relative;width:100%;overflow:hidden;display:flex;align-items:center;margin-left:0;text-align:left;color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.primary})),Rp=l.f.div.withConfig({displayName:"layer__IconWrapper",componentId:"sc-aphr0z-5"})(["display:flex;align-items:center;justify-content:flex-start;position:absolute;right:0;width:32px;aspect-ratio:1;svg{position:relative;display:block;width:100%;color:",";}"],(e=>{let{theme:t}=e;return t.colors.fg.secondary})),Pp=l.f.div.withConfig({displayName:"layer__LayerContentContainer",componentId:"sc-aphr0z-6"})(["margin-right:8px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;"]),Np=Object(l.f)(b.a).attrs({type:g.c.PLAIN,tabIndex:-1}).withConfig({displayName:"layer__LayerAction",componentId:"sc-aphr0z-7"})(["position:relative;aspect-ratio:1;width:20px;padding:0;svg{position:absolute;width:32px;height:auto;top:50%;left:50%;transform:translate(-50%,-50%);}&&{transition:revert;background:var(--background-color);}:disabled{color:",";}:hover{color:var( --selected-hover-color,"," );}& + &{margin-left:4px;}*{pointer-events:none;}:focus{","}"],(e=>{let{theme:t}=e;return t.colors.fg.secondary}),(e=>{let{theme:t}=e;return t.colors.fg.secondary}),(e=>{let{theme:t}=e;return Q.c.focusCSS(t.colors.border.focus,"var(--background-color)")}));function Dp(e){e.stopPropagation(),e.preventDefault()}var Bp=Object(u.m)((function(e){let{element:t}=e;const{LayerIcon:C,LayerContent:a}=Object(ne.g)(t.type),{isSelected:n,handleClick:l}=Zp(t),{duplicateElementsById:i,deleteElementById:o}=Object(H.o)((e=>{let{actions:t}=e;return{duplicateElementsById:t.duplicateElementsById,deleteElementById:t.deleteElementById}})),c=Object(u.G)(null);ep({node:c.current,eventData:{...tp.SELECT_ELEMENT,label:t.type}});const s=Object(u.G)(null);ep({node:s.current,eventData:{...tp.DELETE_ELEMENT,label:t.type}});const d=`layer-${t.id}`;return r.a.createElement(Ip,null,r.a.createElement(Tp,{ref:c,id:d,onClick:l,isSelected:n},r.a.createElement(Sp,null,r.a.createElement(C,{element:t})),r.a.createElement(kp,null,r.a.createElement(Pp,null,t.isBackground?r.a.createElement(xp.a,null,Object(h.__)("Background","web-stories")):r.a.createElement(a,{element:t})),t.isBackground&&r.a.createElement(Rp,null,r.a.createElement(Te.a.LockClosed,null)))),r.a.createElement(Ap,null,t.isBackground?r.a.createElement(Np,{"aria-label":Object(h.__)("Locked","web-stories"),"aria-describedby":d,disabled:!0},r.a.createElement(Te.a.LockClosed,null)):r.a.createElement(r.a.Fragment,null,r.a.createElement(Br.a,{title:Object(h.__)("Delete Layer","web-stories"),hasTail:!0,isDelayed:!0},r.a.createElement(Np,{ref:s,"aria-label":Object(h.__)("Delete","web-stories"),"aria-describedby":d,onPointerDown:Dp,onClick:()=>o({elementId:t.id})},r.a.createElement(Te.a.Trash,null))),r.a.createElement(Br.a,{title:Object(h.__)("Duplicate Layer","web-stories"),hasTail:!0,isDelayed:!0},r.a.createElement(Np,{"aria-label":Object(h.__)("Duplicate","web-stories"),"aria-describedby":d,onPointerDown:Dp,onClick:()=>i({elementIds:[t.id]})},r.a.createElement(Te.a.PagePlus,null))))))}));const zp=Object(l.f)(gp).attrs({"aria-orientation":"vertical","aria-label":Object(h.__)("Layers List","web-stories")}).withConfig({displayName:"layerList__LayerList",componentId:"sc-9dcbvm-0"})(["flex-direction:column;width:100%;height:100%;align-items:stretch;user-select:",";overflow-y:auto;"],(e=>{let{hasUserSelect:t}=e;return t?"none":"initial"})),Fp=Object(l.f)(_p).withConfig({displayName:"layerList__LayerSeparator",componentId:"sc-9dcbvm-1"})(["height:","px;margin:-","px 0;padding:","px 0;"],35,17.5,17.5),Hp=Object(u.m)((function ReorderableLayer(e){let{id:t,position:C,handleStartReordering:a}=e;const n=Object(H.o)((e=>{var C;let{state:a}=e;return null===(C=a.currentPage)||void 0===C?void 0:C.elements.find((e=>e.id===t))}));return n?r.a.createElement(u.b,{key:t},r.a.createElement(Fp,{position:C+1}),r.a.createElement(yp,{position:C,onStartReordering:a(t),disabled:n.isBackground},r.a.createElement(Bp,{element:n}))):null}));var Gp=function LayerPanel(e){let{layers:t}=e;const{arrangeElement:C,setSelectedElementsById:a}=Object(H.o)((e=>{let{actions:t}=e;return{arrangeElement:t.arrangeElement,setSelectedElementsById:t.setSelectedElementsById}})),n=Object(H.n)((e=>e.onOpenMenu)),l=t.length,i=Object(jp.a)(),o=Object(u.s)((e=>()=>{a({elementIds:[e]}),i()}),[a,i]);return l?r.a.createElement(zp,{onContextMenu:n,onPositionChange:(e,a)=>C({elementId:t.find((t=>t.position===e)).id,position:a}),mode:"vertical",getItemSize:()=>35},t.map((e=>r.a.createElement(Hp,{key:e.id,id:e.id,position:e.position,handleStartReordering:o})))):null};var Vp=function(){const e=Object(H.o)((e=>{var t,C;let{state:a}=e;return(null===(t=a.currentPage)||void 0===t||null===(C=t.elements)||void 0===C?void 0:C.map((e=>e.id)))||uC.I})).map(((e,t)=>({id:e,position:t})));return e.reverse(),e};const Up=l.f.div.withConfig({displayName:"layerPanel__Container",componentId:"sc-15wxdbu-0"})(["margin:0 4px;filter:drop-shadow(0px -4px 8px rgba(0,0,0,0.2));"]),Wp=Object(l.f)(hs).withConfig({displayName:"layerPanel__StyledPanelTitle",componentId:"sc-15wxdbu-1"})(["height:48px;border-top-left-radius:",";border-top-right-radius:",";"],(e=>{let{theme:t}=e;return t.borders.radius.small}),(e=>{let{theme:t}=e;return t.borders.radius.small})),Yp=l.f.div.withConfig({displayName:"layerPanel__DividerContainer",componentId:"sc-15wxdbu-2"})(["background:",";"],(e=>{let{theme:t}=e;return t.colors.bg.tertiary})),$p=l.f.div.withConfig({displayName:"layerPanel__Divider",componentId:"sc-15wxdbu-3"})(["border-bottom:1px solid ",";margin:0 16.5px;"],(e=>{let{theme:t}=e;return t.colors.divider.tertiary}));var qp=Object(u.m)((function(){const e=Vp(),t=lr((e=>{let{state:t}=e;return t.inspectorContentHeight}))-52+2,C=Object(u.C)((()=>Math.round(window.innerHeight/4)),[]);return r.a.createElement(Up,null,r.a.createElement(es,{name:"layer-panel",initialHeight:C,resizable:!0,showDragHandle:!0,showFocusStyles:!1,ariaHidden:!0,collapsedByDefault:!1},r.a.createElement(Wp,{isSecondary:!0,isResizable:!0,count:null==e?void 0:e.length,maxHeight:t},Object(h.__)("Layers","web-stories")),r.a.createElement(Yp,null,r.a.createElement($p,null)),r.a.createElement(vs,{isSecondary:!0,padding:"0"},r.a.createElement(Gp,{layers:e}))))}));function Xp(e,t){try{return new URL(t,e).href}catch(e){return t}}var Kp=C(282);var Qp=function(){const{currentPage:e,selectedElements:t}=Object(H.o)((e=>({currentPage:e.state.currentPage,selectedElements:e.state.selectedElements}))),{pageAttachmentContainer:C}=Object(H.d)((e=>({pageAttachmentContainer:e.state.pageAttachmentContainer}))),{elements:a}=e,n=Object(u.C)((()=>a.filter((e=>{var t;let{link:C}=e;return null==C||null===(t=C.url)||void 0===t?void 0:t.length}))),[a]),r=Object(u.s)((()=>{var a,n;if(!C)return!1;if(null==e||null===(a=e.pageAttachment)||void 0===a||null===(n=a.url)||void 0===n||!n.length)return!1;return t.filter((e=>{var t;let{link:C}=e;return null==C||null===(t=C.url)||void 0===t?void 0:t.length})).filter((e=>Object(Kp.a)(e))).length>0}),[e,t,C]),l=Object(u.s)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return C?e.filter((e=>Object(Kp.a)(e,t))):[]}),[C]),i=Object(u.s)((()=>l(n,!0)),[n,l]),o=Object(u.s)((t=>{var a;return!!C&&(!(null==e||null===(a=e.pageAttachment)||void 0===a||!a.url.length)&&Object(Kp.a)(t,!1))}),[C,e]);return{getLinksInAttachmentArea:i,hasInvalidLinkSelected:r(),isElementInAttachmentArea:o,getElementsInAttachmentArea:l}},Jp=C(172),em=C(90);const tm=l.f.div.withConfig({displayName:"link__IconInfo",componentId:"sc-niusn4-0"})(["display:flex;flex-direction:column;margin-left:20px;"]),Cm=Object(l.f)(cC.a).withConfig({displayName:"link__IconText",componentId:"sc-niusn4-1"})(["color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.secondary})),am=l.f.span.withConfig({displayName:"link__Error",componentId:"sc-niusn4-2"})(["font-size:12px;line-height:16px;color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.negative}));var nm=function LinkPanel(e){var t,C;let{selectedElements:a,pushUpdateForObject:n}=e;const{clearEditing:l,setDisplayLinkGuidelines:i,displayLinkGuidelines:o}=Object(H.d)((e=>({clearEditing:e.actions.clearEditing,setDisplayLinkGuidelines:e.actions.setDisplayLinkGuidelines,displayLinkGuidelines:e.state.displayLinkGuidelines}))),{currentPage:c}=Object(H.o)((e=>({currentPage:e.state.currentPage}))),{highlight:s,resetHighlight:d,cancelHighlight:p}=Ic((e=>({highlight:e[Fx.LINK],resetHighlight:e.onFocusOut,cancelHighlight:e.cancelEffect}))),{getElementsInAttachmentArea:m}=Qp(),f=m(a).length>0&&(null==c||null===(t=c.pageAttachment)||void 0===t||null===(C=t.url)||void 0===C?void 0:C.length)>0,b=Object(u.C)((()=>Object(Jp.a)({icon:null,desc:null})),[]),g=mo(a,"link",b),E=Object(Jp.a)(g),{url:v="",desc:O="",icon:y,rel:M=[]}=E,[w,L]=Object(u.I)(!1),[_,j]=Object(u.I)(!1),{actions:{getLinkMetadata:x}}=Object(H.c)(),{getProxiedUrl:Z,checkResourceAccess:A}=Object(em.a)(),I=Object(u.r)((e=>{let{newUrl:t,newTitle:C,newIcon:a,needsProxy:r}=e;return n("link",(()=>t?Object(Jp.a)({url:t,needsProxy:r,desc:C||"",icon:a?Xp(t,a):""}):null),b,!0)}),[n,b]),[T,S]=Object(u.I)(!Object(sl.a)(Object(sl.b)(v))),k=Object(u.x)(Object(u.s)((async e=>{if(e.startsWith("http://")||e.startsWith("https://")){L(!0);try{const{title:t,image:C}=x?await x(e):{},a=!!C&&await A(C);I({newUrl:e,newTitle:t,newIcon:C,needsProxy:a})}catch(e){S(!0)}finally{L(!1)}}}),[A,x,I]),1200),R=Object(u.s)(((e,t)=>{if(l(),k.cancel(),e.url){if(uC.C===e.url)return;const t=Object(sl.b)(e.url),C=Object(sl.a)(t);S(!C),C&&k(t)}n("link",""!==e.url?{...e}:null,b,t)}),[l,n,b,k]),P=Object(u.s)((e=>{R({icon:null==e?void 0:e.src},!0)}),[R]),N=Boolean(null==v?void 0:v.length),D=N&&!T;Object(u.y)((()=>{if(_){const e=N&&v!==uC.C;i(f&&!e)}}),[a,_,f,N,i,v]);const B=y?Z(E,y):null,z=uC.C===v,F=uC.C===O,G=uC.C===M,V=Object(u.s)((e=>R({rel:e},!0)),[R]);return r.a.createElement(rm,{name:"link",title:Object(h.__)("Link","web-stories"),onAnimationEnd:()=>d(),isPersistable:!s,$_css:(null==s?void 0:s.showEffect)&&dZ.FLASH},r.a.createElement(ml,{ref:e=>{e&&null!=s&&s.focus&&null!=s&&s.showEffect&&(e.addEventListener("keydown",p,{once:!0}),e.focus())},onChange:e=>!o&&R({url:e},!e),onBlur:()=>{i(!1),j(!1)},onFocus:()=>{j(!0)},value:v||"",placeholder:z?uC.B:Object(h.__)("Enter an address to apply a link","web-stories"),isIndeterminate:z,"aria-label":Object(h.__)("Element link","web-stories"),hasError:o}),o&&r.a.createElement(dl,null,r.a.createElement(am,null,Object(h.__)("Link can not reside below the dashed line when a page attachment is present","web-stories"))),D&&r.a.createElement(r.a.Fragment,null,r.a.createElement(dl,null,r.a.createElement(EC.b,{placeholder:F?uC.B:Object(h.__)("Optional description","web-stories"),onChange:e=>{let{target:t}=e;return R({desc:t.value},!t.value)},value:O,"aria-label":Object(h.__)("Link description","web-stories"),isIndeterminate:F,disabled:w,containerStyleOverride:tC})),r.a.createElement(dl,{spaceBetween:!1},r.a.createElement(cl,{handleChange:P,icon:B,isLoading:w,disabled:w}),r.a.createElement(tm,null,r.a.createElement(Cm,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Optional brand icon","web-stories")))),!G&&r.a.createElement(oo,{onChangeRel:V,rel:M})))},rm=Object(l.f)(ys).withConfig({displayName:"link___StyledSimplePanel",componentId:"sc-niusn4-3"})(["",""],(e=>e.$_css));const lm=l.f.label.withConfig({displayName:"pageAttachment__Label",componentId:"sc-qn4x32-0"})(["margin-left:12px;"]),im=Object(l.f)(sC.a).withConfig({displayName:"pageAttachment__StyledCheckbox",componentId:"sc-qn4x32-1"})(["",""],(e=>{let{theme:t}=e;return`\n input[type='checkbox']&.${Q.a.FOCUS_VISIBLE_SELECTOR} ~ div, input[type='checkbox']:focus ~ div {\n box-shadow: 0px 0px 0 2px ${t.colors.bg.secondary}, 0px 0px 0 4px ${t.colors.border.focus} !important;\n }\n `})),om=Object(l.f)(dl).withConfig({displayName:"pageAttachment__StyledRow",componentId:"sc-qn4x32-2"})(["justify-content:flex-start;"]),cm=l.f.div.withConfig({displayName:"pageAttachment__Space",componentId:"sc-qn4x32-3"})(["width:20px;"]);var sm=function PageAttachmentPanel(){const{currentPage:e,updateCurrentPageProperties:t}=Object(H.o)((e=>({updateCurrentPageProperties:e.actions.updateCurrentPageProperties,currentPage:e.state.currentPage}))),{setDisplayLinkGuidelines:C}=Object(H.d)((e=>({setDisplayLinkGuidelines:e.actions.setDisplayLinkGuidelines}))),{actions:{getLinkMetadata:a}}=Object(H.c)(),{pageAttachment:n={}}=e,l=Object(h.__)("Learn more","web-stories"),{url:i,ctaText:o=l,icon:c,theme:s,rel:d=[]}=n,[p,m]=Object(u.I)(o),[f,b]=Object(u.I)(i),[g,E]=Object(u.I)(!1),[v,O]=Object(u.I)(!1),{getLinksInAttachmentArea:y}=Qp(),M=y().length>0;Object(u.y)((()=>()=>{C(!1)}),[M,C,i]),Object(u.y)((()=>{g&&null!=i&&i.length&&E(!1)}),[i,g]);const w=Object(u.s)((e=>{const C={...n,...e};t({properties:{pageAttachment:C}})}),[t,n]),L=Object(u.x)(w,300),{getProxiedUrl:_,checkResourceAccess:j}=Object(em.a)(),x=Object(u.x)(Object(u.s)((async e=>{if(e.startsWith("http://")||e.startsWith("https://")){O(!0);try{const{image:t}=a?await a(e):{},C=t?Xp(e,t):"",n=!!C&&await j(C);w({url:e,icon:C,needsProxy:n})}catch(t){w({url:e,icon:"",needsProxy:!1}),A(!0)}finally{O(!1)}}}),[j,a,w]),1200),[Z,A]=Object(u.I)(i&&!Object(sl.a)(Object(sl.b)(i).trim())),I=p===l,T=Boolean(i)&&!Z,S=Object(u.s)((e=>{x.cancel(),b(e),A(!1);const t=Object(sl.b)(e.trim());Object(sl.a)(t)&&x(t)}),[x]),k=Object(u.s)((e=>{let{target:t}=e;const{value:C}=t;m(C),L({ctaText:C})}),[L]),R=Object(u.s)((e=>{w({icon:null==e?void 0:e.src},!0)}),[w]),P=Object(u.s)((e=>w({rel:e},!0)),[w]),N=Object(u.s)((e=>{let{target:t}=e;t.value?(L.cancel(),w({ctaText:p||l})):(w({ctaText:l}),m(l))}),[p,L,l,w]),D=`cb-${Object(Hn.a)()}`,B=c?_(n,c):null;let z;const F=g||Z;return F&&(z=g?Object(h.__)("Links cannot reside below the dashed line when a page attachment is present. If you add a page attachment, your viewers will not be able to click on the link.","web-stories"):Object(h.__)("Invalid link","web-stories")),r.a.createElement(ys,{name:"pageAttachment",title:Object(h.__)("Page Attachment","web-stories"),collapsedByDefault:!1},r.a.createElement(ml,{onChange:e=>S(null==e?void 0:e.trim()),onBlur:()=>{L.cancel(),w({url:null!=f&&f.trim().length?Object(sl.b)(f.trim()):""})},onFocus:()=>{!M||null!=i&&i.length||(E(!0),C(!0))},value:f,clear:!0,"aria-label":Object(h.__)("Type an address to add a page attachment link","web-stories"),hasError:F,hint:z}),T&&r.a.createElement(r.a.Fragment,null,r.a.createElement(dl,null,r.a.createElement(EC.b,{onChange:k,onBlur:N,value:p,"aria-label":Object(h.__)("Page Attachment CTA text","web-stories"),suffix:I?Object(h.__)("Default","web-stories"):null})),r.a.createElement(om,null,r.a.createElement(im,{id:D,checked:s===uC.D.DARK,onChange:e=>w({theme:e.target.checked?uC.D.DARK:uC.D.LIGHT})}),r.a.createElement(lm,{htmlFor:D},r.a.createElement(cC.a,{as:"span",size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Use dark theme","web-stories")))),r.a.createElement(om,null,r.a.createElement(cl,{handleChange:R,icon:B,isLoading:v,disabled:v}),r.a.createElement(cm,null),r.a.createElement(cC.a,{as:"span",size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Link icon","web-stories"))),r.a.createElement(oo,{onChangeRel:P,rel:d})))},dm=C(240);const um=l.f.div.withConfig({displayName:"warning__WarningContainer",componentId:"sc-16blgsz-0"})(["display:flex;gap:8px;margin:14px auto;border:1px solid ",";border-radius:",";padding:8px;"],(e=>{let{theme:t}=e;return t.colors.border.defaultHover}),(e=>{let{theme:t}=e;return t.borders.radius.small})),pm=Object(l.f)(Te.a.ExclamationTriangle).withConfig({displayName:"warning__WarningIcon",componentId:"sc-16blgsz-1"})(["width:32px;height:100%;color:",";"],(e=>{let{theme:t}=e;return t.colors.status.warning})),mm=Object(l.f)(cC.a).attrs({size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL}).withConfig({displayName:"warning__Message",componentId:"sc-16blgsz-2"})(["max-width:calc(100% - 40px);"]);var fm=function Warning(e){let{message:t}=e;const C=Object(Hi.a)("assertive");return Object(u.y)((()=>{C(t)}),[t,C]),r.a.createElement(um,{"data-testid":"warningContainer"},r.a.createElement(pm,{title:gt.lowContrast.warningIcon}),r.a.createElement(mm,null,t))};const hm={horizontal:!1,vertical:!1},bm=Object(l.f)(dl).withConfig({displayName:"pageBackground__Row",componentId:"sc-1rac0x7-0"})(["justify-content:flex-start;"]),gm=l.f.div.withConfig({displayName:"pageBackground__SelectedMedia",componentId:"sc-1rac0x7-1"})(["width:128px;height:36px;border-radius:4px;border:1px solid ",";display:flex;justify-content:space-between;margin-right:12px;"],(e=>{let{theme:t}=e;return t.colors.border.defaultNormal})),Em=l.f.div.withConfig({displayName:"pageBackground__MediaWrapper",componentId:"sc-1rac0x7-2"})(["height:24px;width:24px;border-radius:4px;overflow:hidden;margin:5px;img{object-fit:cover;max-height:100%;max-width:100%;}"]),vm=Object(l.f)(b.a).withConfig({displayName:"pageBackground__RemoveButton",componentId:"sc-1rac0x7-3"})(["margin:1px;align-self:center;"]),Om=Object(l.f)(b.a).attrs({size:g.a.SMALL,variant:g.d.SQUARE,type:g.c.TERTIARY}).withConfig({displayName:"pageBackground__ReplaceButton",componentId:"sc-1rac0x7-4"})(["margin-right:8px;"]),ym=Object(l.f)(cC.a).withConfig({displayName:"pageBackground__Text",componentId:"sc-1rac0x7-5"})(["align-self:center;width:55px;"]);var Mm=function PageBackgroundPanel(e){var t;let{selectedElements:C,pushUpdate:a}=e;const{combineElements:n,currentPage:l,clearBackgroundElement:i,updateCurrentPageProperties:o}=Object(H.o)((e=>{let{state:t,actions:C}=e;return{currentPage:t.currentPage,clearBackgroundElement:C.clearBackgroundElement,combineElements:C.combineElements,updateCurrentPageProperties:C.updateCurrentPageProperties}})),{capabilities:{hasUploadMediaAction:c}}=Object(H.g)(),s=Object(H.l)((e=>{let{state:{pageWidth:t,pageHeight:C}}=e;return{width:t,height:C}})),[d,p]=Object(u.I)(!1),m=Object(u.s)((e=>{o({properties:{backgroundColor:e}})}),[o]),b=Object(u.s)((()=>{a({isBackground:!1,opacity:100},!0),i()}),[a,i]),E=Object(u.s)((e=>{const t=Object(ne.b)(e.type,Object(dm.a)(e.type,{resource:e}));n({firstElement:t,secondId:C[0].id}),Object(f.g)("replace_background_media")}),[n,C]),v=Object(u.s)((e=>r.a.createElement(Om,{onClick:e,"aria-label":Object(h.__)("Replace","web-stories")},r.a.createElement(Te.a.ArrowCloud,null))),[]),{highlight:O,resetHighlight:y,cancelHighlight:M}=Ic((e=>({highlight:e[Fx.PAGE_BACKGROUND],resetHighlight:e.onFocusOut,cancelHighlight:e.cancelEffect})));Object(u.y)((()=>{AA([l],s).then((e=>{var t;const C=null===(t=e[0])||void 0===t?void 0:t.result,a=null==C?void 0:C.some((e=>{let{isBackground:t}=e;return t}));p(Boolean(a))})).catch((()=>{}))}),[l,s]);const w=C[0];if(!w||!w.isBackground)return null;const L=w.isDefaultBackground,_=w.isBackground&&!L,{backgroundColor:j}=l,{LayerIcon:x}=Object(ne.g)(w.type),Z=(null===(t=C[0])||void 0===t?void 0:t.flip)||hm;return r.a.createElement(wm,{onAnimationEnd:()=>y(),name:"pageBackground",title:Object(h.__)("Page Background","web-stories"),isPersistable:!O,collapsedByDefault:!1,$_css:(null==O?void 0:O.showEffect)&&dZ.FLASH},L&&r.a.createElement(bm,null,r.a.createElement(jr,{ref:e=>{e&&null!=O&&O.focus&&null!=O&&O.showEffect&&(e.addEventListener("keydown",M,{once:!0}),e.focus())},allowsGradient:!0,value:j,onChange:m,label:Object(h.__)("Background color","web-stories"),allowsSavedColors:!0,allowsOpacity:!1})),_&&r.a.createElement(bm,{expand:!1},r.a.createElement(gm,null,r.a.createElement(Em,null,r.a.createElement(x,{element:w})),r.a.createElement(ym,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Media","web-stories")),r.a.createElement(vm,{"aria-label":Object(h.__)("Detach background","web-stories"),onClick:b,size:g.a.SMALL,variant:g.d.SQUARE,type:g.c.TERTIARY},r.a.createElement(Te.a.Cross,null))),c&&r.a.createElement(Br.a,{title:Object(h.__)("Replace","web-stories")},r.a.createElement(hl,{buttonInsertText:Object(h.__)("Use as background","web-stories"),onInsert:E,renderButton:v})),r.a.createElement(oC,{onChange:e=>a({flip:e},!0),value:Z})),d&&r.a.createElement(fm,{message:gt.lowContrast.backgroundPanel}))},wm=Object(l.f)(ys).withConfig({displayName:"pageBackground___StyledSimplePanel",componentId:"sc-1rac0x7-6"})(["",""],(e=>e.$_css));var Lm=function ShapeStylePanel(e){let{selectedElements:t,pushUpdate:C}=e;const a=so(t,"backgroundColor"),n=Object(u.s)((e=>{C({backgroundColor:e},!0)}),[C]),{highlight:l,resetHighlight:i,cancelHighlight:o}=Ic((e=>({highlight:e[Fx.STYLE],resetHighlight:e.onFocusOut,cancelHighlight:e.cancelEffect})));return r.a.createElement(_m,{onAnimationEnd:()=>i(),name:"shapeStyle",title:Object(h.__)("Color","web-stories"),isPersistable:!l,"aria-labelledby":null,"aria-label":Object(h.__)("Shape style","web-stories"),$_css:(null==l?void 0:l.showEffect)&&dZ.FLASH},r.a.createElement(dl,null,r.a.createElement(jr,{ref:e=>{e&&null!=l&&l.focus&&null!=l&&l.showEffect&&(e.addEventListener("keydown",o,{once:!0}),e.focus())},allowsGradient:!0,value:a,isMultiple:""===a,onChange:n,label:Object(h.__)("Background color","web-stories"),allowsSavedColors:!0})))},_m=Object(l.f)(ys).withConfig({displayName:"shapeStyle___StyledSimplePanel",componentId:"sc-1ekkvr9-0"})(["",""],(e=>e.$_css)),jm=C(83);var xm=(e,t)=>{let{MIN:C,MAX:a}=t;return Math.min(Math.max(e,C),a)};const Zm={MIN:-360,MAX:360},Am={MIN:1,MAX:1e3},Im={MIN:1,MAX:1e3},Tm={MIN:1,MAX:ee.h-1},Sm={MIN:1-Math.floor(ee.a),MAX:ee.f+Math.floor(ee.a)-1},km={horizontal:!1,vertical:!1};function Rm(e){return"number"==typeof e&&!isNaN(e)}var Pm=function(e,t,C){Wl(((t,C,a)=>{let{width:n,height:r}=C,{width:l,height:i}=a;const{type:o}=t,c=Boolean(n),s=Boolean(r);if(!c&&!s)return null;const{updateForResizeEvent:d}=Object(ne.g)(o);if(d){return d(t,[c?1:0,s?1:0],xm(n,Am),xm(r,Im))}if(e){const e=l/i;if(!c)return{width:xm(Object(Ru.b)(r*e),Am)};if(!s)return{height:xm(Object(Ru.b)(n/e),Im)}}return null}),[e]),Wl((e=>{let{rotationAngle:t}=e;return{rotationAngle:t%360}}),[]),Wl((e=>{let{rotationAngle:t,x:C,y:a,width:n,height:r}=e;const l=Object(ku.a)(t,C,a,n,r),i=C-l.x,o=a-l.y;return{x:xm(C,{MIN:Tm.MIN+i-l.width,MAX:Tm.MAX+i}),y:xm(a,{MIN:Sm.MIN+o-l.height,MAX:Sm.MAX+o})}}),[]);const a=Object(u.s)(((t,C,a)=>e&&t>=a.MAX?xm(a.MAX*C,a):xm(t,a)),[e]);Wl(((e,t)=>{let{height:C}=e,{width:n,height:r}=t;const l=r/n;return C=xm(C,Im),Rm(l)?{height:a(Object(Ru.b)(C),l,Im)}:{height:xm(C,Im)}}),[t,e]),Wl(((e,t)=>{let{width:C}=e,{width:n,height:r}=t;const l=n/r;return C=xm(C,Am),Rm(l)?{width:a(Object(Ru.b)(C),l,Am)}:{width:xm(C,Am)}}),[C,e])};const Nm={MIN:0,MAX:100};function Dm(e){let{opacity:t}=e;return void 0!==t?t:Nm.MAX}var Bm=function OpacityControls(e){let{selectedElements:t,pushUpdate:C}=e;const a=so(t,Dm),n=Object(u.s)(((e,t)=>C({opacity:null!=t?t:100},!0)),[C]);return r.a.createElement(NumericInput,{suffix:r.a.createElement(Te.a.ColorDrop,null),unit:Object(h._x)("%","Percentage","web-stories"),value:a,onChange:n,min:Nm.MIN,max:Nm.MAX,"aria-label":Object(h.__)("Opacity in percent","web-stories"),placeholder:a===uC.C?uC.B:"",isIndeterminate:a===uC.C,containerStyleOverride:tC})};const zm={topLeft:0,topRight:0,bottomRight:0,bottomLeft:0,locked:!0},Fm=l.f.div.withConfig({displayName:"radius__FlexContainer",componentId:"sc-10ryvqs-0"})(["display:flex;"]),Hm=l.f.div.withConfig({displayName:"radius__LockContainer",componentId:"sc-10ryvqs-1"})(["position:relative;display:flex;align-items:center;width:32px;margin-left:8px;"]),Gm=Object(l.f)(LockToggle).withConfig({displayName:"radius__StyledLockToggle",componentId:"sc-10ryvqs-2"})(["",";"],eC),Vm=Object(l.f)(Te.a.Corner).withConfig({displayName:"radius__TopLeft",componentId:"sc-10ryvqs-3"})(["transform:rotate(90deg);"]),Um=Object(l.f)(Te.a.Corner).withConfig({displayName:"radius__TopRight",componentId:"sc-10ryvqs-4"})(["transform:rotate(180deg);"]),Wm=Object(l.f)(Te.a.Corner).withConfig({displayName:"radius__BottomRight",componentId:"sc-10ryvqs-5"})(["transform:rotate(270deg);"]);var Ym=function RadiusControls(e){let{selectedElements:t,pushUpdateForObject:C}=e;const a=mo(t,"borderRadius",zm),n=t.every((e=>Object(ou.b)(e))),l=!0===a.locked,i=Object(u.s)(((e,t)=>{C("borderRadius",l?{topLeft:t,topRight:t,bottomRight:t,bottomLeft:t}:{[e]:t},zm,!0)}),[C,l]),o=Object(u.s)((e=>{const t=e?{locked:e,topLeft:a.topLeft,topRight:a.topLeft,bottomRight:a.topLeft,bottomLeft:a.topLeft}:{locked:e};C("borderRadius",t,zm,!0)}),[C,a]);if(!n)return null;const c=l?Object(h.__)("Corner Radius","web-stories"):Object(h.__)("Top left corner radius","web-stories");return r.a.createElement(Fm,null,r.a.createElement(mu,{locked:l},r.a.createElement(uu,{suffix:r.a.createElement(Vm,null),value:a.topLeft===uC.C?"":a.topLeft,"aria-label":c,onChange:(e,t)=>i("topLeft",t),placeholder:a.topLeft===uC.C?uC.B:"",isIndeterminate:a.topLeft===uC.C}),!l&&r.a.createElement(r.a.Fragment,null,r.a.createElement(uu,{suffix:r.a.createElement(Um,null),value:a.topRight===uC.C?"":a.topRight,"aria-label":Object(h.__)("Top right corner radius","web-stories"),onChange:(e,t)=>i("topRight",t),placeholder:a.topRight===uC.C?uC.B:"",isIndeterminate:a.topRight===uC.C}),r.a.createElement(uu,{value:a.bottomLeft===uC.C?"":a.bottomLeft,"aria-label":Object(h.__)("Bottom left corner radius","web-stories"),onChange:(e,t)=>i("bottomLeft",t),placeholder:a.bottomLeft===uC.C?uC.B:"",suffix:r.a.createElement(Te.a.Corner,null),isIndeterminate:a.bottomLeft===uC.C}),r.a.createElement(uu,{value:a.bottomRight===uC.C?"":a.bottomRight,"aria-label":Object(h.__)("Bottom right corner radius","web-stories"),onChange:(e,t)=>i("bottomRight",t),placeholder:a.bottomRight===uC.C?uC.B:"",suffix:r.a.createElement(Wm,null),isIndeterminate:a.bottomRight===uC.C}))),r.a.createElement(Hm,null,r.a.createElement(Je.a,{title:Object(h.__)("Toggle consistent corner radius","web-stories"),key:a.locked.toString()},r.a.createElement(Gm,{isLocked:a.locked,onClick:()=>o(!a.locked),"aria-label":Object(h.__)("Toggle consistent corner radius","web-stories")}))))};function $m(){return($m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const qm=Object(l.f)(LockToggle).withConfig({displayName:"sizePosition__StyledLockToggle",componentId:"sc-7rw4xb-0"})(["",";"],eC);function Xm(e){var t;return(null===jm.a||void 0===jm.a?void 0:jm.a[null==e||null===(t=e.sticker)||void 0===t?void 0:t.type].aspectRatio)||1}const Km=Object(l.e)(["grid-template-areas:"," 'x . . . y . .' 'w . d . h . l' 'r . . . o . .' 'c c c c c c c';"],(e=>{let{isSingleMedia:t}=e;return t?"'b b b b b . .'":null})),Qm=Object(l.e)(["grid-template-areas:"," 'x . . . y . .' 'w . d . h . l' 'r . . . f . .' ",";"],(e=>{let{isSingleMedia:t}=e;return t?"'b b b b b . .'":null}),(e=>{let{unlockedRadius:t}=e;return t?"\n 'o . . . . . .'\n 'c c c c c c c'\n":"'o . . . c c c'"})),Jm=l.f.div.withConfig({displayName:"sizePosition__Grid",componentId:"sc-7rw4xb-1"})(["display:grid;"," grid-template-columns:1fr 4px 8px 4px 1fr 8px 32px;grid-template-rows:repeat(4,36px);row-gap:16px;align-items:center;justify-items:start;margin-bottom:16px;"],(e=>{let{canFlip:t}=e;return t?Qm:Km})),ef=l.f.div.withConfig({displayName:"sizePosition__Area",componentId:"sc-7rw4xb-2"})(["grid-area:",";width:100%;"],(e=>{let{area:t}=e;return t})),tf=l.f.div.withConfig({displayName:"sizePosition__Dash",componentId:"sc-7rw4xb-3"})(["height:1px;width:100%;background:",";"],(e=>{let{theme:t}=e;return t.colors.divider.primary})),Cf=Object(l.f)(b.a).withConfig({displayName:"sizePosition__StyledButton",componentId:"sc-7rw4xb-4"})(["padding:10px 16px;width:100%;",";"],eC);var af=function SizePositionPanel(e){const{selectedElements:t,submittedSelectedElements:C,pushUpdate:a,pushUpdateForObject:n}=e,l=so(t,"x"),i=so(t,"y"),o=so(t,"width"),c=so(t,"height"),s=so(t,"rotationAngle"),d=mo(t,"flip",km),p=mo(t,"borderRadius",{locked:!0}),m=Object(u.C)((()=>so(C,"width")/so(C,"height")),[C]),f=so(t,"lockAspectRatio"),b=Object(u.G)(null);ep({node:b.current,eventData:tp.SET_BACKGROUND_MEDIA});const E=f===uC.C||f,{currentPage:v,combineElements:O}=Object(VC.a)((e=>({currentPage:e.state.currentPage,combineElements:e.actions.combineElements}))),y=null==v?void 0:v.elements[0].id,M=1===t.length,{isMedia:w}=Object(ne.g)(t[0].type),L=t.every((e=>{let{type:t}=e;return Object(ne.g)(t).canFlip})),_=t.some((e=>{let{type:t}=e;return Object(ne.g)(t).isAspectAlwaysLocked})),j=t.some((e=>{let{type:t}=e;return"text"===t})),x=Object(u.C)((()=>M?Object(ku.a)(s,l,i,o,c):{}),[s,l,i,o,c,M]),Z=l-x.x,A=i-x.y,I=M?{minX:Tm.MIN+Z-x.width,minY:Sm.MIN+A-x.height,maxX:Tm.MAX+Z,maxY:Sm.MAX+A}:function(e){const t=e.map((e=>Object(ku.a)(e.rotationAngle,e.x,e.y,e.width,e.height)));return e.reduce(((e,C,a)=>{const n=t[a],r=C.x-n.x,l=C.y-n.y,i=Tm.MIN+r-n.width,o=Sm.MIN+l-n.height,c=Tm.MAX+r,s=Sm.MAX+l;return{minX:e.minX?Math.max(e.minX,i):i,minY:e.minY?Math.max(e.minY,o):o,maxX:e.maxX?Math.min(e.maxX,c):c,maxY:e.maxY?Math.min(e.maxY,s):s}}),{})}(t),T=(e,t)=>f===uC.C?{lockAspectRatio:E,height:t,width:e}:{height:t,width:e};Pm(E,c,o);const S=Object(u.s)((()=>{O({firstElement:t[0],secondId:y})}),[t,O,y]),k=!E&&j,R=uC.C===c?uC.B:null,P=k?Object(h.__)("Auto","web-stories"):R,N=Object(u.s)((e=>({isIndeterminate:uC.C===e,placeholder:uC.C===e?uC.B:null})),[]);return r.a.createElement(ys,{name:"size",title:Object(h.__)("Selection","web-stories")},r.a.createElement(Jm,{isSingleMedia:w&&M,canFlip:L,unlockedRadius:!p.locked},w&&M&&r.a.createElement(ef,{area:"b"},r.a.createElement(Cf,{ref:b,onClick:S,type:g.c.SECONDARY,size:g.a.SMALL,variant:g.d.RECTANGLE},Object(h.__)("Set as background","web-stories"))),r.a.createElement(ef,{area:"x"},r.a.createElement(NumericInput,$m({suffix:Object(h._x)("X","Position on X axis","web-stories"),value:l,min:I.minX,max:I.maxX,onChange:(e,t)=>a({x:t},!0),"aria-label":Object(h.__)("X position","web-stories"),canBeNegative:!0},N(l),{containerStyleOverride:tC}))),r.a.createElement(ef,{area:"y"},r.a.createElement(NumericInput,$m({suffix:Object(h._x)("Y","Position on Y axis","web-stories"),value:i,min:I.minY,max:I.maxY,onChange:(e,t)=>a({y:t},!0),"aria-label":Object(h.__)("Y position","web-stories"),canBeNegative:!0},N(i),{containerStyleOverride:tC}))),r.a.createElement(ef,{area:"w"},r.a.createElement(NumericInput,$m({suffix:Object(h._x)("W","The Width dimension","web-stories"),value:o,min:Am.MIN,max:Am.MAX,onChange:(e,t)=>{const C=t;let n=c;E&&(""===C?n="":Rm(C/m)&&(n=Object(Ru.b)(C/m))),a((e=>{if("sticker"===(null==e?void 0:e.type)){const t=Xm(e);return T(C,Math.floor(C/t))}return T(C,n)}),!0)},"aria-label":Object(h.__)("Width","web-stories")},N(o),{containerStyleOverride:tC}))),r.a.createElement(ef,{area:"d"},r.a.createElement(tf,null)),r.a.createElement(ef,{area:"h"},r.a.createElement(NumericInput,{suffix:Object(h._x)("H","The Height dimension","web-stories"),value:k?"":c,disabled:k,min:Im.MIN,max:Im.MAX,onChange:(e,t)=>{const C=t;let n=o;E&&(""===C?n="":Rm(C*m)&&(n=Object(Ru.b)(C*m))),a((e=>{if("sticker"===(null==e?void 0:e.type)){const t=Xm(e);return T(Math.floor(C*t),C)}return T(n,C)}),!0)},"aria-label":Object(h.__)("Height","web-stories"),isIndeterminate:uC.C===c,placeholder:P,containerStyleOverride:tC})),r.a.createElement(ef,{area:"l"},r.a.createElement(Br.a,{title:Object(h.__)("Lock aspect ratio","web-stories")},r.a.createElement(qm,{"aria-label":Object(h.__)("Lock aspect ratio","web-stories"),title:Object(h.__)("Lock aspect ratio","web-stories"),isLocked:E||_,disabled:_,onClick:()=>!_&&a({lockAspectRatio:!E},!0)}))),r.a.createElement(ef,{area:"r"},r.a.createElement(NumericInput,$m({suffix:r.a.createElement(Te.a.Angle,null),unit:Object(h._x)("°","Degrees, 0 - 360.","web-stories"),value:s,min:Zm.MIN,max:Zm.MAX,onChange:(e,t)=>a({rotationAngle:t},!0),"aria-label":Object(h.__)("Rotation","web-stories"),canBeNegative:!0},N(s),{containerStyleOverride:tC}))),L&&r.a.createElement(ef,{area:"f"},r.a.createElement(oC,{onChange:e=>n("flip",e,km,!0),value:d})),r.a.createElement(ef,{area:"o"},r.a.createElement(Bm,e)),r.a.createElement(ef,{area:"c"},r.a.createElement(Ym,e))))},nf=C(148),rf=C(246);var lf=function(e){const{width:t,height:C,rotationAngle:a,x:n,y:r}=e,l=Object(Ru.b)(Object(nf.b)(e,t)),[i,o]=Object(rf.a)(a,0,0,0,l-C);return{height:l,x:Object(Ru.b)(n+i),y:Object(Ru.b)(r+o)}},of=C(78),cf=C(277);function sf(e,t){return Object.fromEntries(Object.keys(t).map((C=>{const a=e[C]===uC.C,n=void 0!==e[C]&&!function(e,t){const C=e&&"object"==typeof e&&(e.type||e.color),a=t&&"object"==typeof t&&(t.type||t.color);return C&&a?Object(vn.a)(e,t):e===t}(e[C],t[C]);return a||n?[C,uC.C]:[C,t[C]]})))}var df=function(e,t){const{state:{hasCurrentEditor:C,selectionInfo:a},actions:{selectionActions:n}}=Object(cf.a)(),{clearEditing:r}=Object(H.d)((e=>{let{actions:{clearEditing:t}}=e;return{clearEditing:t}})),l=Object(u.C)((()=>C?a:e.map((e=>{let{content:t}=e;return t})).map(Mn.b).reduce(sf,{})),[C,a,e]),i=Object(u.s)((function(e){for(var C=arguments.length,a=new Array(C>1?C-1:0),n=1;n<C;n++)a[n-1]=arguments[n];return t((t=>{let{content:C}=t;return{content:e(C,...a)}}),!0)}),[t]),o=Object(u.G)(null),c=Object(u.s)((function(){for(var e=arguments.length,t=new Array(e),C=0;C<e;C++)t[C]=arguments[C];o.current=t}),[o]);Object(u.y)((()=>{const e=o.current;e&&(i(...e),o.current=null)}),[e,o,i]);const s=Object(u.C)((()=>{const e=Object(Mn.a)();return C?{handleClickBold:()=>n.toggleBoldInSelection(),handleSelectFontWeight:n.setFontWeightInSelection,handleClickItalic:n.toggleItalicInSelection,handleClickUnderline:n.toggleUnderlineInSelection,handleClickUppercase:n.toggleUppercaseInSelection,handleSetLetterSpacing:n.setLetterSpacingInSelection,handleSetColor:n.setColorInSelection,handleResetFontWeight:async t=>{await r(),c(e.setFontWeight,t)}}:{handleClickBold:t=>i(e.toggleBold,t),handleSelectFontWeight:t=>i(e.setFontWeight,t),handleClickItalic:t=>i(e.toggleItalic,t),handleClickUnderline:t=>i(e.toggleUnderline,t),handleClickUppercase:t=>i(e.toggleUppercase,t),handleSetLetterSpacing:t=>i(e.setLetterSpacing,t),handleSetColor:t=>i(e.setColor,t),handleResetFontWeight:t=>i(e.setFontWeight,t)}}),[C,n,i,r,c]),d=Object(u.s)((()=>e.filter((e=>{let{type:t}=e;return"text"===t})).length>0),[e]);return Object(ye.g)({key:["mod+b","mod+u","mod+i"]},(e=>{let{key:t}=e;if(d)switch(t){case"b":s.handleClickBold();break;case"i":s.handleClickItalic();break;case"u":s.handleClickUnderline()}}),[s,d]),{textInfo:l,handlers:s}};function uf(){return(uf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const pf={MIN:.5,MAX:10},mf={MIN:0,MAX:300},ff=Object(l.f)(NumericInput).withConfig({displayName:"style__StyledNumericInput",componentId:"sc-9ups92-0"})(["flex-grow:1;"]),hf=l.f.div.withConfig({displayName:"style__Space",componentId:"sc-9ups92-1"})(["flex:0 0 3px;"]),bf=Object(l.f)(ToggleButton).withConfig({displayName:"style__StyledToggle",componentId:"sc-9ups92-2"})(["",";"],eC);function gf(e){return r.a.createElement(bf,uf({size:g.a.SMALL,variant:g.d.SQUARE},e))}var Ef=function StylePanel(e){let{selectedElements:t,pushUpdate:C}=e;const{actions:{maybeEnqueueFontStyle:a}}=Object(I.b)(),n=so(t,"textAlign"),l=so(t,"lineHeight"),{textInfo:{isBold:i,isItalic:o,isUnderline:c,isUppercase:s,letterSpacing:d,fontWeight:p},handlers:{handleClickBold:m,handleClickItalic:f,handleClickUnderline:b,handleClickUppercase:g,handleSetLetterSpacing:E}}=df(t,C),v=Object(u.s)(((e,t)=>E(xm(t,mf))),[E]);Wl((e=>{let{lineHeight:t}=e;return{lineHeight:xm(t,pf)}}),[]);const O=Object(u.s)((e=>()=>{C({textAlign:n===e?"":e},!0)}),[C,n]),y=!0===i,M=!0===o,w=!0===c,L=!0===s;return r.a.createElement(r.a.Fragment,null,r.a.createElement(dl,null,r.a.createElement(ff,{"aria-label":Object(h.__)("Line-height","web-stories"),isFloat:!0,value:l,min:pf.MIN,max:pf.MAX,suffix:r.a.createElement(Te.a.LetterAHeight,null),onChange:(e,t)=>C({lineHeight:t},!0),allowEmpty:!0,isIndeterminate:uC.C===l,placeholder:uC.C===l?uC.B:null,containerStyleOverride:tC}),r.a.createElement(hf,null),r.a.createElement(ff,{"aria-label":Object(h.__)("Letter-spacing","web-stories"),value:d,min:mf.MIN,max:mf.MAX,suffix:r.a.createElement(Te.a.LetterAWidth,null),unit:"%",onChange:v,allowEmpty:!0,isIndeterminate:uC.C===d,placeholder:uC.C===d?uC.B:null,containerStyleOverride:tC})),r.a.createElement(dl,null,r.a.createElement(gf,{isToggled:"left"===n,onClick:O("left"),"aria-label":Object(h.__)("Align text left","web-stories")},r.a.createElement(Te.a.AlignTextLeft,null)),r.a.createElement(gf,{isToggled:"center"===n,onClick:O("center"),"aria-label":Object(h.__)("Align text center","web-stories")},r.a.createElement(Te.a.AlignTextCenter,null)),r.a.createElement(gf,{isToggled:"right"===n,onClick:O("right"),"aria-label":Object(h.__)("Align text right","web-stories")},r.a.createElement(Te.a.AlignTextRight,null)),r.a.createElement(gf,{isToggled:"justify"===n,onClick:O("justify"),"aria-label":Object(h.__)("Align text justified","web-stories")},r.a.createElement(Te.a.AlignTextJustified,null)),r.a.createElement(gf,{isToggled:y,onClick:()=>m(!y),"aria-label":Object(h.__)("Bold","web-stories")},r.a.createElement(Te.a.LetterBBold,null)),r.a.createElement(gf,{isToggled:M,onClick:async()=>{await a(t.map((e=>{let{font:t,content:C}=e;return{font:t,fontStyle:M?"normal":"italic",fontWeight:p,content:Object(of.a)(C)}}))),f(!M)},"aria-label":Object(h.__)("Italic","web-stories")},r.a.createElement(Te.a.LetterIItalic,null)),r.a.createElement(gf,{isToggled:w,onClick:()=>b(!w),"aria-label":Object(h.__)("Underline","web-stories")},r.a.createElement(Te.a.LetterUUnderline,null)),r.a.createElement(gf,{isToggled:L,onClick:()=>g(!L),"aria-label":Object(h.__)("Uppercase","web-stories")},r.a.createElement(Te.a.LetterTUppercase,null))))};var vf=function ColorControls(e){let{selectedElements:t,pushUpdate:C,textColorRef:a}=e;const{textInfo:{color:n},handlers:{handleSetColor:l}}=df(t,C);return r.a.createElement(dl,null,r.a.createElement(jr,{"data-testid":"text.color",value:n,onChange:l,allowsSavedColors:!0,label:Object(h.__)("Text color","web-stories"),labelId:"text-color-label",changedStyle:"color",ref:a,hasEyedropper:!0}))};var Of=function(e){const t=[{label:uC.l[400],value:"400"}];return null!=e&&e.weights?e.weights.map((e=>({label:uC.l[e],value:e.toString()}))):t},yf=C(791);const Mf=400;var wf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Mf,t=arguments.length>1?arguments[1]:void 0;return e=parseInt(e),isNaN(parseInt(e))?Mf:t&&0!==t.length?t.reduce(((t,C)=>{t=parseInt(t),C=parseInt(C);const a=Math.abs(t-e),n=Math.abs(C-e);return a===n?t<C?t:C:n<a?C:t})):e};function Lf(){return(Lf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var _f=Object(u.j)((function FontPicker(e,t){let{selectedElements:C,pushUpdate:a,highlightStylesOverride:n}=e;const l=so(C,(e=>{let{font:t}=e;return null==t?void 0:t.family})),{textInfo:{fontWeight:i,isItalic:o},handlers:{handleResetFontWeight:c}}=df(C,a),s=o?"italic":"normal",{fonts:d=[],recentFonts:p=[],curatedFonts:m=[],customFonts:f=[],addRecentFont:b,maybeEnqueueFontStyle:g,ensureMenuFontsLoaded:E,ensureCustomFontsLoaded:v,getFontsBySearch:O}=Object(I.b)((e=>{let{actions:t,state:C}=e;return{getFontsBySearch:t.getFontsBySearch,addRecentFont:t.addRecentFont,ensureMenuFontsLoaded:t.ensureMenuFontsLoaded,ensureCustomFontsLoaded:t.ensureCustomFontsLoaded,maybeEnqueueFontStyle:t.maybeEnqueueFontStyle,recentFonts:C.recentFonts,curatedFonts:C.curatedFonts,fonts:C.fonts,customFonts:C.customFonts}})),y=Object(u.s)((async e=>{await g(C.map((t=>{let{content:C}=t;return{font:e,fontStyle:s,fontWeight:i,content:Object(of.a)(C)}}))),b(e),a({font:e},!0);const t=wf(400,e.weights);await c(t)}),[b,s,i,g,a,C,c]),M=Object(u.C)((()=>{const e=new Map;return d.forEach((t=>{e.set(t.id,t)})),e}),[d]),w=Object(u.s)((e=>{e.length&&(E(e.filter((e=>{var t;return"fonts.google.com"===(null===(t=M.get(e))||void 0===t?void 0:t.service)}))),v(e.filter((e=>{var t;return"custom"===(null===(t=M.get(e))||void 0===t?void 0:t.service)}))))}),[M,v,E]),L=Object(u.s)(((e,t)=>{let{option:C,...a}=e;return r.a.createElement(yf.a.Option,Lf({ref:t},a,{fontFamily:"fonts.google.com"===C.service?`'${C.name}::MENU'`:C.name}),l===C.id&&r.a.createElement(yf.a.Selected,{"aria-label":Object(h.__)("Selected","web-stories")}),C.name)}),[l]),_=Object(u.C)((()=>[...null!=f&&f.length?[{label:Object(h.__)("Your fonts","web-stories"),options:f}]:[],...null!=p&&p.length?[{label:Object(h.__)("Recently used","web-stories"),options:p}]:[]]),[f,p]);return r.a.createElement(yf.a.DropDown,{ref:t,highlightStylesOverride:n,"data-testid":"font","aria-label":Object(h.__)("Font family","web-stories"),options:d,primaryOptions:m,primaryLabel:Object(h.__)("Recommended","web-stories"),priorityOptionGroups:_,searchResultsLabel:Object(h.__)("Search results","web-stories"),selectedId:uC.C===l?"":l,placeholder:uC.C===l?uC.B:l,hasSearch:!0,getOptionsByQuery:O,onChange:y,onObserve:w,renderer:Object(u.j)(L),disabled:!(null!=d&&d.length),dropDownLabel:Object(h.__)("Font","web-stories")})}));const jf={MIN:8,MAX:800},xf=l.f.div.withConfig({displayName:"font__Space",componentId:"sc-1upk4a3-0"})(["flex:0 0 10px;"]),Zf=Object(l.f)(NumericInput).withConfig({displayName:"font__StyledNumericInput",componentId:"sc-1upk4a3-1"})(["flex-basis:80px;text-align:center;"]),Af=Object(l.f)(ki.a).withConfig({displayName:"font__StyledDropDown",componentId:"sc-1upk4a3-2"})(["background-color:transparent;"]);var If=function FontControls(e){let{selectedElements:t,pushUpdate:C,fontDropdownRef:a,highlightStylesOverride:n}=e;const l=so(t,(e=>{let{font:t}=e;return null==t?void 0:t.family})),i=so(t,"fontSize"),{textInfo:{fontWeight:o,isItalic:c},handlers:{handleSelectFontWeight:s}}=df(t,C),{fonts:d=[],maybeEnqueueFontStyle:p,getFontByName:m}=Object(I.b)((e=>{let{actions:{maybeEnqueueFontStyle:t,getFontByName:C},state:{fonts:a}}=e;return{maybeEnqueueFontStyle:t,getFontByName:C,fonts:a}})),f=Object(u.C)((()=>Of(m(l))),[m,l]),b=c?"italic":"normal",g=Object(u.s)((async(e,C)=>{await p(t.map((e=>{let{font:t,content:a}=e;return{font:t,fontStyle:b,fontWeight:parseInt(C),content:Object(of.a)(a)}}))),s(C)}),[b,s,p,t]);return Wl((e=>{let{fontSize:t}=e;return{fontSize:xm(t,jf)}}),[]),r.a.createElement(r.a.Fragment,null,d&&r.a.createElement(dl,null,r.a.createElement(_f,{ref:a,selectedElements:t,pushUpdate:C,highlightStylesOverride:n})),r.a.createElement(dl,null,f&&r.a.createElement(r.a.Fragment,null,r.a.createElement(Af,{ariaLabel:Object(h.__)("Font weight","web-stories"),placeholder:uC.B,options:f,selectedValue:uC.C===o?"":o,onMenuItemClick:g,selectButtonStylesOverride:eC}),r.a.createElement(xf,null)),r.a.createElement(Zf,{"aria-label":Object(h.__)("Font size","web-stories"),isFloat:!0,value:i,onChange:(e,t)=>C({fontSize:t},!0),min:jf.MIN,max:jf.MAX,isIndeterminate:uC.C===i,placeholder:uC.C===i?uC.B:null,containerStyleOverride:tC})))},Tf=C(560);function Sf(){return(Sf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const kf=l.f.div.attrs({role:"listbox"}).withConfig({displayName:"pillGroup__Container",componentId:"sc-1wd98s2-0"})(["display:flex;flex:1;column-gap:4px;"]);var Rf=function PillGroup(e){let{options:t,value:C,onSelect:a,...n}=e;return r.a.createElement(kf,null,t.map((e=>{let{id:t,label:l}=e;return r.a.createElement(Tf.a,Sf({key:t,isActive:t===C,onClick:()=>a(t),role:"option"},n),l)})))};function Pf(e){var t,C;return null!=e&&null!==(t=e.padding)&&void 0!==t&&t.hasHiddenPadding?e.padding:{...null!==(C=e.padding)&&void 0!==C?C:{},hasHiddenPadding:!0,...["vertical","horizontal"].reduce(((t,C)=>{var a;return t[C]=((null==e||null===(a=e.padding)||void 0===a?void 0:a[C])||0)+uC.o[C],t}),{})}}function Nf(e){var t,C;return null!=e&&null!==(t=e.padding)&&void 0!==t&&t.hasHiddenPadding?{...null!==(C=e.padding)&&void 0!==C?C:{},hasHiddenPadding:!1,...["vertical","horizontal"].reduce(((t,C)=>{var a;return t[C]=((null==e||null===(a=e.padding)||void 0===a?void 0:a[C])||0)-uC.o[C],t}),{})}:e.padding}function Df(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"horizontal";return null!=t&&null!==(e=t.padding)&&void 0!==e&&e.hasHiddenPadding?uC.o[C]:0}const Bf=Object(l.f)(dl).withConfig({displayName:"backgroundColor__FillRow",componentId:"sc-2oqmdd-0"})(["align-items:flex-start;justify-content:space-between;button{flex:1;z-index:1;}"]),zf=[{id:uC.b.NONE,label:Object(h.__)("None","web-stories")},{id:uC.b.FILL,label:Object(h.__)("Fill","web-stories")},{id:uC.b.HIGHLIGHT,label:Object(h.__)("Highlight","web-stories")}];var Ff=function BackgroundControls(e){let{selectedElements:t,pushUpdate:C}=e;const a=po(t,"backgroundColor"),n=so(t,"backgroundTextMode"),l=Object(u.G)(),i=Object(u.s)((e=>{C((t=>({backgroundTextMode:e,padding:[uC.b.FILL,uC.b.HIGHLIGHT].includes(e)?Pf(t):Nf(t)})),!0)}),[C]),o=Object(u.s)((e=>{i(e)}),[i]);return r.a.createElement(r.a.Fragment,null,r.a.createElement(Bf,{ref:l},r.a.createElement(Rf,{value:n,onSelect:o,options:zf,pillStyleOverride:eC})),n!==uC.b.NONE&&r.a.createElement(dl,null,r.a.createElement(jr,{"data-testid":"text.backgroundColor",allowsGradient:!0,allowsSavedColors:!0,value:a,onChange:e=>C({backgroundColor:e},!0),label:Object(h.__)("Background color","web-stories"),labelId:"background-color-label",changedStyle:"background",hasEyedropper:!0})))};function Hf(){return(Hf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Gf={horizontal:0,vertical:0,locked:!0,hasHiddenPadding:!1},Vf={MIN:0,MAX:300},Uf=l.f.div.withConfig({displayName:"padding__Space",componentId:"sc-17x5rfj-0"})(["flex:0 0 8px;"]),Wf=Object(l.f)(LockToggle).withConfig({displayName:"padding__LockToggle",componentId:"sc-17x5rfj-1"})([""," ",";"],(e=>{let{isLocked:t}=e;return!t&&"\n position: absolute;\n right: 0;\n top: calc(100% - 8px);\n "}),eC),Yf=Object(l.f)(dl).withConfig({displayName:"padding__Row",componentId:"sc-17x5rfj-2"})(["position:relative;"]),$f=l.f.div.withConfig({displayName:"padding__IconWrapper",componentId:"sc-17x5rfj-3"})(["width:44px;margin-left:6px;color:",";"," svg{width:22px;}"],(e=>{let{theme:t}=e;return t.colors.divider.primary}),(e=>{let{reverse:t}=e;return t&&"transform: scaleY(-1);"}));var qf=function PaddingControls(e){let{selectedElements:t,pushUpdateForObject:C,pushUpdate:a}=e;const n=mo(t.map((e=>({...e,padding:Nf(e)}))),"padding",Gf),l=!0===n.locked,i=Object(u.s)((e=>{a((t=>{const{x:C,y:a,width:n,height:r}=t,l=e(t);return function(e){let{currentPadding:t,newPadding:C,x:a,y:n,width:r,height:l}=e;const i={};return"horizontal"in C&&(i.x=a-(C.horizontal-(t.horizontal||0)),i.width=r+2*(C.horizontal-(t.horizontal||0))),"vertical"in C&&(i.y=n-(C.vertical-(t.vertical||0)),i.height=l+2*(C.vertical-(t.vertical||0))),i}({x:C,y:a,height:r,width:n,currentPadding:t.padding,newPadding:l})})),C("padding",(t=>e({padding:t})),Gf,!0)}),[a,C]);Wl((e=>{let{padding:{horizontal:t,vertical:C,...a}}=e;return{padding:{...a,horizontal:xm(t,Vf),vertical:xm(C,Vf)}}}),[]);const o=l?{suffix:Object(h.__)("Padding","web-stories"),"aria-label":Object(h.__)("Padding","web-stories"),onChange:(e,t)=>{i((e=>({horizontal:t+Df(e,"horizontal"),vertical:t+Df(e,"vertical")})))},stretch:!0}:{suffix:Object(h.__)("Horizontal padding","web-stories"),"aria-label":Object(h.__)("Horizontal padding","web-stories"),onChange:(e,t)=>{i((e=>({horizontal:t+Df(e,"horizontal")})))}};return r.a.createElement(r.a.Fragment,null,r.a.createElement(Yf,null,r.a.createElement(NumericInput,Hf({value:n.horizontal,isIndeterminate:n.horizontal===uC.C,placeholder:n.horizontal===uC.C?uC.B:null},o,{containerStyleOverride:tC})),l&&r.a.createElement(Uf,null),r.a.createElement(Wf,{isLocked:l,onClick:()=>i((e=>l?{locked:!1}:{locked:!0,horizontal:e.padding.horizontal,vertical:e.padding.horizontal+Df(e,"vertical")-Df(e,"horizontal")})),"aria-label":Object(h.__)("Toggle padding ratio lock","web-stories")}),!l&&r.a.createElement($f,{reverse:!0},r.a.createElement(Te.a.TurningLine,null))),!l&&r.a.createElement(Yf,null,r.a.createElement(NumericInput,{isIndeterminate:n.vertical===uC.C,placeholder:n.vertical===uC.C?uC.B:null,suffix:Object(h.__)("Vertical padding","web-stories"),value:n.vertical,onChange:(e,t)=>{i((e=>({vertical:Number(t)+Df(e,"vertical")})))},"aria-label":Object(h.__)("Vertical padding","web-stories"),containerStyleOverride:tC}),r.a.createElement($f,null,r.a.createElement(Te.a.TurningLine,null))))},Xf=C(289);function Kf(e){const{r:t,g:C,b:a,a:n=1}=e;return Xf.relativeLuminance({r:t/255,g:C/255,b:a/255,a:n})}function Qf(e){const t=Xf.str2rgba(e);return Xf.relativeLuminance(t)}function Jf(e,t,C){const a=Xf.contrast(e,t);return{ratio:a,WCAG_AA:Xf.aa(a,C)}}function eh(e,t,C){return Jf(Kf({r:e[0],g:e[1],b:e[2]}),Kf({r:t[0],g:t[1],b:t[2]}),C)}function th(e,t){const C=[255,255,255,255],a=[0,0,0,255],n=[],r={r:255,g:255,b:255,a:1},l={r:0,g:0,b:0,a:1};for(let t=0;t<e.length;t+=4)n.push([e[t],e[t+1],e[t+2],e[t+3]]);const i=n.map((e=>eh(a,e,t)));if(!i.some((e=>{let{WCAG_AA:t}=e;return!t})))return{color:l};const o=n.map((e=>eh(C,e,t)));if(!o.some((e=>{let{WCAG_AA:t}=e;return!t})))return{color:r};return i.reduce(((e,t)=>e+t.ratio),0)<o.reduce(((e,t)=>e+t.ratio),0)?{color:l,backgroundColor:{...r,a:.7}}:{color:r,backgroundColor:{...l,a:.7}}}var Ch=function(e){const{pageCanvasData:t,setPageCanvasData:a,pageCanvasPromise:n,setPageCanvasPromise:r,fullbleedContainer:l}=Object(H.d)((e=>{let{actions:t,state:C}=e;return{pageCanvasData:C.pageCanvasData,pageCanvasPromise:C.pageCanvasPromise,setPageCanvasData:t.setPageCanvasData,setPageCanvasPromise:t.setPageCanvasPromise,fullbleedContainer:C.fullbleedContainer}})),{selectedElementIds:i,currentPageHash:o}=Object(H.o)((e=>{let{state:{selectedElementIds:t,currentPageHash:C}}=e;return{selectedElementIds:t,currentPageHash:C}})),{zoomSetting:c,setZoomSetting:s}=Object(H.l)((e=>{let{state:{zoomSetting:t},actions:{setZoomSetting:C}}=e;return{zoomSetting:t,setZoomSetting:C}})),d=Object(u.s)((()=>o!==t.currentPage),[o,t]),p=Object(u.s)((function(u){let p=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((p||c===uC.K.FIT)&&(!t||d())){p&&s(uC.K.FIT);const t=e=>{u?u(e):a({canvas:e,currentPage:o}),r(null)},c=()=>{p&&u(),r(null)};!n&&l?C.e(197).then(C.bind(null,1056)).then((C=>{const a=1===i.length,n=e&&a,o=C.toCanvas(l,{fontEmbedCss:"",pixelRatio:1,filter:n&&(e=>{var t;return(null==e||null===(t=e.dataset)||void 0===t?void 0:t.elementId)!==i[0]})});r(o),o.then(t).catch(c)})).catch((()=>{})):p&&setTimeout((()=>{n.then(t).catch((()=>c()))}))}}),[l,t,n,r,a,s,c,d,o,i,e]);return{calculateAccessibleTextColors:Object(u.s)((function(e){let C=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return new Promise((n=>{C||c===uC.K.FIT||n(null);const r=t=>{try{const C=t.getContext("2d"),a=(t.width/ee.e-t.width/ee.g)/2,r=Object(Ru.i)({...e,height:e.height?e.height:Object(nf.b)(e,e.width)},t.width,t.height-2*a),{x:l,y:i,width:o,height:c}=r,s=i+a,d=C.getImageData(l,s,o,c).data,{fontSize:u}=e;n(th(d,u))}catch(e){n({color:null})}};!t||d()&&!a?p(r,C):r(t.canvas)}))}),[p,t,d,c]),generateCanvasFromPage:p}};var ah=function(e,t){const C=Object(Mn.a)(),{setColor:a}=C,{calculateAccessibleTextColors:n}=Ch(!0);return async()=>{const C=await n(e),{color:r,backgroundColor:l}=C;if(l||r){const C=l?{backgroundColor:{color:l},backgroundTextMode:uC.b.HIGHLIGHT,padding:Pf(e)}:null,n=r?a(e.content,{color:r}):e.content;t({...C,content:n})}}};const nh=Object(l.f)(b.a).attrs({variant:g.d.SQUARE,type:g.c.TERTIARY,size:g.a.SMALL}).withConfig({displayName:"panelHeader__AutoStyleButton",componentId:"sc-1sprex4-0"})(["",";"],(e=>{let{theme:t}=e;return Q.c.focusableOutlineCSS(t.colors.border.focus,"#1d1f20")}));var rh=function PanelHeader(e){let{selectedElements:t,pushUpdate:C}=e;const{state:{isCollapsed:a}}=Object(u.u)(Xc),n=ah(t[0],(e=>{C(e,!0),Object(f.g)("auto_style_text")})),l=Object(h.__)("Text","web-stories");return r.a.createElement(hs,{ariaLabel:l,secondaryAction:a?null:r.a.createElement(Je.a,{title:Object(h.__)("Adaptive text colors","web-stories")},r.a.createElement(nh,{"aria-label":Object(h.__)("Adaptive text colors","web-stories"),onClick:n,disabled:(null==t?void 0:t.length)>1},r.a.createElement(Te.a.ColorBucket,null)))},l)};var lh=function(e){let{pushUpdate:t}=e;Wl(lf,[]);const{selectedElements:C}=Object(A.e)((e=>{let{state:{selectedElements:t}}=e;return{selectedElements:t}})),a=Object(u.G)(null),n=Object(u.s)((e=>{t((t=>({...e(t),...a.current})),!0),a.current=null}),[t]),{handlers:{handleSetColor:r,handleSetLetterSpacing:l,handleClickUnderline:i,handleClickItalic:o,handleSelectFontWeight:c}}=df(C,n);return Object(u.s)((e=>{const{color:t,fontWeight:C,isItalic:n,isUnderline:s,letterSpacing:d,...u}=e;a.current=u,r(t),l(d),c(C),i(s),o(n)}),[r,l,i,o,c])};var ih=function(e){let{activeIndex:t,setActiveIndex:C,groupRef:a}=e;Object(ye.h)(a,{key:["up","down","left","right"]},(e=>{let{key:n}=e;if(a.current){const e=((e,t)=>{switch(e){case"ArrowUp":return-t;case"ArrowDown":return t;case"ArrowLeft":return-1;case"ArrowRight":return 1;default:return 0}})(n,2),r=a.current.querySelectorAll("button:not([disabled])"),l=r.length-1,i=(null!=t?t:0)+e,o=Math.max(0,Math.min(l,i));C(o),r[o]&&r[o].focus()}}),[t,C,a])};const oh=l.f.button.withConfig({displayName:"styleItem__PresetButton",componentId:"sc-1vi4jyd-0"})(["background-color:",";border-color:transparent;position:relative;cursor:pointer;border-width:0;border-radius:4px;padding:3px;height:100%;width:100%;display:flex;justify-content:center;align-items:center;svg{width:","px;height:","px;position:absolute;top:calc(50% - ","px);left:calc(50% - ","px);color:",";filter:drop-shadow(0px 0px 4px rgba(0,0,0,0.4));}",""],(e=>{let{theme:t}=e;return t.colors.interactiveBg.secondaryNormal}),32,32,16,16,(e=>{let{theme:t}=e;return t.colors.fg.primary}),eC),ch=l.f.span.withConfig({displayName:"styleItem__HighLight",componentId:"sc-1vi4jyd-1"})(["padding:0 2px;"," box-decoration-break:clone;"],(e=>{let{background:t}=e;return Object(te.a)(t)})),sh=l.f.div.withConfig({displayName:"styleItem__TextWrapper",componentId:"sc-1vi4jyd-2"})(["position:relative;display:inline-block;line-height:","px;max-height:","px;overflow:hidden;border-radius:4px;padding:3px;max-width:100%;"," font-size:12px;",""],20,43,(e=>{let{styles:t}=e;return t}),(e=>{let{background:t}=e;return t?Object(te.a)(t):null}));var dh=function StyleItem(e){let{style:t,i:C,activeIndex:a,handleOnClick:n,isEditMode:l}=e;const{selectedElements:i}=Object(A.e)((e=>{let{state:{selectedElements:t}}=e;return{selectedElements:t}}));if(!t)return null;const o=Object(of.a)(i[0].content)||Object(h.__)("Text","web-stories");return r.a.createElement(oh,{tabIndex:a===C?0:-1,style:t,onClick:()=>n(t),"aria-label":l?Object(h.__)("Delete style","web-stories"):Object(h.__)("Apply style","web-stories")},(()=>{const e=t.backgroundTextMode===uC.b.HIGHLIGHT,C=t.backgroundTextMode===uC.b.FILL;return r.a.createElement(sh,{styles:jn(t,!0),background:C?t.backgroundColor:null},e?r.a.createElement(ch,{background:t.backgroundColor},o):o)})(),l&&r.a.createElement(Te.a.Cross,null))};const uh=l.f.div.withConfig({displayName:"styleGroup__Group",componentId:"sc-1jhdklz-0"})(["display:grid;grid-template-columns:repeat(2,1fr);grid-column-gap:20px;grid-row-gap:16px;"]),ph=l.f.div.withConfig({displayName:"styleGroup__ButtonWrapper",componentId:"sc-1jhdklz-1"})(["height:","px;width:","px;"],uC.H,(e=>{let{width:t}=e;return t}));var mh=function StyleGroup(e){let{styles:t,isEditMode:C=!1,handleClick:a,buttonWidth:n=128}=e;const[l,i]=Object(u.I)(0),o=Object(u.G)(null);return ih({activeIndex:l,setActiveIndex:i,groupRef:o,type:uC.G.STYLE}),r.a.createElement(uh,{ref:o},t.map(((e,t)=>r.a.createElement(ph,{key:JSON.stringify(e),width:n},r.a.createElement(dh,{style:e,i:t,activeIndex:l,handleOnClick:a,isEditMode:C})))))};function fh(){return(fh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const hh=l.f.div.withConfig({displayName:"header__Wrapper",componentId:"sc-ftvqxz-0"})(["display:flex;justify-content:space-between;align-items:center;height:","px;padding:4px 8px 4px 8px;position:relative;border-bottom:1px solid ",";"],44,(e=>{let{theme:t}=e;return t.colors.divider.tertiary})),bh=l.f.div.withConfig({displayName:"header__Actions",componentId:"sc-ftvqxz-1"})(["display:flex;margin-left:auto;"]),gh=Object(l.f)(b.a).withConfig({displayName:"header__StyledButton",componentId:"sc-ftvqxz-2"})(["margin-left:8px;",";"],eC);var Eh=function(e){let{children:t,handleClose:C,isEditMode:a=!1,setIsEditMode:n=(()=>{})}=e;const l=Object(u.G)();Object(u.y)((()=>{var e;null===(e=l.current)||void 0===e||e.focus()}),[]);const i={type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE,onClick:e=>{e.stopPropagation(),n(!a)},isEditMode:a};return r.a.createElement(hh,null,t,r.a.createElement(bh,null,r.a.createElement(gh,fh({},i,{"aria-label":a?Object(h.__)("Exit edit mode","web-stories"):Object(h.__)("Edit styles","web-stories")}),a?Object(h.__)("Done","web-stories"):r.a.createElement(Te.a.Pencil,null)),r.a.createElement(gh,{"aria-label":Object(h.__)("Close","web-stories"),onClick:C,type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE,ref:l},r.a.createElement(Te.a.Cross,null))))};var vh=function(e){let{onEmpty:t}=e;const{globalStoryStyles:C,updateStory:a}=Object(H.o)((e=>{let{state:{story:{globalStoryStyles:t}},actions:{updateStory:C}}=e;return{globalStoryStyles:t,updateStory:C}})),{textStyles:n}=C||{};return Object(u.s)((e=>{const r=n.filter((t=>t!==e));a({properties:{globalStoryStyles:{...C,textStyles:r}}}),0===r.length&&t()}),[n,a,C,t])};const Oh="DELETE_STYLE_PRESET_DIALOG_DISMISSED",yh=l.f.label.withConfig({displayName:"confirmationDialog__Label",componentId:"sc-foe4ow-0"})(["margin-left:12px;"]),Mh=l.f.footer.withConfig({displayName:"confirmationDialog__CheckboxWrapper",componentId:"sc-foe4ow-1"})(["display:flex;margin-top:12px;padding:14px 0 0 9px;border-top:1px solid ",";"],(e=>{let{theme:t}=e;return t.colors.divider.primary}));var wh=function(e){let{onClose:t,onPrimary:C}=e;const[a,n]=Object(u.I)(mn.b.getItemByKey(mn.a[Oh])),l=Object(h.__)("This is a global style. Deleting this style will remove it from the Saved Styles across all stories and the style will no longer be available to any other users on the site.","web-stories"),i=`cb-${Object(Hn.a)()}`;return r.a.createElement(Ge.a,{isOpen:!0,onClose:t,secondaryText:Object(h.__)("Cancel","web-stories"),onPrimary:C,primaryText:Object(h.__)("Delete","web-stories")},r.a.createElement(cC.a,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},l),r.a.createElement(Mh,null,r.a.createElement(sC.a,{id:i,checked:a,onChange:()=>{mn.b.setItemByKey(mn.a[Oh],!a),n(!a)}}),r.a.createElement(yh,{htmlFor:i},r.a.createElement(cC.a,{as:"span",size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Don't ask for confirmation again.","web-stories")))))};const Lh=l.f.div.withConfig({displayName:"styleManager__Container",componentId:"sc-15lp1kb-0"})(["border-radius:8px;background:",";width:256px;user-select:none;display:flex;flex-direction:column;align-items:stretch;overflow:hidden;&.style-manager-appear{opacity:0.01;margin-top:-10px;&.style-manager-appear-active{opacity:1;margin-top:0;transition:300ms ease-out;transition-property:opacity,margin-top;}}"],(e=>{let{theme:t}=e;return t.colors.bg.secondary})),_h=l.f.div.withConfig({displayName:"styleManager__Body",componentId:"sc-15lp1kb-1"})(["display:flex;margin:8px 12px 16px;"]),jh=Object(l.f)(cC.a).attrs({size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL}).withConfig({displayName:"styleManager__StyledText",componentId:"sc-15lp1kb-2"})(["margin:0 0 0 8px;color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.primary}));var xh=function StyleManager(e){let{styles:t,onClose:C,applyStyle:a}=e;const[n,l]=Object(u.I)(!1),[i,o]=Object(u.I)(!1),[c,s]=Object(u.I)(null),d=Object(u.G)(null),p=vh({onEmpty:()=>C()});return Object(u.z)(d,(()=>{i||C()}),[i]),r.a.createElement(HC.a,{nodeRef:d,in:!0,appear:!0,classNames:"style-manager",timeout:300},r.a.createElement(Lh,{role:"dialog","aria-label":Object(h.__)("Style presets manager","web-stories"),ref:d},r.a.createElement(Eh,{handleClose:C,isEditMode:n,setIsEditMode:l},r.a.createElement(jh,null,Object(h.__)("Saved Styles","web-stories"))),r.a.createElement(_h,null,r.a.createElement(mh,{styles:[...t].reverse(),handleClick:e=>{if(!n)return void a(e);mn.b.getItemByKey(mn.a[Oh])?p(e):(o(!0),s(e))},isEditMode:n,buttonWidth:106})),i&&r.a.createElement(wh,{onClose:()=>o(!1),onPrimary:()=>{p(c),s(null),o(!1)}})))};const Zh=l.f.div.withConfig({displayName:"stylePresets__PresetsHeader",componentId:"sc-1f5eqf3-0"})(["display:flex;padding:8px 0;justify-content:space-between;"]),Ah=l.f.div.withConfig({displayName:"stylePresets__StylesWrapper",componentId:"sc-1f5eqf3-1"})([""]),Ih=Object(l.f)(cC.a).withConfig({displayName:"stylePresets__SubHeading",componentId:"sc-1f5eqf3-2"})(["color:",";margin:6px 0;font-weight:",";"],(e=>{let{theme:t}=e;return t.colors.fg.secondary}),(e=>{let{theme:t}=e;return t.typography.weight.bold})),Th=Object(l.f)(b.a).withConfig({displayName:"stylePresets__StyledButton",componentId:"sc-1f5eqf3-3"})(["margin-left:auto;"]),Sh=Object(l.f)(b.a).withConfig({displayName:"stylePresets__StyledMoreButton",componentId:"sc-1f5eqf3-4"})(["",";margin:12px 0;padding:0 16px;justify-content:center;align-self:center;svg{transform:rotate(-90deg);height:32px;width:32px;margin-left:-4px;}"],eC),kh=l.f.div.withConfig({displayName:"stylePresets__NoStylesWrapper",componentId:"sc-1f5eqf3-5"})(["display:flex;justify-content:center;align-items:center;width:calc(100% + 32px);margin:0 0 -8px -16px;background-color:",";height:64px;"],(e=>{let{theme:t}=e;return t.colors.opacity.black24})),Rh=Object(l.f)(cC.a).withConfig({displayName:"stylePresets__NoStylesText",componentId:"sc-1f5eqf3-6"})(["color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.tertiary})),Ph={x:20};var Nh=function PresetPanel(e){let{pushUpdate:t}=e;const{globalStoryStyles:C}=Object(H.o)((e=>{let{state:{story:{globalStoryStyles:t}}}=e;return{globalStoryStyles:t}})),{refs:{inspector:a}}=lr(),n=Object(u.G)(null),[l,i]=Object(u.I)(!1),{textStyles:o}=C,c=o.length>0,s=lh({pushUpdate:t}),{addGlobalPreset:d}=Tn({presetType:uC.G.STYLE}),p=e=>{s(e)};return r.a.createElement(r.a.Fragment,null,r.a.createElement(Zh,null,r.a.createElement(Ih,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Recently Saved Styles","web-stories")),r.a.createElement(Th,{type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE,onClick:d,"aria-label":Object(h.__)("Add style","web-stories")},r.a.createElement(Te.a.Plus,null))),c&&r.a.createElement(r.a.Fragment,null,r.a.createElement(Ah,null,r.a.createElement(mh,{styles:[...o].reverse().slice(0,2),handleClick:p})),r.a.createElement(Sh,{ref:n,type:g.c.PLAIN,size:g.a.SMALL,variant:g.d.RECTANGLE,onClick:()=>i(!0)},Object(h.__)("More styles","web-stories"),r.a.createElement(Te.a.ChevronDownSmall,null)),r.a.createElement(FC.a,{anchor:n,dock:a,isOpen:l,placement:zC.a.LEFT_START,spacing:Ph,renderContents:()=>r.a.createElement(xh,{styles:o,applyStyle:p,onClose:()=>i(!1)})})),!c&&r.a.createElement(kh,null,r.a.createElement(Rh,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("No Styles Saved","web-stories"))))};function Dh(){return(Dh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Bh=l.f.section.withConfig({displayName:"textStyle__SubSection",componentId:"sc-1al6pl8-0"})(["border-top:1px solid ",";display:flex;flex-direction:column;"],(e=>{let{theme:t}=e;return t.colors.border.defaultNormal})),zh=Object(l.f)(cC.a).withConfig({displayName:"textStyle__SubHeading",componentId:"sc-1al6pl8-1"})(["color:",";margin:14px 0;font-weight:",";"],(e=>{let{theme:t}=e;return t.colors.fg.secondary}),(e=>{let{theme:t}=e;return t.typography.weight.bold}));var Fh=function(e){const{dropdownHighlight:t,colorHighlight:C,resetHighlight:a,cancelHighlight:n}=Ic((e=>({dropdownHighlight:e[Fx.FONT],colorHighlight:e[Fx.TEXT_COLOR],resetHighlight:e.onFocusOut,cancelHighlight:e.cancelEffect}))),[l,i]=Object(u.I)(!1),[o,c]=Object(u.I)([]),{selectedElements:s}=e;Wl(lf,[]);const{currentPage:d}=Object(H.o)((e=>{let{state:{currentPage:t}}=e;return{currentPage:t}})),p=Object(H.l)((e=>{let{state:{pageWidth:t,pageHeight:C}}=e;return{width:t,height:C}})),m=s.map((e=>e.id)),f=null==o?void 0:o.some((e=>{let{id:t}=e;return m.includes(t)}));return Object(u.y)((()=>{AA([d],p).then((e=>{var t;const C=null===(t=e[0])||void 0===t?void 0:t.result;c(C)})).catch((()=>{}))}),[d,p]),r.a.createElement(Hh,{name:"textStyle",onAnimationEnd:()=>a(),isPersistable:!1,$_css:((null==t?void 0:t.showEffect)||(null==C?void 0:C.showEffect))&&dZ.FLASH},r.a.createElement(rh,e),r.a.createElement(vs,null,r.a.createElement(If,Dh({},e,{fontDropdownRef:e=>{e&&null!=t&&t.focus&&null!=t&&t.showEffect&&(e.focus(),i(!0))},highlightStylesOverride:l?dZ.OUTLINE:[]})),r.a.createElement(Ef,e),r.a.createElement(vf,Dh({},e,{textColorRef:e=>{e&&null!=C&&C.focus&&null!=C&&C.showEffect&&(e.addEventListener("keydown",n,{once:!0}),e.focus(),i(!1))}})),f&&r.a.createElement(fm,{message:gt.lowContrast.textPanel}),r.a.createElement(Bh,null,r.a.createElement(zh,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Text Box","web-stories")),r.a.createElement(Ff,e),r.a.createElement(qf,e)),r.a.createElement(Bh,null,r.a.createElement(Nh,e))))},Hh=Object(l.f)(es).withConfig({displayName:"textStyle___StyledPanel",componentId:"sc-1al6pl8-2"})(["",""],(e=>e.$_css));const Gh={alt:null,poster:null,height:0,width:0},Vh={MAX:1e3},Uh=Object(l.f)(ll).withConfig({displayName:"videoAccessibility__StyledMedia",componentId:"sc-1uodz5m-0"})(["height:114px;width:64px;"]),Wh=l.f.div.withConfig({displayName:"videoAccessibility__InputsWrapper",componentId:"sc-1uodz5m-1"})(["align-self:flex-start;margin-left:16px;"]),Yh=Object(l.f)(cC.a).withConfig({displayName:"videoAccessibility__StyledText",componentId:"sc-1uodz5m-2"})(["color:",";margin-bottom:10px;"],(e=>{let{theme:t}=e;return t.colors.fg.secondary}));var $h=function VideoAccessibilityPanel(e){let{selectedElements:t,pushUpdate:C}=e;const a=mo(t,"resource",Gh),n=so(t,"alt",a.alt),{height:l,width:i}=a,o=so(t,"poster"),c=so(t,"poster",a.poster),{allowedImageMimeTypes:s,allowedImageFileTypes:d,capabilities:{hasUploadMediaAction:p}}=Object(_.c)(),m=Object(u.s)((e=>{(null==e?void 0:e.src)!==o&&C({poster:null==e?void 0:e.src},!0)}),[C,o]),f=Object(u.C)((()=>{let e=Object(h.__)("No file types are currently supported.","web-stories");return d.length&&(e=Object(h.sprintf)(
|
132 |
/* translators: %s: list of allowed file types. */
|
133 |
+
Object(h.__)("Please choose only %s as a poster.","web-stories"),Object(h.translateToExclusiveList)(d))),e}),[d]),{highlightInput:b,highlightMediaPicker:g,resetHighlight:E,cancelHighlight:v}=Ic((e=>({highlightInput:e[Fx.ASSISTIVE_TEXT],highlightMediaPicker:e[Fx.VIDEO_A11Y_POSTER],resetHighlight:e.onFocusOut,cancelHighlight:e.cancelEffect})));let O=null;return l&&l!==uC.C&&i&&i!==uC.C&&(O={height:l,width:i}),r.a.createElement(qh,{onAnimationEnd:()=>E(),name:"videoAccessibility",title:Object(h.__)("Accessibility","web-stories"),isPersistable:!b&&!g,$_css:(b||g)&&dZ.FLASH},r.a.createElement(dl,null,r.a.createElement(Uh,{ref:e=>{e&&null!=g&&g.focus&&null!=g&&g.showEffect&&e.focus()},value:c,cropParams:O,onChange:m,onChangeErrorText:f,title:Object(h.__)("Select as video poster","web-stories"),buttonInsertText:Object(h.__)("Set as video poster","web-stories"),alt:Object(h.__)("Preview poster image","web-stories"),type:s,ariaLabel:Object(h.__)("Video poster","web-stories"),menuOptions:["edit","reset"],imgProps:O,canUpload:p}),r.a.createElement(Wh,null,r.a.createElement(Yh,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Add a brief description of the video.","web-stories")),r.a.createElement(Gl,{ref:e=>{e&&null!=b&&b.focus&&null!=b&&b.showEffect&&(e.addEventListener("keydown",v,{once:!0}),e.focus())},placeholder:n===uC.C?uC.B:"",value:n||"",onChange:e=>{var t,a;return C({alt:(null==e||null===(t=e.target)||void 0===t||null===(a=t.value)||void 0===a?void 0:a.trim())||null},!0)},"aria-label":Object(h.__)("Assistive text","web-stories"),maxLength:Vh.MAX,rows:2,isIndeterminate:n===uC.C}))))},qh=Object(l.f)(ys).withConfig({displayName:"videoAccessibility___StyledSimplePanel",componentId:"sc-1uodz5m-3"})(["",""],(e=>e.$_css)),Xh=C(103);const Kh=Object(l.f)(sC.a).withConfig({displayName:"loopPanelContent__StyledCheckbox",componentId:"sc-lp7bl3-0"})(["",""],(e=>{let{theme:t}=e;return`\n input[type='checkbox']&.${Q.a.FOCUS_VISIBLE_SELECTOR} ~ div, input[type='checkbox']:focus ~ div {\n box-shadow: 0px 0px 0 2px ${t.colors.bg.secondary}, 0px 0px 0 4px ${t.colors.border.focus} !important;\n }\n `})),Qh=l.f.label.withConfig({displayName:"loopPanelContent__Label",componentId:"sc-lp7bl3-1"})(["margin-left:12px;"]);var Jh=function LoopPanelContent(e){let{loop:t,onChange:C}=e;const a=`cb-${Object(Hn.a)()}`;return r.a.createElement(r.a.Fragment,null,r.a.createElement(Kh,{id:a,checked:t,onChange:C}),r.a.createElement(Qh,{htmlFor:a},r.a.createElement(cC.a,{as:"span",size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.__)("Loop","web-stories"))))};const eb=Object(l.f)(dl).withConfig({displayName:"videoOptions__Row",componentId:"sc-csxmtu-0"})(["margin-top:2px;"]),tb=Object(l.f)(b.a).withConfig({displayName:"videoOptions__StyledButton",componentId:"sc-csxmtu-1"})(["padding:12px 8px;"]),Cb=Object(l.f)(tb).withConfig({displayName:"videoOptions__TrimButton",componentId:"sc-csxmtu-2"})(["margin-left:20px;"]),ab=l.f.div.withConfig({displayName:"videoOptions__TrimWrapper",componentId:"sc-csxmtu-3"})(["position:relative;display:flex;"]),nb=l.f.div.withConfig({displayName:"videoOptions__Spinner",componentId:"sc-csxmtu-4"})(["margin-left:4px;margin-top:4px;"]),rb=Object(l.f)(cC.a).attrs({size:ot.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL}).withConfig({displayName:"videoOptions__HelperText",componentId:"sc-csxmtu-5"})(["color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.tertiary}));var lb=function VideoOptionsPanel(e){let{selectedElements:t,pushUpdate:C}=e;const{isTranscodingEnabled:a}=Object(fl.a)(),{muteExistingVideo:n,isResourceTrimming:l,isNewResourceMuting:i,canTranscodeResource:o}=Object(H.m)((e=>{let{state:{canTranscodeResource:t,isNewResourceMuting:C,isResourceTrimming:a},actions:{muteExistingVideo:n}}=e;return{canTranscodeResource:t,isNewResourceMuting:C,isResourceTrimming:a,muteExistingVideo:n}})),c=so(t,"resource"),{isMuted:s,id:d=0}=c,p=l(d),m=i(d),f=so(t,"loop"),b=1===t.length,E=Object(u.s)((()=>{n({resource:c})}),[c,n]),v=!o(c),O=a&&b&&(!s&&o(c)||m),y=m?Object(h.__)("Removing audio…","web-stories"):Object(h.__)("Remove audio","web-stories"),M=p?Object(h.__)("Trimming…","web-stories"):Object(h.__)("Trim","web-stories"),{hasTrimMode:w,toggleTrimMode:L}=Object(Xh.a)((e=>{let{state:{hasTrimMode:t},actions:{toggleTrimMode:C}}=e;return{hasTrimMode:t,toggleTrimMode:C}})),_=Object(Hi.a)();Object(u.y)((()=>{m&&_(y)}),[m,y,_]),Object(u.y)((()=>{p&&_(M)}),[p,M,_]);const Processing=()=>r.a.createElement(nb,null,r.a.createElement(WC.a,{size:24}));return r.a.createElement(ys,{name:"videoOptions",title:Object(h.__)("Video Settings","web-stories")},r.a.createElement(eb,{spaceBetween:!1},r.a.createElement(Jh,{loop:f,onChange:e=>C({loop:e.target.checked},!0)}),w&&r.a.createElement(ab,null,r.a.createElement(Cb,{disabled:v,variant:g.d.RECTANGLE,type:g.c.SECONDARY,size:g.a.SMALL,onClick:L},M),p&&r.a.createElement(Processing,null))),O&&r.a.createElement(r.a.Fragment,null,r.a.createElement(eb,{spaceBetween:!1},r.a.createElement(tb,{disabled:v,variant:g.d.RECTANGLE,type:g.c.SECONDARY,size:g.a.SMALL,onClick:E},y),m&&r.a.createElement(Processing,null)),r.a.createElement(eb,null,r.a.createElement(rb,null,Object(h.__)("Removing the audio from this video will upload a new muted version of it to the media library. This might take a couple of seconds.","web-stories")))))};const ib=Object(l.f)(b.a).withConfig({displayName:"audioPlayer__StyledButton",componentId:"sc-cot87i-0"})(["",";"],(e=>{let{theme:t}=e;return Q.c.focusableOutlineCSS(t.colors.border.focus,t.colors.bg.secondary)})),ob=l.f.div.withConfig({displayName:"audioPlayer__Wrapper",componentId:"sc-cot87i-1"})((e=>{let{theme:t}=e;return Object(l.e)(["position:relative;min-width:40px;width:100%;height:36px;display:flex;align-items:center;justify-content:space-between;color:",";",";"],t.colors.fg.primary,Q.c.expandPresetStyles({preset:{...t.typography.presets.paragraph[ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL]},theme:t}))})),cb=l.f.audio.withConfig({displayName:"audioPlayer__Audio",componentId:"sc-cot87i-2"})(["display:none;"]);var sb=function AudioPlayer(e){let{title:t,src:C,mimeType:a}=e;const[n,l]=Object(u.I)(!1),i=Object(u.G)(),o=Object(u.s)((()=>{const e=i.current;e&&(n?(e.pause(),l(!1)):e.play().then((()=>l(!0))).catch((()=>{})))}),[n,l]);return r.a.createElement(ob,null,r.a.createElement(cb,{crossOrigin:"anonymous",loop:!0,ref:i},r.a.createElement("source",{src:C,type:a})),r.a.createElement("div",null,t),r.a.createElement("div",null,n?r.a.createElement(Je.a,{hasTail:!0,title:Object(h.__)("Pause","web-stories")},r.a.createElement(ib,{type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE,"aria-label":Object(h.__)("Pause","web-stories"),onClick:o},r.a.createElement(Te.a.StopFilled,null))):r.a.createElement(Je.a,{hasTail:!0,title:Object(h.__)("Play","web-stories")},r.a.createElement(ib,{type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE,"aria-label":Object(h.__)("Play","web-stories"),onClick:o},r.a.createElement(Te.a.PlayFilled,null)))))};const db=Object(l.f)(b.a).withConfig({displayName:"backgroundAudioPanelContent__StyledButton",componentId:"sc-lth4t7-0"})(["",";"],(e=>{let{theme:t}=e;return Q.c.focusableOutlineCSS(t.colors.border.focus,t.colors.bg.secondary)})),ub=Object(l.f)(db).withConfig({displayName:"backgroundAudioPanelContent__UploadButton",componentId:"sc-lth4t7-1"})(["padding:12px 8px;"]);var pb=function BackgroundAudioPanelContent(e){let{backgroundAudio:t,updateBackgroundAudio:C,showCaptions:a=!1,showLoopControl:n=!1}=e;const{allowedAudioMimeTypes:l,allowedAudioFileTypes:i,capabilities:{hasUploadMediaAction:o},MediaUpload:c}=Object(H.g)(),{resource:s,tracks:d=[],loop:p=!0}=t||{},m=Object(h.sprintf)(
|
134 |
/* translators: %s: list of allowed file types. */
|
135 |
+
Object(h.__)("Please choose only %s to insert into page.","web-stories"),Object(h.translateToExclusiveList)(i)),f=Object(u.s)((e=>{const t={resource:{src:e.src,id:e.id,mimeType:e.mimeType,length:e.length,lengthFormatted:e.lengthFormatted}};a&&(t.tracks=[]),n&&(t.loop=!0),C(t)}),[a,n,C]),b=Object(u.s)((e=>{C({...t,tracks:e})}),[t,C]),E=Object(u.s)((e=>{C({...t,loop:e.target.checked})}),[t,C]),v=Object(u.s)((e=>{let t=[];if(e){const C=d.findIndex((t=>{let{id:C}=t;return C===e}));t=[...d.slice(0,C),...d.slice(C+1)]}b(t)}),[d,b]),O=Object(u.s)((e=>{let{src:t="",id:C}=e;const a={track:t,trackId:C,trackName:t.split("/").pop(),id:Object(Hn.a)(),kind:"captions",srclang:"",label:""};b([...d,a])}),[d,b]),y=Object(u.s)((e=>r.a.createElement(ub,{onClick:e,type:g.c.SECONDARY,size:g.a.SMALL,variant:g.d.RECTANGLE},Object(h.__)("Upload an audio file","web-stories"))),[]),M=Object(h.__)("Upload audio captions","web-stories"),w=Object(u.s)((e=>r.a.createElement(ub,{onClick:e,type:g.c.SECONDARY,size:g.a.SMALL,variant:g.d.RECTANGLE},M)),[M]);return r.a.createElement(r.a.Fragment,null,!(null!=s&&s.src)&&o&&r.a.createElement(dl,{expand:!0},r.a.createElement(c,{onSelect:f,onSelectErrorMessage:m,type:l,title:Object(h.__)("Upload an audio file","web-stories"),buttonInsertText:Object(h.__)("Select audio file","web-stories"),render:y})),(null==s?void 0:s.src)&&r.a.createElement(r.a.Fragment,null,r.a.createElement(dl,null,r.a.createElement(sb,{title:null==s?void 0:s.src.substring((null==s?void 0:s.src.lastIndexOf("/"))+1),src:null==s?void 0:s.src,mimeType:null==s?void 0:s.mimeType}),r.a.createElement(Je.a,{hasTail:!0,title:Object(h.__)("Remove file","web-stories")},r.a.createElement(db,{"aria-label":Object(h.__)("Remove file","web-stories"),type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.SQUARE,onClick:()=>C(null)},r.a.createElement(Te.a.Trash,null)))),a&&r.a.createElement(ju,{captionText:M,tracks:d||[],handleChangeTrack:O,handleRemoveTrack:v,renderUploadButton:w}),n&&(null==s?void 0:s.length)&&r.a.createElement(dl,{spaceBetween:!1},r.a.createElement(Jh,{loop:p,onChange:E}))))};const mb=Object(l.f)(cC.a).attrs({size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL}).withConfig({displayName:"backgroundAudio__HelperText",componentId:"sc-qyqy4a-0"})(["color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.secondary}));var fb=function PageBackgroundAudioPanel(){const{capabilities:{hasUploadMediaAction:e}}=Object(H.g)(),t=Object(p.b)("enhancedPageBackgroundAudio"),{backgroundAudio:C,updateCurrentPageProperties:a}=Object(H.o)((e=>{var t;return{updateCurrentPageProperties:e.actions.updateCurrentPageProperties,backgroundAudio:null===(t=e.state.currentPage)||void 0===t?void 0:t.backgroundAudio}})),n=Object(u.s)((e=>{a({properties:{backgroundAudio:e}})}),[a]);return C||e?r.a.createElement(ys,{name:"pageBackgroundAudio",title:Object(h.__)("Page Background Audio","web-stories"),collapsedByDefault:!1},r.a.createElement(dl,null,r.a.createElement(mb,null,Object(h.__)("Select an audio file that plays while this page is in view.","web-stories"))),r.a.createElement(pb,{backgroundAudio:C,updateBackgroundAudio:n,showCaptions:t,showLoopControl:t})):null};var hb=function(){const e=Object(u.G)([]),t=Object(u.s)((t=>{const C=e.current;return C.push(t),()=>{C.splice(C.indexOf(t),1)}}),[]);return Object(u.C)((()=>[e.current,t]),[t])};var bb=function(e,t,C){const a="function"==typeof t?t(e):t;if(!a)return{};let n=Object.keys(a);return n=n.filter((e=>a[e]!==uC.C)),C&&(n=n.filter((e=>""!==a[e]))),0===n.length?{}:Object.fromEntries(n.map((e=>[e,a[e]])))},gb=C(33);const Eb=Object.values(gb.a);var vb=function(e){if(0===e.length)return[];if(1===e.length&&e[0].isBackground){const t=[];return!e[0].isDefaultBackground&&(t.push({type:gb.a.PAGE_BACKGROUND,Panel:Mm}),t.push({type:gb.a.FILTER,Panel:Uu}),t.push({type:gb.a.ANIMATION,Panel:lu})),"video"===e[0].type?(t.push({type:gb.a.VIDEO_OPTIONS,Panel:lb}),t.push({type:gb.a.CAPTIONS,Panel:Tu}),t.push({type:gb.a.VIDEO_ACCESSIBILITY,Panel:$h})):["gif","image"].includes(e[0].type)?t.push({type:gb.a.IMAGE_ACCESSIBILITY,Panel:qu}):t.unshift({type:gb.a.PAGE_BACKGROUND,Panel:Mm}),t.push({type:gb.a.PAGE_ATTACHMENT,Panel:sm}),t.push({type:gb.a.PAGE_BACKGROUND_AUDIO,Panel:fb}),t}return e.map((e=>{let{type:t}=e;return ne.f.find((e=>e.type===t)).panels})).reduce(((e,t)=>{return C=t,e.filter((e=>C.includes(e)));var C}),Eb).map((e=>{switch(e){case gb.a.ANIMATION:return{type:e,Panel:lu};case gb.a.PAGE_BACKGROUND:return null;case gb.a.FILTER:return{type:e,Panel:Uu};case gb.a.SIZE_POSITION:return{type:e,Panel:af};case gb.a.LINK:return{type:e,Panel:nm};case gb.a.TEXT_STYLE:return{type:e,Panel:Fh};case gb.a.SHAPE_STYLE:return{type:e,Panel:Lm};case gb.a.BORDER:return{type:e,Panel:Mu};case gb.a.VIDEO_OPTIONS:return{type:e,Panel:lb};case gb.a.CAPTIONS:return{type:e,Panel:Tu};case gb.a.VIDEO_ACCESSIBILITY:return{type:e,Panel:$h};case gb.a.IMAGE_ACCESSIBILITY:return{type:e,Panel:qu};case gb.a.ELEMENT_ALIGNMENT:return{type:e,Panel:Hu};default:throw new Error(`Unknown panel: ${e}`)}})).filter((e=>e))};var Ob=function(){const{selectedElementIds:e,selectedElements:t,selectedElementAnimations:C,deleteSelectedElements:a,updateElementsById:n,updateAnimationState:r}=Object(H.o)((e=>{let{state:{selectedElementIds:t,selectedElements:C,selectedElementAnimations:a},actions:{deleteSelectedElements:n,updateElementsById:r,updateAnimationState:l}}=e;return{selectedElementIds:t,selectedElements:C,selectedElementAnimations:a,deleteSelectedElements:n,updateElementsById:r,updateAnimationState:l}})),l=Object(u.C)((()=>vb(t)),[t]),[i,o]=hb(),c=Object(u.s)((t=>{n({elementIds:e,properties:e=>bb(e,t,!0)})}),[e,n]),s=Object(u.s)((e=>t=>(i.forEach((C=>C(c,e,t))),t)),[c,i]);return Object(u.y)((()=>{const e={},t=o(((t,C,a)=>{c===t&&(e[C]=a)}));return()=>{t(),Object.values(e).forEach((e=>e()))}}),[c,o]),Object(u.C)((()=>({panels:l,createSubmitHandlerForPanel:s,panelProperties:{onSetProperties:c,deleteSelectedElements:a,selectedElements:t,selectedElementAnimations:C,updateAnimationState:r}})),[l,s,c,a,t,C,r])};function yb(){return(yb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Mb=l.f.form.withConfig({displayName:"designPanel__Form",componentId:"sc-1yh98rb-0"})(["padding:0;margin:0;"]),wb=l.f.input.attrs({type:"submit"}).withConfig({displayName:"designPanel__AutoSubmitButton",componentId:"sc-1yh98rb-1"})(["display:none;"]);var Lb=function(e){let{panelType:t,selectedElements:C,onSetProperties:a,registerSubmitHandler:n,...l}=e;const i=Object(u.G)(null),[o,c]=hb(),s=Object(u.C)((()=>({isMultiple:C.length>1,registerPresubmitHandler:c})),[C,c]),[d,p]=Object(u.I)({}),m=Object(u.C)((()=>C.map((e=>({...e,...d[e.id]})))),[C,d]),f=Object(u.s)((e=>{if(0===Object.keys(e).length)return;const t=e;o.length>0&&C.forEach((C=>{const a=bb(C,e[C.id],!0);let n=a;o.forEach((e=>{const t=e({...C,...n},a,C);n={...n,...t}})),t[C.id]=n})),a((e=>t[e.id]))}),[o,C,a]),h=n(Object(u.s)((e=>{e&&(e.preventDefault(),p({})),f(d)}),[f,d])),b=Object(u.s)((()=>{setTimeout((()=>{const e=i.current;e&&e.dispatchEvent(new window.Event("submit",{cancelable:!0,bubbles:!0}))}))}),[]),g=Object(u.s)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];p((t=>{const a={};return C.forEach((C=>{const n={...C,...t[C.id]},r=bb(n,e,!1);a[C.id]={...t[C.id],...r}})),a})),t&&b()}),[C,b]),E=Object(u.s)((function(e,t,C){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];g((a=>{const n=a[e]||C;return{[e]:t?{...n,...bb(n,t,!1)}:null}}),a)}),[g]),v=t;return r.a.createElement(Mb,{ref:i,onSubmit:h},r.a.createElement(wb,null),r.a.createElement(Vl.Provider,{value:s},r.a.createElement(v,yb({selectedElements:m,submittedSelectedElements:C,pushUpdate:g,pushUpdateForObject:E,submit:b},l))))};function _b(){return(_b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const jb=l.f.div.withConfig({displayName:"designPanels__NoSelection",componentId:"sc-14jc2hf-0"})(["height:100%;display:flex;justify-content:center;align-items:center;"]),xb=Object(l.f)(cC.a).withConfig({displayName:"designPanels__Note",componentId:"sc-14jc2hf-1"})(["color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.secondary}));var Zb=function DesignPanels(){const{panels:e,createSubmitHandlerForPanel:t,panelProperties:C}=Ob();return null!=e&&e.length?e.map((e=>{let{Panel:a,type:n}=e;return r.a.createElement(Lb,_b({key:n,panelType:a,registerSubmitHandler:t(n)},C))})):r.a.createElement(jb,null,r.a.createElement(xb,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.MEDIUM},Object(h.__)("Nothing selected","web-stories")))};const Ab=l.f.div.withConfig({displayName:"designInspector__Wrapper",componentId:"sc-9478wu-0"})(["height:100%;flex-direction:column;justify-content:space-between;display:flex;"]),Ib=l.f.div.withConfig({displayName:"designInspector__TopPanels",componentId:"sc-9478wu-1"})(["overflow:auto;flex:1;"]),Tb=l.f.div.withConfig({displayName:"designInspector__BottomPanels",componentId:"sc-9478wu-2"})([""]);var Sb=function DesignInspector(){const e=Object(H.o)((e=>{let{actions:t}=e;return t.updateAnimationState})),t=Object(u.s)((()=>e({animationState:ae.l.RESET})),[e]);return r.a.createElement(Ab,null,r.a.createElement(Ib,{onFocus:t},r.a.createElement(Zb,null)),r.a.createElement(Tb,null,r.a.createElement(qp,null)))};const kb=new Set([Sc,Tc]);var Rb=function InspectorProvider(e){let{inspectorTabs:t,children:C}=e;const{actions:{getAuthors:a}}=Object(j.c)(),{selectedElementIds:n,currentPage:l}=Object(A.e)((e=>{let{state:t}=e;return{selectedElementIds:t.selectedElementIds,currentPage:t.currentPage}})),{tab:i}=Ic((e=>{let{tab:t}=e;return{tab:t}}));Object(u.y)((()=>{kb.has(i)&&(s(i),Object(f.g)("quick_action_tab_change",{name:i}))}),[i]);const o=Object(u.G)(null),[c,s]=Object(u.I)(Tc),[d,p]=Object(u.I)([]),[m,b]=Object(u.I)(null),g=Object(u.G)(),E=Object(u.G)(c),v=Object(u.G)(null),O=Object(u.G)(null),y=Object(u.C)((()=>({[Tc]:v,[Sc]:O})),[]),[M,w]=Object(u.I)(!1),L=Object(u.s)((e=>{g.current=e}),[]);Object(u.H)(g,(e=>{let{height:t}=e;return b(t)}),[]),Object(u.y)((()=>{n.length>0&&E.current===Sc&&s(Tc)}),[n]),Object(u.y)((()=>{E.current===Sc&&s(Tc)}),[l]);const _=Object(u.s)((()=>{M||0!==d.length||(w(!0),a().then((e=>{const t=e.map((e=>{let{id:t,name:C}=e;return{id:t,name:C}}));p(t)})).finally((()=>{w(!1)})))}),[M,d.length,a]),x={state:{tab:c,tabRefs:y,users:d,inspectorContentHeight:m,isUsersLoading:M},refs:{inspector:o},actions:{setTab:s,loadUsers:_,setInspectorContentNode:L},data:{tabs:[{id:Tc,title:Object(h.__)("Design","web-stories"),Pane:Sb}]}};return null!=t&&t.document&&x.data.tabs.push({id:Sc,...t.document}),r.a.createElement(rr.Provider,{value:x},C)};const Pb=e=>`inspector-tab-${e}`,Nb=l.f.div.attrs({role:"tabpanel"}).withConfig({displayName:"inspectorContent__InspectorPane",componentId:"sc-1pehndw-0"})(["height:100%;overflow:overlay;"]),Db=l.f.section.withConfig({displayName:"inspectorContent__InspectorPanes",componentId:"sc-1pehndw-1"})(["height:100%;"]);var Bb=function Inspector(){const{state:{tab:e},data:{tabs:t}}=lr();return r.a.createElement(Db,null,t.map((t=>{let{id:C,Pane:a}=t;return r.a.createElement(Nb,{"aria-labelledby":C,id:Pb(C),key:C,hidden:C!==e},C===e&&r.a.createElement(a,null))})))};const zb=l.f.section.attrs({"aria-label":Object(h.__)("Inspector","web-stories")}).withConfig({displayName:"inspectorLayout__Layout",componentId:"sc-1p4k142-0"})(["height:100%;display:flex;flex-direction:column;background-color:",";color:",";"],(e=>{let{theme:t}=e;return t.colors.bg.secondary}),(e=>{let{theme:t}=e;return t.colors.fg.secondary})),Fb=l.f.div.withConfig({displayName:"inspectorLayout__InspectorContainer",componentId:"sc-1p4k142-1"})(["height:100%;padding:0;overflow:auto;"]),Hb=Object(l.f)(ip).withConfig({displayName:"inspectorLayout__UnjustifiedTabView",componentId:"sc-1p4k142-2"})(["justify-content:center;"]);var Gb=function InspectorLayout(){const{state:{tab:e,tabRefs:t},actions:{setInspectorContentNode:C,setTab:a},refs:{inspector:n},data:{tabs:l}}=lr(),i=Object(u.s)((e=>{a(e),Object(f.g)("inspector_tab_change",{name:e})}),[a]);return Object(ye.e)(n),r.a.createElement(zb,{ref:n},r.a.createElement(Hb,{label:Object(h.__)("Inspector Selection","web-stories"),tabs:l,tab:e,tabRefs:t,onTabChange:i,getAriaControlsId:Pb,shortcut:"mod+option+3"}),r.a.createElement(Fb,{ref:C},r.a.createElement(Bb,null)))};var Vb=function(e){let{inspectorTabs:t}=e;return r.a.createElement(Rb,{inspectorTabs:t},r.a.createElement(zc,{disabled:!0},r.a.createElement(Gb,null)))},Ub=C(820),Wb=C(565);const Yb=Object(l.f)(Wb.a).withConfig({displayName:"searchInput__StyledSearchInput",componentId:"sc-145nauf-0"})(["input{",";}"],eC);var $b=function WrappedSearchInput(e){let{initialValue:t,placeholder:C,onSearch:a,disabled:n=!1,incremental:l=!1,delayMs:i=500}=e;const[o,c]=Object(u.I)(t),s=Object(u.x)((()=>{a(o)}),i),d=Object(u.s)((e=>{l&&i?s():a(e)}),[s,a,i,l]),p=Object(u.s)((e=>{const t=e.target.value;c(t),(l||""===t)&&d(t)}),[d,l]),m=Object(u.s)((()=>{c(""),d("")}),[d]),f=Object(u.s)((e=>{e.preventDefault(),d(o)}),[d,o]),b=o.length>0;return r.a.createElement("form",{onSubmit:f},r.a.createElement(Yb,{inputValue:o,placeholder:C,onChange:p,handleClearInput:m,disabled:n,ariaClearLabel:Object(h.__)("Clear Search","web-stories"),isOpen:b,"aria-label":Object(h.__)("Search","web-stories")}))};const qb=l.f.div.withConfig({displayName:"section__Container",componentId:"sc-emh1dh-0"})(["position:relative;margin-top:28px;margin-bottom:28px;&:first-child{margin-top:0px;}"]),Xb=Object(l.f)(Jt.a).attrs({as:"h2",size:ot.b.TYPOGRAPHY.PRESET_SIZES.XXX_SMALL}).withConfig({displayName:"section__Title",componentId:"sc-emh1dh-1"})(["flex:1 1 auto;color:",";margin-bottom:28px;"],(e=>{let{theme:t}=e;return t.colors.fg.primary}));function Section(e){let{title:t,children:C,...a}=e;return r.a.createElement(qb,a,r.a.createElement(Xb,null,t),C)}l.f.h3.withConfig({displayName:"common__Title",componentId:"sc-q5ifvb-0"})(["color:",";margin:0;font-size:19px;line-height:1.4;flex:3 0 0;display:flex;align-items:center;padding:2px 0;"],(e=>{let{theme:t}=e;return t.colors.fg.primary})),l.f.div.withConfig({displayName:"common__Header",componentId:"sc-q5ifvb-1"})(["display:flex;margin:0 0 25px;"]);var Kb=Object(u.f)({tabs:{}});var Qb=function(e){return Object(u.w)(Kb,null!=e?e:u.k)},Jb=C(775);var eg=function(e){let{sectionRef:t,innerContainerRef:C,isExpanded:a,setFocusedRowOffset:n,collapsedHeight:r,bottomMargin:l,topMargin:i}=e;Object(u.B)((()=>{if(!t.current||!C.current)return;let e;e=a?`${C.current.offsetHeight+i+l}px`:`${r}px`,t.current.style.height=e,t.current.style.minHeight=e,n(0)}),[l,r,C,a,t,n,i])};var tg=function(e){let{innerContainerRef:t,isExpanded:C,setFocusedRowOffset:a,selectedItemId:n,itemRefs:r,offsetSpacing:l=0}=e;Object(u.B)((()=>{var e;if(!t.current)return;const i=null!==(e=r.current)&&void 0!==e&&e[n]?r.current[n]:null,o=(null==i?void 0:i.offsetTop)-l||0;!C&&i&&a(o)}),[t,C,r,l,n,a]),Object(u.B)((()=>{var e;if(!t.current)return;const a=null!==(e=r.current)&&void 0!==e&&e[n]?r.current[n]:null,l=(null==a?void 0:a.offsetTop)||0;for(const e of r.current){if(!e)continue;const t=a&&e.offsetTop===l;!a||t||C?e.classList.remove("invisible"):e.classList.add("invisible")}}),[t,C,n,r])};const Cg=l.f.div.withConfig({displayName:"chipGroup__Section",componentId:"sc-emvo4b-0"})(["height:","px;min-height:","px;background-color:",";display:flex;flex-direction:column;align-items:flex-start;flex:0 1 auto;position:relative;transition:height 0.2s,min-height 0.2s;"],80,80,(e=>{let{theme:t}=e;return t.colors.divider.tertiary})),ag=l.f.div.withConfig({displayName:"chipGroup__Container",componentId:"sc-emvo4b-1"})(["overflow:hidden;margin:","px 12px ","px 24px;"],16,20),ng=l.f.div.withConfig({displayName:"chipGroup__InnerContainer",componentId:"sc-emvo4b-2"})(["display:flex;justify-content:center;flex-wrap:wrap;position:relative;padding:4px 0;transition:transform 0.2s;column-gap:8px;row-gap:14px;"]),rg=Object(l.f)(b.a).attrs({type:g.c.TERTIARY,size:g.a.SMALL,variant:g.d.CIRCLE}).withConfig({displayName:"chipGroup__ExpandButton",componentId:"sc-emvo4b-3"})(["display:flex;position:absolute;bottom:-24px;background:",";max-height:none;width:32px;height:32px;"," visibility:inherit;align-self:center;justify-content:center;align-items:center;"],(e=>{let{theme:t}=e;return t.colors.bg.tertiary}),(e=>{let{isExpanded:t}=e;return t&&"transform: scaleY(-1);"}));var lg=e=>{let{items:t,selectedItemId:C,selectItem:a,deselectItem:n,ariaLabel:l}=e;const[i,o]=Object(u.I)(!1),c=Object(u.G)(),s=Object(u.G)(),d=Object(u.G)([]),[p,m]=Object(u.I)(0),f=Object(u.s)(((e,t)=>{e&&null!==t?n():(o(!1),a(t))}),[n,a]),b=Object(u.s)((()=>o((e=>!e))),[]);eg({sectionRef:c,innerContainerRef:s,isExpanded:i,setFocusedRowOffset:m,collapsedHeight:80,bottomMargin:20,topMargin:16}),tg({isExpanded:i,innerContainerRef:s,selectedItemId:C,setFocusedRowOffset:m,itemRefs:d,offsetSpacing:4});const g=t.length>0;En({ref:c},[i]),Object(ye.h)(c,i?"":"down",(()=>g&&o(!0)),[i,g]);const E=Object(u.C)((()=>`pill-group-${Object(Hn.a)()}`),[]);return r.a.createElement(Cg,{ref:c},g&&r.a.createElement(r.a.Fragment,null,r.a.createElement(ag,{id:E,isExpanded:i,role:"listbox","aria-label":l||Object(h.__)("List of filtering options","web-stories")},r.a.createElement(ng,{role:"presentation",ref:s,style:{transform:`translateY(-${p}px`}},t.map(((e,t)=>{const{id:a,label:n}=e,l=a===C,i=l||!l&&0===t?0:-1;return r.a.createElement(Jb.a,{key:a,role:"option",ref:e=>{d.current[a]=e},active:l,"aria-selected":l,onClick:()=>f(l,a),tabIndex:i},n)})))),r.a.createElement(rg,{onClick:b,isExpanded:i,"aria-controls":E,"aria-expanded":i,"aria-label":Object(h.__)("Expand","web-stories")},r.a.createElement(Te.a.ChevronUp,null))))};const ig="1em",og=l.f.section.attrs((e=>{let{isActive:t}=e;return{role:"tabpanel","aria-expanded":t,hidden:!t}})).withConfig({displayName:"shared__Pane",componentId:"sc-10fhorr-0"})(["padding:1.5em ",";",""],ig,(e=>{let{isOverflowScrollable:t=!1}=e;return t&&Object(l.e)(["overflow-y:scroll;height:100%;"])}));function cg(e){return`library-pane-${e}`}function sg(e){return`library-tab-${e}`}const dg=l.f.div.withConfig({displayName:"shared__LoadingContainer",componentId:"sc-10fhorr-1"})(["display:flex;justify-content:center;margin-top:18px;"]),ug=l.f.div.withConfig({displayName:"styles__PaneInner",componentId:"sc-18rwr03-0"})(["height:100%;display:flex;flex-direction:column;"]),pg=l.f.div.withConfig({displayName:"styles__PaneHeader",componentId:"sc-18rwr03-1"})(["padding-top:24px;flex:0 1 auto;"]),mg=l.f.div.withConfig({displayName:"styles__MediaGalleryContainer",componentId:"sc-18rwr03-2"})(["overflow-y:scroll;overflow-x:hidden;padding:0 ",";margin-top:1em;position:relative;width:100%;flex:1 1 auto;min-height:100px;"],ig),fg=l.f.div.withConfig({displayName:"styles__MediaGalleryInnerContainer",componentId:"sc-18rwr03-3"})(["width:calc(100% + 19px);margin:0 -4px;"]),hg=l.f.div.withConfig({displayName:"styles__MediaGalleryLoadingPill",componentId:"sc-18rwr03-4"})(["display:block;position:absolute;bottom:20px;left:60px;right:60px;width:240px;text-align:center;padding:8px 80px;background-color:",";border-radius:100px;"],(e=>{let{theme:t}=e;return Object(LC.c)(t.colors.standard.black,.4)})),bg=Object(l.f)(cC.a).attrs({size:ot.b.TYPOGRAPHY.PRESET_SIZES.MEDIUM}).withConfig({displayName:"styles__MediaGalleryMessage",componentId:"sc-18rwr03-5"})(["color:",";padding:1em;text-align:center;"],(e=>{let{theme:t}=e;return t.colors.fg.secondary})),gg=Object(l.f)(og).withConfig({displayName:"styles__StyledPane",componentId:"sc-18rwr03-6"})(["height:100%;padding:0;overflow:hidden;"]),Eg=l.f.div.withConfig({displayName:"styles__SearchInputContainer",componentId:"sc-18rwr03-7"})(["padding:0 ",";"],ig);var vg=C(65),Og=C(621);function yg(){return(yg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Mg="loading-indicator",wg=l.f.span.withConfig({displayName:"loadingBar__AriaOnlyAlert",componentId:"sc-x990cz-0"})(Q.c.visuallyHidden),Lg=Object(l.g)(["0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}"]),_g=l.f.div.withConfig({displayName:"loadingBar__UploadingIndicator",componentId:"sc-x990cz-1"})(["height:4px;background:",";background-size:400% 400%;position:absolute;bottom:0px;border-radius:",";animation:"," 4s ease infinite;&.","{&.appear{width:0;}&.appear-done{width:100%;transition:1s ease-out;transition-property:width;}}"],(e=>{let{theme:t}=e;return t.colors.gradient.loading}),(e=>{let{theme:t}=e;return`0px 0px ${t.borders.radius.small} ${t.borders.radius.small}`}),Lg,Mg),LoadingBar=e=>{let{loadingMessage:t,...C}=e;const a=Object(u.G)();return r.a.createElement(r.a.Fragment,null,t&&r.a.createElement(wg,{role:"status"},t),r.a.createElement(HC.a,{nodeRef:a,in:!0,appear:!0,timeout:0,className:Mg},r.a.createElement(_g,yg({ref:a},C))))};var jg=C(626);var xg=function DeleteDialog(e){let{mediaId:t,type:C,onClose:a}=e;const{actions:{deleteMedia:n}}=Object(j.c)(),{showSnackbar:l}=Object(Oe.a)(),{deleteMediaElement:i}=Object(T.c)((e=>{let{actions:{deleteMediaElement:t}}=e;return{deleteMediaElement:t}})),{deleteElementsByResourceId:o}=Object(A.e)((e=>({deleteElementsByResourceId:e.actions.deleteElementsByResourceId}))),c=Object(u.s)((async()=>{a();try{await n(t),i({id:t}),o({id:t})}catch(e){Object(f.f)("local_media_deletion",e.message),l({message:Object(h.__)("Failed to delete media item.","web-stories"),dismissible:!0})}}),[n,i,o,t,a,l]),s=Object(h.__)("Delete Image?","web-stories"),d=Object(h.__)("Delete Video?","web-stories"),p=Object(h.__)("You are about to permanently delete this image from your site. The image will appear broken in any WordPress content that uses it. ","web-stories"),m=Object(h.__)("You are about to permanently delete this video from your site. The video will appear broken in any WordPress content that uses it. ","web-stories");return r.a.createElement(Ge.a,{isOpen:!0,onClose:a,title:"image"===C?s:d,secondaryText:Object(h.__)("Cancel","web-stories"),onPrimary:c,primaryText:Object(h.__)("Delete","web-stories"),maxWidth:512},r.a.createElement(cC.a,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},"image"===C?p:m),r.a.createElement(cC.a,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL,isBold:!0},Object(h.__)("This action can not be undone.","web-stories")))},Zg=C(628);const Ag=Object(l.e)(["display:flex;width:","px;margin-right:28px;"],152),Ig=l.f.img.withConfig({displayName:"mediaEditDialog__Image",componentId:"sc-ctku7j-0"})(["",""],Ag),Tg=l.f.video.withConfig({displayName:"mediaEditDialog__Video",componentId:"sc-ctku7j-1"})(["",""],Ag),Sg=l.f.div.withConfig({displayName:"mediaEditDialog__DialogBody",componentId:"sc-ctku7j-2"})(["display:flex;justify-content:left;align-items:flex-start;"]),kg=l.f.div.withConfig({displayName:"mediaEditDialog__MetadataTextContainer",componentId:"sc-ctku7j-3"})(["display:flex;flex-direction:column;margin:0 4px;"]),Rg=Object(l.f)(cC.a).withConfig({displayName:"mediaEditDialog__DateText",componentId:"sc-ctku7j-4"})(["margin-bottom:8px;"]),Pg=Object(l.f)(zl).withConfig({displayName:"mediaEditDialog__AssistiveTextArea",componentId:"sc-ctku7j-5"})(["margin:20px 0 4px;"]),Ng=Object(h.__)("Edit Image","web-stories"),Dg=Object(h.__)("Edit Video","web-stories"),Bg=Object(h.__)("Assistive text","web-stories"),zg=Object(h.__)("Video description","web-stories"),Fg=Object(h.__)("Describe the appearance and function of the image. Leave empty if the image is purely decorative.","web-stories"),Hg=Object(h.__)("For indexability and accessibility. Include any burned-in text inside the video.","web-stories");var Gg=function MediaEditDialog(e){let{resource:t,onClose:C}=e;const{id:a,src:n,creationDate:l,width:i,height:o,type:c,alt:s,poster:d,mimeType:p}=t,{actions:{updateMedia:m}}=Object(j.c)(),{updateMediaElement:b}=Object(T.c)((e=>{let{actions:{updateMediaElement:t}}=e;return{updateMediaElement:t}})),{showSnackbar:g}=Object(Oe.a)(),[E,v]=Object(u.I)(s),O=Object(Ct.m)(l),y=Object(u.s)((e=>{v(e.target.value)}),[]),M=Object(u.s)((async()=>{try{await m(a,{alt_text:E}),b({id:a,data:{alt:E}}),C()}catch(e){Object(f.f)("local_media_edit",e.message),g({message:Object(h.__)("Failed to update, please try again.","web-stories"),dismissible:!0})}}),[E,a,C,g,m,b]),w="image"===c;return r.a.createElement(Ge.a,{isOpen:!0,onClose:C,title:w?Ng:Dg,secondaryText:Object(h.__)("Cancel","web-stories"),onPrimary:M,primaryText:Object(h.__)("Save","web-stories")},r.a.createElement(Sg,null,"image"===c?r.a.createElement(Ig,{src:Object(Zg.a)(152,t),alt:s,loading:"lazy",crossOrigin:"anonymous",decoding:"async"}):r.a.createElement(Tg,{key:n,crossOrigin:"anonymous",poster:d,preload:"metadata",muted:!0},r.a.createElement("source",{src:n,type:p})),r.a.createElement(kg,null,Object(Ct.k)(O)&&r.a.createElement(Rg,{forwardedAs:"span",size:ot.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL},Object(h.sprintf)(
|
136 |
/* translators: %s: upload date of media item. */
|
137 |
+
Object(h.__)("Uploaded: %s","web-stories"),Object(Ct.d)(l))),r.a.createElement(cC.a,{as:"span",size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},Object(h.sprintf)(
|
138 |
/* translators: 1: image width. 2: image height. */
|
139 |
+
Object(h.__)("%1$d x %2$d pixels","web-stories"),i,o)),r.a.createElement(Pg,{value:E,"aria-label":w?Bg:zg,type:"text",placeholder:w?Bg:zg,onChange:y}),r.a.createElement(cC.a,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL},w?Fg:Hg))))};const Vg=Object(l.f)(b.a).attrs({variant:g.d.ICON}).withConfig({displayName:"dropDownMenu__MoreButton",componentId:"sc-1eq0xdj-0"})(["display:flex;align-items:center;position:absolute;top:8px;right:8px;background:",";color:",";border-radius:100%;width:28px;height:28px;"],(e=>{let{theme:t}=e;return t.colors.bg.secondary}),(e=>{let{theme:t}=e;return t.colors.fg.primary})),Ug=l.f.div.withConfig({displayName:"dropDownMenu__IconContainer",componentId:"sc-1eq0xdj-1"})(["height:32px;width:auto;"]),Wg=l.f.div.withConfig({displayName:"dropDownMenu__DropDownContainer",componentId:"sc-1eq0xdj-2"})(["margin-top:10px;"]),Yg=l.f.div.withConfig({displayName:"dropDownMenu__MenuContainer",componentId:"sc-1eq0xdj-3"})(["z-index:1;"]),$g=Object(l.e)(["min-width:100px;margin-top:0;li{display:block;}"]);var qg=function DropDownMenu(e){let{resource:t,display:C,isMenuOpen:a,onMenuOpen:n,onMenuCancelled:l,onMenuSelected:i}=e;const o=[{group:[{label:Object(h.__)("Edit","web-stories"),value:"edit"},{label:Object(h.__)("Delete","web-stories"),value:"delete"}]}],[c,s]=Object(u.I)(!1),[d,p]=Object(u.I)(!1),m=Object(u.G)(),{canTranscodeResource:f}=Object(H.m)((e=>{let{state:{canTranscodeResource:t}}=e;return{canTranscodeResource:t}})),b=Object(u.s)((()=>s(!1)),[s]),g=Object(u.s)((()=>p(!1)),[p]),E=Object(u.C)((()=>`list-${Object(Hn.a)()}`),[]),v=Object(u.C)((()=>`button-${Object(Hn.a)()}`),[]);return f(t)&&r.a.createElement(Yg,null,(C||a)&&r.a.createElement(r.a.Fragment,null,r.a.createElement(Vg,{ref:m,onClick:n,"aria-label":Object(h.__)("More","web-stories"),"aria-pressed":a,"aria-haspopup":!0,"aria-expanded":a,"aria-owns":a?E:null,id:v},r.a.createElement(Ug,null,r.a.createElement(Te.a.Dots,null))),r.a.createElement(zr.a,{anchor:m,placement:zC.a.BOTTOM_START,isOpen:a,width:160},r.a.createElement(Wg,null,r.a.createElement(Dr.a,{parentId:v,listId:E,onMenuItemClick:(e,t)=>{switch(i(),t){case"edit":p(!0);break;case"delete":s(!0)}},options:o,onDismissMenu:l,hasMenuRole:!0,menuStylesOverride:$g})))),c&&r.a.createElement(xg,{mediaId:t.id,type:t.type,onClose:b}),d&&r.a.createElement(Gg,{resource:t,onClose:g}))};const Xg=Object(l.f)(cC.a).withConfig({displayName:"attribution__StyledText",componentId:"sc-dg18hp-0"})(["color:",";"],(e=>{let{theme:t,active:C}=e;return Object(LC.c)(t.colors.standard.white,C?1:.6)})),Kg=l.f.a.withConfig({displayName:"attribution__Link",componentId:"sc-dg18hp-1"})(["display:block;position:absolute;left:0;bottom:0;width:100%;padding:8px;background-color:",";text-overflow:ellipsis;overflow:hidden;white-space:nowrap;text-decoration:none;"],(e=>{let{theme:t,active:C}=e;return Object(LC.c)(t.colors.bg.primary,C?.8:.6)}));var Qg=e=>{let{author:t,url:C}=e;const[a,n]=Object(u.I)(!1),l=()=>n(!0),i=()=>n(!1);return r.a.createElement(Kg,{title:t,active:a,onPointerEnter:l,onFocus:l,onPointerLeave:i,onBlur:i,href:C,target:"_blank",rel:"noreferrer"},r.a.createElement(Xg,{forwardedAs:"span",size:ot.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL},t))},Jg=C(137),eE=C(119);const tE=l.f.nav.withConfig({displayName:"menu__Menu",componentId:"sc-pi2qzl-0"})(["position:absolute;background:hotpink;padding:5px;border:1px solid white;color:white;z-index:2;"]);var CE=Object(u.j)((function FloatingMenu(e,t){return Object(u.B)((()=>{const e=t.current,C=e.getBoundingClientRect();e.style.setProperty("--width",`${C.width.toFixed(2)}px`),e.style.setProperty("--height",`${C.height.toFixed(2)}px`)}),[t]),r.a.createElement(tE,{ref:t},"Floating Menu | Floating Menu | Floating Menu | Floating Menu")}));const aE=[".moveable-control-box",".moveable-direction.moveable-e",".moveable-direction.moveable-s",".moveable-direction moveable-se"];var nE=function FloatingMenuLayer(){const{setMoveableMount:e}=Object(H.d)((e=>{let{actions:{setMoveableMount:t}}=e;return{setMoveableMount:t}})),{workspaceWidth:t,workspaceHeight:C}=Object(H.l)((e=>{let{state:{workspaceWidth:t,workspaceHeight:C}}=e;return{workspaceWidth:t,workspaceHeight:C}})),[a,n]=Object(u.I)(null),l=Object(u.G)(),i=Object(u.G)();return Object(u.y)((()=>(e((()=>n)),()=>e(null))),[e]),Object(u.y)((()=>{i.current={width:t,height:C}}),[t,C]),Object(u.y)((()=>{const e=l.current;if(!a)return e.style.display="none",null;const t=()=>{const t=a.getRect(),{width:C,height:n}=i.current;e.style.display="flex";const r=t.left+t.width/2;e.style.left=`clamp(0px, ${r}px - (var(--width) / 2), ${C}px - var(--width))`;const l=t.top+t.height+uC.j;e.style.top=`clamp(0px, ${l}px, ${n}px - var(--height))`};t();const C=new MutationObserver(t);return aE.map((e=>document.querySelector(e))).filter(Boolean).forEach((e=>C.observe(e,{attributes:!0}))),()=>C.disconnect()}),[a]),r.a.createElement(CE,{ref:l})},rE=C(421);function lE(){return(lE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const iE=l.f.div.withConfig({displayName:"withOverlay__Overlay",componentId:"sc-q4xyyl-0"})(["position:absolute;top:0;/*! @noflip */ left:0;width:0;height:0;z-index:",";"],(e=>{let{zIndex:t}=e;return t}));var oE=function(e){return Object(u.j)((function WithOverlay(t,C){let{children:a,...n}=t;const[l,i]=Object(u.I)(null),[o,c]=Object(u.I)(null),{zIndex:s=1}=n;return r.a.createElement(rE.a.Provider,{value:{container:o,overlay:l}},r.a.createElement(e,lE({ref:Object(u.t)(C,c)},n),a,r.a.createElement(iE,{ref:i,zIndex:s})))}))},cE=C(280),sE=C.n(cE),dE=C(85);var uE=function(e){let{canSnap:t,otherNodes:C,snappingOffsetX:a=null,isDragging:n}=e;const r=Object(H.e)(H.a.CANVAS_CONTAINER),l=Object(H.e)(H.a.PAGE_CONTAINER),i=Object(H.d)((e=>{let{state:t}=e;return t.designSpaceGuideline})),{pageWidth:o,pageHeight:c}=Object(H.l)((e=>{let{state:{pageWidth:t,pageHeight:C}}=e;return{pageWidth:t,pageHeight:C}})),{activeDropTargetId:s,isDropTargetingDisabled:d}=Object(W.b)((e=>{let{state:t}=e;return{activeDropTargetId:t.activeDropTargetId,isDropTargetingDisabled:t.isDropTargetingDisabled}})),p=Object(H.r)((e=>{let{SAFE_ZONE:t}=e;return t}));t=t&&!d&&!s;const m=Object(u.s)((e=>{let{elements:t}=e;const C=t.flat().some((e=>{let{center:t,element:C}=e;return C===i&&!t}));n&&C&&p()}),[n,i,p]);if(!r||!l)return{};const f=a||r.x,h=Math.ceil(l.x-f),b=Math.floor(l.y-r.y),g=t?[h,h+o/2,h+o]:[],E=(o/ee.e-c)/2;return{snappable:t,snapHorizontal:t,snapVertical:t,snapCenter:t,snapGap:t,isDisplaySnapDigit:!1,onSnap:m,horizontalGuidelines:t?[b-E,b,b+c/2,b+c,b+c+E]:[],verticalGuidelines:g,elementGuidelines:t?[...C,i]:[]}};var pE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Object(u.y)((()=>{let t=!0;const C=()=>{var C,a;t&&(null===(C=e.current)||void 0===C||null===(a=C.updateRect)||void 0===a||a.call(C))};C();const a=setTimeout(C);return()=>{t=!1,clearTimeout(a)}}),t)};var mE=function(e){Object(u.y)((()=>{const t=()=>{var t;return null===(t=e.current)||void 0===t?void 0:t.updateRect()};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[e])};var fE=function(e,t){const{left:C,right:a,top:n,bottom:r}=e.getBoundingClientRect(),l=t.getBoundingClientRect();return C>l.right||a<l.left||r<l.top||n>l.bottom};var hE=function(){const{deleteSelectedElements:e}=Object(H.o)((e=>({deleteSelectedElements:e.actions.deleteSelectedElements}))),{fullbleedContainer:t}=Object(H.d)((e=>{let{state:{fullbleedContainer:t}}=e;return{fullbleedContainer:t}}));return{handleElementOutOfCanvas:C=>!!fE(C,t)&&(e(),!0)}};var bE=function(e){let{setIsDragging:t,resetMoveable:C,selectedElement:a,setTransformStyle:n,frame:r}=e;const{isDropSource:l,handleDrag:i,handleDrop:o,setDraggingResource:c}=Object(W.b)((e=>{let{actions:{handleDrag:t,handleDrop:C,isDropSource:a,setDraggingResource:n}}=e;return{handleDrag:t,handleDrop:C,setDraggingResource:n,isDropSource:a}})),{handleElementOutOfCanvas:s}=hE(),{updateSelectedElements:d}=Object(H.o)((e=>({updateSelectedElements:e.actions.updateSelectedElements}))),{editorToDataX:p,editorToDataY:m}=Object(Ce.a)((e=>{let{actions:{editorToDataX:t,editorToDataY:C}}=e;return{editorToDataX:t,editorToDataY:C}})),f=Object(u.r)((e=>{t(!1),c(null),C(e)}),[t,c,C]);return{onDrag:e=>{let{target:C,beforeTranslate:o,clientX:s,clientY:d}=e;t(!0),l(a.type)&&c(a.resource),r.translate=o,n(C,r),l(a.type)&&i(a.resource,s,d,a.id)},throttleDrag:0,onDragStart:e=>{let{set:t}=e;t(r.translate)},onDragEnd:e=>{let{target:C,isDrag:n}=e;if(!n)return!1;if(s(C))return t(!1),void c(null);const i=e=>Math.abs(e)<=1?0:e,[u,h]=r.translate;if(0!==u||0!==h){const e={x:i(a.x+p(u)),y:i(a.y+m(h))};d({properties:e}),l(a.type)&&o(a.resource,a.id)}f(C)}}};const gE=[],EE=["n","s"],vE=["e","w"],OE=["nw","ne","sw","se"];function yE(e){let{vertical:t,horizontal:C,diagonal:a}=e;return[...t?EE:gE,...C?vE:gE,...a?OE:gE]}var ME=function(e){let{resetMoveable:t,selectedElement:C,setTransformStyle:a,frame:n,isEditMode:r,pushTransform:l,classNames:i,forceLockRatio:o}=e;const{updateSelectedElements:c}=Object(H.o)((e=>({updateSelectedElements:e.actions.updateSelectedElements}))),{handleElementOutOfCanvas:s}=hE(),{editorToDataX:d,editorToDataY:u,dataToEditorY:p,dataToEditorX:m}=Object(Ce.a)((e=>{let{actions:{editorToDataX:t,editorToDataY:C,dataToEditorY:a,dataToEditorX:n}}=e;return{editorToDataX:t,editorToDataY:C,dataToEditorY:a,dataToEditorX:n}})),{lockAspectRatio:f,type:h}=C,b=o||f,{resizeRules:g={},unlockedResizeRules:E,updateForResizeEvent:v}=Object(ne.g)(h),O=!b&&E?E:g,y=m(O.minWidth),M=p(O.minHeight),w=C.width/C.height,L=C.width<=O.minWidth||C.height<=O.minHeight;return{onResize:e=>{let{target:t,direction:r,width:l,height:i,drag:o}=e,c=l,s=i,m=null;b?(c<y&&(c=y,s=c/w),s<M&&(s=M,c=M*w)):(s=Math.max(s,M),c=Math.max(c,y)),v&&(m=v(C,r,d(c,!1),u(s,!1),b)),m&&m.height&&(s=p(m.height)),m&&m.marginOffset&&(t.querySelector(".syncMargin").style.margin=-p(m.marginOffset)/2+"px 0"),t.style.width=`${c}px`,t.style.height=`${s}px`,n.direction=r,n.resize=[c,s],n.translate=o.beforeTranslate,n.updates=m,a(t,n)},onResizeStart:e=>{let{setOrigin:t,dragStart:a}=e;t(["%","%"]),a&&a.set(n.translate),r&&l(C.id,n)},onResizeEnd:e=>{let{target:a}=e;if(s(a))return;const[r,l]=n.resize;if(0!==r&&0!==l){const{direction:e}=n,[t,a]=n.translate,i=d(r),o=u(l),s={width:i,height:o,x:C.x+d(t),y:C.y+u(a)};v&&Object.assign(s,v(C,e,i,o,b)),c({properties:s})}t(a)},keepRatio:b,renderDirections:yE(O),className:sE()(i,{"visually-hide-handles":L})}};var utils_normalizeRotationDegrees=function(e){return(e%360+360)%360};var wE=function(e){let{selectedElement:t,isEditMode:C,pushTransform:a,frame:n,setTransformStyle:r,resetMoveable:l,throttleRotation:i}=e;const{updateSelectedElements:o}=Object(H.o)((e=>({updateSelectedElements:e.actions.updateSelectedElements}))),{handleElementOutOfCanvas:c}=hE();return{throttleRotate:i?30:0,onRotate:e=>{let{target:t,beforeRotate:C}=e;n.rotate=utils_normalizeRotationDegrees(C),r(t,n)},onRotateEnd:e=>{let{target:t}=e;if(c(t))return;const C={rotationAngle:Math.round(n.rotate)};o({properties:C}),l(t)},onRotateStart:e=>{let{set:r}=e;C&&a(t.id,n),r(n.rotate)}}};function LE(){return(LE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var _E=Object(u.j)((function SingleSelectionMoveable(e,t){let{selectedElement:C,targetEl:a,pushEvent:n,isEditMode:l,...i}=e;const o=Object(u.G)(null),[c,s]=Object(u.I)(!1),d=Object(H.d)((e=>{let{state:t}=e;return t.nodesById})),p=Object(Ce.a)((e=>{let{actions:t}=e;return t.getBox})),m=Object(U.b)((e=>{let{actions:t}=e;return t.pushTransform})),{zoomSetting:f,scrollLeft:h,scrollTop:b}=Object(H.l)((e=>{let{state:t}=e;return{zoomSetting:t.zoomSetting,scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}})),g=!C.isBackground,E=Object(u.G)(),v=Object(H.o)((e=>{var t,C;let{state:a}=e;return null===(t=a.currentPage)||void 0===t||null===(C=t.elements[0])||void 0===C?void 0:C.id})),O=Object(ye.f)("shift");mE(o),Object(u.y)((()=>{E.current=n}),[n]),Object(u.y)((()=>{o.current&&o.current.updateRect()}),[h,b]),pE(o,[f]),Object(u.y)((()=>{o.current&&(E.current&&a.contains(E.current.target)&&g&&o.current.moveable.dragStart(E.current),o.current.updateRect())}),[a,o,g]),Object(u.y)((()=>{o.current&&o.current.updateRect()}));const y=p(C),M=Object(u.C)((()=>({translate:[0,0],rotate:y.rotationAngle,resize:[0,0],updates:null})),[y.rotationAngle]),w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:M;M.translate=t.translate,M.direction=t.direction,M.resize=t.resize,M.updates=t.updates,M.rotate=t.rotate,e.style.transform=`translate(${M.translate[0]}px, ${M.translate[1]}px) rotate(${M.rotate}deg)`,M.resize[0]&&(e.style.width=`${M.resize[0]}px`),M.resize[1]&&(e.style.height=`${M.resize[1]}px`),m(C.id,M)},L=Object(u.r)((e=>{o.current&&(M.direction=[0,0],M.translate=[0,0],M.resize=[0,0],M.updates=null,m(C.id,null),e.style.transform="",e.style.width="",e.style.height="",o.current.updateRect())}),[M,m,C.id]),_=!l,j=c,x=sE()("default-moveable",{"hide-handles":j,"type-text":"text"===C.type}),Z=bE({setIsDragging:s,resetMoveable:L,selectedElement:C,setTransformStyle:w,frame:M}),A=l?{onDrag:()=>!1,onDragEnd:()=>!1,onDragStart:()=>!1}:Z,I=ME({resetMoveable:L,selectedElement:C,setTransformStyle:w,frame:M,isEditMode:l,pushTransform:m,classNames:x,forceLockRatio:O}),T=wE({selectedElement:C,isEditMode:l,pushTransform:m,frame:M,setTransformStyle:w,resetMoveable:L,throttleRotation:O}),S=Object.values(Object(dE.a)(d,[C.id,v])),k=uE({otherNodes:S,canSnap:_&&g,isDragging:c});return r.a.createElement(Jg.a,LE({},i,{className:x,zIndex:0,ref:Object(u.t)(o,t),target:a,edge:!0,draggable:g,resizable:g&&!j,rotatable:g&&!j},A,I,T,k,{origin:!1,pinchable:!0}))}));function jE(){return(jE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const xE=l.f.div.withConfig({displayName:"editElement__Wrapper",componentId:"sc-1w8k2uc-0"})([""," "," "," pointer-events:initial;"],re.h,re.j,re.i);var ZE=function EditElement(e){let{element:t}=e;const{id:C,type:a}=t,{getBox:n}=Object(Ce.a)((e=>({getBox:e.actions.getBox}))),[l,i]=Object(u.I)(null),[o,c]=Object(u.I)(null),{Edit:s,hasEditModeMoveable:d}=Object(ne.g)(a),p=n(o?{...t,...o}:t),m=Object(u.G)(null);return r.a.createElement(r.a.Fragment,null,r.a.createElement(xE,jE({"aria-labelledby":`layer-${C}`},p,{ref:i}),r.a.createElement(s,{element:o?{...t,...o}:t,box:p,editWrapper:d&&l,onResize:()=>{m.current&&m.current.updateRect()},setLocalProperties:c})),d&&l&&r.a.createElement(_E,{selectedElement:t,targetEl:l,isEditMode:!0,ref:m}))};const AE=Object(l.f)(Bo).withConfig({displayName:"editLayer__LayerWithGrayout",componentId:"sc-1j9iuj3-0"})(["background-color:",";"],(e=>{let{grayout:t,theme:C}=e;return t?C.colors.opacity.overlayDark:"transparent"})),IE=oE(Ko);function EditLayerForElement(e){let{element:t,showOverflow:C}=e;const a=Object(u.G)(null),n=Object(u.G)(null),{editModeGrayout:l,EditMenu:i}=Object(ne.g)(t.type),{clearEditing:o}=Object(H.d)((e=>({clearEditing:e.actions.clearEditing}))),c=Object(jp.a)();return Object(ye.h)(a,{key:"esc",editable:!0},(()=>o()),[o]),Object(u.y)((()=>()=>c(!1)),[c]),r.a.createElement(AE,{ref:a,"aria-label":Object(h._x)("Edit layer","compound noun","web-stories"),"data-testid":"editLayer",grayout:l,zIndex:ko,onPointerDown:e=>{e.target!==a.current&&e.target!==n.current||o()}},r.a.createElement(IE,{ref:n,fullBleedContainerLabel:Object(h.__)("Fullbleed area (Edit layer)","web-stories"),isControlled:!0,showOverflow:C,overflow:C?"visible":"hidden"},r.a.createElement(ZE,{element:t})),i&&r.a.createElement(Xo,{showOverflow:!0},r.a.createElement(i,null)))}var TE=Object(u.m)((function EditLayer(){const{currentPage:e}=Object(H.o)((e=>({currentPage:e.state.currentPage}))),{editingElement:t,showOverflow:C=!0}=Object(H.d)((e=>{let{state:{editingElement:t,editingElementState:{showOverflow:C}={}}}=e;return{editingElement:t,showOverflow:C}})),a=t&&e&&e.elements.find((e=>e.id===t));return a?r.a.createElement(EditLayerForElement,{element:a,showOverflow:C}):null}));function SE(){return(SE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var kE=n.createElement("path",{fillOpacity:.1,d:"M12 0c6.6 0 12 5.4 12 12s-5.4 12-12 12S0 18.6 0 12 5.4 0 12 0z"}),RE=n.createElement("path",{d:"M13.8 14.6c.1.1.2.3.2.5s-.1.3-.2.5L12.3 17c-.7.7-1.7 1.1-2.7 1.1-1 0-1.9-.4-2.7-1.1-.7-.7-1.1-1.7-1.1-2.7 0-1 .4-1.9 1.1-2.7l1.5-1.5c.2 0 .3-.1.5-.1s.3.1.5.2c.1.1.2.3.2.5s-.1.4-.2.5l-1.5 1.5c-.5.5-.7 1.1-.7 1.7 0 .6.3 1.3.7 1.7.5.5 1.1.7 1.7.7s1.3-.3 1.7-.7l1.5-1.5c.3-.3.7-.3 1 0zM17 7c-.7-.7-1.7-1.1-2.7-1.1-1 0-1.9.4-2.7 1.1l-1.5 1.5c0 .1-.1.3-.1.4 0 .2.1.3.2.5.1.1.3.2.5.2s.3-.1.5-.2l1.5-1.5c.5-.5 1.1-.7 1.7-.7.6 0 1.3.3 1.7.7.5.5.7 1.1.7 1.7 0 .6-.3 1.3-.7 1.7l-1.5 1.5c-.1.1-.2.3-.2.5s.1.3.2.5c.1.1.3.2.5.2s.3-.1.5-.2l1.5-1.5c.7-.7 1.1-1.7 1.1-2.7-.1-1-.5-1.9-1.2-2.6zm-7.9 7.2c0 .2.1.3.2.5.1.1.3.2.5.2s.4-.1.5-.2l4.5-4.5c.1-.1.2-.3.2-.5s-.1-.4-.2-.5c-.3-.2-.8-.2-1 .1l-4.5 4.5c-.1.1-.2.3-.2.4z"});function SvgDefaultIcon(e){let{title:t,titleId:C,...a}=e;return n.createElement("svg",SE({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-labelledby":C},a),t?n.createElement("title",{id:C},t):null,kE,RE)}const PE=n.memo(SvgDefaultIcon);function NE(){return(NE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var DE=n.createElement("path",{d:"M18 7.7c-.2 0-.5-.1-.7-.2l-7.3-4-7.3 4c-.7.4-1.6.2-2-.6-.4-.7-.1-1.6.6-2l8-4.4c.5-.2 1-.2 1.5 0l8 4.4c.7.4 1 1.3.6 2-.4.5-.9.8-1.4.8z"});function SvgArrowBar(e){let{title:t,titleId:C,...a}=e;return n.createElement("svg",NE({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 8","aria-labelledby":C},a),t?n.createElement("title",{id:C},t):null,DE)}const BE=n.memo(SvgArrowBar);const zE=l.f.div.withConfig({displayName:"pageAttachment__Wrapper",componentId:"sc-1bseqmx-0"})(["position:absolute;display:flex;align-items:center;justify-content:flex-end;flex-direction:column;bottom:0;height:20%;width:100%;color:",";z-index:3;"],(e=>{let{theme:t}=e;return t.colors.standard.white})),FE=l.f.div.withConfig({displayName:"pageAttachment__Guideline",componentId:"sc-1bseqmx-1"})(["mix-blend-mode:difference;position:absolute;height:1px;bottom:20%;width:100%;background-image:",";background-position:top;background-size:16px 0.5px;background-repeat:repeat-x;z-index:3;"],(e=>{let{theme:t}=e;return`linear-gradient(to right, ${t.colors.standard.black} 50%, ${t.colors.standard.white} 0%)`})),HE=Object(l.f)(BE).withConfig({displayName:"pageAttachment__ArrowBar",componentId:"sc-1bseqmx-2"})(["display:block;cursor:pointer;margin-bottom:10px;filter:drop-shadow(0px 2px 6px rgba(0,0,0,0.3));width:20px;height:8px;"]),GE=l.f.div.withConfig({displayName:"pageAttachment__OutlinkChip",componentId:"sc-1bseqmx-3"})(["height:36px;display:flex;position:relative;padding:10px 6px;margin:0 0 20px;max-width:calc(100% - 64px);border-radius:30px;place-items:center;box-shadow:0px 4px 10px rgba(0,0,0,0.15);background:",";"],(e=>{let{bgColor:t}=e;return t})),VE=l.f.span.withConfig({displayName:"pageAttachment__TextWrapper",componentId:"sc-1bseqmx-4"})(["font-family:Roboto,sans-serif;font-size:16px;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative;padding-inline-start:6px;padding-inline-end:8px;height:16px;letter-spacing:0.3px;font-weight:700;max-width:210px;color:",";"],(e=>{let{fgColor:t}=e;return t})),UE=l.f.div.withConfig({displayName:"pageAttachment__Tooltip",componentId:"sc-1bseqmx-5"})(["background-color:",";color:",";width:200px;padding:8px;font-size:14px;border-radius:4px;text-align:center;"],(e=>{let{theme:t}=e;return t.colors.standard.black}),(e=>{let{theme:t}=e;return t.colors.standard.white})),WE=l.f.div.withConfig({displayName:"pageAttachment__LinkImage",componentId:"sc-1bseqmx-6"})(["height:24px;width:24px;vertical-align:middle;background-size:cover;background-repeat:no-repeat;background-position:50%;border-radius:50%;background-image:url('","') !important;"],(e=>{let{icon:t}=e;return t})),YE={x:8},$E="#FFFFFF",qE="#000000";var XE=function PageAttachment(e){let{pageAttachment:t={}}=e;const{displayLinkGuidelines:C,pageAttachmentContainer:a,setPageAttachmentContainer:n}=Object(H.d)((e=>({displayLinkGuidelines:e.state.displayLinkGuidelines,pageAttachmentContainer:e.state.pageAttachmentContainer,setPageAttachmentContainer:e.actions.setPageAttachmentContainer}))),{hasInvalidLinkSelected:l}=Qp(),{ctaText:i=Object(h.__)("Learn more","web-stories"),url:o,icon:c,theme:s}=t,d=s===uC.D.DARK?qE:$E,u=s===uC.D.DARK?$E:qE;return r.a.createElement(r.a.Fragment,null,(C||l)&&r.a.createElement(FE,null),r.a.createElement(zE,{role:"presentation",ref:n},(null==o?void 0:o.length)>0&&r.a.createElement(r.a.Fragment,null,r.a.createElement(HE,{fill:d}),r.a.createElement(GE,{bgColor:d},c?r.a.createElement(WE,{icon:c}):r.a.createElement(PE,{fill:u,width:24,height:24}),r.a.createElement(VE,{fgColor:u},i)),a&&l&&r.a.createElement(FC.a,{anchor:{current:a},isOpen:!0,placement:"left",spacing:YE},r.a.createElement(UE,null,Object(h.__)("Links can not reside below the dashed line when a page attachment is present. Your viewers will not be able to click on the link.","web-stories"))))))};var KE=function(e){const t=/^(?:(\d{2,}):)?(\d{2}):(\d{2})\.(\d{3})$/.exec(e);return t?3600*(t[1]?parseInt(t[1]):0)+60*parseInt(t[2])+parseInt(t[3])+parseInt(t[4])/1e3:null};const QE=l.f.span.withConfig({displayName:"cue__CueWrapper",componentId:"sc-1mhx6zx-0"})(["text-align:center;height:",";"],(e=>{let{$height:t}=e;return`${t}px`})),JE=l.f.span.withConfig({displayName:"cue__CueEl",componentId:"sc-1mhx6zx-1"})(["color:",";"],(e=>{let{$isFutureCue:t,theme:C}=e;return t?C.colors.fg.black:C.colors.fg.white})),ev=l.f.span.withConfig({displayName:"cue__Section",componentId:"sc-1mhx6zx-2"})(["margin:0 10px 10px;padding:6px 12px;vertical-align:middle;border-radius:15px;background:rgba(11,11,11,0.6);color:rgba(255,255,255,1);display:inline-block;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',sans-serif;line-height:1.4;word-break:break-word;word-wrap:break-word;overflow-wrap:break-word;"]);var tv=function Cue(e){let{cue:t,videoTime:C,height:a}=e;const n=t.getCueAsHTML();return r.a.createElement(QE,{$height:a},r.a.createElement(ev,null,[...n.childNodes].map((e=>{if("timestamp"===e.target)return null;{var t;let a=null;"timestamp"===(null===(t=e.previousSibling)||void 0===t?void 0:t.target)&&(a=KE(e.previousSibling.data));const n=a>C;return e.nodeType===Node.TEXT_NODE?null!==a?r.a.createElement("span",null,r.a.createElement(JE,{$isFutureCue:n},e.textContent)):r.a.createElement(JE,null,e.textContent):null!==a?r.a.createElement("span",null,r.a.createElement(JE,{$isFutureCue:n,dangerouslySetInnerHTML:{__html:e.innerHTML}})):r.a.createElement(JE,{dangerouslySetInnerHTML:{__html:e.innerHTML}})}}))))};const Cv=l.f.div.withConfig({displayName:"trackRenderer__Track",componentId:"sc-ggnlxo-0"})(["width:100%;height:100%;display:grid;align-content:end;font-size:",";"],(e=>{let{$fontSize:t}=e;return`${t}px`}));var av=function TrackRenderer(e){let{videoElement:t,trackIndex:C}=e;const{pageWidth:a,pageHeight:n}=Object(H.l)((e=>{let{state:{pageWidth:t,pageHeight:C}}=e;return{pageWidth:t,pageHeight:C}})),l=.04*a,i=.2*n,[o,c]=Object(u.I)(null),[s,d]=Object(u.I)(0),[p,m]=Object(u.I)([]),f=Object(u.s)((()=>{const e=null!=o&&o.activeCues?[...o.activeCues]:[];m(e)}),[o]);return Object(u.y)((()=>{var e;f(),d(0);const a=document.getElementById(`video-${t.id}`);if(!a)return;const n=null===(e=a.textTracks)||void 0===e?void 0:e[C];return n?(n.mode="hidden",f(),c(n),a.addEventListener("timeupdate",(()=>{d(a.currentTime)})),n.addEventListener("cuechange",f),()=>{n.removeEventListener("cuechange",f)}):void 0}),[C,f,t,a,n]),p&&o?r.a.createElement(Cv,{$fontSize:l},p.map(((e,t)=>r.a.createElement(tv,{key:t,cue:e,videoTime:s,height:i})))):null};const nv=Object(l.f)(Bo).withConfig({displayName:"videoCaptionsLayer__CaptionsLayer",componentId:"sc-1p5lucx-0"})([""]),rv=Object(l.f)(Ko).withConfig({displayName:"videoCaptionsLayer__CaptionsPageArea",componentId:"sc-1p5lucx-1"})(["position:absolute;pointer-events:none;"]),lv=l.f.div.withConfig({displayName:"videoCaptionsLayer__CaptionsCanvas",componentId:"sc-1p5lucx-2"})(["background:transparent;border-radius:5px;position:absolute;z-index:2;transform:translateZ(0);top:0;left:0;bottom:0;right:0;cursor:default;"]);var iv=function VideoCaptionsLayer(){const e=Object(p.b)("customVideoCaptionsInEditor"),{isEditing:t}=Object(H.d)((e=>{let{state:{isEditing:t}}=e;return{isEditing:t}})),C=Object(H.o)((e=>{let{state:t}=e;const{selectedElements:C}=t;if(1!==C.length)return null;const a=C[0],{type:n,tracks:r}=a;return"video"===n&&(null==r?void 0:r.length)>0?a:null})),[a,n]=Object(u.I)(0);return Object(u.y)((()=>{if(n(0),t||!C)return;const e=document.getElementById(`video-${C.id}`);n(e.textTracks.length)}),[C,n,t]),e&&!t&&C&&a?r.a.createElement(nv,null,r.a.createElement(rv,{withSafezone:!1,showOverflow:!0},r.a.createElement(lv,null,Array.from({length:a}).map(((e,t)=>r.a.createElement(av,{key:t,videoElement:C,trackIndex:t})))))):null};const ov=Object(l.f)(Ko).withConfig({displayName:"displayLayer__DisplayPageArea",componentId:"sc-13e1aq-0"})(["position:absolute;"]);function DisplayPage(e){let{page:t,editingElement:C}=e;return t?t.elements.map((e=>C===e.id?null:r.a.createElement(me,{key:e.id,element:e,isAnimatable:!0}))):null}function DisplayPageAnimationController(e){let{animationState:t,resetAnimationState:C,page:a}=e;const n=Object(ae.t)((e=>{let{actions:t}=e;return t.WAAPIAnimationMethods}));return Object(u.y)((()=>{switch(t){case ae.l.PLAYING_SELECTED:case ae.l.PLAYING:return void n.play();case ae.l.RESET:return void n.reset();case ae.l.SCRUBBING:case ae.l.PAUSED:return void n.pause();default:return}}),[t,n]),Object(u.y)((()=>C),[C,a]),null}DisplayPageAnimationController.propTypes={page:ie.b.page,animationState:Ue.a.oneOf(Object.values(ae.l)),resetAnimationState:Ue.a.func};var cv=Object(u.m)((function DisplayLayer(){var e,t,C;const{currentPage:a,animationState:n,updateAnimationState:l,selectedElements:i}=Object(H.o)((e=>{let{state:t,actions:C}=e;return{currentPage:t.currentPage,animationState:t.animationState,selectedElements:t.selectedElements,updateAnimationState:C.updateAnimationState}})),o=Object(H.f)(H.a.PAGE_CONTAINER),{editingElement:c,setPageContainer:s,setFullbleedContainer:d}=Object(H.d)((e=>{let{state:{editingElement:t},actions:{setPageContainer:C,setFullbleedContainer:a}}=e;return{editingElement:t,setPageContainer:C,setFullbleedContainer:a}})),p=(null==i||null===(e=i[0])||void 0===e?void 0:e.id)===(null==a||null===(t=a.elements)||void 0===t||null===(C=t[0])||void 0===C?void 0:C.id),m=Object(u.s)((()=>{l({animationState:ae.l.RESET})}),[l]),f=Object(u.C)((()=>i.map((e=>e.id))),[i]);return r.a.createElement(ae.m.Provider,{animations:null==a?void 0:a.animations,elements:null==a?void 0:a.elements,onWAAPIFinish:m,selectedElementIds:n===ae.l.PLAYING_SELECTED?f:[]},r.a.createElement(DisplayPageAnimationController,{page:a,animationState:n,resetAnimationState:m}),r.a.createElement(Bo,{"data-testid":"DisplayLayer",pointerEvents:"none","aria-label":Object(h._x)("Display layer","compound noun","web-stories")},r.a.createElement(ov,{ref:Object(u.t)(s,o),fullbleedRef:d,background:null==a?void 0:a.backgroundColor,isBackgroundSelected:p,fullBleedContainerLabel:Object(h.__)("Fullbleed area (Display layer)","web-stories"),overlay:a&&r.a.createElement(XE,{pageAttachment:a.pageAttachment}),isControlled:!0},r.a.createElement(DisplayPage,{page:a,editingElement:c})),r.a.createElement(iv,null)))})),sv=C(422),dv=C(109);var uv=function(e){const{selectedElementIds:t,selectedElements:C,arrangeSelection:a,clearSelection:n,deleteSelectedElements:r,duplicateElementsById:l,updateSelectedElements:i,setSelectedElementsById:o,currentPage:c,animationState:s,updateAnimationState:d}=Object(A.e)((e=>{let{state:{selectedElementIds:t,selectedElements:C,currentPage:a,animationState:n},actions:{arrangeSelection:r,clearSelection:l,deleteSelectedElements:i,duplicateElementsById:o,updateSelectedElements:c,setSelectedElementsById:s,updateAnimationState:d}}=e;return{currentPage:a,selectedElementIds:t,selectedElements:C,arrangeSelection:r,clearSelection:l,deleteSelectedElements:i,duplicateElementsById:o,updateSelectedElements:c,setSelectedElementsById:s,animationState:n,updateAnimationState:d}})),{actions:{clearTransforms:p}}=Object(U.b)(),{isEditing:m,getNodeForElement:h,setEditingElement:b}=Object(dv.c)((e=>{let{state:{isEditing:t},actions:{getNodeForElement:C,setEditingElement:a}}=e;return{isEditing:t,getNodeForElement:C,setEditingElement:a}})),g=Object(u.G)(null);g.current=t,Object(u.y)((()=>{const t=e.current;if(!t)return;const C=t.ownerDocument,a=()=>{setTimeout((()=>{if(C.activeElement===C.body){const e=g.current,C=1===(null==e?void 0:e.length)?h(e[0]):null;if(""!==window.getSelection().toString())return;C?C.focus({preventScroll:!0}):t.focus({preventScroll:!0})}}),300)};return C.addEventListener("focusout",a,!0),()=>{C.removeEventListener("focusout",a,!0)}}),[e,h]),Object(ye.g)("delete",(()=>r()),[r]),Object(ye.g)("esc",(()=>{n(),p()}),[n,p]),Object(ye.g)({key:["mod+a"]},(()=>{const e=c.elements.map((e=>{let{id:t}=e;return t}));o({elementIds:e})}),[c,o]),Object(ye.g)({key:["up","down","left","right"],shift:!0},(e=>{var t;let{key:a,shiftKey:n}=e;if(m)return;if(null!=C&&null!==(t=C[0])&&void 0!==t&&t.isBackground)return;const{dx:r,dy:l}=Object(sv.a)(a,n);i({properties:e=>{let{x:t,y:C}=e;return{x:t+r,y:C+l}}})}),[i,m,C]),Object(ye.g)({key:["mod+up","mod+down","mod+left","mod+right"],shift:!0},(e=>{const{key:t,shiftKey:C}=e;e.preventDefault();const n=function(e,t){if("ArrowUp"===e)return t?uC.r.FRONT:uC.r.FORWARD;if("ArrowDown"===e)return t?uC.r.BACK:uC.r.BACKWARD;return null}(t,C);n&&a({position:n})}),[a]),Object(ye.g)({key:"enter",clickable:!1},(()=>{if(1!==C.length)return;const{type:e,id:t}=C[0],{hasEditMode:a}=Object(ne.g)(e);a&&b(t)}),[C,b]);const E=Object(u.s)((()=>{0!==C.length&&l({elementIds:C.map((e=>e.id))})}),[l,C]);Object(ye.g)("clone",(()=>E()),[E]);const v=[ae.l.PLAYING,ae.l.PLAYING_SELECTED].includes(s);Object(ye.g)({key:["mod+k"]},(e=>{e.preventDefault(),d({animationState:v?ae.l.RESET:ae.l.PLAYING}),Object(f.g)("canvas_play_animations",{status:v?"stop":"play"})}),[v,d])},pv=C(123),mv=C(82);function fv(){return(fv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const hv={position:"absolute",top:0,left:0,right:0,bottom:0},bv=Object(l.e)(["position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;"]),gv=l.f.svg.withConfig({displayName:"frame__DropTargetSVG",componentId:"sc-151vhxt-0"})([""," z-index:",";"],bv,(e=>{let{active:t}=e;return t?1:-1})),Ev=l.f.svg.withConfig({displayName:"frame__Filler",componentId:"sc-151vhxt-1"})(["",""],bv),vv=l.f.path.withConfig({displayName:"frame__FillerPath",componentId:"sc-151vhxt-2"})(["pointer-events:all;"]),Ov=l.f.path.withConfig({displayName:"frame__DropTargetPath",componentId:"sc-151vhxt-3"})(["transition:opacity 0.5s;pointer-events:visibleStroke;opacity:",";stroke:",";"],(e=>{let{active:t}=e;return t?.3:0}),(e=>{let{theme:t}=e;return t.colors.border.selection})),yv=l.f.div.withConfig({displayName:"frame__Wrapper",componentId:"sc-151vhxt-4"})(["width:100%;height:100%;::before{transition:opacity 0.5s;opacity:",";display:block;content:'';position:absolute;width:calc(100% + 8px);height:calc(100% + 8px);border-radius:8px;left:-4px;top:-4px;border:1px solid ",";}"],(e=>{let{hasBackgroundOutline:t}=e;return t?1:0}),(e=>{let{theme:t}=e;return t.colors.border.selection}));function WithDropTarget(e){let{element:t,children:C,hover:a}=e;const n=Object(u.G)(null),{draggingResource:l,activeDropTargetId:i,isDropSource:o,registerDropTarget:c,unregisterDropTarget:s}=Object(H.h)((e=>{let{state:{draggingResource:t,activeDropTargetId:C},actions:{isDropSource:a,registerDropTarget:n,unregisterDropTarget:r}}=e;return{draggingResource:t,activeDropTargetId:C,isDropSource:a,registerDropTarget:n,unregisterDropTarget:r}})),{id:d,resource:p,isBackground:m}=t,f=Object(ou.d)(t);if(Object(u.y)((()=>(c(d,n.current),()=>{s(d)})),[d,c,s]),!f)return C;const h=a&&!l||Boolean(l)&&o(l.type)&&l!==p,b=h&&!m,g=h&&m,E={vectorEffect:"non-scaling-stroke",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",d:null==f?void 0:f.path};return r.a.createElement(yv,{hasBackgroundOutline:g},C,r.a.createElement(gv,{viewBox:"0 0 1 "+1/f.ratio,width:"100%",height:"100%",preserveAspectRatio:"none",active:i===t.id},r.a.createElement(Ov,fv({},E,{strokeWidth:"3",style:{opacity:b?1:0}})),r.a.createElement(Ov,fv({ref:n,strokeWidth:"48"},E))))}function WithMask(e){let{element:t,fill:C,style:a,children:n,eventHandlers:l=null,flip:i,...o}=e;const[c,s]=Object(u.I)(!1),{isBackground:d}=t,p=Object(u.G)(null);ep({node:p.current,eventData:{...tp.SELECT_ELEMENT,label:t.type},eventType:"pointerdown"});const m=Object(ou.d)(t),f=i?{transform:Object(pv.a)(i)}:null;if(null==m||!m.type||d&&m.type!==mv.c.RECTANGLE)return r.a.createElement("div",fv({style:{...C?hv:{},...a,...f}},o),n);const h=`mask-${m.type}-${t.id}-frame`;return r.a.createElement("div",fv({ref:p,style:{...C?hv:{},...a,...f,...d?{}:{clipPath:`url(#${h})`}}},o,l,{onPointerOver:()=>s(!0),onPointerOut:()=>s(!1)}),r.a.createElement("svg",{width:0,height:0},r.a.createElement("defs",null,r.a.createElement("clipPath",{id:h,transform:`scale(1 ${m.ratio})`,clipPathUnits:"objectBoundingBox"},r.a.createElement("path",{d:m.path})))),r.a.createElement(Ev,{viewBox:"0 0 1 "+1/m.ratio,width:"100%",height:"100%",preserveAspectRatio:"none"},r.a.createElement(vv,{fill:"none",d:null==m?void 0:m.path})),r.a.createElement(WithDropTarget,{element:t,hover:c},n))}const Mv=Object(l.f)(Je.a).withConfig({displayName:"frame__StyledTooltip",componentId:"sc-1fjzoyw-0"})(["box-shadow:0px 6px 10px ",";align-items:center;p{display:flex;max-width:100%;}"],(e=>{let{theme:t}=e;return Object(LC.c)(t.colors.standard.black,.1)})),wv=l.f.div.withConfig({displayName:"frame__IconWrapper",componentId:"sc-1fjzoyw-1"})(["background-color:",";width:24px;height:24px;border-radius:50%;margin-right:8px;display:inline-block;"],(e=>{let{theme:t}=e;return t.colors.fg.secondary})),Lv=l.f.img.withConfig({displayName:"frame__BrandIcon",componentId:"sc-1fjzoyw-2"})(["width:100%;height:100%;border:none;"]),_v=l.f.span.withConfig({displayName:"frame__LinkDesc",componentId:"sc-1fjzoyw-3"})(["padding-top:2px;flex:1;max-width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;"]);var jv=function WithLink(e){let{element:t,active:C,children:a,anchorRef:n}=e;const l=Object(Jp.b)(t),i=null!=l&&l.url&&C?r.a.createElement(r.a.Fragment,null,r.a.createElement(wv,null,(null==l?void 0:l.icon)&&r.a.createElement(Lv,{src:l.icon,alt:Object(h.__)("Site Icon","web-stories")})),r.a.createElement(_v,null,l.desc||l.url)):null;return r.a.createElement(Mv,{forceAnchorRef:n,placement:zC.a.TOP_START,title:i},a)};var xv=function(e,t){let C=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const[a,n]=Object(u.I)(null),[r,l]=Object(u.I)(null),i=Object(u.s)((C=>r=>{if(r.stopPropagation(),a!==C)return a&&e(r,a),n(C),void l(r);t(r,a),n(null)}),[e,t,a]);return Object(u.y)((()=>{if(!a)return;const t=setTimeout((()=>{n(null),e(r,a)}),C||Zv);return()=>{clearTimeout(t)}}),[a,r,e,C]),i};const Zv=200;function Av(){return(Av=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Iv=l.f.div.withConfig({displayName:"frameElement__Wrapper",componentId:"sc-80q0sm-0"})([""," "," "," pointer-events:",";outline:1px solid transparent;transition:outline-color 0.5s;&:focus,&:active,&:hover{outline-color:",";}"],re.h,re.j,re.i,(e=>{let{maskDisabled:t}=e;return t?"initial":"none"}),(e=>{let{theme:t,hasMask:C}=e;return C?"transparent":t.colors.border.selection})),Tv=l.f.div.withConfig({displayName:"frameElement__EmptyFrame",componentId:"sc-80q0sm-1"})(["position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;"]),NOOP=()=>{};var Sv=Object(u.m)((function FrameElement(e){let{id:t}=e;const{isSelected:C,isSingleElement:a,isBackground:n,element:l}=Object(H.o)((e=>{var C,a;let{state:n}=e;return{isSelected:n.selectedElementIds.includes(t),isSingleElement:1===n.selectedElementIds.length,isBackground:(null===(C=n.currentPage)||void 0===C?void 0:C.elements[0].id)===t,element:null===(a=n.currentPage)||void 0===a?void 0:a.elements.find((e=>e.id===t))}})),i=Object(H.d)((e=>{let{actions:t}=e;return t.setEditingElement})),{type:o,flip:c}=l,{Frame:s,isMaskable:d,Controls:p}=Object(ne.g)(o),m=Object(u.G)(),[f,h]=Object(u.I)(!1),b=Object(H.q)((e=>{let{state:t}=e;return!C&&f&&!t.isAnythingTransforming})),{setNodeForElement:g,handleSelectElement:E,isEditing:v}=Object(H.d)((e=>{let{state:t,actions:C}=e;return{setNodeForElement:C.setNodeForElement,handleSelectElement:C.handleSelectElement,isEditing:t.isEditing}})),O=Object(Ce.a)((e=>{let{actions:t}=e;return t.getBox}));Object(u.B)((()=>{g(t,m.current)}),[t,g]);const y=O(l),[M,w]=Object(u.I)(!1);Object(U.c)(t,(e=>{var t;const C=m.current;void 0!==(null==e||null===(t=e.dropTargets)||void 0===t?void 0:t.hover)&&(C.style.opacity=e.dropTargets.hover?0:1),w(null!==e)}));const{isMedia:L}=Object(ne.g)(o),_=Object(u.s)((e=>{C||E(t,e),i(t)}),[t,i,E,C]),j=xv(NOOP,_),x=Object(ou.d)(l),Z=!(null!=x&&x.type)||n&&x.type!==mv.c.RECTANGLE,A={onMouseDown:e=>{C||E(t,e),m.current.focus({preventScroll:!0}),n||e.stopPropagation()},onFocus:e=>{C||E(t,e)},onPointerEnter:()=>h(!0),onPointerLeave:()=>h(!1),onClick:L?j(t):null};return ep({node:Z?m.current:null,eventData:{...tp.SELECT_ELEMENT,label:l.type},eventType:"pointerdown"}),r.a.createElement(jv,{element:l,active:b,anchorRef:m},p&&r.a.createElement(p,{isTransforming:M,isSelected:C,isSingleElement:a,isEditing:v,box:y,elementRef:m,element:l}),r.a.createElement(Iv,Av({ref:m,"data-element-id":t},y,{tabIndex:0,"aria-labelledby":`layer-${t}`,hasMask:d,"data-testid":"frameElement",maskDisabled:Z},Z?A:null),r.a.createElement(WithMask,{element:l,fill:!0,flip:c,eventHandlers:Z?null:A},s?r.a.createElement(s,{wrapperRef:m,element:l,box:y}):r.a.createElement(Tv,null))))})),kv=C(247);var Rv=function(e){let{targetList:t,frames:C,setTransformStyle:a,onGroupEventStart:n,onGroupEventEnd:r,isDragging:l,setIsDragging:i}=e;const{draggingResource:o}=Object(W.b)((e=>{let{state:{draggingResource:t}}=e;return{draggingResource:t}})),{nodesById:c,handleSelectElement:s}=Object(H.d)((e=>{let{state:{nodesById:t},actions:{handleSelectElement:C}}=e;return{nodesById:t,handleSelectElement:C}})),d=Object(u.G)({}),p=l||Boolean(o);return{onDragGroup:e=>{let{events:n}=e;n.forEach(((e,n)=>{let{target:r,beforeTranslate:l}=e;const i=C[n],{element:o}=t[n];i.translate=l,a(o.id,r,i)}))},onDragGroupEnd:e=>{let{targets:t,inputEvent:C}=e;i(!1),(e=>{if(Object(kv.a)(d.current,e))return!1;const t=Object.keys(c).find((t=>c[t].contains(e.target)));return t&&s(t,e),!0})(C)||r({targets:t})},onDragGroupStart:e=>{let{events:t,inputEvent:C}=e;(e=>{const{timeStamp:t,clientX:C,clientY:a}=e;d.current={timeStamp:t,clientX:C,clientY:a}})(C),l||i(!0),n({events:t,isDrag:!0})},className:"default-moveable "+(p?"hide-handles":""),resizable:!p,rotatable:!p}};var Pv=function(e){let{onGroupEventEnd:t,targetList:C,setTransformStyle:a,frames:n}=e;const{editorToDataX:r,editorToDataY:l,dataToEditorY:i}=Object(Ce.a)((e=>({editorToDataX:e.actions.editorToDataX,editorToDataY:e.actions.editorToDataY,dataToEditorY:e.actions.dataToEditorY})));return{onResizeGroup:e=>{let{events:t}=e;t.forEach(((e,t)=>{let{target:o,direction:c,width:s,height:d,drag:u}=e;const p=n[t],{element:m,updateForResizeEvent:f}=C[t];let h=d;const b=s;let g=null;f&&(g=f(m,c,r(b),l(h))),g&&g.height&&(h=i(g.height)),o.style.width=`${b}px`,o.style.height=`${h}px`,p.direction=c,p.resize=[b,h],p.translate=u.beforeTranslate,p.updates=g,a(m.id,o,p)}))},onResizeGroupStart:e=>{let{events:t}=e;t.forEach(((e,t)=>{const C=n[t];e.setOrigin(["%","%"]),e.dragStart&&e.dragStart.set(C.translate)}))},onResizeGroupEnd:e=>{let{targets:C}=e;t({targets:C,isResize:!0})}}};var Nv=function(e){let{onGroupEventStart:t,setTransformStyle:C,onGroupEventEnd:a,targetList:n,frames:r}=e;return{onRotateGroup:e=>{let{events:t}=e;t.forEach(((e,t)=>{let{target:a,beforeRotate:l,drag:i}=e;const o=r[t],{element:c}=n[t];o.rotate=utils_normalizeRotationDegrees(l),o.translate=i.beforeTranslate,C(c.id,a,o)}))},onRotateGroupEnd:e=>{let{targets:t}=e;a({targets:t,isRotate:!0})},onRotateGroupStart:e=>{let{events:C}=e;t({events:C,isRotate:!0})},throttleRotate:Object(ye.f)("shift")?30:0}};function Dv(){return(Dv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const Bv=["nw","ne","sw","se"];var zv=Object(u.j)((function MultiSelectionMoveable(e,t){let{selectedElements:C,...a}=e;const n=Object(u.G)(),{updateElementsById:l,deleteElementsById:i,backgroundElement:o}=Object(H.o)((e=>{var t;return{updateElementsById:e.actions.updateElementsById,deleteElementsById:e.actions.deleteElementsById,backgroundElement:null!==(t=e.state.currentPage.elements[0])&&void 0!==t?t:{}}})),{nodesById:c,fullbleedContainer:s}=Object(H.d)((e=>{let{state:{nodesById:t,fullbleedContainer:C}}=e;return{fullbleedContainer:C,nodesById:t}})),{editorToDataX:d,editorToDataY:p}=Object(Ce.a)((e=>({editorToDataX:e.actions.editorToDataX,editorToDataY:e.actions.editorToDataY}))),{zoomSetting:m,scrollLeft:f,scrollTop:h}=Object(H.l)((e=>{let{state:{zoomSetting:t,scrollLeft:C,scrollTop:a}}=e;return{zoomSetting:t,scrollLeft:C,scrollTop:a}})),{actions:{pushTransform:b}}=Object(U.b)();mE(n),Object(u.y)((()=>{n.current&&n.current.updateRect()}),[C,n,c,f,h]),pE(n,[m]);const g=C.map((e=>({element:e,node:c[e.id],updateForResizeEvent:Object(ne.g)(e.type).updateForResizeEvent}))),[E,v]=Object(u.I)(!1),O=(e,t,C)=>{t.style.transform=`translate(${C.translate[0]}px, ${C.translate[1]}px) rotate(${C.rotate}deg)`,b(e,C)},y=g?g.map((e=>{let{element:t}=e;return{translate:[0,0],rotate:t.rotationAngle,direction:[0,0],resize:[0,0],updates:null}})):[],M=e=>{let{events:t,isDrag:C,isRotate:a}=e;t.forEach(((e,t)=>{const n=y[t];C?e.set(n.translate):a&&e.set(n.rotate)}))},w=e=>{let{targets:t,isRotate:C,isResize:a}=e;const r={},o=[];t.forEach(((e,t)=>{const{element:n,updateForResizeEvent:l}=g[t];if(fE(e,s))return void o.push(n.id);const i=y[t],{direction:c}=i,u=e=>Math.abs(e)<=1?0:e,m={x:u(n.x+d(i.translate[0])),y:u(n.y+p(i.translate[1]))};C&&(m.rotationAngle=i.rotate);const[f,h]=i.resize;if(a&&(0!==f&&0!==h)){const e=d(f),t=p(h);m.width=e,m.height=t,l&&Object.assign(m,l(n,c,e,t))}r[n.id]=m})),l({elementIds:Object.keys(r),properties:e=>r[e.id]}),o.length>0&&i({elementIds:o}),g.forEach(((e,t)=>{let{element:C,node:a}=e;y[t].direction=[0,0],y[t].translate=[0,0],y[t].resize=[0,0],y[t].updates=null,a.style.transform="",a.style.width="",a.style.height="",b(C.id,null)})),n.current&&n.current.updateRect()},L=Object.values(Object(dE.a)(c,[...C.map((e=>e.id)),o.id])),_=uE({canSnap:!0,otherNodes:L}),j=Rv({targetList:g,frames:y,setTransformStyle:O,onGroupEventStart:M,onGroupEventEnd:w,isDragging:E,setIsDragging:v}),x=Pv({onGroupEventEnd:w,targetList:g,setTransformStyle:O,frames:y}),Z=Nv({onGroupEventStart:M,setTransformStyle:O,onGroupEventEnd:w,targetList:g,frames:y}),A=Object(u.t)(n,t);return g.some((e=>{let{node:t}=e;return void 0===t}))?null:r.a.createElement(Jg.a,Dv({},a,{className:"default-moveable",ref:A,zIndex:0,target:g.map((e=>{let{node:t}=e;return t})),draggable:!0,resizable:!0,rotatable:!0,renderDirections:Bv},j,Z,x,_))}));function Fv(){return(Fv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}var Hv=function Selection(e){var t,C;const a=Object(H.o)((e=>{var t,C,a;let{state:n}=e;return(null===(t=n.selectedElements[0])||void 0===t?void 0:t.id)===(null===(C=n.currentPage.elements)||void 0===C||null===(a=C[0])||void 0===a?void 0:a.id)})),{selectedElements:n,isAnimating:l}=Object(H.o)((e=>({selectedElements:e.state.selectedElements,isAnimating:[ae.l.PLAYING,ae.l.PLAYING_SELECTED,ae.l.SCRUBBING].includes(e.state.animationState)}))),{editingElement:i,lastSelectionEvent:o,nodesById:c,onMoveableMount:s}=Object(H.d)((e=>{let{state:{editingElement:t,lastSelectionEvent:C,nodesById:a,onMoveableMount:n}}=e;return{editingElement:t,lastSelectionEvent:C,nodesById:a,onMoveableMount:n}}));if(0===n.length)return null;if(a)return null;if(null===(t=n[0])||void 0===t||null===(C=t.resource)||void 0===C?void 0:C.isPlaceholder)return null;if(i||l)return null;if(1===n.length){const t=n[0],C=c[t.id];return C?r.a.createElement(_E,Fv({selectedElement:t,targetEl:C,pushEvent:o},e,s&&{ref:s})):null}return r.a.createElement(zv,Fv({selectedElements:n},e,s&&{ref:s}))};const Gv=l.f.div.withConfig({displayName:"pagenav__Wrapper",componentId:"sc-j8q0gt-0"})(["display:flex;align-items:center;color:",";& > *{pointer-events:initial;}"],(e=>{let{theme:t}=e;return t.colors.fg.white})),Vv=Object(l.f)(Te.a.ArrowLeftLarge).withConfig({displayName:"pagenav__FlippableArrow",componentId:"sc-j8q0gt-1"})(["transform:rotate(","turn);"],(e=>{let{$isLeft:t}=e;return t?0:.5}));var Uv=function PageNav(e){let{isNext:t=!0}=e;const{pages:C,currentPageIndex:a,setCurrentPage:n}=Object(H.o)((e=>{let{state:{pages:t,currentPageIndex:C},actions:{setCurrentPage:a}}=e;return{pages:t,currentPageIndex:C,setCurrentPage:a}})),{isRTL:l}=Object(H.g)(),i=Object(u.G)(null),o=Object(u.s)((e=>e.stopPropagation()),[]),c=Object(u.s)((()=>{const e=t?C[a+1]:C[a-1];e&&n({pageId:e.id})}),[n,a,t,C]),{hasPageNavigation:s}=Object(H.l)((e=>{let{state:{hasPageNavigation:t}}=e;return{hasPageNavigation:t}}));if(ep({node:i.current,eventData:tp.PAGE_NAVIGATION}),!s)return!1;const d=t&&a<C.length-1||!t&&a>0,p=l===t;return r.a.createElement(Gv,null,r.a.createElement(b.a,{ref:i,variant:g.d.SQUARE,type:g.c.TERTIARY,size:g.a.MEDIUM,"aria-disabled":!d,"aria-label":t?Object(h.__)("Next Page","web-stories"):Object(h.__)("Previous Page","web-stories"),onClick:c,onMouseDown:o},r.a.createElement(Vv,{$isLeft:p})))};const Wv=Object(l.f)(Ko).withConfig({displayName:"framesLayer__FramesPageArea",componentId:"sc-5ltl4w-0"})(["pointer-events:initial;"]),Yv=uC.i/ee.h*100,$v=l.f.div.withConfig({displayName:"framesLayer__DesignSpaceGuidelineBorder",componentId:"sc-5ltl4w-1"})(["border:1px solid ",";left:","%;right:","%;top:0;bottom:0;position:absolute;pointer-events:none;z-index:1;visibility:",";"],(e=>{let{theme:t}=e;return t.colors.border.negativePress}),Yv,Yv,(e=>{let{isVisible:t}=e;return t?"visible":"hidden"}));function DesignSpaceGuideline(){const e=Object(H.d)((e=>{let{actions:t}=e;return t.setDesignSpaceGuideline})),{isAnythingTransforming:t}=Object(H.q)((e=>{let{state:t}=e;return{isAnythingTransforming:t.isAnythingTransforming}}));return r.a.createElement($v,{ref:e,isVisible:t})}var qv=Object(u.m)((function FramesLayer(){const e=Object(H.o)((e=>{var t,C;let{state:a}=e;return(null===(t=a.currentPage)||void 0===t||null===(C=t.elements)||void 0===C?void 0:C.map((e=>e.id)))||uC.I})),t=Object(H.o)((e=>{let{state:t}=e;return[ae.l.PLAYING,ae.l.SCRUBBING].includes(t.animationState)})),C=Object(u.G)(null);uv(C);const a=Object(H.n)((e=>e.onOpenMenu)),{setScrollOffset:n}=Object(H.l)((e=>{let{actions:{setScrollOffset:t}}=e;return{setScrollOffset:t}})),l=Object(u.s)((e=>n({left:e.target.scrollLeft,top:e.target.scrollTop})),[n]);return Object(ye.h)(C,"mod+alt+shift+m",a),r.a.createElement(Bo,{ref:C,"data-testid":"FramesLayer",pointerEvents:"initial",tabIndex:"-1","aria-label":Object(h.__)("Frames layer","web-stories")},!t&&r.a.createElement(Wv,{fullBleedContainerLabel:Object(h.__)("Fullbleed area (Frames layer)","web-stories"),onContextMenu:a,onScroll:l},e.map((e=>r.a.createElement(Sv,{key:e,id:e}))),r.a.createElement(DesignSpaceGuideline,null)),r.a.createElement(Yo,null,r.a.createElement(Uv,{isNext:!1})),r.a.createElement($o,null,r.a.createElement(Uv,null)),r.a.createElement(Hv,{onContextMenu:a}))})),Xv=Object(u.f)({state:{},actions:{}});var Kv=e=>{let{children:t}=e;const[C,a]=Object(u.I)(!1),n=Object(u.s)((e=>{e.preventDefault(),Object(f.g)("shortcuts_menu_toggled",{status:C?"closed":"open"}),a((e=>!e))}),[C]),l=Object(u.s)((()=>{C&&(Object(f.g)("shortcuts_menu_toggled",{status:"closed"}),a(!1))}),[C]),i=Object(u.C)((()=>({state:{isOpen:C},actions:{toggle:n,close:l}})),[l,C,n]);return r.a.createElement(Xv.Provider,{value:i},t)};function Qv(e){return Object(u.w)(Xv,null!=e?e:u.k)}var Jv=Object(u.f)({state:{},actions:{}});var eO=function(e){return Object(u.w)(Jv,null!=e?e:u.k)};const tO=Object(l.f)(Te.a.ArrowLeft).withConfig({displayName:"carouselScroll__FlippableArrow",componentId:"sc-1npfzcu-0"})(["transform:rotate(","turn);"],(e=>{let{$isLeft:t}=e;return t?0:.5}));function CarouselScrollButton(e){let{isNext:t=!1}=e;const{hasOverflow:C,canScrollBack:a,canScrollForward:n,scrollBack:l,scrollForward:i}=eO((e=>{let{state:{hasOverflow:t,canScrollBack:C,canScrollForward:a},actions:{scrollBack:n,scrollForward:r}}=e;return{hasOverflow:t,canScrollBack:C,canScrollForward:a,scrollBack:n,scrollForward:r}})),{isRTL:o}=Object(H.g)();if(!C)return null;const c=t?n:a,s=t?i:l,d=t?Object(h.__)("Scroll Forward","web-stories"):Object(h.__)("Scroll Back","web-stories"),u=o===t;return r.a.createElement(b.a,{variant:g.d.SQUARE,type:g.c.PLAIN,size:g.a.SMALL,disabled:!c,onClick:s,"aria-label":d},r.a.createElement(tO,{$isLeft:u}))}function CarouselScrollForward(){return r.a.createElement(CarouselScrollButton,{isNext:!0})}function CarouselScrollBack(){return r.a.createElement(CarouselScrollButton,null)}function CO(){return(CO=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const aO=l.f.button.withConfig({displayName:"pagepreview__Page",componentId:"sc-f0c590-0"})(["display:block;position:relative;cursor:",";padding:0;border:0;background-color:transparent;height:","px;width:","px;flex:none;outline:0;&::after{content:'';display:block;position:absolute;left:-4px;right:-4px;top:-4px;bottom:-4px;pointer-events:none;border-style:solid;border-width:1px;border-radius:8px;border-color:",";}",""],(e=>{let{isInteractive:t}=e;return t?"pointer":"default"}),(e=>{let{height:t}=e;return t}),(e=>{let{width:t}=e;return t}),(e=>{let{isActive:t,theme:C}=e;return t?C.colors.border.defaultActive:"transparent"}),(e=>{let{isInteractive:t,isActive:C,theme:a}=e;return t&&Object(l.e)(["&:focus::after{border-color:",";}"],Object(LC.c)(a.colors.border.selection,C?1:.7))})),nO=l.f.div.withConfig({displayName:"pagepreview__PreviewWrapper",componentId:"sc-f0c590-1"})(["height:100%;position:relative;overflow:hidden;background-color:white;border-radius:4px;",""],(e=>{let{background:t}=e;return Object(te.a)(t)})),rO=l.f.img.withConfig({displayName:"pagepreview__Image",componentId:"sc-f0c590-2"})(["width:100%;"]);var lO=function PagePreview(e){let{page:t,label:a,isCacheable:n=!1,cachedImage:l=null,setCachedImage:i=null,...o}=e;const{backgroundColor:c}=t,{width:s,height:d,isActive:m}=o,[f,h]=Object(u.I)(),b=Object(u.s)((e=>e&&h(e)),[]),g=Object(u.G)(),E=Object(p.b)("enableThumbnailCaching")&&n;return Object(u.y)((()=>{E&&m&&g.current!==t&&(i({pageId:t.id,cachedImage:null}),g.current=null)}),[t,i,m,E]),Object(u.y)((()=>{if(E&&!m&&f&&!l){const e=X((()=>{C.e(197).then(C.bind(null,1056)).then((e=>{e.toJpeg(f,{quality:1}).then((e=>i({pageId:t.id,cachedImage:e}))),g.current=t}))}),{timeout:5e3});return()=>K(e)}}),[E,m,f,l,i,t]),ep({node:f,eventData:tp.PAGE_PREVIEW_CLICK}),r.a.createElement(J.a,{pageSize:{width:s,height:d}},r.a.createElement(U.a,null,r.a.createElement(aO,CO({ref:b,"aria-label":a},o),r.a.createElement(nO,{background:c},l?r.a.createElement(rO,{src:l,width:s,height:d,alt:a,decoding:"async"}):t.elements.map((e=>r.a.createElement(me,{key:e.id,previewMode:!0,element:e})))))))};const iO=l.f.div.withConfig({displayName:"carouselPage__Line",componentId:"sc-mvqls9-0"})(["background:",";height:","px;width:","px;margin:0px;"],(e=>{let{theme:t}=e;return t.colors.border.selection}),(e=>{let{height:t}=e;return t}),4),oO=l.f.li.attrs({role:"presentation"}).withConfig({displayName:"carouselPage__ItemContainer",componentId:"sc-mvqls9-1"})(["display:flex;position:relative;margin:0;padding:0;"]),cO=Object(l.f)(_p).withConfig({displayName:"carouselPage__PageSeparator",componentId:"sc-mvqls9-2"})(["position:absolute;bottom:0;left:","px;width:","px;height:","px;display:flex;justify-content:center;",":first-of-type &:first-of-type,",":last-of-type &:last-of-type{width:","px;}",":first-of-type &:first-of-type{left:","px;justify-content:flex-start;}",":first-of-type &:last-of-type{left:","px;}",":last-of-type &:last-of-type{justify-content:flex-end;}"],(e=>{let{width:t}=e;return t/2}),(e=>{let{width:t,margin:C}=e;return t+C}),(e=>{let{height:t}=e;return t}),oO,oO,(e=>{let{width:t,margin:C}=e;return(t+C+4)/2}),oO,(e=>{let{margin:t}=e;return(t-4)/2}),oO,(e=>{let{width:t,margin:C}=e;return C+t/2}),oO),sO=Object(l.f)(yp).withConfig({displayName:"carouselPage__ReorderablePage",componentId:"sc-mvqls9-3"})(["display:flex;z-index:1;margin-right:","px;margin-left:","px;"],(e=>{let{margin:t}=e;return t}),(e=>{let{margin:t,position:C}=e;return 0===C?t:0}));var dO=function CarouselPage(e){let{pageId:t,index:C}=e;const{pageThumbWidth:a,pageThumbHeight:n,pageThumbMargin:l,clickPage:i,setPageRef:o,page:c,isCurrentPage:s,hasMultiplePages:d,setCachedImage:u,cachedImage:p}=eO((e=>{let{state:{pageThumbWidth:C,pageThumbHeight:a,pageThumbMargin:n,numPages:r,pages:l,currentPageId:i,cachedImages:o},actions:{clickPage:c,setPageRef:s,setCachedImage:d}}=e;return{pageThumbWidth:C,pageThumbHeight:a,pageThumbMargin:n,clickPage:c,setPageRef:s,page:l.find((e=>{let{id:C}=e;return C===t})),isCurrentPage:t===i,hasMultiplePages:r>1,cachedImage:o[t]||null,setCachedImage:d}}));return c&&c.id?r.a.createElement(oO,{ref:e=>o(c,e),"data-testid":`carousel-page-preview-${t}`},0===C&&r.a.createElement(cO,{position:0,width:a,height:n,margin:l},r.a.createElement(iO,{height:n})),r.a.createElement(sO,{position:C,margin:l},r.a.createElement(lO,{tabIndex:s&&d?0:-1,onClick:()=>i(c),role:"option","data-page-id":c.id,label:s?Object(h.sprintf)(
|
140 |
/* translators: %s: page number. */
|
141 |
+
Object(h.__)("Page %s (current page)","web-stories"),C+1):Object(h.sprintf)(
|
142 |
/* translators: %s: page number. */
|
143 |
+
Object(h.__)("Go to page %s","web-stories"),C+1),isActive:s&&d,page:c,width:a,height:n,isInteractive:d,isCacheable:!0,cachedImage:p,setCachedImage:u})),r.a.createElement(cO,{position:C+1,width:a,height:n,margin:l},r.a.createElement(iO,{height:n}))):null},uO=C(816),pO=C(424);const mO=l.f.li.attrs({role:"presentation"}).withConfig({displayName:"skeletonPage__EmptyPage",componentId:"sc-szsuww-0"})(["display:block;position:relative;flex:0 0;margin:0;padding:0;border-radius:4px;"]);var fO=function SkeletonPage(e){var t;let{pageId:C,index:a}=e;const{pageThumbWidth:n,pageThumbHeight:l,pageThumbMargin:i,page:o}=eO((e=>{let{state:{pageThumbWidth:t,pageThumbHeight:a,pageThumbMargin:n,pages:r}}=e;return{pageThumbWidth:t,pageThumbHeight:a,pageThumbMargin:n,page:r.find((e=>{let{id:t}=e;return t===C}))}}));if(!o||!o.id)return null;const c=o.elements[0],{isMedia:s}=Object(ne.g)(c.type),d=s&&Object(pO.a)(null===(t=c.resource)||void 0===t?void 0:t.baseColor)?Object(uO.a)(c.resource.baseColor.replace("#","")):o.backgroundColor;return r.a.createElement(mO,{style:{flexBasis:`${n}px`,height:`${l}px`,marginLeft:`${0===a?i:0}px`,marginRight:`${i}px`,...Object(te.a)(d)},"data-testid":`carousel-page-preview-skeleton-${C}`})};const hO=Object(l.f)(gp).attrs({role:"listbox","aria-orientation":"horizontal",mode:"horizontal"}).withConfig({displayName:"carouselList__PageList",componentId:"sc-1oa14z5-0"})(["grid-area:carousel;flex-direction:row;align-items:center;justify-content:center;overflow-x:hidden;overflow-y:hidden;width:","px;list-style:none;padding:4px 0;margin:-4px 0;",";::-webkit-scrollbar-thumb{border:6px solid transparent !important;}"],(e=>{let{width:t}=e;return t}),(e=>{let{hasOverflow:t}=e;return t&&Object(l.e)(["overflow-x:visible;overflow-x:overlay;justify-content:flex-start;"])}));var bO=function CarouselList(){const{pageThumbWidth:e,carouselWidth:t,hasOverflow:C,pageIds:a,rearrangePages:n,setListRef:l,showSkeleton:i}=eO((e=>{let{state:{pageThumbWidth:t,carouselWidth:C,hasOverflow:a,pageIds:n,showSkeleton:r},actions:{rearrangePages:l,setListRef:i}}=e;return{pageThumbWidth:t,carouselWidth:C,hasOverflow:a,pageIds:n,rearrangePages:l,setListRef:i,showSkeleton:r}})),o=i?fO:dO;return r.a.createElement(hO,{mode:"horizontal",width:t,ref:l,hasOverflow:C,"aria-label":Object(h.__)("Pages List","web-stories"),onPositionChange:n,getItemSize:()=>e},a.map(((e,t)=>r.a.createElement(o,{key:e,pageId:e,index:t}))))};const gO=Object(l.e)(["width:32px;margin:-8px;"]),EO=Object(l.f)(Te.a.ChevronDownSmall).withConfig({displayName:"carouselDrawerIcon__IconDown",componentId:"sc-b03fdn-0"})(["",""],gO),vO=Object(l.f)(Te.a.ChevronUpSmall).withConfig({displayName:"carouselDrawerIcon__IconUp",componentId:"sc-b03fdn-1"})(["",""],gO);var OO=function CarouselDrawerIcon(e){let{state:t}=e;return[uC.d.OPEN,uC.d.CLOSING].includes(t)?r.a.createElement(EO,null):r.a.createElement(vO,null)};const yO=l.f.div.withConfig({displayName:"carouselDrawer__Wrapper",componentId:"sc-1dxh28m-0"})(["display:flex;justify-content:center;"]),MO=Object(l.f)(b.a).withConfig({displayName:"carouselDrawer__StyledButton",componentId:"sc-1dxh28m-1"})(["white-space:nowrap;gap:8px;"]);var wO=function CarouselDrawer(){const{carouselState:e,openCarousel:t,closeCarousel:C}=Object(H.l)((e=>{let{state:{carouselState:t},actions:{openCarousel:C,closeCarousel:a}}=e;return{carouselState:t,openCarousel:C,closeCarousel:a}})),{currentPageNumber:a,pageCount:n}=Object(H.o)((e=>{let{state:{currentPageNumber:t,pages:C}}=e;return{currentPageNumber:t,pageCount:C.length}})),l=Object(u.s)((()=>{e===uC.d.OPEN?C():e===uC.d.CLOSED&&t()}),[e,t,C]);return r.a.createElement(yO,null,r.a.createElement(MO,{"aria-label":Object(h.__)("Toggle page carousel","web-stories"),onClick:l,variant:g.d.RECTANGLE,size:g.a.SMALL,type:g.c.TERTIARY},Object(h.sprintf)(
|
144 |
/* translators: 1: current page number. 2: total page count. */
|
145 |
+
Object(h._n)("%1$d of %2$d page","%1$d of %2$d pages",n,"web-stories"),a,n),r.a.createElement(OO,{state:e})))};const LO=l.f.section.withConfig({displayName:"carouselLayout__Wrapper",componentId:"sc-iaovfa-0"})(["position:relative;display:grid;grid:'. d d d d d .' 32px '. . . . . . .' ","px '. p . c . n .' auto / 1fr ","px ","px auto ","px ","px 1fr;width:100%;height:auto;&.carousel-enter{top:","px;&.carousel-enter-active{top:0;transition:","ms ease-out;transition-property:top;}}&.carousel-exit{top:0;&.carousel-exit-active{top:","px;transition:","ms ease-out;transition-property:top;}}"],(e=>{let{isCollapsed:t}=e;return t?2:8}),Lo,8,8,Lo,(e=>{let{thumbHeight:t}=e;return t+6}),uC.e,(e=>{let{thumbHeight:t}=e;return t+6}),uC.e),_O=l.f.div.withConfig({displayName:"carouselLayout__Area",componentId:"sc-iaovfa-1"})(["grid-area:",";display:flex;align-items:center;justify-content:center;flex-direction:column;"],(e=>{let{area:t}=e;return t}));var jO=function CarouselLayout(){const{carouselState:e}=Object(H.l)((e=>{let{state:{carouselState:t}}=e;return{carouselState:t}})),{numPages:t,pageThumbHeight:C}=eO((e=>{let{state:{numPages:t,pageThumbHeight:C}}=e;return{numPages:t,pageThumbHeight:C}})),a=Object(u.G)();if(t<=0)return null;const n=e===uC.d.CLOSED,l=[uC.d.OPEN,uC.d.OPENING].includes(e);return r.a.createElement(HC.a,{in:l,classNames:"carousel",containerRef:!0,nodeRef:a,timeout:uC.e},r.a.createElement(LO,{ref:a,"aria-label":Object(h.__)("Page Carousel","web-stories"),isCollapsed:n,thumbHeight:C},r.a.createElement(_O,{area:"d"},r.a.createElement(wO,null)),!n&&r.a.createElement(r.a.Fragment,null,r.a.createElement(_O,{area:"p"},r.a.createElement(CarouselScrollBack,null)),r.a.createElement(_O,{area:"c"},r.a.createElement(bO,null)),r.a.createElement(_O,{area:"n"},r.a.createElement(CarouselScrollForward,null)))))};var xO=function(e){let{availableSpace:t,numPages:C}=e;return Object(u.C)((()=>{const e=t>=400,a=t-2*_o,n=e?40:36,r=e?60:54,l=n+16,i=Math.floor((a-16)/l),o=i<C;return{pageThumbWidth:n,pageThumbHeight:r,pageThumbMargin:16,carouselWidth:Math.min(i,C)*(n+16)+16,showablePages:i,hasOverflow:o}}),[t,C])};var ZO=function(e){let{listElement:t,carouselWidth:C,hasOverflow:a,showablePages:n,pageThumbWidth:r,pageThumbMargin:l}=e;const[i,o]=Object(u.I)(0),{isRTL:c}=Object(H.g)(),{carouselState:s}=Object(H.l)((e=>{let{state:{carouselState:t}}=e;return{carouselState:t}})),{currentPageIndex:d}=Object(H.o)((e=>{let{state:{currentPageId:t,pages:C}}=e;return{currentPageIndex:C.findIndex((e=>{let{id:C}=e;return C===t}))}})),p=Object(u.s)((e=>{c&&(e*=-1),t.scrollBy?t.scrollBy({left:e,behavior:"smooth"}):t.scrollLeft+=e}),[t,c]),m=C,f=a&&!(c?1===i:0===i),h=a&&!(c?0===i:1===i),b=Object(u.s)((()=>p(m)),[p,m]),g=Object(u.s)((()=>p(-m)),[p,m]);Object(u.B)((()=>{if(!a||!t)return;const e=()=>{const{offsetWidth:e,scrollLeft:C,scrollWidth:a}=t;o(C/(a-e))};return t.addEventListener("scroll",e,{passive:!0}),()=>t.removeEventListener("scroll",e)}),[t,a]);const E=Object(u.s)((e=>(r+l)*e),[r,l]),v=Object(u.G)(!0);return Object(u.y)((()=>{s===uC.d.CLOSED&&(v.current=!0)}),[s]),Object(u.B)((()=>{if(!a||!t)return;const{scrollLeft:e}=t,C=Math.max(0,d-n+1),r=d,l=E(C),i=E(r);if(e>=l&&e<=i)return;const o=e<l?l:i,c=setInterval((()=>{if(t.scrollWidth-t.offsetWidth<o)return;const e=v.current?"instant":"smooth";v.current=!1,t.scrollTo({left:o,top:0,behavior:e}),clearInterval(c)}),100);return()=>clearInterval(c)}),[t,a,d,n,E]),{canScrollBack:f,canScrollForward:h,scrollForward:b,scrollBack:g}};function AO(e,t,C,a){const n=a?-1:1;return e===t?n:e===C?-n:0}var IO=function(e){let{listElement:t,pageRefs:C}=e;const{isRTL:a}=Object(H.g)(),{addPageAt:n,arrangePage:r,currentPage:l,currentPageId:i,deletePage:o,pages:c,setCurrentPage:s}=Object(H.o)((e=>{let{state:{pages:t,currentPage:C,currentPageId:a},actions:{addPageAt:n,arrangePage:r,deletePage:l,setCurrentPage:i}}=e;return{addPageAt:n,arrangePage:r,currentPage:C,currentPageId:a,deletePage:l,pages:t,setCurrentPage:i}})),d=Object(u.C)((()=>c.map((e=>{let{id:t}=e;return t}))),[c]);Object(ye.e)(t,[t]),Object(ye.h)(t,{key:["up","down","left","right"]},(e=>{let{key:t}=e;const n=AO(t,"ArrowRight","ArrowLeft",a);if(0===n)return;const r=d.indexOf(i)+n;if(r>=0&&r<d.length){const e=d[r];s({pageId:e});const t=C.current&&C.current[e],a=null==t?void 0:t.querySelector("button");a&&a.focus()}}),[i,a,d,s,C,t]),Object(ye.h)(t,{key:["mod+up","mod+down","mod+left","mod+right"],shift:!0},(e=>{const{key:t,shiftKey:C}=e;e.preventDefault();const n=AO(t,"ArrowRight","ArrowLeft",a);if(0===n)return;const l=d.indexOf(i);let o=l+n;C&&(o=n<0?0:d.length-1),o!==l&&o>=0&&o<d.length&&r({pageId:i,position:o})}),[r,i,a,d,s]),Object(ye.h)(t,"delete",(()=>{o({pageId:i});const e=document.activeElement,C=()=>{if(document.activeElement!==e){const e=t.querySelector('[role="option"][tabindex="0"]');if(e)return void e.focus()}setTimeout(C,100)};C()}),[i,o,t]),Object(ye.h)(t,"clone",(()=>{const e=d.indexOf(l.id);n({page:Object(ne.e)(l),position:e+1})}),[n,l,d])};const TO={setCachedImage:(e,t)=>{let{payload:{pageId:C,cachedImage:a}}=t;return{...e,[C]:a}}};var SO=function(){const[e,{setCachedImage:t}]=Object(u.F)({},TO);return{cachedImages:e,setCachedImage:t}};var kO=function CarouselProvider(e){let{availableSpace:t,children:C}=e;const{pages:a,currentPageId:n,setCurrentPage:l,arrangePage:i}=Object(H.o)((e=>{let{state:{pages:t,currentPageId:C},actions:{setCurrentPage:a,arrangePage:n}}=e;return{pages:t,currentPageId:C,setCurrentPage:a,arrangePage:n}})),[o,c]=Object(u.I)(null),s=Object(u.G)([]),d=a.length,p=Object(u.C)((()=>a.map((e=>{let{id:t}=e;return t}))),[a]),[m,f]=Object(u.I)(!0);Object(u.y)((()=>{const e=X((()=>f(!1)),{timeout:5e3});return()=>K(e)}),[]);const{pageThumbWidth:h,pageThumbHeight:b,pageThumbMargin:g,carouselWidth:E,hasOverflow:v,showablePages:O}=xO({availableSpace:t,numPages:d}),{canScrollBack:y,canScrollForward:M,scrollBack:w,scrollForward:L}=ZO({listElement:o,carouselWidth:E,hasOverflow:v,showablePages:O,pageThumbWidth:h,pageThumbMargin:g});IO({listElement:o,pageRefs:s});const{cachedImages:_,setCachedImage:j}=SO(),x=Object(u.s)(((e,t)=>{s.current[e.id]=t}),[]),Z=Object(u.s)((e=>l({pageId:e.id})),[l]),A=Object(u.s)(((e,t)=>{const C=p[e];i({pageId:C,position:t}),l({pageId:C})}),[p,i,l]),I={state:{pageThumbWidth:h,pageThumbHeight:b,pageThumbMargin:g,carouselWidth:E,hasOverflow:v,pages:a,pageIds:p,numPages:d,currentPageId:n,canScrollBack:y,canScrollForward:M,showSkeleton:m,cachedImages:_},actions:{scrollBack:w,scrollForward:L,clickPage:Z,rearrangePages:A,setListRef:c,setPageRef:x,setCachedImage:j}};return r.a.createElement(Jv.Provider,{value:I},C)};const RO=l.f.div.withConfig({displayName:"carouselContainer__Wrapper",componentId:"sc-1dsu28u-0"})(["height:auto;width:100%;align-self:flex-end;"]);var PO=Object(u.m)((function CarouselContainer(){const e=Object(u.G)(),[t,C]=Object(u.I)(0);return Object(u.H)(e,(e=>{let{width:t}=e;return C(t)}),[]),r.a.createElement(kO,{availableSpace:t},r.a.createElement(RO,{ref:e},r.a.createElement(jO,null)))}));const NO=Object(l.e)(["height:36px;padding:8px;span{padding:0;}"]),DO=[{label:Object(h._x)("100%","zoom level","web-stories"),value:1},{label:Object(h._x)("200%","zoom level","web-stories"),value:2},{label:Object(h._x)("Fill","zoom level","web-stories"),value:uC.K.FILL},{label:Object(h._x)("Fit","zoom level","web-stories"),value:uC.K.FIT}];var BO=function ZoomSelector(){const{zoomSetting:e,zoomLevel:t,setZoomSetting:C,setZoomLevel:a}=Object(Ao.a)((e=>{let{state:{zoomSetting:t,zoomLevel:C},actions:{setZoomSetting:a,setZoomLevel:n}}=e;return{zoomSetting:t,zoomLevel:C,setZoomSetting:a,setZoomLevel:n}})),n=Object(u.C)((()=>{const C=DO.find((C=>{let{value:a}=C;return e===uC.K.FIXED?a===t:a===e}));return C?C.label:Object(h.sprintf)(
|
146 |
/* translators: %d: zoom level percentage value. */
|
147 |
+
Object(h._x)("%d%%","zoom level","web-stories"),Math.round(100*t))}),[e,t]),l=Object(u.s)(((e,t)=>{Object.prototype.hasOwnProperty.call(uC.K,t)?C(t):a(t)}),[C,a]);return r.a.createElement(ki.a,{ariaLabel:Object(h.__)("Zoom Level","web-stories"),placeholder:n,options:DO,placement:zC.a.TOP_START,onMenuItemClick:l,selectedValue:e,popupFillWidth:!1,selectButtonStylesOverride:NO})},zO=C(819),FO=C(798);const HO=l.f.section.withConfig({displayName:"gridView__Container",componentId:"sc-ytsaos-0"})(["display:flex;flex-direction:column;height:100%;width:100%;padding:32px;"]),GO=l.f.header.withConfig({displayName:"gridView__TopRow",componentId:"sc-ytsaos-1"})(["display:flex;justify-content:space-between;align-items:center;margin-bottom:36px;@media ","{margin-bottom:72px;}@media ","{margin-bottom:112px;}"],(e=>{let{theme:t}=e;return t.breakpoint.desktop}),(e=>{let{theme:t}=e;return t.breakpoint.wide})),VO=Object(l.f)(gp).withConfig({displayName:"gridView__Wrapper",componentId:"sc-ytsaos-2"})(["position:relative;overflow-y:auto;overflow-y:overlay;overflow-x:hidden;flex-grow:1;display:flex;flex-direction:column;pointer-events:all;padding:4px;"]),UO=l.f.div.withConfig({displayName:"gridView__Grid",componentId:"sc-ytsaos-3"})(["position:relative;display:grid;grid-template-columns:",";grid-template-rows:repeat(auto-fill,","px);grid-gap:","px;justify-content:center;align-items:flex-start;flex-grow:1;"],(e=>{let{pageWidth:t}=e;return`repeat(auto-fit, minmax(${t}px, max-content))`}),(e=>{let{pageHeight:t}=e;return t}),(e=>{let{gapWidth:t}=e;return t})),WO=l.f.div.withConfig({displayName:"gridView__NoButton",componentId:"sc-ytsaos-4"})(["flex:0 0 56px;"]),YO=Object(l.f)(b.a).withConfig({displayName:"gridView__ClickableButton",componentId:"sc-ytsaos-5"})(["pointer-events:all;"]),$O=Object(l.f)(zO.a).withConfig({displayName:"gridView__ClickableSlider",componentId:"sc-ytsaos-6"})(["pointer-events:all;width:366px;"]),qO=Object(l.f)(_p).withConfig({displayName:"gridView__PageSeparator",componentId:"sc-ytsaos-7"})(["position:absolute;bottom:0;left:","px;width:","px;height:","px;display:flex;justify-content:center;align-items:center;",""],(e=>{let{width:t}=e;return t/2}),(e=>{let{width:t,margin:C}=e;return t+C}),(e=>{let{height:t}=e;return t}),(e=>{let{before:t,width:C,margin:a}=e;return t&&`\n left: -${(C+2*a)/2}px;\n `})),XO=l.f.div.withConfig({displayName:"gridView__Line",componentId:"sc-ytsaos-8"})(["background:",";height:","px;width:2px;margin:0px;"],(e=>{let{theme:t}=e;return t.colors.border.selection}),(e=>{let{height:t}=e;return t})),KO=l.f.div.withConfig({displayName:"gridView__ItemContainer",componentId:"sc-ytsaos-9"})(["display:flex;flex-direction:row;position:relative;"]);var QO=function GridView(e){let{onClose:t}=e;const{pages:C,currentPageId:a,currentPageIndex:n,setCurrentPage:l,arrangePage:i}=Object(H.o)((e=>{let{state:{pages:t,currentPageIndex:C,currentPageId:a},actions:{setCurrentPage:n,arrangePage:r}}=e;return{pages:t,currentPageIndex:C,currentPageId:a,setCurrentPage:n,arrangePage:r}})),{isRTL:o}=Object(H.g)(),[c,s]=Object(u.I)(4),[d,p]=Object(u.I)(null),m=Object(u.G)();Object(u.H)(m,(e=>{let{width:t}=e;return p(t)}),[]);const f=(d-20*(c-1))/c,b=12*Math.floor(f/12),E=b*c,v=Math.floor((d-E)/(c-1)),O=b/ee.g,y=e=>()=>l({pageId:e.id}),M=Object(u.G)(),w=Object(u.G)({}),L=Object(u.s)(((e,t)=>{i({pageId:e,position:t})}),[i]);Object(FO.a)({containerRef:m,gridRef:M,itemRefs:w,isRTL:o,currentItemId:a,items:C,arrangeItem:L});const _=Math.min(O-24,64);return r.a.createElement(HO,{"aria-label":Object(h.__)("Grid View","web-stories")},r.a.createElement(GO,null,r.a.createElement(YO,{variant:g.d.SQUARE,type:g.c.TERTIARY,size:g.a.MEDIUM,onClick:t,"aria-label":Object(h.__)("Close","web-stories")},r.a.createElement(Te.a.Cross,null)),r.a.createElement($O,{min:4,max:12,majorStep:1,minorStep:1,value:c,handleChange:e=>s(e),"aria-label":Object(h.__)("Pages per row","web-stories")}),r.a.createElement(WO,null)),r.a.createElement(VO,{"aria-label":Object(h.__)("Grid View Pages List","web-stories"),ref:m,onPositionChange:(e,t)=>{const a=C[e].id;i({pageId:a,position:t}),l({pageId:a})},mode:"grid",getItemSize:()=>O,scrollSize:64},r.a.createElement(UO,{pageWidth:b,pageHeight:O,gapWidth:v,ref:M},C.map(((e,t)=>{const a=t===n,l=C.length>1;return r.a.createElement(KO,{key:e.id,ref:t=>{w.current[e.id]=t}},r.a.createElement(qO,{position:t,width:b,height:O,margin:v,before:!0},r.a.createElement(XO,{height:_})),r.a.createElement(yp,{position:t},r.a.createElement(lO,{key:e.id,label:a?Object(h.sprintf)(
|
148 |
/* translators: %s: page number. */
|
149 |
+
Object(h.__)("Page %s (current page)","web-stories"),t+1):Object(h.sprintf)(
|
150 |
/* translators: %s: page number. */
|
151 |
+
Object(h.__)("Page %s","web-stories"),t+1),tabIndex:a&&l?0:-1,isActive:a&&l,page:e,width:b,height:O,onClick:y(e),isInteractive:l,gridRef:M,role:"option"})),r.a.createElement(qO,{position:t+1,width:b,height:O,margin:v},r.a.createElement(XO,{height:_})))})))))};const JO=l.f.div.withConfig({displayName:"gridViewButton__Box",componentId:"sc-1gc0r0y-0"})(["width:32px;height:32px;display:flex;justify-content:center;align-items:center;"]);var ey=function GridViewButton(){const[e,t]=Object(u.I)(!1),C=Object(u.s)((()=>{t((e=>{const t=!e;return Object(f.g)("grid_view_toggled",{status:t?"open":"closed"}),t}))}),[t]);return r.a.createElement(r.a.Fragment,null,r.a.createElement(JO,null,r.a.createElement(Je.a,{title:Object(h.__)("Grid View","web-stories"),placement:zC.a.TOP,hasTail:!0},r.a.createElement(b.a,{variant:g.d.SQUARE,type:g.c.TERTIARY,size:g.a.SMALL,onClick:C,"aria-label":Object(h.__)("Grid View","web-stories")},r.a.createElement(Te.a.Box4,null)))),r.a.createElement(d.a,{isOpen:e,onClose:C,contentLabel:Object(h.__)("Grid View","web-stories"),overlayStyles:{alignItems:"stretch",backgroundColor:"#131516"},contentStyles:{pointerEvents:"none",flex:1}},r.a.createElement(QO,{onClose:C})))};const ty=l.f.div.withConfig({displayName:"primaryMenu__Wrapper",componentId:"sc-1n6k8y9-0"})(["display:flex;align-items:flex-end;justify-content:flex-end;width:100%;height:100%;"]),Cy=l.f.div.withConfig({displayName:"primaryMenu__MenuItems",componentId:"sc-1n6k8y9-1"})(["position:relative;display:flex;flex-direction:row;align-items:center;margin-right:","px;gap:","px;"],16,8);var ay=function PrimaryMenu(){return r.a.createElement(ty,null,r.a.createElement(Cy,{id:"primary-menu-items"},r.a.createElement(BO,null),r.a.createElement(ey,null)))};function ny(){return(ny=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const ry=Object(ye.c)(),LargeKey=e=>r.a.createElement("kbd",ny({className:"large-key"},e)),ShiftKeyWrapper=e=>ry?r.a.createElement("kbd",e):r.a.createElement(LargeKey,e),ly={header:{label:Object(h.__)("Keyboard Shortcuts","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,"/"))},landmarks:[{label:Object(h.__)("Element","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,Object(ye.d)("alt")),r.a.createElement("kbd",null,"1"))},{label:Object(h.__)("Workspace","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,Object(ye.d)("alt")),r.a.createElement("kbd",null,"2"))},{label:Object(h.__)("Design panels","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,Object(ye.d)("alt")),r.a.createElement("kbd",null,"3"))}],sections:[{title:Object(h.__)("Basics","web-stories"),commands:[{label:Object(h.__)("Undo","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,"Z"))},{label:Object(h.__)("Redo","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement(ShiftKeyWrapper,null,Object(ye.d)("shift")),r.a.createElement("kbd",null,"Z"))},{label:Object(h.__)("Save","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,"S"))},{label:Object(h.__)("Play / Stop","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,"K"))}]},{title:Object(h.__)("Text","web-stories"),commands:[{disabled:!0,label:Object(h.__)("Insert/edit link","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,"K"))},{label:Object(h.__)("Bold","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,"B"))},{label:Object(h.__)("Italic","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,"I"))},{label:Object(h.__)("Underline","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,"U"))}]},{title:Object(h.__)("Element","web-stories"),commands:[{label:Object(h.__)("Copy","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,"C"))},{label:Object(h.__)("Cut","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,"X"))},{label:Object(h.__)("Duplicate","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,"D"))},{label:Object(h.__)("Paste","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,"V"))},{label:Object(h.__)("Copy Styles","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,Object(ye.d)("alt")),r.a.createElement("kbd",null,"O"))},{label:Object(h.__)("Paste Styles","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,Object(ye.d)("alt")),r.a.createElement("kbd",null,"P"))},{label:Object(h.__)("Select all","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,"A"))},{label:Object(h.__)("Select multiple","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement(h.TranslateWithMarkup,{mapping:{lkbd:r.a.createElement(LargeKey,null),shortcut:r.a.createElement(ye.a,{shortcut:"shift"})}},Object(h.sprintf)(
|
152 |
/* translators: 1: Shift key. */
|
153 |
+
Object(h.__)("<lkbd>%s</lkbd> <span>+ click</span>","web-stories"),Object(ye.d)("shift"))))},{label:Object(h.__)("Move forward or back","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement(h.TranslateWithMarkup,{mapping:{kbd:r.a.createElement("kbd",null),lkbd:r.a.createElement(LargeKey,null)}},Object(h.sprintf)(
|
154 |
/* translators: 1: Cmd/Ctrl key. 2: Up key. 3: Down key. */
|
155 |
+
Object(h.__)("<lkbd>%1$s</lkbd> <kbd>%2$s</kbd> <span>or</span> <kbd>%3$s</kbd>","web-stories"),Object(ye.d)("mod"),Object(ye.d)("up"),Object(ye.d)("down"))))},{label:Object(h.__)("Move to front or back","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement(h.TranslateWithMarkup,{mapping:{kbd:r.a.createElement("kbd",null),lkbd:r.a.createElement(LargeKey,null)}},Object(h.sprintf)(
|
156 |
/* translators: 1: Cmd/Ctrl key. 2: Shift key. 3: Up key. 4: Down key. */
|
157 |
+
Object(h.__)("<lkbd>%1$s</lkbd> <lkbd>%2$s</lkbd> <kbd>%3$s</kbd> <span>or</span> <kbd>%4$s</kbd>","web-stories"),Object(ye.d)("mod"),Object(ye.d)("shift"),Object(ye.d)("up"),Object(ye.d)("down"))))},{label:Object(h.__)("Enter crop/edit mode","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement(h.TranslateWithMarkup,{mapping:{kbd:r.a.createElement("kbd",null)}},Object(h.sprintf)(
|
158 |
/* translators: %s: Enter key. */
|
159 |
+
Object(h.__)("<kbd>%s</kbd> <span>or double-click</span>","web-stories"),Object(ye.d)("enter"))))},{label:Object(h.__)("Delete","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("delete")))},{disabled:!0,label:Object(h.__)("Insert/edit link","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",null,"A"))},{label:Object(h.__)("Disable snapping and drop targeting","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement(h.TranslateWithMarkup,{mapping:{lkbd:r.a.createElement(LargeKey,null)}},Object(h.sprintf)(
|
160 |
/* translators: %s: Cmd/Ctrl key. */
|
161 |
+
Object(h.__)("<span>Hold</span> <lkbd>%s</lkbd>","web-stories"),Object(ye.d)("mod"))))},{label:Object(h.__)("Open context menu","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("mod")),r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("alt")),r.a.createElement("kbd",{className:"large-key"},Object(ye.d)("shift")),r.a.createElement("kbd",null,"M"))},{label:Object(h.__)("Move element 1px","web-stories"),shortcut:r.a.createElement("kbd",null,r.a.createElement(h.TranslateWithMarkup,{mapping:{lkbd:r.a.createElement(LargeKey,null),shortcut:r.a.createElement(ye.a,{shortcut:"shift"})}},Object(h.sprintf)(
|
162 |
/* translators: 1: Shift key. */
|
163 |
+
Object(h.__)("<lkbd>%s</lkbd> <span>+ arrow keys</span>","web-stories"),Object(ye.d)("shift"))))}]}]},iy=ly.header,oy=ly.landmarks.filter((e=>!e.disabled)),cy=ly.sections.map((e=>({...e,commands:e.commands.filter((e=>!e.disabled))})));function sy(){return(sy=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const dy=l.f.dd.withConfig({displayName:"shortcutLabel__Wrapper",componentId:"sc-6tlmvo-0"})(["display:block;margin:0;kbd{"," display:flex;justify-content:",";align-items:center;margin:0;padding:0;color:",";background-color:transparent;& > kbd{display:flex;justify-content:center;align-items:center;padding:0 5px;height:24px;width:24px;border-radius:",";border:1px solid ",";color:",";}& > kbd.large-key{width:auto;}kbd + kbd{margin-left:2px;}kbd + span{margin-left:4px;}span + kbd{margin-left:4px;}}"],Q.c.expandTextPreset(((e,t)=>{let{paragraph:C}=e,{X_SMALL:a}=t;return C[a]})),(e=>{let{alignment:t}=e;return t}),(e=>{let{theme:t}=e;return t.colors.fg.secondary}),(e=>{let{theme:t}=e;return t.borders.radius.medium}),(e=>{let{theme:t}=e;return t.colors.border.defaultNormal}),(e=>{let{theme:t}=e;return t.colors.fg.primary}));var uy=function ShortCutLabel(e){let{keys:t,alignment:C="center",...a}=e;return r.a.createElement(dy,sy({alignment:C},a),t)};function py(){return(py=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const my=l.f.dl.withConfig({displayName:"headerShortcut__List",componentId:"sc-1egg06k-0"})(["margin:24px;display:flex;flex-shrink:0;"]),fy=l.f.dt.withConfig({displayName:"headerShortcut__Item",componentId:"sc-1egg06k-1"})(["margin:0 12px 0 0;"]);var hy=function HeaderShortcut(e){const{label:t,shortcut:C}=iy;return r.a.createElement(my,null,r.a.createElement(fy,null,r.a.createElement(Jt.a,py({as:"h2",size:ot.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL},e),t)),r.a.createElement(uy,{keys:C}))};const by=l.f.dl.withConfig({displayName:"landmarkShortcuts__LandmarksWrapper",componentId:"sc-k7r8e2-0"})(["background-color:",";margin:0;padding:16px 24px;display:flex;justify-content:space-between;"],(e=>{let{theme:t}=e;return t.colors.bg.secondary})),gy=l.f.div.withConfig({displayName:"landmarkShortcuts__Landmark",componentId:"sc-k7r8e2-1"})(["display:flex;flex-direction:column-reverse;"]),Ey=Object(l.f)(cC.a).attrs({size:ot.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL,forwardedAs:"span"}).withConfig({displayName:"landmarkShortcuts__Label",componentId:"sc-k7r8e2-2"})(["text-align:center;margin-top:8px;white-space:nowrap;display:inline-block;"]);var vy=function LandmarkShortcuts(){return r.a.createElement(by,null,oy.map((e=>{let{label:t,shortcut:C}=e;return r.a.createElement(gy,{key:t},r.a.createElement("dt",null,r.a.createElement(Ey,null,t)),r.a.createElement(uy,{keys:C}))})))};const Oy=Object(l.f)(Jt.a).attrs({as:"h3",size:ot.b.TYPOGRAPHY.PRESET_SIZES.XX_SMALL}).withConfig({displayName:"shortcutMenuSection__Header",componentId:"sc-xssjcb-0"})(["margin-top:24px;color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.primary})),yy=l.f.dl.withConfig({displayName:"shortcutMenuSection__List",componentId:"sc-xssjcb-1"})(["display:grid;grid-template-columns:1fr;row-gap:12px;align-items:center;margin:12px 0 0;"]),My=l.f.div.withConfig({displayName:"shortcutMenuSection__ListRow",componentId:"sc-xssjcb-2"})(["display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto;column-gap:5px;align-items:center;dd{grid-column:1;grid-row:1;}dt{grid-column:2;grid-row:1;}"]),wy=Object(l.f)(cC.a).attrs({size:ot.b.TYPOGRAPHY.PRESET_SIZES.SMALL,forwardedAs:"span"}).withConfig({displayName:"shortcutMenuSection__Label",componentId:"sc-xssjcb-3"})(["display:inline-block;color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.secondary}));var Ly=function ShortcutMenuSection(e){let{title:t,commands:C}=e;const a=`header-${Object(Hn.a)()}`;return r.a.createElement(r.a.Fragment,null,r.a.createElement(Oy,{id:a},t),r.a.createElement(yy,{title:t},C.map((e=>{let{label:t,shortcut:C}=e;return r.a.createElement(My,{key:t},r.a.createElement("dt",null,r.a.createElement(wy,null,t)),r.a.createElement(uy,{keys:C,alignment:"left"}))}))))};const _y=l.f.div.withConfig({displayName:"regularShortcuts__ContentWrapper",componentId:"sc-fl8s7-0"})(["display:flex;flex-direction:column;margin:0 24px 24px;"]);var jy=function RegularShortcuts(){return r.a.createElement(_y,null,cy.map((e=>{let{title:t,commands:C}=e;return r.a.createElement(Ly,{key:t,title:t,commands:C})})))};const xy="mod+/",Zy=l.f.div.withConfig({displayName:"shortcutMenu__Container",componentId:"sc-m0xcqa-0"})(["position:absolute;left:0;bottom:0;width:352px;border-radius:",";background-color:",";border:","px solid ",";"],(e=>{let{theme:t}=e;return t.borders.radius.small}),(e=>{let{theme:t}=e;return t.colors.bg.primary}),1,(e=>{let{theme:t}=e;return t.colors.border.defaultNormal})),Ay=uC.a+uC.n+16-2,Iy=l.f.div.withConfig({displayName:"shortcutMenu__FlexContent",componentId:"sc-m0xcqa-1"})(["display:flex;flex-direction:column;max-height:calc( 100vh - ","px - ","px );"],Ay,(e=>{let{bottomOffset:t}=e;return t})),Ty=l.f.div.withConfig({displayName:"shortcutMenu__CloseContainer",componentId:"sc-m0xcqa-2"})(["position:absolute;right:4px;top:4px;"]),Sy=l.f.div.withConfig({displayName:"shortcutMenu__ScrollableContent",componentId:"sc-m0xcqa-3"})(["overflow:auto;flex-shrink:1;",";"],Q.c.focusableOutlineCSS),ky=`kb-header-${Object(Hn.a)()}`;var Ry=function ShortcutMenu(){const e=Object(u.G)(),t=Object(u.G)(),{close:C,toggleMenu:a,isOpen:n}=Qv((e=>{let{actions:t,state:C}=e;return{toggleMenu:t.toggleMenu,close:t.close,isOpen:C.isOpen}})),[l,i]=Object(u.I)(0);return Object(u.B)((()=>{const e=t.current;if(!e)return;const C=()=>{const t=e.getBoundingClientRect(),C=e.ownerDocument.documentElement.getBoundingClientRect();i(C.height-t.y-t.height)};return C(),setTimeout(C),window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)}),[]),Object(u.y)((()=>{n&&e.current&&e.current.focus()}),[n]),Object(ye.h)(t,xy,a,[a]),Object(ye.h)(t,"esc",C),r.a.createElement(Zy,{ref:t},r.a.createElement(Ty,null,r.a.createElement(b.a,{ref:e,type:g.c.PLAIN,size:g.a.SMALL,variant:g.d.CIRCLE,onClick:C,"aria-label":Object(h.__)("Close Menu","web-stories")},r.a.createElement(Te.a.Cross,null))),r.a.createElement(Iy,{bottomOffset:l},r.a.createElement(hy,{id:ky}),r.a.createElement(Sy,{role:"presentation",tabIndex:0},r.a.createElement(vy,null),r.a.createElement(jy,null))))};const Py=Object(l.f)(fc).withConfig({displayName:"keyboardShortcutsMenu__StyledToggleButton",componentId:"sc-1nngfyy-0"})(["padding-left:","px;padding-right:","px;width:auto;display:block;"],3,3),Ny=l.f.div.withConfig({displayName:"keyboardShortcutsMenu__Wrapper",componentId:"sc-1nngfyy-1"})(["z-index:",";"],ko+1),Dy=Object(l.f)(Te.a.Keyboard).withConfig({displayName:"keyboardShortcutsMenu__MainIcon",componentId:"sc-1nngfyy-2"})(["height:32px;width:auto;display:block;"]);var By=function KeyboardShortcutsMenu(){const e=Object(u.G)(),t=Object(u.G)(),{close:C,toggle:a,isOpen:n}=Qv((e=>{let{actions:{close:t,toggle:C},state:{isOpen:a}}=e;return{close:t,toggle:C,isOpen:a}}));return Object(u.y)((()=>{var t,C;document.body.classList.contains(Pe)&&!n&&(null==e||null===(t=e.current)||void 0===t||null===(C=t.focus)||void 0===C||C.call(t))}),[n]),Object(ye.g)(xy,a,[a]),Object(u.z)(t,C,[C]),r.a.createElement(Ht,null,r.a.createElement(Ny,{ref:t},r.a.createElement(Mo,{popupId:"keyboard_shortcut_menu",isOpen:n,ariaLabel:Object(h.__)("Keyboard Shortcuts","web-stories")},r.a.createElement(Ry,{toggleMenu:a})),r.a.createElement(Py,{ref:e,isOpen:n,"aria-owns":"keyboard_shortcut_menu",onClick:a,"aria-label":Object(h.__)("Keyboard Shortcuts","web-stories"),label:Object(h.__)("Keyboard Shortcuts","web-stories"),MainIcon:Dy,shortcut:"mod+/"})))},zy=C(51);function Fy(){var e;null===(e=document.querySelector(zy.b))||void 0===e||e.focus()}const Hy=Object(l.e)(["color:",";"],(e=>{let{theme:t}=e;return t.colors.fg.secondary})),Gy=Object(l.f)(fo).withConfig({displayName:"bottomNavigation__BottomNavBar",componentId:"sc-yk08yc-0"})(["position:absolute;bottom:0;transition:transform ","ms ",";z-index:2;",""],zy.g,ot.a.default,(e=>{let{isHidden:t}=e;return t&&Object(l.e)(["transform:translateY(100%);"])})),Vy=l.f.div.withConfig({displayName:"bottomNavigation__BottomNavButtons",componentId:"sc-yk08yc-1"})(["display:flex;padding:0 16px;white-space:nowrap;"]),Uy=l.f.div.withConfig({displayName:"bottomNavigation__ArrowWrap",componentId:"sc-yk08yc-2"})([""," margin:-5px -16px;"," svg{display:block;}"],Hy,(e=>{let{$isRTL:t}=e;return t&&Object(l.e)(["transform:rotate(180deg);"])}));function BottomNavigation(e){let{onAllTips:t,onPrev:C,onNext:a,hasBottomNavigation:n,isNextDisabled:l,isPrevDisabled:i}=e;const{isRTL:o}=Object(_.c)(),c=Object(u.G)(null),s=Object(u.G)(null),[d,p]=Object(u.I)({isPrevDisabled:i,isNextDisabled:l});return Object(u.y)((()=>{[i&&document.activeElement===c.current,l&&document.activeElement===s.current].forEach((e=>(e=>t=>{e&&t()})(e)(Fy))),p({isPrevDisabled:i,isNextDisabled:l})}),[i,l]),r.a.createElement(Gy,{"aria-hidden":!n,isHidden:!n},r.a.createElement(Vy,null,r.a.createElement(ho,{onClick:()=>{Fy(),t()},type:g.c.PLAIN,size:g.a.SMALL,disabled:!n},r.a.createElement(Uy,{$isRTL:o},r.a.createElement(Te.a.ArrowLeft,null)),r.a.createElement(Wy,null,Object(h.__)("All Tips","web-stories")))),r.a.createElement(Vy,null,r.a.createElement(ho,{ref:c,onClick:C,type:g.c.PLAIN,size:g.a.SMALL,disabled:!n||d.isPrevDisabled},Object(h.__)("Previous","web-stories")),r.a.createElement(ho,{ref:s,onClick:a,type:g.c.PLAIN,size:g.a.SMALL,disabled:!n||d.isNextDisabled},Object(h.__)("Next","web-stories"))))}var Wy=Object(l.f)("span").withConfig({displayName:"bottomNavigation___StyledSpan",componentId:"sc-yk08yc-3"})(["",""],Hy);const Yy=l.f.div.withConfig({displayName:"navigator__Layout",componentId:"sc-3xgugm-0"})([""," contain:content;"],Q.c.fullSizeRelative),$y=l.f.div.withConfig({displayName:"navigator__Content",componentId:"sc-3xgugm-1"})([""]),qy=l.f.div.withConfig({displayName:"navigator__ContentInner",componentId:"sc-3xgugm-2"})(["position:relative;"]);var Xy=Object(u.m)((function Navigator(e){let{children:t,isOpen:C,onClose:a,onNext:n,onPrev:l,onAllTips:i,hasBottomNavigation:o,isNextDisabled:c,isPrevDisabled:s}=e;const d=Object(u.G)(null),p=Object(u.G)(null);return Object(u.y)((()=>function(e,t){if(!e||!t)return()=>{};const{height:C}=e.getBoundingClientRect();t.style.height=`${C}px`,e.style.position="absolute",e.style.bottom=0,e.style.content="contain";let a=requestAnimationFrame((()=>{a=requestAnimationFrame((()=>{t.style.transition=`height ${zy.g}ms ${ot.a.default}`}))}));return()=>cancelAnimationFrame(a)}(d.current,p.current)),[]),Object(u.H)(d,(e=>{let{height:t}=e;p.current&&(p.current.style.height=`${t}px`)}),[]),r.a.createElement(Qt,{isOpen:C},r.a.createElement(TopNavigation,{onClose:a,label:Object(h.__)("Quick Tips","web-stories"),popupId:zy.e}),r.a.createElement(Yy,{ref:p},r.a.createElement($y,{ref:d},r.a.createElement(qy,null,t))),r.a.createElement(BottomNavigation,{onNext:n,onPrev:l,onAllTips:i,hasBottomNavigation:o,isNextDisabled:c,isPrevDisabled:s}))})),Ky=C(799);const Qy=l.f.div.withConfig({displayName:"header__Panel",componentId:"sc-1aci6do-0"})(["padding:24px 0 16px 0;border-bottom:1px solid ",";"],(e=>{let{theme:t}=e;return t.colors.bg.tertiary})),Jy=l.f.h1.withConfig({displayName:"header__Heading",componentId:"sc-1aci6do-1"})([""," color:",";line-height:32px;margin:0 0 8px 0;"],Q.c.expandTextPreset(((e,t)=>{let{label:C}=e,{MEDIUM:a}=t;return C[a]})),(e=>{let{theme:t}=e;return t.colors.fg.primary}));function eM(){return r.a.createElement(Qy,null,r.a.createElement(Jy,{as:"h2"},Object(h.__)("Web Stories Help Center","web-stories")),r.a.createElement(cC.a,{size:ot.b.TYPOGRAPHY.PRESET_SIZES.X_SMALL},Object(h.__)("Discover tips & resources to help you get the most out of your Web Stories.","web-stories")))}const tM=l.f.div.withConfig({displayName:"tips__Panel",componentId:"sc-1bvshes-0"})(["padding:24px 0;"]),CM=Object(l.f)(b.a).withConfig({displayName:"tips__StyledButton",componentId:"sc-1bvshes-1"})([""," display:flex;justify-content:space-between;width:100%;padding:6px 0;"],Q.c.expandTextPreset(((e,t)=>{let{label:C}=e,{SMALL:a}=t;return C[a]}))),aM=l.f.span.withConfig({displayName:"tips__ButtonText",componentId:"sc-1bvshes-2"})(["vertical-align:middle;text-align:left;",""],(e=>{let{unread:t,theme:C}=e;return t&&Object(l.e)(["&::before{content:' ';display:inline-block;height:10px;width:10px;margin-right:16px;border-radius:",";background-color:",";}"],C.borders.radius.round,C.colors.accent.primary)})),nM=l.f.div.withConfig({displayName:"tips__ArrowWrap",componentId:"sc-1bvshes-3"})(["width:32px;margin:-9px;transform-origin:50% 50%;transform:",";"],(e=>{let{$isRTL:t}=e;return t?"none":"rotate(180deg)"})),rM=Object(l.f)(Te.a.ArrowLeft).withConfig({displayName:"tips__StyledArrow",componentId:"sc-1bvshes-4"})(["width:100%;"]);function Tip(e){let{children:t,onClick:C,unread:a=!0}=e;const{isRTL:n}=Object(_.c)();return r.a.createElement(CM,{size:g.a.SMALL,onClick:C},r.a.createElement(aM,{unread:a},t),r.a.createElement(nM,{$isRTL:n},r.a.createElement(rM,null)))}function Tips(e){let{onTipSelect:t=(()=>{}),readTips:C}=e;const{state:{tips:a}}=Object(H.j)(),n=Object.entries(a);return r.a.createElement(tM,null,n.map((e=>{let[a,n]=e;return r.a.createElement(Tip,{unread:!C[a],key:a,onClick:()=>{Fy(),t(a)}},n.title)})))}function lM(){return(lM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const iM=1.2*zy.g,oM=Object(l.e)(["opacity:1;transform:none;"]),cM=Object(l.e)(["position:absolute;bottom:0;opacity:0.6;transform:scale(0.96);"]),sM={entering:oM,entered:oM,exiting:cM,exited:cM},dM=l.f.div.withConfig({displayName:"transitioner__Manager",componentId:"sc-aat78p-0"})(["position:relative;color:",";opacity:0.6;transform-origin:50% 50%;transform:scale(0.96);transition:transform ","ms ",",opacity ","ms ",";z-index:",";",";"],(e=>{let{theme:t}=e;return t.colors.fg.primary}),iM,ot.a.default,iM,ot.a.default,zy.h.MENU,(e=>{let{state:t}=e;return sM[t]}));function Transitioner(e){let{children:t,...C}=e;return r.a.createElement(ScheduledTransition,lM({},C,{timeout:iM,mountOnEnter:!0,unmountOnExit:!0}),(e=>r.a.createElement(dM,{state:e},t)))}const uM=l.f.div.withConfig({displayName:"menu__Container",componentId:"sc-ztoh5v-0"})(["padding:0 ","px;max-height:60vh;overflow-y:scroll;*{user-select:text;}"],zy.c);function pM(e){let{onTipSelect:t=Kt.a,readTips:C,components:a,...n}=e;const l=null==a?void 0:a.Footer;return r.a.createElement(Transitioner,n,r.a.createElement(uM,{"data-testid":"help_center_container"},r.a.createElement(eM,null),r.a.createElement(Tips,{readTips:C,onTipSelect:t}),l&&r.a.createElement(l,null)))}var mM=C(389);function fM(){return(fM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var C=arguments[t];for(var a in C)Object.prototype.hasOwnProperty.call(C,a)&&(e[a]=C[a])}return e}).apply(this,arguments)}const hM=zy.g-80,bM=l.f.div.withConfig({displayName:"transitioner__Opacity",componentId:"sc-cc5d3w-0"})([""]),gM=()=>Object(l.e)(["transition-delay:","ms;transform:none;","{opacity:1;}"],80,bM),EM=e=>{let{isLeftToRightTransition:t}=e;return Object(l.e)(["position:absolute;bottom:0;","{opacity:0;}",""],bM,t?Object(l.e)(["transform:translateX(-100%);"]):Object(l.e)(["transform:translateX(100%);"]))},vM={entering:gM,entered:gM,exiting:EM,exited:EM},OM=l.f.div.withConfig({displayName:"transitioner__Manager",componentId:"sc-cc
|