<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[11266] sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns: Pattern Directory: Sync with git WordPress/pattern-directory@e673a5744a3a5a95a08d9b0663d9a03e9530d0d4</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/11266">11266</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/11266","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>ryelle</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2021-10-05 18:08:46 +0000 (Tue, 05 Oct 2021)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Pattern Directory: Sync with git WordPress/pattern-directory@e673a5744a3a5a95a08d9b0663d9a03e9530d0d4</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpatternsbuildindexassetphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/build/index.asset.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpatternsbuildindexjs">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/build/index.js</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpatternspackagejson">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/package.json</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpatternssrccomponentsmyfavoritesemptyheaderjs">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/src/components/my-favorites/empty-header.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpatternsbuildindexassetphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/build/index.asset.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/build/index.asset.php 2021-10-05 06:44:59 UTC (rev 11265)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/build/index.asset.php 2021-10-05 18:08:46 UTC (rev 11266)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1 +1 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '7869491d325e2fc5a7ae4fe6f08b6589');
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'de6b6b147534aa25b4e7562eed6a9837');
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpatternsbuildindexjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/build/index.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/build/index.js 2021-10-05 06:44:59 UTC (rev 11265)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/build/index.js 2021-10-05 18:08:46 UTC (rev 11266)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,7 +1,7 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?functio
n(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.url},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.dataControls},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var c=a.apply(null,r);c&&e.push(c)}}else if("object"===o)if(r.toString===Object.prototype.toString)for(var i in r)n.call(r,i)&&r[i]&&e.push(i);else e.push(r.toString())}}return e.join(" ")}e.exports?(a.default
=a,e.exports=a):void 0===(r=function(){return a}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.wp.compose},function(e,t){e.exports=window.wp.primitives},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.a11y},function(e,t){e.exports=window.wp.keycodes},function(e,t){e.exports=window.lodash},function(e,t){e.exports=window.wp.coreData},function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=window.wp.apiFetch},function(e,t){e.exports=window.wp.dom},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"fetchPatterns",(function(){return N})),n.d(r,"loadPattern",(function(){return T}
)),n.d(r,"loadPatterns",(function(){return k})),n.d(r,"setErrorPatterns",(function(){return C})),n.d(r,"setCurrentQuery",(function(){return A})),n.d(r,"fetchCategories",(function(){return I})),n.d(r,"loadCategories",(function(){return L})),n.d(r,"fetchPatternFlagReasons",(function(){return R})),n.d(r,"loadPatternFlagReasons",(function(){return D})),n.d(r,"loadFavorites",(function(){return F})),n.d(r,"addFavorite",(function(){return M})),n.d(r,"removeFavorite",(function(){return B}));var a={};n.r(a),n.d(a,"getPatternsByQuery",(function(){return $})),n.d(a,"getPattern",(function(){return V})),n.d(a,"getCategories",(function(){return G})),n.d(a,"getPatternFlagReasons",(function(){return H})),n.d(a,"getFavorites",(function(){return z}));var o={};n.r(o),n.d(o,"isLoadingPatternsByQuery",(function(){return W})),n.d(o,"getPatter
ns",(function(){return Y})),n.d(o,"getPatternsByQuery",(function(){return X})),n.d(o,"getPatternTotalsByQuery",(function(){return J})),n.d(o,"getPatternTotalPagesByQuery",(function(){return Z})),n.d(o,"getPattern",(function(){return ee})),n.d(o,"getCurrentQuery",(function(){return te})),n.d(o,"isLoadingCategories",(function(){return ne})),n.d(o,"hasLoadedCategories",(function(){return re})),n.d(o,"getCategories",(function(){return ae})),n.d(o,"getCategoryBySlug",(function(){return oe})),n.d(o,"getCategoryById",(function(){return ce})),n.d(o,"getPatternFlagReasons",(function(){return ie})),n.d(o,"isLoadingPatternFlagReasons",(function(){return se})),n.d(o,"getFavorites",(function(){return le})),n.d(o,"isFavorite",(function(){return ue})),n.d(o,"getQueryFromUrl",(function(){return pe})),n.d(o,"getUrlFromQuery",(function(){
return de}));var c=n(0),i=n(1),s=n(2),l=({name:e,url:t,avatar:n})=>Object(c.createElement)("a",{href:t,className:"pattern__author-avatar"},Object(c.createElement)("img",{alt:"",src:n}),e);const u=({className:e="",style:t,children:n})=>Object(c.createElement)("span",{className:e+" pattern-skeleton__container",style:t},n),p=e=>Object(c.createElement)("span",{className:"pattern-skeleton",style:e});var d=n(10),b=n.n(d),g=n(9),f=function(e){return Object(c.createElement)(g.SVG,b()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},e),Object(c.createElement)(g.Path,{d:"M11.941 21.175l-1.443-1.32c-5.124-4.67-8.508-7.75-8.508-11.53 0-3.08 2.408-5.5 5.473-5.5 1.732 0 3.394.81 4.478 2.09 1.085-1.28 2.747-2.09 4.478-2.09 3.065 0 5.473 2.42 5.473 5.5 0 3.78-3.383 6.86-8.508 11.54l-1.443 1.31z"}))};function m(e){return e
*(2/3)}const v=()=>{const[e,t]=Object(c.useState)(),n=Object(c.useRef)();return Object(c.useEffect)(()=>{n.current&&t(m(n.current.clientWidth)+"px")},[n]),Object(c.createElement)("div",{ref:n},Object(c.createElement)(u,null,Object(c.createElement)(p,{height:e}),Object(c.createElement)(p,{height:"14px",marginTop:"1rem"}),Object(c.createElement)(u,{style:{flexDirection:"row",marginTop:"0.5rem",alignItems:"center"}},Object(c.createElement)(p,{height:"18px",width:"18px",marginRight:"0.5rem",borderRadius:"32px"}),Object(c.createElement)(p,{height:"12px",width:"100px",marginRight:"0.75rem"}),Object(c.createElement)(f,{width:"16px",height:"16px",fill:"#787c82",className:"pattern-favorite-button__filled"}),Object(c.createElement)(p,{height:"12px",width:"32px",marginLeft:"0.5r
em"}))))};var h=({length:e=6})=>Array(e).fill().map((e,t)=>Object(c.createElement)(v,{key:t})),O=n(3);const y=e=>e.split("?")[0],j=(e,t)=>{if(!t||!e)return"";const n=Object(O.getQueryArgs)(e);if(n[t])return n[t];const r=(e=>e.replace(/^\//,""))(y(e).replace(/\/$/,"")).split("/"),a=r.indexOf(t);return-1===a?"":r[a+1]||""},_=e=>Number(j(e,"page")||1),w=Object(c.createContext)();function E({children:e}){const[t,n]=Object(c.useState)(Object(O.getPathAndQueryString)(window.location.href)),r=e=>{window.history.pushState("","",e),n(e)},a=()=>{n(document.location.href)};return Object(c.useEffect)(()=>(window.addEventListener("popstate",a),()=>{window.removeEventListener("popstate",a)}),[]),Object(c.createElement)(w.Provider,{value:{path:t,update:e=>{const n=(e=>(e=>{const t={};return Object.keys(e).forEach(n=>{const r=e[n];nul
l!=r&&r.toString().length>0&&(t[n]=r)}),t})({...Object(O.getQueryArgs)(t),...Object(O.getQueryArgs)(e)}))(e),a=y(e),o=Object(O.addQueryArgs)(a,n);r(o)},replace:r}},e)}function S(){const e=Object(c.useContext)(w);if(void 0===e)throw new Error("useRoute must be used within a Provider");return e}function P({currentPage:e=1,onNavigation:t,totalPages:n}){const{path:r,update:a}=S();if(!n||n<=1)return null;const o=e>1,s=e<n,l=Object(O.getQueryString)(r)?"?"+Object(O.getQueryString)(r):"",u=r.replace(l,"").replace(/page\/\d+\/?/,""),p=function(e,t=1){const n=Array.from({length:e},(e,t)=>t+1),r=[];return e<=5?n:(r.push(...n.slice(0,2)),t>=2&&t<=e-1&&r.push(...n.slice(t-2,t+1)),r.push(...n.slice(-2)),r.filter((e,t,n)=>n.indexOf(e)===t).reduce((e,t,n,r)=>{if(0===n)return e.push(t),e;const a=Math.abs(r[n]-r[n-1]);return 0===a||(a>1&&e.push("…"),e.push(t)),e},[])
)}(n,e),d=`${u}page/%s/${l}`,b=e=>1===e?`${u}${l}`:Object(i.sprintf)(d,e),g=(e,n)=>{e.preventDefault(),a(b(n)),"function"==typeof t&&t()};return Object(c.createElement)("nav",{className:"pagination","aria-label":Object(i.__)("Pagination","wporg-patterns")},Object(c.createElement)("ul",{className:"pagination__list"},Object(c.createElement)("li",{className:"pagination__item pagination__item-previous-page"},o&&Object(c.createElement)("a",{className:"pagination__link",href:b(e-1),onClick:t=>g(t,e-1)},Object(c.createElement)("span",{className:"screen-reader-text"},Object(i.__)("Previous page","wporg-patterns")),Object(c.createElement)("span",{"aria-hidden":!0},Object(i._x)("Previous","previous page link label","wporg-patterns")))),p.map((t,n)=>"…&
quot;===t?Object(c.createElement)("li",{className:"pagination__item",key:`${n}-${t}`},t):Object(c.createElement)("li",{className:"pagination__item",key:t},Object(c.createElement)("a",{className:"pagination__link",href:b(t),"aria-current":t===e?"page":void 0,onClick:e=>g(e,t)},Object(c.createElement)("span",{className:"screen-reader-text"},Object(i.sprintf)(// translators: %s is the page number.
-Object(i.__)("Page %s","wporg-patterns"),t)),Object(c.createElement)("span",{"aria-hidden":!0},t)))),Object(c.createElement)("li",{className:"pagination__item pagination__item-next-page"},s&&Object(c.createElement)("a",{className:"pagination__link",href:b(e+1),onClick:t=>g(t,e+1)},Object(c.createElement)("span",{className:"screen-reader-text"},Object(i.__)("Next page","wporg-patterns")),Object(c.createElement)("span",{"aria-hidden":!0},Object(i._x)("Next","next page link label","wporg-patterns"))))))}var x=n(6);function N(e){return{type:"FETCH_BLOCK_PATTERNS",query:e}}function T(e,t){return{type:"LOAD_BLOCK_PATTERN",postId:e,pattern:t}}function k(e,{page:t,patterns:n,total:r,totalPages:a}){return{type:"LOAD_BLOCK_PATTERNS",query:e,page:t,patterns:n,total:r,totalPages:a}}funct
ion C(e,{page:t,error:n}){return{type:"ERROR_BLOCK_PATTERNS",query:e,page:t,error:n}}function A(e){return{type:"SET_CURRENT_QUERY",query:e}}function I(){return{type:"FETCH_CATEGORIES"}}function L(e){return{type:"LOAD_CATEGORIES",categories:e}}function R(){return{type:"FETCH_PATTERN_FLAG_REASONS"}}function D(e){return{type:"LOAD_PATTERN_FLAG_REASONS",reasons:e}}function F(e){return{type:"LOAD_FAVORITES",patternIds:e}}function*M(e){const t=yield Object(x.apiFetch)({path:"/wporg/v1/pattern-favorites",method:"POST",data:{id:e}});if("number"==typeof t)return{type:"ADD_FAVORITE",patternId:e,count:t}}function*B(e){const t=yield Object(x.apiFetch)({path:"/wporg/v1/pattern-favorites",method:"DELETE",data:{id:e}});if("number"==typeof t)return{type:"REMOVE_FAVORITE",patternId:e,count:t}}function Q(e={}){const t=Object.keys(e).sort();let n="&
quot;;for(let r=0;r<t.length;r++){const a=t[r];let o=e[a];switch(Array.isArray(o)&&(o=e[a].join()),a){case"page":case"per_page":case"_fields":break;default:n+=(n?"&":"")+Object(O.addQueryArgs)("",{[a]:o}).slice(1)}}return n}function q(e={},t){switch(t.type){case"LOAD_BLOCK_PATTERNS":{const n=(t.patterns||[]).reduce((e,t)=>({...e,[t.id]:t}),{});return{...e,...n}}case"LOAD_BLOCK_PATTERN":return{...e,[t.postId]:t.pattern};case"ADD_FAVORITE":case"REMOVE_FAVORITE":{const n={...e[t.patternId],favorite_count:t.count};return{...e,[t.patternId]:n}}default:return e}}function U(e={},t){const n=(t.patterns||[]).map(({id:e})=>e),{page:r,total:a,totalPages:o}=t;switch(t.type){case"LOAD_BLOCK_PATTERNS":{const c={...e[t.query]||{},total:a,totalPages:o};return c[r]=n,{...e,[t.query]:c}}case"ERROR_BLOCK_PATTERNS":{const n=e[t.query]||{};return n[r]=[],{...e,[t.q
uery]:n}}default:return e}}var K=Object(s.combineReducers)({patterns:function(e={},t){return{byId:q(e.byId,t),queries:U(e.queries,t)}},categories:function(e,t){switch(t.type){case"FETCH_CATEGORIES":return null;case"LOAD_CATEGORIES":const e=(t.categories||[]).sort((e,t)=>e.name.localeCompare(t.name));return[{id:-1,slug:"",name:Object(i.__)("All","wporg-patterns"),link:wporgPatternsUrl.site},...e]}return e},currentQuery:function(e,t){switch(t.type){case"SET_CURRENT_QUERY":return t.query}return e},patternFlagReasons:function(e,t){switch(t.type){case"FETCH_PATTERN_FLAG_REASONS":return null;case"LOAD_PATTERN_FLAG_REASONS":return[...t.reasons];default:return e}},favorites:function(e=null,t){const{patternId:n}=t;switch(t.type){case"LOAD_FAVORITES":return t.patternIds;case"ADD_FAVORITE":return e.includes(n)?e:[...e,n];case"REMOVE_FAVORITE":return e.filter(e=>e!==n)}return e}})
;function*$(e){const t=Q(e);try{yield N(t);const n=yield Object(x.apiFetch)({path:Object(O.addQueryArgs)("/wp/v2/wporg-pattern",{...e,locale:JSON.parse(wporgLocale)}),parse:!1}),{total:r,totalPages:a,results:o}=yield Object(x.__unstableAwaitPromise)(async function(e){try{var t,n;return{total:Number((null===(t=e.headers)||void 0===t?void 0:t.get("X-WP-Total"))||0),totalPages:Number((null===(n=e.headers)||void 0===n?void 0:n.get("X-WP-TotalPages"))||0),results:await e.json()}}catch(e){return{}}}(n));yield k(t,{page:e.page||1,patterns:o,total:r,totalPages:a})}catch(n){const r=yield Object(x.__unstableAwaitPromise)(async function(e){try{return await e.json()}catch(e){return{}}}(n));yield C(t,{page:e.page||1,error:r})}}function*V(e){try{const t=yield Object(x.apiFetch)({path:Object(O.addQueryArgs)("/wp/v2/wporg-pattern/"+e)});yield T(e,t)}catch(e){}}function*G(){try{yield{type:"FETCH_CATEGORIES"};const e=yield Object(x.apiFetch)({path:Obj
ect(O.addQueryArgs)("/wp/v2/pattern-categories")});yield L(e)}catch(e){}}function*H(){try{yield{type:"FETCH_PATTERN_FLAG_REASONS"};const e=yield Object(x.apiFetch)({path:Object(O.addQueryArgs)("/wp/v2/wporg-pattern-flag-reason")});yield D(e)}catch(e){}}function*z(){try{const e=yield Object(x.apiFetch)({path:"/wporg/v1/pattern-favorites"});yield F(e)}catch(e){}}function W(e,t){var n,r;const a=Q(t),o=(null==t?void 0:t.page)||1;return!Array.isArray(null===(n=e.patterns.queries)||void 0===n||null===(r=n[a])||void 0===r?void 0:r[o])}function Y(e){return Object.values(e.patterns.byId)}function X(e,t){var n,r;const a=Q(t),o=(null==t?void 0:t.page)||1;return((null===(n=e.patterns.queries)||void 0===n||null===(r=n[a])||void 0===r?void 0:r[o])||[]).map(t=>e.patterns.byId[t])}function J(e,t){var n,r;const a=Q(t);return(null===(n=e.patterns.queries)||void 0===n||null===(r=n[a])||void 0===r?void 0:r.total)||0}function Z(e,t){var n,r;const a=Q(t);return(
null===(n=e.patterns.queries)||void 0===n||null===(r=n[a])||void 0===r?void 0:r.totalPages)||0}function ee(e,t){return e.patterns.byId[t]||null}function te(e){return e.currentQuery}function ne(e){return null===e.categories}function re(e){return Array.isArray(e.categories)}function ae(e){return e.categories}function oe(e,t){if(!re(e))return;const[n]=e.categories.filter(e=>e.slug===t);return n}function ce(e,t){if(re(e))return e.categories.find(({id:e})=>t===e)}function ie(e){return e.patternFlagReasons}function se(e){return null===e.patternFlagReasons}function le(e){return e.favorites}function ue(e,t){var n;return null===(n=e.favorites)||void 0===n?void 0:n.includes(t)}function pe(e,t){const n=["categories","author","page","search"],r=Object(O.getQueryArgs)(t),a=j(t,"categories");if(a&&-1===n.indexOf(a)){const t=oe(e,a);null!=t&&t.id&&(r["pattern-categories"]=t.id)}const o=j(t,"author")
;o&&-1===n.indexOf(o)&&(r.author_name=o);const c=_(t);"number"==typeof c&&c>1&&(r.page=c);const i=(e=>decodeURI(j(e,"search")))(t);i.length>0&&-1===n.indexOf(i)&&(r.search=i);const s=j(t,"my-patterns");return s&&"page"!==s&&(r.status=s),r}function de(e,t={},n=wporgPatternsUrl.site){if(n=n.replace(/\/$/,""),t.author_name&&(n+="/author/"+t.author_name,delete t.author_name),t["pattern-categories"]){const r=t["pattern-categories"],a=ae(e).find(({id:e})=>r===e);null!=a&&a.slug&&(n+="/categories/"+a.slug),delete t["pattern-categories"]}return t.page&&(n+="/page/"+t.page,delete t.page),Object.keys(t).length?n+="/?"+Object(O.buildQueryString)(t):n+"/"}const be=Object(s.createReduxStore)("wporg/pattern-directory",{reducer:K,selectors:o,actions:r,co
ntrols:x.controls,resolvers:a});Object(s.register)(be);var ge=function({header:e,children:t,onNavigation:n,query:r,showPagination:a=!0}){const{isLoading:o,posts:i,totalPages:l}=Object(s.useSelect)(e=>{const{getPatternTotalPagesByQuery:t,getPatternsByQuery:n,isLoadingPatternsByQuery:a}=e(be);return{isLoading:r&&a(r),posts:r?n(r):[],totalPages:r?t(r):0}});return Object(c.createElement)(c.Fragment,null,i.length?e:null,Object(c.createElement)("div",{className:"pattern-grid"},o?Object(c.createElement)(h,{length:null==r?void 0:r.per_page}):i.map(t)),a&&Object(c.createElement)(P,{totalPages:l,currentPage:null==r?void 0:r.page,onNavigation:n}))},fe=n(8),me=n(4);function ve(e){e.dir=document.dir,e.body.className="pattern-wrapper";for(const t of document.body.classList)t.startsWith("admin-color-")&&e.body.classList.add(t)}var he=Object(c.forwardRef)((function({contentRef:e,children:t,head:n,headHTML:r,bodyStyle:a="",
themeSlug:o="twentytwentyone",...s},l){const[u,p]=Object(c.useState)();r+=`<link rel="stylesheet" href="https://wp-themes.com/wp-content/themes/${o}/style.css" media="all" />`,r+=`<style>\n body {\n display: flex;\n min-height: 100vh;\n align-items: center;\n justify-content: center;\n background-color: white;\n }\n .pattern-wrapper {\n padding: 0;\n ${a}\n }\n body > div {\n width: 100%;\n max-height: 100%;\n pointer-events: none;\n }\n </style>`;const d=Object(c.useCallback)(t=>{function n(){const{contentDocument:n}=t,{readyState:a,body:o}=n;return("interactive"===a||"complete"===a)&&("function"==typeof e?e(o):e&&(e.current=o),function(e,t){e.head.innerHTML="<style>body{margin:0}</style>"+t}(n,r),ve(n),function(e){const{defaultView:t}=e,{frameElement:n}=t;functi
on r(e){const r=Object.getPrototypeOf(e).constructor.name,a=window[r],o={};for(const t in e)o[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();o.clientX+=e.left,o.clientY+=e.top}const c=new a(e.type,o);!n.dispatchEvent(c)&&e.preventDefault()}const a=["keydown","keypress","dragover"];for(const t of a)e.addEventListener(t,r)}(n),ve(n),p(n),!0)}t&&(n()||t.addEventListener("load",()=>{n()}))},[]);return Object(c.createElement)("iframe",b()({title:Object(i.__)("Pattern Preview","wporg-patterns"),tabIndex:"-1"},s,{ref:Object(fe.useMergeRefs)([l,d])}),u&&Object(c.createPortal)(t,u.body),u&&Object(c.createPortal)(n,u.head))})),Oe=function({html:e}){return Object(c.createElement)("div",null,Object(c.createElement)(he,{className:"pattern-preview__viewport-iframe",style:{width:"100%",height:"50vh",minHeight:"600px
",overflowY:"auto"},headHTML:window.__editorStyles.html},Object(c.createElement)("div",{dangerouslySetInnerHTML:{__html:e}})))},ye=n(5),je=n.n(ye);function _e(e,t){return e.map((function(e,n){return e+t[n]}))}function we(e,t){return e.map((function(e,n){return e-t[n]}))}function Ee(e){return Math.hypot.apply(Math,e)}function Se(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function Pe(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}function xe(e,t,n,r){return void 0===r&&(r=.15),0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-Pe(t-e,n-t,r)+t:e>n?+Pe(e-n,n-t,r)+n:e}function Ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Te(){return(Te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];f
or(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ke(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Ce(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ie(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ae(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.len
gth){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Le(){}function Re(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?Le:1===t.length?t[0]:function(){for(var e,n,r=Ie(t);!(n=r()).done;){var a=n.value;e=a.apply(this,arguments)||e}return e}}function De(e,t){if(void 0===e){if(void 0===t)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function Fe(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}return e}function Me(e,t){void 0===e&&(e={});for(var n={},r=0,a=Object.entries(t);r<a.length;r++){va
r o=a[r],c=o[0],i=o[1];switch(typeof i){case"function":n[c]=i.call(n,e[c],c,e);break;case"object":n[c]=Me(e[c],i);break;case"boolean":i&&(n[c]=e[c])}}return n}function Be(){return"undefined"!=typeof window&&"ontouchstart"in window}function Qe(e){return"pointerId"in e?null:"touchend"===e.type?e.changedTouches:e.targetTouches}function qe(e){return Array.from(Qe(e)).map((function(e){return e.identifier}))}function Ue(e){return{buttons:"buttons"in e?e.buttons:0,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}var Ke=function(e){return e};function $e(e,t){void 0===t&&(t=Ke);var n=Qe(e),r=n?n[0]:e;return t([r.clientX,r.clientY])}var Ve=Te({},{threshold:function(e){return void 0===e&&(e=0),De(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return De(.15);case!1:return De(0);default:return De(e)}},enabled:function(e){return void 0===e&
amp;&(e=!0),e},triggerAllEvents:function(e){return void 0===e&&(e=!1),e},initial:function(e){return void 0===e&&(e=0),"function"==typeof e?e:De(e)},transform:!0},{axis:!0,lockDirection:function(e){return void 0===e&&(e=!1),e},bounds:function(e){if(void 0===e&&(e={}),"function"==typeof e)return function(t){return Ve.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,a=t.right,o=void 0===a?1/0:a,c=t.top,i=void 0===c?-1/0:c,s=t.bottom;return[[r,o],[i,void 0===s?1/0:s]]}}),Ge="undefined"!=typeof window&&window.document&&window.document.createElement,He={enabled:function(e){return void 0===e&&(e=!0),e},domTarget:!0,window:function(e){function t(_x){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return void 0===e&&(e=Ge?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,a=t.capture;return{passive:r,c
apture:void 0!==a&&a}},transform:!0},ze=Te({},Ve,{useTouch:function(e){void 0===e&&(e=!1);var t=Be(),n="undefined"!=typeof window&&"onpointerdown"in window;return!(!e||!t)||!(!t||n)},experimental_preventWindowScrollY:function(e){return void 0===e&&(e=!1),e},threshold:function(e,t,n){var r=n.filterTaps,a=void 0!==r&&r,o=n.lockDirection,c=void 0!==o&&o,i=n.axis,s=De(e,a?3:c||(void 0===i?void 0:i)?1:0);return this.filterTaps=a,s},swipeVelocity:function(e){return void 0===e&&(e=.5),De(e)},swipeDistance:function(e){return void 0===e&&(e=50),De(e)},swipeDuration:function(e){return void 0===e&&(e=250),e},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function We(e){var t,n=e.domTarget,r=e.eventOptions,a=e.window,o=e.enabled,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=
0||(a[n]=e[n]);return a}(e,["domTarget","eventOptions","window","enabled"]),i=(void 0===(t={domTarget:n,eventOptions:r,window:a,enabled:o})&&(t={}),Me(t,He));return i.drag=function(e){return void 0===e&&(e={}),Me(e,ze)}(c),i}function Ye(e){return Te({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_threshold:[0,0],_lastEventType:void 0,_dragStarted:!1,_dragPreventScroll:!1,_dragIsTap:!0,_dragDelayed:!1,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:Le,canceled:!1,memo:void 0,args:void 0},e)}function Xe(){return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1,locked:!1},drag:Ye({_pointerI
d:void 0,axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,tap:!1,swipe:[0,0]}),pinch:Ye({_pointerIds:[],da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:Ye({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:Ye({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:Ye({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var Je=new Map,Ze=function(e){return e};function et(e,t){return Math.abs(e)>=t&&Se(e)*t}function tt(e,t,n){var r=t[0],a=t[1],o=n[0],c=n[1],i=e[0],s=i[0],l=i[1],u=e[1],p=u[0],d=u[1];return[xe(r,s,l,o),xe(a,p,d,c)]}function nt(e,t,n){var r=e.state,a=t.timeStamp,o=t.type,c=r.values;return{_lastEventType:o,event:t,timeStamp:a,elapsedTime:n?0:a-r.startTime,previous:c}}function rt(e,t,n,r){var a=e.state,o=e.config,c=e.stateKey,i=e.args,s=e.transform,l=a.offset,u=n.timeStamp,p=o.initial,d=o.bounds,b=we(s(o.threshold),s([0,0])).map(Math.abs),g=Te({},Xe()[c],{_active:!0,args:i,values:t,initial:null!=r?r:t,_threshold:b,offset:l,lastOffs
et:l,startTime:u});return Te({},g,{_initial:Fe(p,g),_bounds:Fe(d,g)})}var at=function(e){var t=this;this.classes=e,this.pointerIds=new Set,this.touchIds=new Set,this.supportsTouchEvents=Be(),this.supportsGestureEvents=function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),this.bind=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var a,o={},c=Ie(t.classes);!(a=c()).done;){var i=a.value;new i(t,n).addBindings(o)}var s=function(e){bt(o,e,(function(r){return t.nativeRefs[e](Te({},t.state.shared,{event:r,args:n}))}))};for(var l in t.nativeRefs)s(l);return t.config.domTarget?lt(t,o):ut(t,o)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=dt(t.config),n=t.config.eventOptions;e&&ft(e,pt(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,a=e.windowListeners;if(n){for(var o in a){ft(n,a[o],r
)}e.windowListeners={}}}(t)},this.classes=e,this.state=Xe(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function ot(e,t){"pointerId"in t?e.pointerIds.add(t.pointerId):e.touchIds=new Set(qe(t))}function ct(e,t){"pointerId"in t?e.pointerIds.delete(t.pointerId):qe(t).forEach((function(t){return e.touchIds.delete(t)}))}function it(e,t,n){var r=e.config,a=e.windowListeners;void 0===n&&(n=r.eventOptions),r.window&&(ft(r.window,a[t],n),delete a[t])}function st(e,t,n,r){var a=e.config,o=e.windowListeners;void 0===n&&(n=[]),void 0===r&&(r=a.eventOptions),a.window&&(ft(a.window,o[t],r),gt(a.window,o[t]=n,r))}function lt(e,t){var n=e.config,r=e.domListeners,a=dt(n);if(!a)throw new Error("domTarget must be defined");var o=n.eventOptions;ft(a,pt(r),o);for(var c=0,i=Object.entries(t);c<i.length;c++){var s=i[c],l=s[0],u=s[1],p=l.slice(2).toLowerCase();r.push([p,Re.apply(void 0,u)])}gt(a,r,o)}function ut(e,t
){for(var n={},r=e.config.eventOptions.capture?"Capture":"",a=0,o=Object.entries(t);a<o.length;a++){var c=o[a],i=c[0],s=c[1],l=Array.isArray(s)?s:[s];n[i+r]=Re.apply(void 0,l)}return n}function pt(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function dt(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function bt(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function gt(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,a=Ie(t);!(r=a()).done;){var o=r.value,c=o[0],i=o[1];e.addEventListener(c,i,n)}}function ft(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,a=Ie(t);!(r=a()).done;){var o=r.value,c=o[0],i=o[1];e.removeEventListener(c,i,n)}}function mt(){}function vt(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}var ht=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="dragging",t.stateKey="drag",
t.setPointerCapture=function(e){if(!t.config.useTouch&&!document.pointerLockElement){var n=e.target,r=e.pointerId;n&&"setPointerCapture"in n&&n.setPointerCapture(r),t.updateGestureState({_dragTarget:n,_dragPointerId:r})}},t.releasePointerCapture=function(){if(!t.config.useTouch&&!document.pointerLockElement){var e=t.state,n=e._dragTarget,r=e._dragPointerId;if(r&&n&&"releasePointerCapture"in n&&(!("hasPointerCapture"in n)||n.hasPointerCapture(r)))try{n.releasePointerCapture(r)}catch(e){}}},t.preventScroll=function(e){t.state._dragPreventScroll&&e.cancelable&&e.preventDefault()},t.getEventId=function(e){return t.config.useTouch?e.changedTouches[0].identifier:e.pointerId},t.isValidEvent=function(e){return t.state._pointerId===t.getEventId(e)},t.shouldPreventWindowScrollY=t.config.experimental_preventWindowScrollY&&t.controller.supportsTouchEvents,t.setUpWindowScrollDetection=fu
nction(e){vt(e),st(t.controller,t.stateKey,[["touchmove",t.preventScroll],["touchend",t.clean.bind(Ce(t))],["touchcancel",t.clean.bind(Ce(t))]],{passive:!1}),t.setTimeout(t.startDrag.bind(Ce(t)),250,e)},t.setUpDelayedDragTrigger=function(e){t.state._dragDelayed=!0,vt(e),t.setTimeout(t.startDrag.bind(Ce(t)),t.config.delay,e)},t.setStartState=function(e){var n=$e(e,t.transform);t.updateSharedState(Ue(e)),t.updateGestureState(Te({},rt(Ce(t),n,e),nt(Ce(t),e,!0),{_pointerId:t.getEventId(e)})),t.updateGestureState(t.getMovement(n))},t.onDragStart=function(e){ot(t.controller,e),t.enabled&&!t.state._active&&(t.setStartState(e),t.setPointerCapture(e),t.shouldPreventWindowScrollY?t.setUpWindowScrollDetection(e):t.config.delay>0?t.setUpDelayedDragTrigger(e):t.startDrag(e,!0))},t.onDragChange=function(e){if(!t.state.canceled&&t.state._active&&t.isValidEvent(e)&&(t.state._lastEventType!==e.type||e.timeStamp!==t.state.timeSt
amp)){var n;if(document.pointerLockElement){var r=e.movementX,a=e.movementY;n=_e(t.transform([r,a]),t.state.values)}else n=$e(e,t.transform);var o=t.getKinematics(n,e);if(!t.state._dragStarted){if(t.state._dragDelayed)return void t.startDrag(e);if(!t.shouldPreventWindowScrollY)return;if(t.state._dragPreventScroll||!o.axis)return;if("x"!==o.axis)return void(t.state._active=!1);t.startDrag(e)}var c=Ue(e);t.updateSharedState(c);var i=nt(Ce(t),e),s=Ee(o._movement),l=t.state._dragIsTap;l&&s>=3&&(l=!1),t.updateGestureState(Te({},i,o,{_dragIsTap:l})),t.fireGestureHandler()}},t.onDragEnd=function(e){if(ct(t.controller,e),t.isValidEvent(e)&&(t.clean(),t.state._active)){t.state._active=!1;var n=t.state._dragIsTap,r=t.state.velocities,a=r[0],o=r[1],c=t.state.movement,i=c[0],s=c[1],l=t.state._intentional,u=l[0],p=l[1],d=t.config.swipeVelocity,b=d[0],g=d[1],f=t.config.swipeDistance,m=f[0],v=f[1],h=t.config.swipeDuration,O=Te({},nt(Ce(t),e),t.getMovement(t.sta
te.values)),y=[0,0];O.elapsedTime<h&&(!1!==u&&Math.abs(a)>b&&Math.abs(i)>m&&(y[0]=Se(a)),!1!==p&&Math.abs(o)>g&&Math.abs(s)>v&&(y[1]=Se(o))),t.updateSharedState({buttons:0}),t.updateGestureState(Te({},O,{tap:n,swipe:y})),t.fireGestureHandler(t.config.filterTaps&&!0===n)}},t.clean=function(){e.prototype.clean.call(Ce(t)),t.state._dragStarted=!1,t.releasePointerCapture(),it(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0,_active:!1}),t.updateSharedState({buttons:0}),setTimeout((function(){return t.fireGestureHandler()}),0))},t.onClick=function(e){t.state._dragIsTap||e.stopPropagation()},t}ke(t,e);var n=t.prototype;return n.startDrag=function(e,t){void 0===t&&(t=!1),this.state._active&&!this.state._dragStarted&&(t||this.setStartState(e),this.updateGestureState({_dragStarted:!0,_dragPreventScroll:!0,cancel:this.onCancel}),this.clearT
imeout(),this.fireGestureHandler())},n.addBindings=function(e){this.config.useTouch?(bt(e,"onTouchStart",this.onDragStart),bt(e,"onTouchMove",this.onDragChange),bt(e,"onTouchEnd",this.onDragEnd),bt(e,"onTouchCancel",this.onDragEnd)):(bt(e,"onPointerDown",this.onDragStart),bt(e,"onPointerMove",this.onDragChange),bt(e,"onPointerUp",this.onDragEnd),bt(e,"onPointerCancel",this.onDragEnd)),this.config.filterTaps&&bt(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(function(e){function t(){return e.apply(this,arguments)||this}ke(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return we(e,t.initial)},n.checkIntentionality=function(e,t){if(!1===e[0]&&!1===e[1])return{_intentional:e,axis:this.state.axis};var n=t.map(Math.abs),r=n[0],a=n[1],o=this.state.axis||(r>a?"x":r<a?"y":void 0);return thi
s.config.axis||this.config.lockDirection?o?this.config.axis&&o!==this.config.axis?{_intentional:e,_blocked:!0,axis:o}:(e["x"===o?1:0]=!1,{_intentional:e,_blocked:!1,axis:o}):{_intentional:[!1,!1],_blocked:!1,axis:o}:{_intentional:e,_blocked:!1,axis:o}},n.getKinematics=function(e,t){var n=this.getMovement(e);if(!n._blocked){var r=t.timeStamp-this.state.timeStamp;Object.assign(n,function(e,t,n){var r=Ee(t),a=0===r?0:1/r,o=0===n?0:1/n,c=o*r,i=t.map((function(e){return o*e})),s=t.map((function(e){return a*e}));return{velocities:i,velocity:c,distance:Ee(e),direction:s}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(function(){function e(e,t){var n=this;void 0===t&&(t=[]),this.controller=e,this.args=t,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140),clearTimeout(n.controller.timeouts[n.stateKey]);for(var a=arguments.length,o=new Array(a>2?a-2:0),c=2;c<a;c++)o[c-2]=arg
uments[c];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(o))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.fireGestureHandler=function(e){if(void 0===e&&(e=!1),n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;if(!e&&!n.state.intentional&&!n.config.triggerAllEvents)return null;if(n.state.intentional){var t=n.state.active,r=n.state._active;n.state.active=r,n.state.first=r&&!t,n.state.last=t&&!r,n.controller.state.shared[n.ingKey]=r}var a=n.controller.pointerIds.size||n.controller.touchIds.size,o=n.controller.state.shared.buttons>0||a>0,c=Te({},n.controller.state.shared,n.state,n.mapStateValues(n.state),{locked:!!document.pointerLockElement,touches:a,down:o}),i=n.handler(c);return n.state.memo=void 0!==i?i:n.state.memo,c},this.controller=e,this.args=t}var t,n,r=e.prototype;return r.updateSharedState=function(e){Object.assign(this.controller.state.sha
red,e)},r.updateGestureState=function(e){Object.assign(this.state,e)},r.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},r.getMovement=function(e){var t=this.config.rubberband,n=this.state,r=n._bounds,a=n._initial,o=n._active,c=n._intentional,i=n.lastOffset,s=n.movement,l=n._threshold,u=this.getInternalMovement(e,this.state),p=!1===c[0]?et(u[0],l[0]):c[0],d=!1===c[1]?et(u[1],l[1]):c[1],b=this.checkIntentionality([p,d],u);if(b._blocked)return Te({},b,{_movement:u,delta:[0,0]});var g=b._intentional,f=u,m=[!1!==g[0]?u[0]-g[0]:0,!1!==g[1]?u[1]-g[1]:0],v=_e(m,i),h=o?t:[0,0];return m=tt(r,_e(m,a),h),Te({},b,{intentional:!1!==g[0]||!1!==g[1],_initial:a,_movement:f,movement:m,values:e,offset:tt(r,v,h),delta:we(m,s)})},r.clean=function(){this.clearTimeout()},t=e,(n=[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"st
ate",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}},{key:"transform",get:function(){return this.config.transform||this.controller.config.transform||Ze}}])&&Ne(t.prototype,n),e}()));function Ot(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,a,o,c;if(Array.isArray(t)){if((r=t.length)!==n.length)return!1;for(a=r;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if("function"==typeof Map&&t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(c=t.entries();!(a=c.next()).done;)if(!n.has(a.value[0]))return!1;for(c=t.entries();!(a=c.next()).done;)if(!e(a.value[1],n.get(a.value[0])))return!1;return!0}if("function"==typeof Set&&t instanceof Set&&n instanceof Set){if(t.s
ize!==n.size)return!1;for(c=t.entries();!(a=c.next()).done;)if(!n.has(a.value[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(a=r;0!=a--;)if(!Object.prototype.hasOwnProperty.call(n,o[a]))return!1;if("undefined"!=typeof Element&&t instanceof Element)return!1;for(a=r;0!=a--;)if(!("_owner"===o[a]&&t.$$typeof||e(t[o[a]],n[o[a]])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}var yt=n(12),jt=function({label:e,className:t,onDragChange:n,onDragEnd:r,direction:a="left",...o}){const i=function(e,t){void 0===t&&(t
={}),Je.set("drag",ht);var o=Object(ye.useRef)();return o.current||(o.current=function(e,t){var n,r,a=[],o=!1;return function(){for(var c=arguments.length,i=new Array(c),s=0;s<c;s++)i[s]=arguments[s];return o&&n===this&&t(i,a)||(r=e.apply(this,i),o=!0,n=this,a=i),r}}(We,Ot)),function(e,t,n){void 0===n&&(n={});var r=function(e){var t=new Set;return e.drag&&t.add(Je.get("drag")),e.wheel&&t.add(Je.get("wheel")),e.scroll&&t.add(Je.get("scroll")),e.move&&t.add(Je.get("move")),e.pinch&&t.add(Je.get("pinch")),e.hover&&t.add(Je.get("hover")),t}(e),a=je.a.useMemo((function(){return new at(r)}),[]);return a.config=t,a.handlers=e,a.nativeRefs=n,je.a.useEffect(a.effect,[]),a.config.domTarget?mt:a.bind}({drag:({delta:e,dragging:t})=>{const o="left"===a?-2:2;t?n(e[0]*o):r()}},o.current(t))}();return Object(c.createElement)("div",{c
lassName:"pattern-preview__drag-handle "+t},Object(c.createElement)("button",b()({className:"pattern-preview__drag-handle-button","aria-label":e},o,{onKeyDown:e=>{const{keyCode:t}=e;"left"===a&&t===yt.LEFT||"right"===a&&t===yt.RIGHT?n(20):("left"===a&&t===yt.RIGHT||"right"===a&&t===yt.LEFT)&&n(-20)},onKeyUp:r},i())))},_t=function e({blockContent:t}){const n=Object(fe.useViewportMatch)("mobile",">="),r=Object(fe.useViewportMatch)("large",">="),a=Object(fe.useViewportMatch)("wide",">="),o=Object(fe.useInstanceId)(e),[s,l]=Object(c.useState)(window.innerWidth<960?window.innerWidth:960),u=Object(c.useCallback)(e=>l(t=>t+e),[l]),p=()=>{s<280&&l(280)},d=Object(c.useMemo)(()=>n?a?[{label:Object(i.__)("Full (1200px)","wporg-patterns"),value:1200},{label:Obj
ect(i.__)("Default (960px)","wporg-patterns"),value:960},{label:Object(i.__)("Medium (480px)","wporg-patterns"),value:480},{label:Object(i.__)("Narrow (320px)","wporg-patterns"),value:320}]:r?[{label:Object(i.__)("Default (960px)","wporg-patterns"),value:960},{label:Object(i.__)("Medium (480px)","wporg-patterns"),value:480},{label:Object(i.__)("Narrow (320px)","wporg-patterns"),value:320}]:[{label:Object(i.__)("Medium (480px)","wporg-patterns"),value:480},{label:Object(i.__)("Narrow (320px)","wporg-patterns"),value:320}]:[],[n,r,a]);let b=!1;if(!d.some(e=>e.value===s)){const e=Math.max(Math.floor(s),280);b={
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function
(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.url},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.dataControls},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var c=a.apply(null,r);c&&e.push(c)}}else if("object"===o)if(r.toString===Object.prototype.toString)for(var i in r)n.call(r,i)&&r[i]&&e.push(i);else e.push(r.toString())}}return e.join(" ")}e.exports?(a.default=
a,e.exports=a):void 0===(r=function(){return a}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.wp.compose},function(e,t){e.exports=window.wp.primitives},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.a11y},function(e,t){e.exports=window.wp.keycodes},function(e,t){e.exports=window.lodash},function(e,t){e.exports=window.wp.coreData},function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=window.wp.apiFetch},function(e,t){e.exports=window.wp.dom},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"fetchPatterns",(function(){return N})),n.d(r,"loadPattern",(function(){return T})
),n.d(r,"loadPatterns",(function(){return k})),n.d(r,"setErrorPatterns",(function(){return C})),n.d(r,"setCurrentQuery",(function(){return A})),n.d(r,"fetchCategories",(function(){return I})),n.d(r,"loadCategories",(function(){return L})),n.d(r,"fetchPatternFlagReasons",(function(){return R})),n.d(r,"loadPatternFlagReasons",(function(){return D})),n.d(r,"loadFavorites",(function(){return F})),n.d(r,"addFavorite",(function(){return M})),n.d(r,"removeFavorite",(function(){return B}));var a={};n.r(a),n.d(a,"getPatternsByQuery",(function(){return $})),n.d(a,"getPattern",(function(){return V})),n.d(a,"getCategories",(function(){return G})),n.d(a,"getPatternFlagReasons",(function(){return H})),n.d(a,"getFavorites",(function(){return z}));var o={};n.r(o),n.d(o,"isLoadingPatternsByQuery",(function(){return W})),n.d(o,"getPattern
s",(function(){return Y})),n.d(o,"getPatternsByQuery",(function(){return X})),n.d(o,"getPatternTotalsByQuery",(function(){return J})),n.d(o,"getPatternTotalPagesByQuery",(function(){return Z})),n.d(o,"getPattern",(function(){return ee})),n.d(o,"getCurrentQuery",(function(){return te})),n.d(o,"isLoadingCategories",(function(){return ne})),n.d(o,"hasLoadedCategories",(function(){return re})),n.d(o,"getCategories",(function(){return ae})),n.d(o,"getCategoryBySlug",(function(){return oe})),n.d(o,"getCategoryById",(function(){return ce})),n.d(o,"getPatternFlagReasons",(function(){return ie})),n.d(o,"isLoadingPatternFlagReasons",(function(){return se})),n.d(o,"getFavorites",(function(){return le})),n.d(o,"isFavorite",(function(){return ue})),n.d(o,"getQueryFromUrl",(function(){return pe})),n.d(o,"getUrlFromQuery",(function(){r
eturn de}));var c=n(0),i=n(1),s=n(2),l=({name:e,url:t,avatar:n})=>Object(c.createElement)("a",{href:t,className:"pattern__author-avatar"},Object(c.createElement)("img",{alt:"",src:n}),e);const u=({className:e="",style:t,children:n})=>Object(c.createElement)("span",{className:e+" pattern-skeleton__container",style:t},n),p=e=>Object(c.createElement)("span",{className:"pattern-skeleton",style:e});var d=n(10),b=n.n(d),g=n(9),f=function(e){return Object(c.createElement)(g.SVG,b()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},e),Object(c.createElement)(g.Path,{d:"M11.941 21.175l-1.443-1.32c-5.124-4.67-8.508-7.75-8.508-11.53 0-3.08 2.408-5.5 5.473-5.5 1.732 0 3.394.81 4.478 2.09 1.085-1.28 2.747-2.09 4.478-2.09 3.065 0 5.473 2.42 5.473 5.5 0 3.78-3.383 6.86-8.508 11.54l-1.443 1.31z"}))};function m(e){return e*
(2/3)}const h=()=>{const[e,t]=Object(c.useState)(),n=Object(c.useRef)();return Object(c.useEffect)(()=>{n.current&&t(m(n.current.clientWidth)+"px")},[n]),Object(c.createElement)("div",{ref:n},Object(c.createElement)(u,null,Object(c.createElement)(p,{height:e}),Object(c.createElement)(p,{height:"14px",marginTop:"1rem"}),Object(c.createElement)(u,{style:{flexDirection:"row",marginTop:"0.5rem",alignItems:"center"}},Object(c.createElement)(p,{height:"18px",width:"18px",marginRight:"0.5rem",borderRadius:"32px"}),Object(c.createElement)(p,{height:"12px",width:"100px",marginRight:"0.75rem"}),Object(c.createElement)(f,{width:"16px",height:"16px",fill:"#787c82",className:"pattern-favorite-button__filled"}),Object(c.createElement)(p,{height:"12px",width:"32px",marginLeft:"0.5re
m"}))))};var v=({length:e=6})=>Array(e).fill().map((e,t)=>Object(c.createElement)(h,{key:t})),O=n(3);const y=e=>e.split("?")[0],j=(e,t)=>{if(!t||!e)return"";const n=Object(O.getQueryArgs)(e);if(n[t])return n[t];const r=(e=>e.replace(/^\//,""))(y(e).replace(/\/$/,"")).split("/"),a=r.indexOf(t);return-1===a?"":r[a+1]||""},_=e=>Number(j(e,"page")||1),w=Object(c.createContext)();function E({children:e}){const[t,n]=Object(c.useState)(Object(O.getPathAndQueryString)(window.location.href)),r=e=>{window.history.pushState("","",e),n(e)},a=()=>{n(document.location.href)};return Object(c.useEffect)(()=>(window.addEventListener("popstate",a),()=>{window.removeEventListener("popstate",a)}),[]),Object(c.createElement)(w.Provider,{value:{path:t,update:e=>{const n=(e=>(e=>{const t={};return Object.keys(e).forEach(n=>{const r=e[n];null
!=r&&r.toString().length>0&&(t[n]=r)}),t})({...Object(O.getQueryArgs)(t),...Object(O.getQueryArgs)(e)}))(e),a=y(e),o=Object(O.addQueryArgs)(a,n);r(o)},replace:r}},e)}function S(){const e=Object(c.useContext)(w);if(void 0===e)throw new Error("useRoute must be used within a Provider");return e}function P({currentPage:e=1,onNavigation:t,totalPages:n}){const{path:r,update:a}=S();if(!n||n<=1)return null;const o=e>1,s=e<n,l=Object(O.getQueryString)(r)?"?"+Object(O.getQueryString)(r):"",u=r.replace(l,"").replace(/page\/\d+\/?/,""),p=function(e,t=1){const n=Array.from({length:e},(e,t)=>t+1),r=[];return e<=5?n:(r.push(...n.slice(0,2)),t>=2&&t<=e-1&&r.push(...n.slice(t-2,t+1)),r.push(...n.slice(-2)),r.filter((e,t,n)=>n.indexOf(e)===t).reduce((e,t,n,r)=>{if(0===n)return e.push(t),e;const a=Math.abs(r[n]-r[n-1]);return 0===a||(a>1&&e.push("…"),e.push(t)),e},[]))
}(n,e),d=`${u}page/%s/${l}`,b=e=>1===e?`${u}${l}`:Object(i.sprintf)(d,e),g=(e,n)=>{e.preventDefault(),a(b(n)),"function"==typeof t&&t()};return Object(c.createElement)("nav",{className:"pagination","aria-label":Object(i.__)("Pagination","wporg-patterns")},Object(c.createElement)("ul",{className:"pagination__list"},Object(c.createElement)("li",{className:"pagination__item pagination__item-previous-page"},o&&Object(c.createElement)("a",{className:"pagination__link",href:b(e-1),onClick:t=>g(t,e-1)},Object(c.createElement)("span",{className:"screen-reader-text"},Object(i.__)("Previous page","wporg-patterns")),Object(c.createElement)("span",{"aria-hidden":!0},Object(i._x)("Previous","previous page link label","wporg-patterns")))),p.map((t,n)=>"…&q
uot;===t?Object(c.createElement)("li",{className:"pagination__item",key:`${n}-${t}`},t):Object(c.createElement)("li",{className:"pagination__item",key:t},Object(c.createElement)("a",{className:"pagination__link",href:b(t),"aria-current":t===e?"page":void 0,onClick:e=>g(e,t)},Object(c.createElement)("span",{className:"screen-reader-text"},Object(i.sprintf)(// translators: %s is the page number.
+Object(i.__)("Page %s","wporg-patterns"),t)),Object(c.createElement)("span",{"aria-hidden":!0},t)))),Object(c.createElement)("li",{className:"pagination__item pagination__item-next-page"},s&&Object(c.createElement)("a",{className:"pagination__link",href:b(e+1),onClick:t=>g(t,e+1)},Object(c.createElement)("span",{className:"screen-reader-text"},Object(i.__)("Next page","wporg-patterns")),Object(c.createElement)("span",{"aria-hidden":!0},Object(i._x)("Next","next page link label","wporg-patterns"))))))}var x=n(6);function N(e){return{type:"FETCH_BLOCK_PATTERNS",query:e}}function T(e,t){return{type:"LOAD_BLOCK_PATTERN",postId:e,pattern:t}}function k(e,{page:t,patterns:n,total:r,totalPages:a}){return{type:"LOAD_BLOCK_PATTERNS",query:e,page:t,patterns:n,total:r,totalPages:a}}funct
ion C(e,{page:t,error:n}){return{type:"ERROR_BLOCK_PATTERNS",query:e,page:t,error:n}}function A(e){return{type:"SET_CURRENT_QUERY",query:e}}function I(){return{type:"FETCH_CATEGORIES"}}function L(e){return{type:"LOAD_CATEGORIES",categories:e}}function R(){return{type:"FETCH_PATTERN_FLAG_REASONS"}}function D(e){return{type:"LOAD_PATTERN_FLAG_REASONS",reasons:e}}function F(e){return{type:"LOAD_FAVORITES",patternIds:e}}function*M(e){const t=yield Object(x.apiFetch)({path:"/wporg/v1/pattern-favorites",method:"POST",data:{id:e}});if("number"==typeof t)return{type:"ADD_FAVORITE",patternId:e,count:t}}function*B(e){const t=yield Object(x.apiFetch)({path:"/wporg/v1/pattern-favorites",method:"DELETE",data:{id:e}});if("number"==typeof t)return{type:"REMOVE_FAVORITE",patternId:e,count:t}}function Q(e={}){const t=Object.keys(e).sort();let n="&
quot;;for(let r=0;r<t.length;r++){const a=t[r];let o=e[a];switch(Array.isArray(o)&&(o=e[a].join()),a){case"page":case"per_page":case"_fields":break;default:n+=(n?"&":"")+Object(O.addQueryArgs)("",{[a]:o}).slice(1)}}return n}function q(e={},t){switch(t.type){case"LOAD_BLOCK_PATTERNS":{const n=(t.patterns||[]).reduce((e,t)=>({...e,[t.id]:t}),{});return{...e,...n}}case"LOAD_BLOCK_PATTERN":return{...e,[t.postId]:t.pattern};case"ADD_FAVORITE":case"REMOVE_FAVORITE":{const n={...e[t.patternId],favorite_count:t.count};return{...e,[t.patternId]:n}}default:return e}}function U(e={},t){const n=(t.patterns||[]).map(({id:e})=>e),{page:r,total:a,totalPages:o}=t;switch(t.type){case"LOAD_BLOCK_PATTERNS":{const c={...e[t.query]||{},total:a,totalPages:o};return c[r]=n,{...e,[t.query]:c}}case"ERROR_BLOCK_PATTERNS":{const n=e[t.query]||{};return n[r]=[],{...e,[t.q
uery]:n}}default:return e}}var K=Object(s.combineReducers)({patterns:function(e={},t){return{byId:q(e.byId,t),queries:U(e.queries,t)}},categories:function(e,t){switch(t.type){case"FETCH_CATEGORIES":return null;case"LOAD_CATEGORIES":const e=(t.categories||[]).sort((e,t)=>e.name.localeCompare(t.name));return[{id:-1,slug:"",name:Object(i.__)("All","wporg-patterns"),link:wporgPatternsUrl.site},...e]}return e},currentQuery:function(e,t){switch(t.type){case"SET_CURRENT_QUERY":return t.query}return e},patternFlagReasons:function(e,t){switch(t.type){case"FETCH_PATTERN_FLAG_REASONS":return null;case"LOAD_PATTERN_FLAG_REASONS":return[...t.reasons];default:return e}},favorites:function(e=null,t){const{patternId:n}=t;switch(t.type){case"LOAD_FAVORITES":return t.patternIds;case"ADD_FAVORITE":return e.includes(n)?e:[...e,n];case"REMOVE_FAVORITE":return e.filter(e=>e!==n)}return e}})
;function*$(e){const t=Q(e);try{yield N(t);const n=yield Object(x.apiFetch)({path:Object(O.addQueryArgs)("/wp/v2/wporg-pattern",{...e,locale:JSON.parse(wporgLocale)}),parse:!1}),{total:r,totalPages:a,results:o}=yield Object(x.__unstableAwaitPromise)(async function(e){try{var t,n;return{total:Number((null===(t=e.headers)||void 0===t?void 0:t.get("X-WP-Total"))||0),totalPages:Number((null===(n=e.headers)||void 0===n?void 0:n.get("X-WP-TotalPages"))||0),results:await e.json()}}catch(e){return{}}}(n));yield k(t,{page:e.page||1,patterns:o,total:r,totalPages:a})}catch(n){const r=yield Object(x.__unstableAwaitPromise)(async function(e){try{return await e.json()}catch(e){return{}}}(n));yield C(t,{page:e.page||1,error:r})}}function*V(e){try{const t=yield Object(x.apiFetch)({path:Object(O.addQueryArgs)("/wp/v2/wporg-pattern/"+e)});yield T(e,t)}catch(e){}}function*G(){try{yield{type:"FETCH_CATEGORIES"};const e=yield Object(x.apiFetch)({path:Obj
ect(O.addQueryArgs)("/wp/v2/pattern-categories")});yield L(e)}catch(e){}}function*H(){try{yield{type:"FETCH_PATTERN_FLAG_REASONS"};const e=yield Object(x.apiFetch)({path:Object(O.addQueryArgs)("/wp/v2/wporg-pattern-flag-reason")});yield D(e)}catch(e){}}function*z(){try{const e=yield Object(x.apiFetch)({path:"/wporg/v1/pattern-favorites"});yield F(e)}catch(e){}}function W(e,t){var n,r;const a=Q(t),o=(null==t?void 0:t.page)||1;return!Array.isArray(null===(n=e.patterns.queries)||void 0===n||null===(r=n[a])||void 0===r?void 0:r[o])}function Y(e){return Object.values(e.patterns.byId)}function X(e,t){var n,r;const a=Q(t),o=(null==t?void 0:t.page)||1;return((null===(n=e.patterns.queries)||void 0===n||null===(r=n[a])||void 0===r?void 0:r[o])||[]).map(t=>e.patterns.byId[t])}function J(e,t){var n,r;const a=Q(t);return(null===(n=e.patterns.queries)||void 0===n||null===(r=n[a])||void 0===r?void 0:r.total)||0}function Z(e,t){var n,r;const a=Q(t);return(
null===(n=e.patterns.queries)||void 0===n||null===(r=n[a])||void 0===r?void 0:r.totalPages)||0}function ee(e,t){return e.patterns.byId[t]||null}function te(e){return e.currentQuery}function ne(e){return null===e.categories}function re(e){return Array.isArray(e.categories)}function ae(e){return e.categories}function oe(e,t){if(!re(e))return;const[n]=e.categories.filter(e=>e.slug===t);return n}function ce(e,t){if(re(e))return e.categories.find(({id:e})=>t===e)}function ie(e){return e.patternFlagReasons}function se(e){return null===e.patternFlagReasons}function le(e){return e.favorites}function ue(e,t){var n;return null===(n=e.favorites)||void 0===n?void 0:n.includes(t)}function pe(e,t){const n=["categories","author","page","search"],r=Object(O.getQueryArgs)(t),a=j(t,"categories");if(a&&-1===n.indexOf(a)){const t=oe(e,a);null!=t&&t.id&&(r["pattern-categories"]=t.id)}const o=j(t,"author")
;o&&-1===n.indexOf(o)&&(r.author_name=o);const c=_(t);"number"==typeof c&&c>1&&(r.page=c);const i=(e=>decodeURI(j(e,"search")))(t);i.length>0&&-1===n.indexOf(i)&&(r.search=i);const s=j(t,"my-patterns");return s&&"page"!==s&&(r.status=s),r}function de(e,t={},n=wporgPatternsUrl.site){if(n=n.replace(/\/$/,""),t.author_name&&(n+="/author/"+t.author_name,delete t.author_name),t["pattern-categories"]){const r=t["pattern-categories"],a=ae(e).find(({id:e})=>r===e);null!=a&&a.slug&&(n+="/categories/"+a.slug),delete t["pattern-categories"]}return t.page&&(n+="/page/"+t.page,delete t.page),Object.keys(t).length?n+="/?"+Object(O.buildQueryString)(t):n+"/"}const be=Object(s.createReduxStore)("wporg/pattern-directory",{reducer:K,selectors:o,actions:r,co
ntrols:x.controls,resolvers:a});Object(s.register)(be);var ge=function({header:e,children:t,onNavigation:n,query:r,showPagination:a=!0}){const{isLoading:o,posts:i,totalPages:l}=Object(s.useSelect)(e=>{const{getPatternTotalPagesByQuery:t,getPatternsByQuery:n,isLoadingPatternsByQuery:a}=e(be);return{isLoading:r&&a(r),posts:r?n(r):[],totalPages:r?t(r):0}});return Object(c.createElement)(c.Fragment,null,i.length?e:null,Object(c.createElement)("div",{className:"pattern-grid"},o?Object(c.createElement)(v,{length:null==r?void 0:r.per_page}):i.map(t)),a&&Object(c.createElement)(P,{totalPages:l,currentPage:null==r?void 0:r.page,onNavigation:n}))},fe=n(8),me=n(4);function he(e){e.dir=document.dir,e.body.className="pattern-wrapper";for(const t of document.body.classList)t.startsWith("admin-color-")&&e.body.classList.add(t)}var ve=Object(c.forwardRef)((function({contentRef:e,children:t,head:n,headHTML:r,bodyStyle:a="",
themeSlug:o="twentytwentyone",...s},l){const[u,p]=Object(c.useState)();r+=`<link rel="stylesheet" href="https://wp-themes.com/wp-content/themes/${o}/style.css" media="all" />`,r+=`<style>\n body {\n display: flex;\n min-height: 100vh;\n align-items: center;\n justify-content: center;\n background-color: white;\n }\n .pattern-wrapper {\n padding: 0;\n ${a}\n }\n body > div {\n width: 100%;\n max-height: 100%;\n pointer-events: none;\n }\n </style>`;const d=Object(c.useCallback)(t=>{function n(){const{contentDocument:n}=t,{readyState:a,body:o}=n;return("interactive"===a||"complete"===a)&&("function"==typeof e?e(o):e&&(e.current=o),function(e,t){e.head.innerHTML="<style>body{margin:0}</style>"+t}(n,r),he(n),function(e){const{defaultView:t}=e,{frameElement:n}=t;functi
on r(e){const r=Object.getPrototypeOf(e).constructor.name,a=window[r],o={};for(const t in e)o[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();o.clientX+=e.left,o.clientY+=e.top}const c=new a(e.type,o);!n.dispatchEvent(c)&&e.preventDefault()}const a=["keydown","keypress","dragover"];for(const t of a)e.addEventListener(t,r)}(n),he(n),p(n),!0)}t&&(n()||t.addEventListener("load",()=>{n()}))},[]);return Object(c.createElement)("iframe",b()({title:Object(i.__)("Pattern Preview","wporg-patterns"),tabIndex:"-1"},s,{ref:Object(fe.useMergeRefs)([l,d])}),u&&Object(c.createPortal)(t,u.body),u&&Object(c.createPortal)(n,u.head))})),Oe=function({html:e}){return Object(c.createElement)("div",null,Object(c.createElement)(ve,{className:"pattern-preview__viewport-iframe",style:{width:"100%",height:"50vh",minHeight:"600px
",overflowY:"auto"},headHTML:window.__editorStyles.html},Object(c.createElement)("div",{dangerouslySetInnerHTML:{__html:e}})))},ye=n(5),je=n.n(ye);function _e(e,t){return e.map((function(e,n){return e+t[n]}))}function we(e,t){return e.map((function(e,n){return e-t[n]}))}function Ee(e){return Math.hypot.apply(Math,e)}function Se(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function Pe(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}function xe(e,t,n,r){return void 0===r&&(r=.15),0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-Pe(t-e,n-t,r)+t:e>n?+Pe(e-n,n-t,r)+n:e}function Ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Te(){return(Te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];f
or(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ke(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Ce(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ie(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ae(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.len
gth){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Le(){}function Re(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?Le:1===t.length?t[0]:function(){for(var e,n,r=Ie(t);!(n=r()).done;){var a=n.value;e=a.apply(this,arguments)||e}return e}}function De(e,t){if(void 0===e){if(void 0===t)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function Fe(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}return e}function Me(e,t){void 0===e&&(e={});for(var n={},r=0,a=Object.entries(t);r<a.length;r++){va
r o=a[r],c=o[0],i=o[1];switch(typeof i){case"function":n[c]=i.call(n,e[c],c,e);break;case"object":n[c]=Me(e[c],i);break;case"boolean":i&&(n[c]=e[c])}}return n}function Be(){return"undefined"!=typeof window&&"ontouchstart"in window}function Qe(e){return"pointerId"in e?null:"touchend"===e.type?e.changedTouches:e.targetTouches}function qe(e){return Array.from(Qe(e)).map((function(e){return e.identifier}))}function Ue(e){return{buttons:"buttons"in e?e.buttons:0,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}var Ke=function(e){return e};function $e(e,t){void 0===t&&(t=Ke);var n=Qe(e),r=n?n[0]:e;return t([r.clientX,r.clientY])}var Ve=Te({},{threshold:function(e){return void 0===e&&(e=0),De(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return De(.15);case!1:return De(0);default:return De(e)}},enabled:function(e){return void 0===e&
amp;&(e=!0),e},triggerAllEvents:function(e){return void 0===e&&(e=!1),e},initial:function(e){return void 0===e&&(e=0),"function"==typeof e?e:De(e)},transform:!0},{axis:!0,lockDirection:function(e){return void 0===e&&(e=!1),e},bounds:function(e){if(void 0===e&&(e={}),"function"==typeof e)return function(t){return Ve.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,a=t.right,o=void 0===a?1/0:a,c=t.top,i=void 0===c?-1/0:c,s=t.bottom;return[[r,o],[i,void 0===s?1/0:s]]}}),Ge="undefined"!=typeof window&&window.document&&window.document.createElement,He={enabled:function(e){return void 0===e&&(e=!0),e},domTarget:!0,window:function(e){function t(_x){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return void 0===e&&(e=Ge?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,a=t.capture;return{passive:r,c
apture:void 0!==a&&a}},transform:!0},ze=Te({},Ve,{useTouch:function(e){void 0===e&&(e=!1);var t=Be(),n="undefined"!=typeof window&&"onpointerdown"in window;return!(!e||!t)||!(!t||n)},experimental_preventWindowScrollY:function(e){return void 0===e&&(e=!1),e},threshold:function(e,t,n){var r=n.filterTaps,a=void 0!==r&&r,o=n.lockDirection,c=void 0!==o&&o,i=n.axis,s=De(e,a?3:c||(void 0===i?void 0:i)?1:0);return this.filterTaps=a,s},swipeVelocity:function(e){return void 0===e&&(e=.5),De(e)},swipeDistance:function(e){return void 0===e&&(e=50),De(e)},swipeDuration:function(e){return void 0===e&&(e=250),e},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function We(e){var t,n=e.domTarget,r=e.eventOptions,a=e.window,o=e.enabled,c=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=
0||(a[n]=e[n]);return a}(e,["domTarget","eventOptions","window","enabled"]),i=(void 0===(t={domTarget:n,eventOptions:r,window:a,enabled:o})&&(t={}),Me(t,He));return i.drag=function(e){return void 0===e&&(e={}),Me(e,ze)}(c),i}function Ye(e){return Te({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_threshold:[0,0],_lastEventType:void 0,_dragStarted:!1,_dragPreventScroll:!1,_dragIsTap:!0,_dragDelayed:!1,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:Le,canceled:!1,memo:void 0,args:void 0},e)}function Xe(){return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1,locked:!1},drag:Ye({_pointerI
d:void 0,axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,tap:!1,swipe:[0,0]}),pinch:Ye({_pointerIds:[],da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:Ye({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:Ye({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:Ye({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var Je=new Map,Ze=function(e){return e};function et(e,t){return Math.abs(e)>=t&&Se(e)*t}function tt(e,t,n){var r=t[0],a=t[1],o=n[0],c=n[1],i=e[0],s=i[0],l=i[1],u=e[1],p=u[0],d=u[1];return[xe(r,s,l,o),xe(a,p,d,c)]}function nt(e,t,n){var r=e.state,a=t.timeStamp,o=t.type,c=r.values;return{_lastEventType:o,event:t,timeStamp:a,elapsedTime:n?0:a-r.startTime,previous:c}}function rt(e,t,n,r){var a=e.state,o=e.config,c=e.stateKey,i=e.args,s=e.transform,l=a.offset,u=n.timeStamp,p=o.initial,d=o.bounds,b=we(s(o.threshold),s([0,0])).map(Math.abs),g=Te({},Xe()[c],{_active:!0,args:i,values:t,initial:null!=r?r:t,_threshold:b,offset:l,lastOffs
et:l,startTime:u});return Te({},g,{_initial:Fe(p,g),_bounds:Fe(d,g)})}var at=function(e){var t=this;this.classes=e,this.pointerIds=new Set,this.touchIds=new Set,this.supportsTouchEvents=Be(),this.supportsGestureEvents=function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),this.bind=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var a,o={},c=Ie(t.classes);!(a=c()).done;){var i=a.value;new i(t,n).addBindings(o)}var s=function(e){bt(o,e,(function(r){return t.nativeRefs[e](Te({},t.state.shared,{event:r,args:n}))}))};for(var l in t.nativeRefs)s(l);return t.config.domTarget?lt(t,o):ut(t,o)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=dt(t.config),n=t.config.eventOptions;e&&ft(e,pt(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,a=e.windowListeners;if(n){for(var o in a){ft(n,a[o],r
)}e.windowListeners={}}}(t)},this.classes=e,this.state=Xe(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function ot(e,t){"pointerId"in t?e.pointerIds.add(t.pointerId):e.touchIds=new Set(qe(t))}function ct(e,t){"pointerId"in t?e.pointerIds.delete(t.pointerId):qe(t).forEach((function(t){return e.touchIds.delete(t)}))}function it(e,t,n){var r=e.config,a=e.windowListeners;void 0===n&&(n=r.eventOptions),r.window&&(ft(r.window,a[t],n),delete a[t])}function st(e,t,n,r){var a=e.config,o=e.windowListeners;void 0===n&&(n=[]),void 0===r&&(r=a.eventOptions),a.window&&(ft(a.window,o[t],r),gt(a.window,o[t]=n,r))}function lt(e,t){var n=e.config,r=e.domListeners,a=dt(n);if(!a)throw new Error("domTarget must be defined");var o=n.eventOptions;ft(a,pt(r),o);for(var c=0,i=Object.entries(t);c<i.length;c++){var s=i[c],l=s[0],u=s[1],p=l.slice(2).toLowerCase();r.push([p,Re.apply(void 0,u)])}gt(a,r,o)}function ut(e,t
){for(var n={},r=e.config.eventOptions.capture?"Capture":"",a=0,o=Object.entries(t);a<o.length;a++){var c=o[a],i=c[0],s=c[1],l=Array.isArray(s)?s:[s];n[i+r]=Re.apply(void 0,l)}return n}function pt(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function dt(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function bt(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function gt(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,a=Ie(t);!(r=a()).done;){var o=r.value,c=o[0],i=o[1];e.addEventListener(c,i,n)}}function ft(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,a=Ie(t);!(r=a()).done;){var o=r.value,c=o[0],i=o[1];e.removeEventListener(c,i,n)}}function mt(){}function ht(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}var vt=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="dragging",t.stateKey="drag",
t.setPointerCapture=function(e){if(!t.config.useTouch&&!document.pointerLockElement){var n=e.target,r=e.pointerId;n&&"setPointerCapture"in n&&n.setPointerCapture(r),t.updateGestureState({_dragTarget:n,_dragPointerId:r})}},t.releasePointerCapture=function(){if(!t.config.useTouch&&!document.pointerLockElement){var e=t.state,n=e._dragTarget,r=e._dragPointerId;if(r&&n&&"releasePointerCapture"in n&&(!("hasPointerCapture"in n)||n.hasPointerCapture(r)))try{n.releasePointerCapture(r)}catch(e){}}},t.preventScroll=function(e){t.state._dragPreventScroll&&e.cancelable&&e.preventDefault()},t.getEventId=function(e){return t.config.useTouch?e.changedTouches[0].identifier:e.pointerId},t.isValidEvent=function(e){return t.state._pointerId===t.getEventId(e)},t.shouldPreventWindowScrollY=t.config.experimental_preventWindowScrollY&&t.controller.supportsTouchEvents,t.setUpWindowScrollDetection=fu
nction(e){ht(e),st(t.controller,t.stateKey,[["touchmove",t.preventScroll],["touchend",t.clean.bind(Ce(t))],["touchcancel",t.clean.bind(Ce(t))]],{passive:!1}),t.setTimeout(t.startDrag.bind(Ce(t)),250,e)},t.setUpDelayedDragTrigger=function(e){t.state._dragDelayed=!0,ht(e),t.setTimeout(t.startDrag.bind(Ce(t)),t.config.delay,e)},t.setStartState=function(e){var n=$e(e,t.transform);t.updateSharedState(Ue(e)),t.updateGestureState(Te({},rt(Ce(t),n,e),nt(Ce(t),e,!0),{_pointerId:t.getEventId(e)})),t.updateGestureState(t.getMovement(n))},t.onDragStart=function(e){ot(t.controller,e),t.enabled&&!t.state._active&&(t.setStartState(e),t.setPointerCapture(e),t.shouldPreventWindowScrollY?t.setUpWindowScrollDetection(e):t.config.delay>0?t.setUpDelayedDragTrigger(e):t.startDrag(e,!0))},t.onDragChange=function(e){if(!t.state.canceled&&t.state._active&&t.isValidEvent(e)&&(t.state._lastEventType!==e.type||e.timeStamp!==t.state.timeSt
amp)){var n;if(document.pointerLockElement){var r=e.movementX,a=e.movementY;n=_e(t.transform([r,a]),t.state.values)}else n=$e(e,t.transform);var o=t.getKinematics(n,e);if(!t.state._dragStarted){if(t.state._dragDelayed)return void t.startDrag(e);if(!t.shouldPreventWindowScrollY)return;if(t.state._dragPreventScroll||!o.axis)return;if("x"!==o.axis)return void(t.state._active=!1);t.startDrag(e)}var c=Ue(e);t.updateSharedState(c);var i=nt(Ce(t),e),s=Ee(o._movement),l=t.state._dragIsTap;l&&s>=3&&(l=!1),t.updateGestureState(Te({},i,o,{_dragIsTap:l})),t.fireGestureHandler()}},t.onDragEnd=function(e){if(ct(t.controller,e),t.isValidEvent(e)&&(t.clean(),t.state._active)){t.state._active=!1;var n=t.state._dragIsTap,r=t.state.velocities,a=r[0],o=r[1],c=t.state.movement,i=c[0],s=c[1],l=t.state._intentional,u=l[0],p=l[1],d=t.config.swipeVelocity,b=d[0],g=d[1],f=t.config.swipeDistance,m=f[0],h=f[1],v=t.config.swipeDuration,O=Te({},nt(Ce(t),e),t.getMovement(t.sta
te.values)),y=[0,0];O.elapsedTime<v&&(!1!==u&&Math.abs(a)>b&&Math.abs(i)>m&&(y[0]=Se(a)),!1!==p&&Math.abs(o)>g&&Math.abs(s)>h&&(y[1]=Se(o))),t.updateSharedState({buttons:0}),t.updateGestureState(Te({},O,{tap:n,swipe:y})),t.fireGestureHandler(t.config.filterTaps&&!0===n)}},t.clean=function(){e.prototype.clean.call(Ce(t)),t.state._dragStarted=!1,t.releasePointerCapture(),it(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0,_active:!1}),t.updateSharedState({buttons:0}),setTimeout((function(){return t.fireGestureHandler()}),0))},t.onClick=function(e){t.state._dragIsTap||e.stopPropagation()},t}ke(t,e);var n=t.prototype;return n.startDrag=function(e,t){void 0===t&&(t=!1),this.state._active&&!this.state._dragStarted&&(t||this.setStartState(e),this.updateGestureState({_dragStarted:!0,_dragPreventScroll:!0,cancel:this.onCancel}),this.clearT
imeout(),this.fireGestureHandler())},n.addBindings=function(e){this.config.useTouch?(bt(e,"onTouchStart",this.onDragStart),bt(e,"onTouchMove",this.onDragChange),bt(e,"onTouchEnd",this.onDragEnd),bt(e,"onTouchCancel",this.onDragEnd)):(bt(e,"onPointerDown",this.onDragStart),bt(e,"onPointerMove",this.onDragChange),bt(e,"onPointerUp",this.onDragEnd),bt(e,"onPointerCancel",this.onDragEnd)),this.config.filterTaps&&bt(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(function(e){function t(){return e.apply(this,arguments)||this}ke(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return we(e,t.initial)},n.checkIntentionality=function(e,t){if(!1===e[0]&&!1===e[1])return{_intentional:e,axis:this.state.axis};var n=t.map(Math.abs),r=n[0],a=n[1],o=this.state.axis||(r>a?"x":r<a?"y":void 0);return thi
s.config.axis||this.config.lockDirection?o?this.config.axis&&o!==this.config.axis?{_intentional:e,_blocked:!0,axis:o}:(e["x"===o?1:0]=!1,{_intentional:e,_blocked:!1,axis:o}):{_intentional:[!1,!1],_blocked:!1,axis:o}:{_intentional:e,_blocked:!1,axis:o}},n.getKinematics=function(e,t){var n=this.getMovement(e);if(!n._blocked){var r=t.timeStamp-this.state.timeStamp;Object.assign(n,function(e,t,n){var r=Ee(t),a=0===r?0:1/r,o=0===n?0:1/n,c=o*r,i=t.map((function(e){return o*e})),s=t.map((function(e){return a*e}));return{velocities:i,velocity:c,distance:Ee(e),direction:s}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(function(){function e(e,t){var n=this;void 0===t&&(t=[]),this.controller=e,this.args=t,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140),clearTimeout(n.controller.timeouts[n.stateKey]);for(var a=arguments.length,o=new Array(a>2?a-2:0),c=2;c<a;c++)o[c-2]=arg
uments[c];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(o))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.fireGestureHandler=function(e){if(void 0===e&&(e=!1),n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;if(!e&&!n.state.intentional&&!n.config.triggerAllEvents)return null;if(n.state.intentional){var t=n.state.active,r=n.state._active;n.state.active=r,n.state.first=r&&!t,n.state.last=t&&!r,n.controller.state.shared[n.ingKey]=r}var a=n.controller.pointerIds.size||n.controller.touchIds.size,o=n.controller.state.shared.buttons>0||a>0,c=Te({},n.controller.state.shared,n.state,n.mapStateValues(n.state),{locked:!!document.pointerLockElement,touches:a,down:o}),i=n.handler(c);return n.state.memo=void 0!==i?i:n.state.memo,c},this.controller=e,this.args=t}var t,n,r=e.prototype;return r.updateSharedState=function(e){Object.assign(this.controller.state.sha
red,e)},r.updateGestureState=function(e){Object.assign(this.state,e)},r.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},r.getMovement=function(e){var t=this.config.rubberband,n=this.state,r=n._bounds,a=n._initial,o=n._active,c=n._intentional,i=n.lastOffset,s=n.movement,l=n._threshold,u=this.getInternalMovement(e,this.state),p=!1===c[0]?et(u[0],l[0]):c[0],d=!1===c[1]?et(u[1],l[1]):c[1],b=this.checkIntentionality([p,d],u);if(b._blocked)return Te({},b,{_movement:u,delta:[0,0]});var g=b._intentional,f=u,m=[!1!==g[0]?u[0]-g[0]:0,!1!==g[1]?u[1]-g[1]:0],h=_e(m,i),v=o?t:[0,0];return m=tt(r,_e(m,a),v),Te({},b,{intentional:!1!==g[0]||!1!==g[1],_initial:a,_movement:f,movement:m,values:e,offset:tt(r,h,v),delta:we(m,s)})},r.clean=function(){this.clearTimeout()},t=e,(n=[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"st
ate",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}},{key:"transform",get:function(){return this.config.transform||this.controller.config.transform||Ze}}])&&Ne(t.prototype,n),e}()));function Ot(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,a,o,c;if(Array.isArray(t)){if((r=t.length)!==n.length)return!1;for(a=r;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if("function"==typeof Map&&t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(c=t.entries();!(a=c.next()).done;)if(!n.has(a.value[0]))return!1;for(c=t.entries();!(a=c.next()).done;)if(!e(a.value[1],n.get(a.value[0])))return!1;return!0}if("function"==typeof Set&&t instanceof Set&&n instanceof Set){if(t.s
ize!==n.size)return!1;for(c=t.entries();!(a=c.next()).done;)if(!n.has(a.value[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(a=r;0!=a--;)if(!Object.prototype.hasOwnProperty.call(n,o[a]))return!1;if("undefined"!=typeof Element&&t instanceof Element)return!1;for(a=r;0!=a--;)if(!("_owner"===o[a]&&t.$$typeof||e(t[o[a]],n[o[a]])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}var yt=n(12),jt=function({label:e,className:t,onDragChange:n,onDragEnd:r,direction:a="left",...o}){const i=function(e,t){void 0===t&&(t
={}),Je.set("drag",vt);var o=Object(ye.useRef)();return o.current||(o.current=function(e,t){var n,r,a=[],o=!1;return function(){for(var c=arguments.length,i=new Array(c),s=0;s<c;s++)i[s]=arguments[s];return o&&n===this&&t(i,a)||(r=e.apply(this,i),o=!0,n=this,a=i),r}}(We,Ot)),function(e,t,n){void 0===n&&(n={});var r=function(e){var t=new Set;return e.drag&&t.add(Je.get("drag")),e.wheel&&t.add(Je.get("wheel")),e.scroll&&t.add(Je.get("scroll")),e.move&&t.add(Je.get("move")),e.pinch&&t.add(Je.get("pinch")),e.hover&&t.add(Je.get("hover")),t}(e),a=je.a.useMemo((function(){return new at(r)}),[]);return a.config=t,a.handlers=e,a.nativeRefs=n,je.a.useEffect(a.effect,[]),a.config.domTarget?mt:a.bind}({drag:({delta:e,dragging:t})=>{const o="left"===a?-2:2;t?n(e[0]*o):r()}},o.current(t))}();return Object(c.createElement)("div",{c
lassName:"pattern-preview__drag-handle "+t},Object(c.createElement)("button",b()({className:"pattern-preview__drag-handle-button","aria-label":e},o,{onKeyDown:e=>{const{keyCode:t}=e;"left"===a&&t===yt.LEFT||"right"===a&&t===yt.RIGHT?n(20):("left"===a&&t===yt.RIGHT||"right"===a&&t===yt.LEFT)&&n(-20)},onKeyUp:r},i())))},_t=function e({blockContent:t}){const n=Object(fe.useViewportMatch)("mobile",">="),r=Object(fe.useViewportMatch)("large",">="),a=Object(fe.useViewportMatch)("wide",">="),o=Object(fe.useInstanceId)(e),[s,l]=Object(c.useState)(window.innerWidth<960?window.innerWidth:960),u=Object(c.useCallback)(e=>l(t=>t+e),[l]),p=()=>{s<280&&l(280)},d=Object(c.useMemo)(()=>n?a?[{label:Object(i.__)("Full (1200px)","wporg-patterns"),value:1200},{label:Obj
ect(i.__)("Default (960px)","wporg-patterns"),value:960},{label:Object(i.__)("Medium (480px)","wporg-patterns"),value:480},{label:Object(i.__)("Narrow (320px)","wporg-patterns"),value:320}]:r?[{label:Object(i.__)("Default (960px)","wporg-patterns"),value:960},{label:Object(i.__)("Medium (480px)","wporg-patterns"),value:480},{label:Object(i.__)("Narrow (320px)","wporg-patterns"),value:320}]:[{label:Object(i.__)("Medium (480px)","wporg-patterns"),value:480},{label:Object(i.__)("Narrow (320px)","wporg-patterns"),value:320}]:[],[n,r,a]);let b=!1;if(!d.some(e=>e.value===s)){const e=Math.max(Math.floor(s),280);b={
</ins><span class="cx" style="display: block; padding: 0 10px"> /* translators: %s is the width in pixels, ex 600. */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-label:Object(i.sprintf)(Object(i.__)("Current (%spx)","wporg-patterns"),e),value:e}}return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"pattern-preview__size-control"},n&&Object(c.createElement)(me.SelectControl,{hideLabelFromVision:!0,label:Object(i.__)("Preview Width","wporg-patterns"),value:s,options:b?[b,...d]:d,onChange:e=>l(Number(e))})),Object(c.createElement)("div",{className:"pattern-preview__viewport",style:{width:s+40}},Object(c.createElement)(jt,{label:Object(i.__)("Drag to resize","wporg-patterns"),className:"is-left",onDragChange:u,onDragEnd:p,direction:"left","aria-describedby":"pattern-preview__resize-help-"+o}),Object(c.createElement)(Oe,{html:t}),Object(c.createElement)(jt,{label:Objec
t(i.__)("Drag to resize","wporg-patterns"),className:"is-right",onDragChange:u,onDragEnd:p,direction:"right","aria-describedby":"pattern-preview__resize-help-"+o}),Object(c.createElement)(me.VisuallyHidden,{id:"pattern-preview__resize-help-"+o,className:"pattern-preview__resize-help"},Object(i.__)("Use left and right arrow keys to resize the preview.","wporg-patterns"))))},wt=n(7),Et=n.n(wt),St=n(13),Pt=n(11),xt=({isSmall:e=!1,onSuccess:t=St.noop,content:n})=>{const[r,a]=Object(c.useState)(!1);if(!n){const e=document.getElementById("block-data");n=JSON.parse(decodeURIComponent(e.value))}Object(c.useEffect)(()=>{if(!r)return;Object(Pt.speak)(Object(i.__)("Copied pattern to clipboard.","wporg-patterns"));const e=setTimeout(()=>a(!1),2e4);return()=>{clearTimeout(e)}},[r]);let o=Object(i.__)("Copy Pattern","wporg-patterns");e&a
mp;&(o=r?Object(i.__)("Copied","wporg-patterns"):Object(i.__)("Copy","wporg-patterns"));const s=Et()({"pattern-copy-button":!0,"is-small-label":e});return Object(c.createElement)(me.Button,{className:s,isPrimary:!0,onClick:({target:e})=>{const r=(e=>{const t=document.createElement("textarea");t.setAttribute("readonly",""),t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.left="-9999px",t.value=e,document.body.appendChild(t),t.select();const n=document.execCommand("copy");return document.body.removeChild(t),n})(n);a(r),e.focus(),r&&t()}},o)},Nt=n(14),Tt=function(e){return Object(c.createElement)(g.SVG,b()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},e),Object(c.createElement)(g.Path,{d:"M12 4.915c1.09-1.28 2.76-2.09 4.5-2.09 3.
08 0 5.5 2.42 5.5 5.5 0 3.777-3.394 6.855-8.537 11.518l-.013.012-1.45 1.32-1.45-1.31-.04-.036C5.384 15.17 2 12.095 2 8.325c0-3.08 2.42-5.5 5.5-5.5 1.74 0 3.41.81 4.5 2.09zm0 13.56l.1-.1c4.76-4.31 7.9-7.16 7.9-10.05 0-2-1.5-3.5-3.5-3.5-1.54 0-3.04.99-3.56 2.36h-1.87c-.53-1.37-2.03-2.36-3.57-2.36-2 0-3.5 1.5-3.5 3.5 0 2.89 3.14 5.74 7.9 10.05l.1.1z"}))},kt=({showLabel:e=!0,patternId:t})=>{const{hasPermission:n,isFavorite:r}=Object(s.useSelect)(e=>(e(be).getFavorites(),{hasPermission:!!e(Nt.store).canUser("create","../../wporg/v1/pattern-favorites"),isFavorite:e(be).isFavorite(t)})),{addFavorite:a,removeFavorite:o}=Object(s.useDispatch)(be),l=Object(c.useCallback)(()=>{r?o(t):a(t)},[r]);if(!n)return null;const u=Et()("button button-link pattern-favorite-button",{"is-favorited":r,"has-label":e}),p=Et()({"screen-reader-text":!e});return Object(c.createElement)("button",{className:u,onClick:l},Object(c.cre
ateElement)(f,{className:"pattern-favorite-button__filled"}),Object(c.createElement)(Tt,{className:"pattern-favorite-button__outline"}),Object(c.createElement)("span",{className:p},r?Object(i.__)("Remove from favorites","wporg-patterns"):Object(i.__)("Add to favorites","wporg-patterns")))},Ct=({onClick:e})=>Object(c.createElement)(me.Notice,{className:"pattern-actions__notice",status:"success",isDismissible:!1,actions:[{label:Object(i.__)("Learn More","wporg-patterns"),onClick:e,variant:"secondary"}]},Object(c.createElement)("div",null,Object(c.createElement)("b",null,Object(i.__)("Pattern copied!","wporg-patterns")),Object(i.__)(" Now you can paste it into any WordPress post or page.","wporg-patterns")));const At=()=>Object(c.createElement)("div",{style:{height:"220px"}},Object(c
.createElement)("img",{src:wporgPatternsUrl.assets+"/images/copy-paste-demo.gif",alt:Object(i.__)("GIF of copy and pasting.","wporg-patterns")}));var It=({onFinish:e})=>Object(c.createElement)(me.Animate,{type:"appear",options:{origin:"bottom"}},({className:t})=>Object(c.createElement)(me.Guide,{className:"pattern-actions__guide "+t,onFinish:e,finishButtonText:Object(i.__)("Close","wporg-patterns"),pages:[{image:Object(c.createElement)(At,null),content:Object(c.createElement)("div",{className:"pattern-actions__guide-content"},Object(c.createElement)("h3",{className:"pattern-actions__guide-title"},Object(i.__)("How to use patterns on your WordPress site.","wporg-patterns")),Object(c.createElement)("p",null,Object(i.__)("Patterns are really just text. And, just like you can copy and paste text, you can copy and paste
patterns. It’s really easy!","wporg-patterns")),Object(c.createElement)("ol",null,Object(c.createElement)("li",null,Object(c.createElement)("p",null,Object(i.__)("Open any post or page in the WordPress block editor.","wporg-patterns"))),Object(c.createElement)("li",null,Object(c.createElement)("p",null,Object(i.__)("Place your cursor where you want to add the pattern.","wporg-patterns"))),Object(c.createElement)("li",null,Object(c.createElement)("p",null,Object(c.createInterpolateElement)(Object(i.__)("Paste the contents of your clipboard by holding down <kbd>ctrl</kbd> control (Windows) or <kbd>⌘</kbd> command (Mac) and pressing the <kbd>v</kbd> key, or right-clicking and choose “Paste” from the menu.","wporg-patterns"),{kbd:Object(c.createElement)("kbd",{className:"pattern-action
s__guide-shortcut"})})))))}]})),Lt=({postId:e})=>{const[t,n]=Object(c.useState)(!1),[r,a]=Object(c.useState)(!1);return Object(c.createElement)("div",{className:"pattern-actions"},Object(c.createElement)("div",{className:"pattern-actions__container"},Object(c.createElement)(xt,{onSuccess:()=>n(!0)}),Object(c.createElement)(kt,{patternId:e}),t&&Object(c.createElement)(Ct,{onClick:()=>a(!0)}),r&&Object(c.createElement)(It,{onFinish:()=>a(!1)})))},Rt=n(15),Dt=function({className:e,html:t}){const n=Object(c.useRef)(),[r,a]=Object(c.useState)("1px"),[o,s]=Object(c.useState)(.3125),l=(({element:e})=>{const[t,n]=Object(c.useState)(null);Object(c.useEffect)(()=>{if(!e.current)return;const t=Object(St.debounce)(r,200);return r(),window.addEventListener("scroll",t),window.addEventListener("resize",t),()=>{window.removeEventListener("scroll",t),window.addEventListener("
;resize",t)}},[e]);const r=()=>{if(!e.current)return;const t=window.innerHeight,{top:r}=e.current.getBoundingClientRect();n(r>=0&&r<=t)};return t})({element:n}),[u,p]=Object(c.useState)(!1);Object(c.useEffect)(()=>{l&&p(!0)},[l]),Object(c.useEffect)(()=>{const e=()=>{try{a(m(n.current.clientWidth)),s(n.current.clientWidth/800)}catch(e){}};return e(),window.addEventListener("resize",e),()=>{window.addEventListener("resize",e)}},[]);const d={border:"none",width:"800px",maxWidth:"none",height:m(800)+"px",transform:`scale(${o})`,transformOrigin:Object(i.isRTL)()?"top right":"top left",pointerEvents:"none"};return Object(c.createElement)("div",{className:e,ref:n,style:{height:r},tabIndex:"-1"},Object(c.createElement)(he,{className:"pattern-grid__preview-iframe",style:d,bodyStyle:"overflow: hidden;",headHTML:window.__ed
itorStyles.html},Object(c.createElement)("div",{dangerouslySetInnerHTML:{__html:u?t:""}})))},Ft=({className:e,label:t,patternId:n})=>{const{hasPermission:r,isFavorite:a}=Object(s.useSelect)(e=>(e(be).getFavorites(),{hasPermission:!!e(Nt.store).canUser("create","../../wporg/v1/pattern-favorites"),isFavorite:e(be).isFavorite(n)})),{addFavorite:o,removeFavorite:i}=Object(s.useDispatch)(be),l=Object(c.useCallback)(()=>{a?i(n):o(n)},[a]),u=Et()(e,"pattern-favorite-button-small",{button:r,"button-link":r,"is-favorited":a});return r?Object(c.createElement)("button",{className:u,onClick:l},Object(c.createElement)(f,{className:"pattern-favorite-button__filled"}),Object(c.createElement)("span",null,t)):Object(c.createElement)("span",{className:u},Object(c.createElement)(f,{className:"pattern-favorite-button__filled"}),Object(c.createElement)("span",null,t)
)},Mt=function({pattern:e,showAvatar:t}){const n=function(e){switch(e.status){case"pending":return Object(i.__)("Pending","wporg-patterns");case"draft":return Object(i.__)("Draft","wporg-patterns");case"declined":return Object(i.__)("Declined","wporg-patterns")}return""}(e);return Object(c.createElement)("div",{className:"pattern-grid__pattern"},Object(c.createElement)("div",{className:"pattern-grid__pattern-frame"},Object(c.createElement)("a",{href:e.link,rel:"bookmark"},Object(c.createElement)("span",{className:"screen-reader-text"},Object(Rt.decodeEntities)(e.title.rendered)),Object(c.createElement)(me.Disabled,null,Object(c.createElement)(Dt,{className:"pattern-grid__preview",html:e.content.rendered}))),n?Object(c.createElement)("div",{className:"pattern-grid__status is-"+
e.status},Object(c.createElement)("span",null,n)):null,Object(c.createElement)("span",{className:"pattern-grid__actions"},Object(c.createElement)(kt,{showLabel:!1,patternId:e.id}),Object(c.createElement)(xt,{isSmall:!0,content:e.pattern_content}))),Object(c.createElement)("h2",{className:"pattern-grid__title"},Object(c.createElement)("a",{href:e.link},Object(Rt.decodeEntities)(e.title.rendered))),Object(c.createElement)("p",{className:"pattern-grid__meta"},t&&e.author_meta?Object(c.createElement)("a",{href:e.author_meta.url,className:"pattern-grid__author-avatar"},Object(c.createElement)("img",{alt:"",src:e.author_meta.avatar}),e.author_meta.name):null,e.favorite_count>0?Object(c.createElement)(Ft,{className:"pattern-grid__favorite-count",patternId:e.id,label:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("span",{clas
sName:"screen-reader-text"},Object(i.sprintf)(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+label:Object(i.sprintf)(Object(i.__)("Current (%spx)","wporg-patterns"),e),value:e}}return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"pattern-preview__size-control"},n&&Object(c.createElement)(me.SelectControl,{hideLabelFromVision:!0,label:Object(i.__)("Preview Width","wporg-patterns"),value:s,options:b?[b,...d]:d,onChange:e=>l(Number(e))})),Object(c.createElement)("div",{className:"pattern-preview__viewport",style:{width:s+40}},Object(c.createElement)(jt,{label:Object(i.__)("Drag to resize","wporg-patterns"),className:"is-left",onDragChange:u,onDragEnd:p,direction:"left","aria-describedby":"pattern-preview__resize-help-"+o}),Object(c.createElement)(Oe,{html:t}),Object(c.createElement)(jt,{label:Object
(i.__)("Drag to resize","wporg-patterns"),className:"is-right",onDragChange:u,onDragEnd:p,direction:"right","aria-describedby":"pattern-preview__resize-help-"+o}),Object(c.createElement)(me.VisuallyHidden,{id:"pattern-preview__resize-help-"+o,className:"pattern-preview__resize-help"},Object(i.__)("Use left and right arrow keys to resize the preview.","wporg-patterns"))))},wt=n(7),Et=n.n(wt),St=n(13),Pt=n(11),xt=({isSmall:e=!1,onSuccess:t=St.noop,content:n})=>{const[r,a]=Object(c.useState)(!1);if(!n){const e=document.getElementById("block-data");n=JSON.parse(decodeURIComponent(e.value))}Object(c.useEffect)(()=>{if(!r)return;Object(Pt.speak)(Object(i.__)("Copied pattern to clipboard.","wporg-patterns"));const e=setTimeout(()=>a(!1),2e4);return()=>{clearTimeout(e)}},[r]);let o=Object(i.__)("Copy Pattern","wporg-patterns");e&am
p;&(o=r?Object(i.__)("Copied","wporg-patterns"):Object(i.__)("Copy","wporg-patterns"));const s=Et()({"pattern-copy-button":!0,"is-small-label":e});return Object(c.createElement)(me.Button,{className:s,isPrimary:!0,onClick:({target:e})=>{const r=(e=>{const t=document.createElement("textarea");t.setAttribute("readonly",""),t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.left="-9999px",t.value=e,document.body.appendChild(t),t.select();const n=document.execCommand("copy");return document.body.removeChild(t),n})(n);a(r),e.focus(),r&&t()}},o)},Nt=n(14),Tt=function(e){return Object(c.createElement)(g.SVG,b()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},e),Object(c.createElement)(g.Path,{d:"M12 4.915c1.09-1.28 2.76-2.09 4.5-2.09 3.0
8 0 5.5 2.42 5.5 5.5 0 3.777-3.394 6.855-8.537 11.518l-.013.012-1.45 1.32-1.45-1.31-.04-.036C5.384 15.17 2 12.095 2 8.325c0-3.08 2.42-5.5 5.5-5.5 1.74 0 3.41.81 4.5 2.09zm0 13.56l.1-.1c4.76-4.31 7.9-7.16 7.9-10.05 0-2-1.5-3.5-3.5-3.5-1.54 0-3.04.99-3.56 2.36h-1.87c-.53-1.37-2.03-2.36-3.57-2.36-2 0-3.5 1.5-3.5 3.5 0 2.89 3.14 5.74 7.9 10.05l.1.1z"}))},kt=({showLabel:e=!0,patternId:t})=>{const{hasPermission:n,isFavorite:r}=Object(s.useSelect)(e=>(e(be).getFavorites(),{hasPermission:!!e(Nt.store).canUser("create","../../wporg/v1/pattern-favorites"),isFavorite:e(be).isFavorite(t)})),{addFavorite:a,removeFavorite:o}=Object(s.useDispatch)(be),l=Object(c.useCallback)(()=>{r?o(t):a(t)},[r]);if(!n)return null;const u=Et()("button button-link pattern-favorite-button",{"is-favorited":r,"has-label":e}),p=Et()({"screen-reader-text":!e});return Object(c.createElement)("button",{className:u,onClick:l},Object(c.crea
teElement)(f,{className:"pattern-favorite-button__filled"}),Object(c.createElement)(Tt,{className:"pattern-favorite-button__outline"}),Object(c.createElement)("span",{className:p},r?Object(i.__)("Remove from favorites","wporg-patterns"):Object(i.__)("Add to favorites","wporg-patterns")))},Ct=({onClick:e})=>Object(c.createElement)(me.Notice,{className:"pattern-actions__notice",status:"success",isDismissible:!1,actions:[{label:Object(i.__)("Learn More","wporg-patterns"),onClick:e,variant:"secondary"}]},Object(c.createElement)("div",null,Object(c.createElement)("b",null,Object(i.__)("Pattern copied!","wporg-patterns")),Object(i.__)(" Now you can paste it into any WordPress post or page.","wporg-patterns")));const At=()=>Object(c.createElement)("div",{style:{height:"220px"}},Object(c.
createElement)("img",{src:wporgPatternsUrl.assets+"/images/copy-paste-demo.gif",alt:Object(i.__)("GIF of copy and pasting.","wporg-patterns")}));var It=({onFinish:e})=>Object(c.createElement)(me.Animate,{type:"appear",options:{origin:"bottom"}},({className:t})=>Object(c.createElement)(me.Guide,{className:"pattern-actions__guide "+t,onFinish:e,finishButtonText:Object(i.__)("Close","wporg-patterns"),pages:[{image:Object(c.createElement)(At,null),content:Object(c.createElement)("div",{className:"pattern-actions__guide-content"},Object(c.createElement)("h3",{className:"pattern-actions__guide-title"},Object(i.__)("How to use patterns on your WordPress site.","wporg-patterns")),Object(c.createElement)("p",null,Object(i.__)("Patterns are really just text. And, just like you can copy and paste text, you can copy and paste
patterns. It’s really easy!","wporg-patterns")),Object(c.createElement)("ol",null,Object(c.createElement)("li",null,Object(c.createElement)("p",null,Object(i.__)("Open any post or page in the WordPress block editor.","wporg-patterns"))),Object(c.createElement)("li",null,Object(c.createElement)("p",null,Object(i.__)("Place your cursor where you want to add the pattern.","wporg-patterns"))),Object(c.createElement)("li",null,Object(c.createElement)("p",null,Object(c.createInterpolateElement)(Object(i.__)("Paste the contents of your clipboard by holding down <kbd>ctrl</kbd> control (Windows) or <kbd>⌘</kbd> command (Mac) and pressing the <kbd>v</kbd> key, or right-clicking and choose “Paste” from the menu.","wporg-patterns"),{kbd:Object(c.createElement)("kbd",{className:"pattern-actions
__guide-shortcut"})})))))}]})),Lt=({postId:e})=>{const[t,n]=Object(c.useState)(!1),[r,a]=Object(c.useState)(!1);return Object(c.createElement)("div",{className:"pattern-actions"},Object(c.createElement)("div",{className:"pattern-actions__container"},Object(c.createElement)(xt,{onSuccess:()=>n(!0)}),Object(c.createElement)(kt,{patternId:e}),t&&Object(c.createElement)(Ct,{onClick:()=>a(!0)}),r&&Object(c.createElement)(It,{onFinish:()=>a(!1)})))},Rt=n(15),Dt=function({className:e,html:t}){const n=Object(c.useRef)(),[r,a]=Object(c.useState)("1px"),[o,s]=Object(c.useState)(.3125),l=(({element:e})=>{const[t,n]=Object(c.useState)(null);Object(c.useEffect)(()=>{if(!e.current)return;const t=Object(St.debounce)(r,200);return r(),window.addEventListener("scroll",t),window.addEventListener("resize",t),()=>{window.removeEventListener("scroll",t),window.addEventListener("
resize",t)}},[e]);const r=()=>{if(!e.current)return;const t=window.innerHeight,{top:r}=e.current.getBoundingClientRect();n(r>=0&&r<=t)};return t})({element:n}),[u,p]=Object(c.useState)(!1);Object(c.useEffect)(()=>{l&&p(!0)},[l]),Object(c.useEffect)(()=>{const e=()=>{try{a(m(n.current.clientWidth)),s(n.current.clientWidth/800)}catch(e){}};return e(),window.addEventListener("resize",e),()=>{window.addEventListener("resize",e)}},[]);const d={border:"none",width:"800px",maxWidth:"none",height:m(800)+"px",transform:`scale(${o})`,transformOrigin:Object(i.isRTL)()?"top right":"top left",pointerEvents:"none"};return Object(c.createElement)("div",{className:e,ref:n,style:{height:r},tabIndex:"-1"},Object(c.createElement)(ve,{className:"pattern-grid__preview-iframe",style:d,bodyStyle:"overflow: hidden;",headHTML:window.__edi
torStyles.html},Object(c.createElement)("div",{dangerouslySetInnerHTML:{__html:u?t:""}})))},Ft=({className:e,label:t,patternId:n})=>{const{hasPermission:r,isFavorite:a}=Object(s.useSelect)(e=>(e(be).getFavorites(),{hasPermission:!!e(Nt.store).canUser("create","../../wporg/v1/pattern-favorites"),isFavorite:e(be).isFavorite(n)})),{addFavorite:o,removeFavorite:i}=Object(s.useDispatch)(be),l=Object(c.useCallback)(()=>{a?i(n):o(n)},[a]),u=Et()(e,"pattern-favorite-button-small",{button:r,"button-link":r,"is-favorited":a});return r?Object(c.createElement)("button",{className:u,onClick:l},Object(c.createElement)(f,{className:"pattern-favorite-button__filled"}),Object(c.createElement)("span",null,t)):Object(c.createElement)("span",{className:u},Object(c.createElement)(f,{className:"pattern-favorite-button__filled"}),Object(c.createElement)("span",null,t))
},Mt=function({pattern:e,showAvatar:t}){const n=function(e){switch(e.status){case"pending":return Object(i.__)("Pending","wporg-patterns");case"draft":return Object(i.__)("Draft","wporg-patterns");case"declined":return Object(i.__)("Declined","wporg-patterns")}return""}(e);return Object(c.createElement)("div",{className:"pattern-grid__pattern"},Object(c.createElement)("div",{className:"pattern-grid__pattern-frame"},Object(c.createElement)("a",{href:e.link,rel:"bookmark"},Object(c.createElement)("span",{className:"screen-reader-text"},Object(Rt.decodeEntities)(e.title.rendered)),Object(c.createElement)(me.Disabled,null,Object(c.createElement)(Dt,{className:"pattern-grid__preview",html:e.content.rendered}))),n?Object(c.createElement)("div",{className:"pattern-grid__status is-"+e
.status},Object(c.createElement)("span",null,n)):null,Object(c.createElement)("span",{className:"pattern-grid__actions"},Object(c.createElement)(kt,{showLabel:!1,patternId:e.id}),Object(c.createElement)(xt,{isSmall:!0,content:e.pattern_content}))),Object(c.createElement)("h2",{className:"pattern-grid__title"},Object(c.createElement)("a",{href:e.link},Object(Rt.decodeEntities)(e.title.rendered))),Object(c.createElement)("p",{className:"pattern-grid__meta"},t&&e.author_meta?Object(c.createElement)("a",{href:e.author_meta.url,className:"pattern-grid__author-avatar"},Object(c.createElement)("img",{alt:"",src:e.author_meta.avatar}),e.author_meta.name):null,e.favorite_count>0?Object(c.createElement)(Ft,{className:"pattern-grid__favorite-count",patternId:e.id,label:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("span",{class
Name:"screen-reader-text"},Object(i.sprintf)(
</ins><span class="cx" style="display: block; padding: 0 10px"> /* translators: %s is the favorite count for a pattern. */
</span><span class="cx" style="display: block; padding: 0 10px"> Object(i._n)("Favorited %s times","Favorited %s times",e.favorite_count,"wporg-patterns"),e.favorite_count)),Object(c.createElement)("span",{"aria-hidden":!0},e.favorite_count))}):null))},Bt=function({icon:e,size:t=24,...n}){return Object(c.cloneElement)(e,{width:t,height:t,...n})},Qt=Object(c.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(g.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"})),qt=n(16),Ut=n.n(qt);const Kt=(e,t)=>{switch(t.status){case"submitting":return{isSubmitting:!0};case"submitted":return{isSubmitted:!0};case"error":return{hasError:!0,message:t.message};default:return{}}};var $t=({postId:e,onClose:t})=>{const[n,r]=Object(c.useReducer)(Kt,{}),[a,o]=Object(c.useState)(""),[l,u]=Object(c.useState)(""),
p=Object(c.useRef)(),d=Object(i.__)("Your report has been submitted.","wporg-patterns"),{isLoading:b,mappedReasons:g}=Object(s.useSelect)(e=>{const{getPatternFlagReasons:t,isLoadingPatternFlagReasons:n}=e(be),r=t()||[];return{isLoading:n(),mappedReasons:r.sort((e,t)=>{switch(!0){case e.slug<t.slug:return-1;case e.slug>t.slug:return 1;default:return 0}}).map(e=>({label:e.name,value:e.id.toString()}))}}),f=()=>{t(n.isSubmitted)};return Object(c.createElement)(me.Modal,{className:"pattern-report-modal "+(n.isSubmitted?"":"pattern-report-modal__has-fixed-height"),title:Object(i.__)("Report this pattern","wporg-patterns"),onRequestClose:f},Object(c.createElement)("div",{ref:p},b?Object(c.createElement)(me.Spinner,null):n.isSubmitted?Object(c.createElement)("p",{className:"pattern-report-modal__copy"},d):Object(c.createElement)("form",{onSubmit:t=>{t.preventDe
fault(),a&&l.length&&!n.isSubmitted&&!n.isSubmitting&&(r({status:"submitting"}),Ut()({path:Object(O.addQueryArgs)("/wp/v2/wporg-pattern-flag"),method:"POST",data:{parent:e,"wporg-pattern-flag-reason":a,excerpt:l}}).then(()=>{r({status:"submitted"}),Object(Pt.speak)(d),p.current.closest('[role="dialog"]').focus()}).catch(e=>{r({status:"error",message:e.message}),Object(Pt.speak)(Object(i.sprintf)(
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: %s: Error message. */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,7 +9,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // translators: %s is the author name.
</span><span class="cx" style="display: block; padding: 0 10px"> Ht(Object(i.sprintf)(Object(i.__)("Author: %s","wporg-patterns"),t)):n&&
</span><span class="cx" style="display: block; padding: 0 10px"> // translators: %s is the category name.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-Ht(Object(i.sprintf)(Object(i.__)("Category: %s","wporg-patterns"),n))},[e]),null},Wt=Object.prototype.hasOwnProperty;function Yt(e,t,n){for(n of e.keys())if(Xt(n,t))return n}function Xt(e,t){var n,r,a;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Xt(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e){if((a=r)&&"object"==typeof a&&!(a=Yt(t,a)))return!1;if(!t.has(a))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e){if((a=r[0])&&"object"==typeof a&&!(a=Yt(t,a)))return!1;if(!Xt(r[1],t.get(a)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if(
(r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if(Wt.call(e,n)&&++r&&!Wt.call(t,n))return!1;if(!(n in t)||!Xt(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}var Jt=function(e,t){return Object(ye.useEffect)(e,(n=t,r=Object(ye.useRef)(),a=Object(ye.useRef)(0),Xt(n,r.current)||(r.current=n,a.current+=1),[a.current]));var n,r,a};const Zt=(e=1,t=1)=>1===t?"":Object(i.sprintf)(Object(i.__)("Page %1$d of %2$d.","wporg-patterns"),e,t)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+Ht(Object(i.sprintf)(Object(i.__)("Category: %s","wporg-patterns"),n))},[e]),null},Wt=Object.prototype.hasOwnProperty;function Yt(e,t,n){for(n of e.keys())if(Xt(n,t))return n}function Xt(e,t){var n,r,a;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Xt(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e){if((a=r)&&"object"==typeof a&&!(a=Yt(t,a)))return!1;if(!t.has(a))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e){if((a=r[0])&&"object"==typeof a&&!(a=Yt(t,a)))return!1;if(!Xt(r[1],t.get(a)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((
r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if(Wt.call(e,n)&&++r&&!Wt.call(t,n))return!1;if(!(n in t)||!Xt(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}function Jt(e,t){return ye.useEffect(e,(n=t,r=ye.useRef(n),a=ye.useRef(0),Xt(n,r.current)||(r.current=n,a.current+=1),ye.useMemo((function(){return r.current}),[a.current])));var n,r,a}const Zt=(e=1,t=1)=>1===t?"":Object(i.sprintf)(Object(i.__)("Page %1$d of %2$d.","wporg-patterns"),e,t)
</ins><span class="cx" style="display: block; padding: 0 10px"> /* translators: %1$d: current page. %2$d: total number of pages. */;var en=function(e){const{path:t}=S(),[n,r]=Object(c.useState)(),[a]=Object(c.useState)({title:"",links:[]}),{author:o,category:l,count:u,isLoadingPatterns:p,pageLabel:d,query:b}=Object(s.useSelect)(n=>{const{getCategoryById:r,getPatternTotalsByQuery:a,getPatternTotalPagesByQuery:o,getQueryFromUrl:c,isLoadingPatternsByQuery:i}=n(be),s={...c(t),...e.query},l=i(s);return{author:wporgPatternsData.currentAuthorName||(null==s?void 0:s.author_name),category:r(s["pattern-categories"]),count:a(s),isLoadingPatterns:l,pageLabel:s&&!l?Zt(s.page,o(s)):"",query:s}},[t,e.query]);Jt(()=>{if(((e={})=>!e.hasOwnProperty("include")||e.include.length>0)(b)&&p)return void r((({category:e,author:t})=>e&&t?Object(c.createInterpolateElement)(Object(i.sprintf)(
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: %1$s category name, %2$s author name. */
</span><span class="cx" style="display: block; padding: 0 10px"> Object(i.__)("Loading <b>%1$s</b> patterns by %2$s.","wporg-patterns"),e,t),{b:Object(c.createElement)("b",null)}):e?Object(c.createInterpolateElement)(Object(i.sprintf)(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -30,4 +30,4 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: Author name */
</span><span class="cx" style="display: block; padding: 0 10px"> Object(i.sprintf)(Object(i.__)("Block Patterns by %s","wporg-patterns"),o)):l.push(Object(i.__)("Block Pattern Directory","wporg-patterns")),c>1&&l.push(
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: Page number */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-Object(i.sprintf)(Object(i.__)("Page %d","wporg-patterns"),c)),l.push(Object(i.__)("WordPress.org","wporg-patterns")),l.join(" | ")});return Object(c.useEffect)(()=>{t&&(document.title=t)},[t]),null},nn=function(){return Object(c.createElement)("div",{className:"pattern-grid__empty-header"},Object(c.createElement)("h2",null,Object(i.__)("No results found","wporg-patterns")),Object(c.createElement)("p",null,Object(c.createInterpolateElement)(Object(i.__)("View <a>all block patterns</a> or browse some of our recent patterns.","wporg-patterns"),{a:Object(c.createElement)("a",{href:wporgPatternsUrl.site})})))},rn=({options:e})=>{const{path:t,replace:n}=S(),r=Object(fe.useViewportMatch)("medium",">=");retur
n e?Object(c.createElement)("div",{className:"pattern-order-select"},Object(c.createElement)(me.SelectControl,{label:Object(i.__)("Order by","wporg-patterns"),labelPosition:"side",hideLabelFromVision:r,value:Object(O.getQueryArg)(window.location.href,"orderby"),options:e,onChange:e=>{n(Object(O.addQueryArgs)(t,{orderby:e}).replace(/\/page\/[\d]+/,""))}})):null},an=()=>Object(c.createElement)(u,{className:"pattern-menu",style:{flexDirection:"row"}},Array(7).fill().map((e,t)=>Object(c.createElement)(p,{key:t,height:"1.25rem",width:"5rem",marginRight:"1rem"}))),on=({current:e,isLoading:t,label:n=Object(i.__)("Main Menu","wporg-patterns"),onClick:r,options:a})=>t?Object(c.createElement)(an,null):a.length?Object(c.createElement)("nav",null,Object(c.createElement)("h2",{className:"screen-reader-text"},n),Objec
t(c.createElement)("ul",{className:"pattern-menu"},a.map(t=>Object(c.createElement)("li",{key:t.value},Object(c.createElement)("a",{className:Et()({"pattern-menu__item":!0,"is-active":e===t.slug}),href:t.value,onClick:r,"aria-current":e===t.slug?"page":void 0},t.label))))):null,cn=({onClick:e,options:t,label:n=Object(i.__)("Browse categories","wporg-patterns")})=>{const[r,a]=Object(c.useState)(!1);return Object(c.createElement)(me.PanelBody,{className:"pattern-menu is-mobile",title:n,initialOpen:r,opened:r,onToggle:()=>a(!r)},Object(c.createElement)("ul",null,t.map(t=>Object(c.createElement)("li",{key:t.value},Object(c.createElement)("a",{href:t.value,onClick:t=>{a(!1),e(t)}},t.label)))))},sn=e=>Object(fe.useViewportMatch)("medium","<")?Object(c.createElement)(cn,e):Object(c.createElement)(on,e),ln=({prim
ary:e,secondary:t})=>Object(c.createElement)("div",{className:"pattern-navigation-layout"},e&&Object(c.createElement)("div",{className:"pattern-navigation-layout__primary"},e),t&&Object(c.createElement)("div",{className:"pattern-navigation-layout__secondary"},t)),un=({basePath:e="",onNavigation:t,...n})=>{const{path:r,update:a}=S(),{categorySlug:o,isLoading:l,options:u}=Object(s.useSelect)(t=>{var n;const{getCategoryById:a,getCategories:o,getQueryFromUrl:c,getUrlFromQuery:i,isLoadingCategories:s}=t(be),l=c(r);delete l.page;const u=(o()||[]).map(t=>({value:i({...l,"pattern-categories":t.id},wporgPatternsUrl.site+e),slug:t.slug,label:t.name}));return{categorySlug:(null===(n=a(l["pattern-categories"]))||void 0===n?void 0:n.slug)||"",isLoading:s(),options:u}});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(ln,{primary:Object(c.createElem
ent)(sn,{current:o,options:u||[],onClick:e=>{e.preventDefault(),a(e.target.pathname),"function"==typeof t&&t()},isLoading:l}),secondary:Object(c.createElement)(rn,{options:[{label:Object(i.__)("Newest","wporg-patterns"),value:"date"},{label:Object(i.__)("Favorites","wporg-patterns"),value:"favorite_count"}]})}),Object(c.createElement)(en,n))},pn=()=>{const{setCurrentQuery:e}=Object(s.useDispatch)(be),{path:t}=S(),n=Object(s.useSelect)(e=>e(be).getQueryFromUrl(t),[t]);return Jt(()=>{e(n)},[n]),null},dn=n(17);function bn(){const e=Object(c.useRef)(),t=Object(c.useCallback)(()=>{if(null==e||!e.current)return;const t=dn.focus.tabbable.find(e.current),n=t[t.length-1]||!1;n&&n.focus(),n.focus()},[]);return[e,t]}var gn=function({isLoggedIn:e}){const t=Object(O.addQueryArgs)(wporgPatternsUrl.login,{redirect_to:window.location}),n=Object(O.addQueryArgs)(wporgPatternsUrl.register,{redirect_to:
window.location});return e?Object(c.createElement)("div",{className:"pattern-grid__empty-header pattern-favorites__empty-header"},Object(c.createElement)("h2",null,Object(i.__)("Collect and view your favorite patterns.","wporg-patterns")),Object(c.createElement)("p",null,Object(i.__)("Tap the heart on any pattern to make it as a favorite. All your favorite patterns will appear here.","wporg-patterns"))):Object(c.createElement)("div",{className:"pattern-grid__empty-header pattern-favorites__empty-header"},Object(c.createElement)("h2",null,Object(i.__)("Collect and view your favorite patterns.","wporg-patterns")),Object(c.createElement)("p",null,Object(i.__)("Log in to your WordPress.org account and you’ll be able to see all your favorite patterns in one place.","wporg-patterns")),Object(c.createElement)("p",null,Ob
ject(c.createElement)("a",{className:"button button-primary button-large",href:t},Object(i.__)("Log in","wporg-patterns"))),Object(c.createElement)("p",null,Object(c.createElement)("a",{className:"button-link link-create-account",href:n},Object(i.__)("Create an account","wporg-patterns"))))},fn=function(){const{path:e,update:t}=S();let n=j(e,"my-patterns");"page"===n&&(n="all");const r=[{value:wporgPatternsUrl.site+"/my-patterns/",slug:"all",label:Object(i.__)("All","wporg-patterns")},{value:wporgPatternsUrl.site+"/my-patterns/draft/",slug:"draft",label:Object(i.__)("Drafts","wporg-patterns")},{value:wporgPatternsUrl.site+"/my-patterns/pending/",slug:"pending",label:Object(i.__)("Pending Review","wporg-patterns")}];return Object(c.createEl
ement)(sn,{label:Object(i.__)("Menu","wporg-patterns"),current:n||"all",options:r,onClick:e=>{e.preventDefault(),t(e.target.pathname)},isLoading:!1})};const mn=document.getElementById("patterns__container");mn&&Object(c.render)(Object(c.createElement)(()=>{const{isEmpty:e,isSearch:t,query:n}=Object(s.useSelect)(e=>{const{getCurrentQuery:t,getPatternsByQuery:n,isLoadingPatternsByQuery:r}=e(be),a=t(),o=a&&r(a),c=a?n(a):[];return{isEmpty:!o&&!c.length,isSearch:a&&!!a.search,query:a}}),[r,a]=bn();return Object(c.createElement)(E,null,Object(c.createElement)(tn,null),Object(c.createElement)(pn,null),Object(c.createElement)(zt,null),Object(c.createElement)("div",{ref:r},t?Object(c.createElement)(en,{query:n}):Object(c.createElement)(un,{onNavigation:a})),e?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(nn,null),Object(c.createElement)(ge,{query:{per_page:6},showPagination:!1},e=>
Object(c.createElement)(Mt,{key:e.id,pattern:e,showAvatar:!0}))):Object(c.createElement)(ge,{query:n,onNavigation:a},e=>Object(c.createElement)(Mt,{key:e.id,pattern:e,showAvatar:!0})))},null),mn);const vn=document.getElementById("my-patterns__container");vn&&Object(c.render)(Object(c.createElement)(()=>{const e=wporgPatternsData.userId,{isEmpty:t,query:n}=Object(s.useSelect)(t=>{const{getCurrentQuery:n,getPatternsByQuery:r,isLoadingPatternsByQuery:a}=t(be),o={status:"any",...n()||{},author:e},c=e&&a(o),i=e?r(o):[];return{isEmpty:!c&&!i.length,query:o}});if(!e){const e=Object(O.addQueryArgs)(wporgPatternsUrl.login,{redirect_to:window.location});return Object(c.createElement)("div",{className:"entry-content"},Object(c.createElement)("p",null,Object(i.__)("Please log in to view your patterns.","wporg-patterns")),Object(c.createElement)("a",{className:"button button-prim
ary",href:e},Object(i.__)("Log in","wporg-patterns")))}return Object(c.createElement)(E,null,Object(c.createElement)(pn,null),Object(c.createElement)(ln,{primary:Object(c.createElement)(fn,null),secondary:Object(c.createElement)(rn,{options:[{label:Object(i.__)("Newest","wporg-patterns"),value:"date"},{label:Object(i.__)("Favorites","wporg-patterns"),value:"favorite_count"}]})}),t?Object(c.createElement)("div",{className:"pattern-grid__empty-header"},Object(c.createElement)("h2",null,Object(i.__)("Nothing found","wporg-patterns")),Object(c.createElement)("p",null,Object(i.__)("You haven’t created any patterns yet.","wporg-patterns"))):Object(c.createElement)(ge,{query:n},e=>Object(c.createElement)(Mt,{key:e.id,pattern:e})))},null),vn);const hn=document.getElementById("pattern-favorites__container");hn&
&Object(c.render)(Object(c.createElement)(()=>{const{isEmpty:e,query:t}=Object(s.useSelect)(e=>{const{getCurrentQuery:t,getFavorites:n,getPatternsByQuery:r,isLoadingPatternsByQuery:a}=e(be),o=t()||{},c=n();if(null===c)return{query:!1,isEmpty:!1};const i={...o,include:c},s=!!c.length&&a(i),l=c.length?r(i):[];return{query:i,isEmpty:!s&&!l.length}}),[n,r]=bn(),a={orderby:"favorite_count",per_page:6};t["pattern-categories"]&&(a["pattern-categories"]=t["pattern-categories"]);const o=!!wporgPatternsData.userId;return Object(c.createElement)(E,null,Object(c.createElement)(pn,null),Object(c.createElement)("div",{ref:n},o&&Object(c.createElement)(un,{basePath:"/favorites/",query:t,onNavigation:r})),!o||e?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(gn,{isLoggedIn:o}),Object(c.createElement)(ge,{header:Object(c.createElement)("h2",{className:"pattern-favorite
s__grid-title"},Object(i.__)("Here’s a few of our favorite patterns","wporg-patterns")),query:a,showPagination:!1},e=>Object(c.createElement)(Mt,{key:e.id,pattern:e,showAvatar:!0}))):Object(c.createElement)(ge,{query:t,onNavigation:r},e=>Object(c.createElement)(Mt,{key:e.id,pattern:e,showAvatar:!0})))},null),hn);const On=document.querySelectorAll(".pattern__container");for(let e=0;e<On.length;e++){const t=On[e],n=t.dataset;Object(c.render)(Object(c.createElement)(Gt,n),t,()=>{t.hidden=!1,document.querySelectorAll(".hide-if-pattern-loaded").forEach(e=>e.hidden=!0)})}}]);
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+Object(i.sprintf)(Object(i.__)("Page %d","wporg-patterns"),c)),l.push(Object(i.__)("WordPress.org","wporg-patterns")),l.join(" | ")});return Object(c.useEffect)(()=>{t&&(document.title=t)},[t]),null},nn=function(){return Object(c.createElement)("div",{className:"pattern-grid__empty-header"},Object(c.createElement)("h2",null,Object(i.__)("No results found","wporg-patterns")),Object(c.createElement)("p",null,Object(c.createInterpolateElement)(Object(i.__)("View <a>all block patterns</a> or browse some of our recent patterns.","wporg-patterns"),{a:Object(c.createElement)("a",{href:wporgPatternsUrl.site})})))},rn=({options:e})=>{const{path:t,replace:n}=S(),r=Object(fe.useViewportMatch)("medium",">=");retur
n e?Object(c.createElement)("div",{className:"pattern-order-select"},Object(c.createElement)(me.SelectControl,{label:Object(i.__)("Order by","wporg-patterns"),labelPosition:"side",hideLabelFromVision:r,value:Object(O.getQueryArg)(window.location.href,"orderby"),options:e,onChange:e=>{n(Object(O.addQueryArgs)(t,{orderby:e}).replace(/\/page\/[\d]+/,""))}})):null},an=()=>Object(c.createElement)(u,{className:"pattern-menu",style:{flexDirection:"row"}},Array(7).fill().map((e,t)=>Object(c.createElement)(p,{key:t,height:"1.25rem",width:"5rem",marginRight:"1rem"}))),on=({current:e,isLoading:t,label:n=Object(i.__)("Main Menu","wporg-patterns"),onClick:r,options:a})=>t?Object(c.createElement)(an,null):a.length?Object(c.createElement)("nav",null,Object(c.createElement)("h2",{className:"screen-reader-text"},n),Objec
t(c.createElement)("ul",{className:"pattern-menu"},a.map(t=>Object(c.createElement)("li",{key:t.value},Object(c.createElement)("a",{className:Et()({"pattern-menu__item":!0,"is-active":e===t.slug}),href:t.value,onClick:r,"aria-current":e===t.slug?"page":void 0},t.label))))):null,cn=({onClick:e,options:t,label:n=Object(i.__)("Browse categories","wporg-patterns")})=>{const[r,a]=Object(c.useState)(!1);return Object(c.createElement)(me.PanelBody,{className:"pattern-menu is-mobile",title:n,initialOpen:r,opened:r,onToggle:()=>a(!r)},Object(c.createElement)("ul",null,t.map(t=>Object(c.createElement)("li",{key:t.value},Object(c.createElement)("a",{href:t.value,onClick:t=>{a(!1),e(t)}},t.label)))))},sn=e=>Object(fe.useViewportMatch)("medium","<")?Object(c.createElement)(cn,e):Object(c.createElement)(on,e),ln=({prim
ary:e,secondary:t})=>Object(c.createElement)("div",{className:"pattern-navigation-layout"},e&&Object(c.createElement)("div",{className:"pattern-navigation-layout__primary"},e),t&&Object(c.createElement)("div",{className:"pattern-navigation-layout__secondary"},t)),un=({basePath:e="",onNavigation:t,...n})=>{const{path:r,update:a}=S(),{categorySlug:o,isLoading:l,options:u}=Object(s.useSelect)(t=>{var n;const{getCategoryById:a,getCategories:o,getQueryFromUrl:c,getUrlFromQuery:i,isLoadingCategories:s}=t(be),l=c(r);delete l.page;const u=(o()||[]).map(t=>({value:i({...l,"pattern-categories":t.id},wporgPatternsUrl.site+e),slug:t.slug,label:t.name}));return{categorySlug:(null===(n=a(l["pattern-categories"]))||void 0===n?void 0:n.slug)||"",isLoading:s(),options:u}});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(ln,{primary:Object(c.createElem
ent)(sn,{current:o,options:u||[],onClick:e=>{e.preventDefault(),a(e.target.pathname),"function"==typeof t&&t()},isLoading:l}),secondary:Object(c.createElement)(rn,{options:[{label:Object(i.__)("Newest","wporg-patterns"),value:"date"},{label:Object(i.__)("Favorites","wporg-patterns"),value:"favorite_count"}]})}),Object(c.createElement)(en,n))},pn=()=>{const{setCurrentQuery:e}=Object(s.useDispatch)(be),{path:t}=S(),n=Object(s.useSelect)(e=>e(be).getQueryFromUrl(t),[t]);return Jt(()=>{e(n)},[n]),null},dn=n(17);function bn(){const e=Object(c.useRef)(),t=Object(c.useCallback)(()=>{if(null==e||!e.current)return;const t=dn.focus.tabbable.find(e.current),n=t[t.length-1]||!1;n&&n.focus(),n.focus()},[]);return[e,t]}var gn=function({isLoggedIn:e}){const t=Object(O.addQueryArgs)(wporgPatternsUrl.login,{redirect_to:window.location}),n=Object(O.addQueryArgs)(wporgPatternsUrl.register,{redirect_to:
window.location});return e?Object(c.createElement)("div",{className:"pattern-grid__empty-header pattern-favorites__empty-header"},Object(c.createElement)("h2",null,Object(i.__)("Collect and view your favorite patterns.","wporg-patterns")),Object(c.createElement)("p",null,Object(i.__)("Tap the heart on any pattern to mark it as a favorite. All your favorite patterns will appear here.","wporg-patterns"))):Object(c.createElement)("div",{className:"pattern-grid__empty-header pattern-favorites__empty-header"},Object(c.createElement)("h2",null,Object(i.__)("Collect and view your favorite patterns.","wporg-patterns")),Object(c.createElement)("p",null,Object(i.__)("Log in to your WordPress.org account and you’ll be able to see all your favorite patterns in one place.","wporg-patterns")),Object(c.createElement)("p",null,Ob
ject(c.createElement)("a",{className:"button button-primary button-large",href:t},Object(i.__)("Log in","wporg-patterns"))),Object(c.createElement)("p",null,Object(c.createElement)("a",{className:"button-link link-create-account",href:n},Object(i.__)("Create an account","wporg-patterns"))))},fn=function(){const{path:e,update:t}=S();let n=j(e,"my-patterns");"page"===n&&(n="all");const r=[{value:wporgPatternsUrl.site+"/my-patterns/",slug:"all",label:Object(i.__)("All","wporg-patterns")},{value:wporgPatternsUrl.site+"/my-patterns/draft/",slug:"draft",label:Object(i.__)("Drafts","wporg-patterns")},{value:wporgPatternsUrl.site+"/my-patterns/pending/",slug:"pending",label:Object(i.__)("Pending Review","wporg-patterns")}];return Object(c.createEl
ement)(sn,{label:Object(i.__)("Menu","wporg-patterns"),current:n||"all",options:r,onClick:e=>{e.preventDefault(),t(e.target.pathname)},isLoading:!1})};const mn=document.getElementById("patterns__container");mn&&Object(c.render)(Object(c.createElement)(()=>{const{isEmpty:e,isSearch:t,query:n}=Object(s.useSelect)(e=>{const{getCurrentQuery:t,getPatternsByQuery:n,isLoadingPatternsByQuery:r}=e(be),a=t(),o=a&&r(a),c=a?n(a):[];return{isEmpty:!o&&!c.length,isSearch:a&&!!a.search,query:a}}),[r,a]=bn();return Object(c.createElement)(E,null,Object(c.createElement)(tn,null),Object(c.createElement)(pn,null),Object(c.createElement)(zt,null),Object(c.createElement)("div",{ref:r},t?Object(c.createElement)(en,{query:n}):Object(c.createElement)(un,{onNavigation:a})),e?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(nn,null),Object(c.createElement)(ge,{query:{per_page:6},showPagination:!1},e=>
Object(c.createElement)(Mt,{key:e.id,pattern:e,showAvatar:!0}))):Object(c.createElement)(ge,{query:n,onNavigation:a},e=>Object(c.createElement)(Mt,{key:e.id,pattern:e,showAvatar:!0})))},null),mn);const hn=document.getElementById("my-patterns__container");hn&&Object(c.render)(Object(c.createElement)(()=>{const e=wporgPatternsData.userId,{isEmpty:t,query:n}=Object(s.useSelect)(t=>{const{getCurrentQuery:n,getPatternsByQuery:r,isLoadingPatternsByQuery:a}=t(be),o={status:"any",...n()||{},author:e},c=e&&a(o),i=e?r(o):[];return{isEmpty:!c&&!i.length,query:o}});if(!e){const e=Object(O.addQueryArgs)(wporgPatternsUrl.login,{redirect_to:window.location});return Object(c.createElement)("div",{className:"entry-content"},Object(c.createElement)("p",null,Object(i.__)("Please log in to view your patterns.","wporg-patterns")),Object(c.createElement)("a",{className:"button button-prim
ary",href:e},Object(i.__)("Log in","wporg-patterns")))}return Object(c.createElement)(E,null,Object(c.createElement)(pn,null),Object(c.createElement)(ln,{primary:Object(c.createElement)(fn,null),secondary:Object(c.createElement)(rn,{options:[{label:Object(i.__)("Newest","wporg-patterns"),value:"date"},{label:Object(i.__)("Favorites","wporg-patterns"),value:"favorite_count"}]})}),t?Object(c.createElement)("div",{className:"pattern-grid__empty-header"},Object(c.createElement)("h2",null,Object(i.__)("Nothing found","wporg-patterns")),Object(c.createElement)("p",null,Object(i.__)("You haven’t created any patterns yet.","wporg-patterns"))):Object(c.createElement)(ge,{query:n},e=>Object(c.createElement)(Mt,{key:e.id,pattern:e})))},null),hn);const vn=document.getElementById("pattern-favorites__container");vn&
&Object(c.render)(Object(c.createElement)(()=>{const{isEmpty:e,query:t}=Object(s.useSelect)(e=>{const{getCurrentQuery:t,getFavorites:n,getPatternsByQuery:r,isLoadingPatternsByQuery:a}=e(be),o=t()||{},c=n();if(null===c)return{query:!1,isEmpty:!1};const i={...o,include:c},s=!!c.length&&a(i),l=c.length?r(i):[];return{query:i,isEmpty:!s&&!l.length}}),[n,r]=bn(),a={orderby:"favorite_count",per_page:6};t["pattern-categories"]&&(a["pattern-categories"]=t["pattern-categories"]);const o=!!wporgPatternsData.userId;return Object(c.createElement)(E,null,Object(c.createElement)(pn,null),Object(c.createElement)("div",{ref:n},o&&Object(c.createElement)(un,{basePath:"/favorites/",query:t,onNavigation:r})),!o||e?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(gn,{isLoggedIn:o}),Object(c.createElement)(ge,{header:Object(c.createElement)("h2",{className:"pattern-favorite
s__grid-title"},Object(i.__)("Here’s a few of our favorite patterns","wporg-patterns")),query:a,showPagination:!1},e=>Object(c.createElement)(Mt,{key:e.id,pattern:e,showAvatar:!0}))):Object(c.createElement)(ge,{query:t,onNavigation:r},e=>Object(c.createElement)(Mt,{key:e.id,pattern:e,showAvatar:!0})))},null),vn);const On=document.querySelectorAll(".pattern__container");for(let e=0;e<On.length;e++){const t=On[e],n=t.dataset;Object(c.render)(Object(c.createElement)(Gt,n),t,()=>{t.hidden=!1,document.querySelectorAll(".hide-if-pattern-loaded").forEach(e=>e.hidden=!0)})}}]);
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpatternspackagejson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/package.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/package.json 2021-10-05 06:44:59 UTC (rev 11265)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/package.json 2021-10-05 18:08:46 UTC (rev 11266)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,26 +26,26 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ],
</span><span class="cx" style="display: block; padding: 0 10px"> "devDependencies": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@lodder/grunt-postcss": "3.0.1",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/a11y": "3.2.1",
- "@wordpress/api-fetch": "5.2.1",
- "@wordpress/block-editor": "7.0.1",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/a11y": "3.2.2",
+ "@wordpress/api-fetch": "5.2.2",
+ "@wordpress/block-editor": "7.0.2",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/browserslist-config": "4.1.0",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/components": "16.0.0",
- "@wordpress/compose": "5.0.1",
- "@wordpress/core-data": "4.0.1",
- "@wordpress/data": "6.0.1",
- "@wordpress/data-controls": "2.2.2",
- "@wordpress/dom": "3.2.2",
- "@wordpress/element": "4.0.0",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/components": "17.0.0",
+ "@wordpress/compose": "5.0.2",
+ "@wordpress/core-data": "4.0.2",
+ "@wordpress/data": "6.1.0",
+ "@wordpress/data-controls": "2.2.3",
+ "@wordpress/dom": "3.2.3",
+ "@wordpress/element": "4.0.1",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/html-entities": "3.2.1",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/i18n": "4.2.1",
- "@wordpress/icons": "5.0.1",
- "@wordpress/keycodes": "3.2.1",
- "@wordpress/primitives": "3.0.0",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/i18n": "4.2.2",
+ "@wordpress/icons": "5.0.2",
+ "@wordpress/keycodes": "3.2.2",
+ "@wordpress/primitives": "3.0.1",
</ins><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/scripts": "16.1.4",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "@wordpress/url": "3.2.1",
- "@wordpress/viewport": "4.0.1",
- "autoprefixer": "10.3.3",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "@wordpress/url": "3.2.2",
+ "@wordpress/viewport": "4.0.2",
+ "autoprefixer": "10.3.7",
</ins><span class="cx" style="display: block; padding: 0 10px"> "classnames": "2.3.1",
</span><span class="cx" style="display: block; padding: 0 10px"> "cssnano": "5.0.8",
</span><span class="cx" style="display: block; padding: 0 10px"> "grunt": "1.4.1",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -55,11 +55,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "grunt-sass-globbing": "1.5.1",
</span><span class="cx" style="display: block; padding: 0 10px"> "grunt-webpack": "4.0.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "lodash": "4.17.21",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "postcss": "8.3.6",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "postcss": "8.3.9",
</ins><span class="cx" style="display: block; padding: 0 10px"> "react-use-gesture": "9.1.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "rtlcss": "3.3.0",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "sass": "1.38.2",
- "use-deep-compare-effect": "1.6.1"
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "sass": "1.42.1",
+ "use-deep-compare-effect": "1.8.0"
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "eslintConfig": {
</span><span class="cx" style="display: block; padding: 0 10px"> "extends": "../../../../.eslintrc.js",
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgpatternssrccomponentsmyfavoritesemptyheaderjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/src/components/my-favorites/empty-header.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/src/components/my-favorites/empty-header.js 2021-10-05 06:44:59 UTC (rev 11265)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/src/components/my-favorites/empty-header.js 2021-10-05 18:08:46 UTC (rev 11266)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,7 +13,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <h2>{ __( 'Collect and view your favorite patterns.', 'wporg-patterns' ) }</h2>
</span><span class="cx" style="display: block; padding: 0 10px"> <p>
</span><span class="cx" style="display: block; padding: 0 10px"> { __(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'Tap the heart on any pattern to make it as a favorite. All your favorite patterns will appear here.',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'Tap the heart on any pattern to mark it as a favorite. All your favorite patterns will appear here.',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'wporg-patterns'
</span><span class="cx" style="display: block; padding: 0 10px"> ) }
</span><span class="cx" style="display: block; padding: 0 10px"> </p>
</span></span></pre>
</div>
</div>
</body>
</html>