File: /www/wwwroot/www.waciwang.com/wp-content/plugins/gutenberg/build/scripts/dom/index.min.js
"use strict";var wp;(wp||={}).dom=(()=>{var Dt=Object.create;var O=Object.defineProperty;var At=Object.getOwnPropertyDescriptor;var Ot=Object.getOwnPropertyNames;var vt=Object.getPrototypeOf,Lt=Object.prototype.hasOwnProperty;var Ht=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),B=(t,e)=>{for(var r in e)O(t,r,{get:e[r],enumerable:!0})},Z=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ot(e))!Lt.call(t,n)&&n!==r&&O(t,n,{get:()=>e[n],enumerable:!(o=At(e,n))||o.enumerable});return t};var Pt=(t,e,r)=>(r=t!=null?Dt(vt(t)):{},Z(e||!t||!t.__esModule?O(r,"default",{value:t,enumerable:!0}):r,t)),Mt=t=>Z(O({},"__esModule",{value:!0}),t);var ut=Ht((Xe,lt)=>{lt.exports=window.wp.deprecated});var Kt={};B(Kt,{__unstableStripHTML:()=>xt,computeCaretRect:()=>K,documentHasSelection:()=>et,documentHasTextSelection:()=>C,documentHasUncollapsedSelection:()=>tt,focus:()=>Jt,getFilesFromDataTransfer:()=>$t,getOffsetParent:()=>rt,getPhrasingContentSchema:()=>Ct,getRectangleFromRange:()=>h,getScrollContainer:()=>q,insertAfter:()=>w,isEmpty:()=>R,isEntirelySelected:()=>nt,isFormElement:()=>it,isHorizontalEdge:()=>ft,isNumberInput:()=>dt,isPhrasingContent:()=>A,isRTL:()=>T,isSelectionForward:()=>v,isTextContent:()=>Yt,isTextField:()=>E,isVerticalEdge:()=>mt,placeCaretAtHorizontalEdge:()=>pt,placeCaretAtVerticalEdge:()=>gt,remove:()=>g,removeInvalidHTML:()=>Tt,replace:()=>ht,replaceTag:()=>bt,safeHTML:()=>F,unwrap:()=>y,wrap:()=>Nt});var z={};B(z,{find:()=>S});function Ft(t){return[t?'[tabindex]:not([tabindex^="-"])':"[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])",'iframe:not([tabindex^="-"])',"object","embed","summary","area[href]","[contenteditable]:not([contenteditable=false])"].join(",")}function $(t){return t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0}function Vt(t){let e=t.closest("map[name]");if(!e)return!1;let r=t.ownerDocument.querySelector('img[usemap="#'+e.name+'"]');return!!r&&$(r)}function S(t,{sequential:e=!1}={}){let r=t.querySelectorAll(Ft(e));return Array.from(r).filter(o=>{if(!$(o))return!1;let{nodeName:n}=o;return n==="AREA"?Vt(o):!0})}var k={};B(k,{find:()=>jt,findNext:()=>qt,findPrevious:()=>kt,isTabbableIndex:()=>J});function U(t){let e=t.getAttribute("tabindex");return e===null?0:parseInt(e,10)}function J(t){return U(t)!==-1}function _t(){let t={};return function(r,o){let{nodeName:n,type:i,checked:a,name:s}=o;if(n!=="INPUT"||i!=="radio"||!s)return r.concat(o);let f=t.hasOwnProperty(s);if(!(a||!f))return r;if(f){let d=t[s];r=r.filter(l=>l!==d)}return t[s]=o,r.concat(o)}}function Bt(t,e){return{element:t,index:e}}function zt(t){return t.element}function Ut(t,e){let r=U(t.element),o=U(e.element);return r===o?t.index-e.index:r-o}function j(t){return t.filter(J).map(Bt).sort(Ut).map(zt).reduce(_t(),[])}function jt(t){return j(S(t))}function kt(t){return j(S(t.ownerDocument.body)).reverse().find(e=>t.compareDocumentPosition(e)&t.DOCUMENT_POSITION_PRECEDING)}function qt(t){return j(S(t.ownerDocument.body)).find(e=>t.compareDocumentPosition(e)&t.DOCUMENT_POSITION_FOLLOWING)}function h(t){if(!t.collapsed){let i=Array.from(t.getClientRects());if(i.length===1)return i[0];let a=i.filter(({width:l})=>l>1);if(a.length===0)return t.getBoundingClientRect();if(a.length===1)return a[0];let{top:s,bottom:f,left:c,right:d}=a[0];for(let{top:l,bottom:u,left:m,right:x}of a)l<s&&(s=l),u>f&&(f=u),m<c&&(c=m),x>d&&(d=x);return new window.DOMRect(c,s,d-c,f-s)}let{startContainer:e}=t,{ownerDocument:r}=e;if(e.nodeName==="BR"){let{parentNode:i}=e;let a=Array.from(i.childNodes).indexOf(e);t=r.createRange(),t.setStart(i,a),t.setEnd(i,a)}let o=t.getClientRects();if(o.length>1)return null;let n=o[0];if(!n||n.height===0){let i=r.createTextNode("\u200B");t=t.cloneRange(),t.insertNode(i),n=t.getClientRects()[0],i.parentNode,i.parentNode.removeChild(i)}return n}function K(t){let e=t.getSelection();let r=e.rangeCount?e.getRangeAt(0):null;return r?h(r):null}function C(t){t.defaultView;let e=t.defaultView.getSelection();let r=e.rangeCount?e.getRangeAt(0):null;return!!r&&!r.collapsed}function b(t){return t?.nodeName==="INPUT"}function E(t){let e=["button","checkbox","hidden","file","radio","image","range","reset","submit","number","email","time"];return b(t)&&t.type&&!e.includes(t.type)||t.nodeName==="TEXTAREA"||t.contentEditable==="true"}function Q(t){if(!b(t)&&!E(t))return!1;try{let{selectionStart:e,selectionEnd:r}=t;return e===null||e!==r}catch{return!0}}function tt(t){return C(t)||!!t.activeElement&&Q(t.activeElement)}function et(t){return!!t.activeElement&&(b(t.activeElement)||E(t.activeElement)||C(t))}function p(t){return t.ownerDocument.defaultView,t.ownerDocument.defaultView.getComputedStyle(t)}function q(t,e="vertical"){if(t){if((e==="vertical"||e==="all")&&t.scrollHeight>t.clientHeight){let{overflowY:r}=p(t);if(/(auto|scroll)/.test(r))return t}if((e==="horizontal"||e==="all")&&t.scrollWidth>t.clientWidth){let{overflowX:r}=p(t);if(/(auto|scroll)/.test(r))return t}return t.ownerDocument===t.parentNode?t:q(t.parentNode,e)}}function rt(t){let e;for(;(e=t.parentNode)&&e.nodeType!==e.ELEMENT_NODE;);return e?p(e).position!=="static"?e:e.offsetParent:null}function N(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"}function nt(t){if(N(t))return t.selectionStart===0&&t.value.length===t.selectionEnd;if(!t.isContentEditable)return!0;let{ownerDocument:e}=t,{defaultView:r}=e;let o=r.getSelection();let n=o.rangeCount?o.getRangeAt(0):null;if(!n)return!0;let{startContainer:i,endContainer:a,startOffset:s,endOffset:f}=n;if(i===t&&a===t&&s===0&&f===t.childNodes.length)return!0;let c=t.lastChild;let d=a.nodeType===a.TEXT_NODE?a.data.length:a.childNodes.length;return ot(i,t,"firstChild")&&ot(a,t,"lastChild")&&s===0&&f===d}function ot(t,e,r){let o=e;do{if(t===o)return!0;o=o[r]}while(o);return!1}function it(t){if(!t)return!1;let{tagName:e}=t;return N(t)||e==="BUTTON"||e==="SELECT"}function T(t){return p(t).direction==="rtl"}function at(t){let e=Array.from(t.getClientRects());if(!e.length)return;let r=Math.min(...e.map(({top:n})=>n));return Math.max(...e.map(({bottom:n})=>n))-r}function v(t){let{anchorNode:e,focusNode:r,anchorOffset:o,focusOffset:n}=t;let i=e.compareDocumentPosition(r);return i&e.DOCUMENT_POSITION_PRECEDING?!1:i&e.DOCUMENT_POSITION_FOLLOWING?!0:i===0?o<=n:!0}function st(t,e,r){if(t.caretRangeFromPoint)return t.caretRangeFromPoint(e,r);if(!t.caretPositionFromPoint)return null;let o=t.caretPositionFromPoint(e,r);if(!o)return null;let n=t.createRange();return n.setStart(o.offsetNode,o.offset),n.collapse(!0),n}function L(t,e,r,o){let n=o.style.zIndex,i=o.style.position,{position:a="static"}=p(o);a==="static"&&(o.style.position="relative"),o.style.zIndex="10000";let s=st(t,e,r);return o.style.zIndex=n,o.style.position=i,s}function H(t,e,r){let o=r();return(!o||!o.startContainer||!t.contains(o.startContainer))&&(t.scrollIntoView(e),o=r(),!o||!o.startContainer||!t.contains(o.startContainer))?null:o}function P(t,e,r=!1){if(N(t)&&typeof t.selectionStart=="number")return t.selectionStart!==t.selectionEnd?!1:e?t.selectionStart===0:t.value.length===t.selectionStart;if(!t.isContentEditable)return!0;let{ownerDocument:o}=t,{defaultView:n}=o;let i=n.getSelection();if(!i||!i.rangeCount)return!1;let a=i.getRangeAt(0),s=a.cloneRange(),f=v(i),c=i.isCollapsed;c||s.collapse(!f);let d=h(s),l=h(a);if(!d||!l)return!1;let u=at(a);if(!c&&u&&u>d.height&&f===e)return!1;let m=T(t)?!e:e,x=t.getBoundingClientRect(),wt=m?x.left+1:x.right-1,yt=e?x.top+1:x.bottom-1,G=H(t,e,()=>L(o,wt,yt,t));if(!G)return!1;let _=h(G);if(!_)return!1;let W=e?"top":"bottom",X=m?"left":"right",It=_[W]-l[W],St=_[X]-d[X],Y=Math.abs(It)<=1,Rt=Math.abs(St)<=1;return r?Y:Y&&Rt}function ft(t,e){return P(t,e)}var ct=Pt(ut(),1);function dt(t){return(0,ct.default)("wp.dom.isNumberInput",{since:"6.1",version:"6.5"}),b(t)&&t.type==="number"&&!isNaN(t.valueAsNumber)}function mt(t,e){return P(t,e,!0)}function Gt(t,e,r){let{ownerDocument:o}=t,n=T(t)?!e:e,i=t.getBoundingClientRect();r===void 0?r=e?i.right-1:i.left+1:r<=i.left?r=i.left+1:r>=i.right&&(r=i.right-1);let a=n?i.bottom-1:i.top+1;return L(o,r,a,t)}function M(t,e,r){if(!t)return;if(t.focus(),N(t)){if(typeof t.selectionStart!="number")return;e?(t.selectionStart=t.value.length,t.selectionEnd=t.value.length):(t.selectionStart=0,t.selectionEnd=0);return}if(!t.isContentEditable)return;let o=H(t,e,()=>Gt(t,e,r));if(!o)return;let{ownerDocument:n}=t,{defaultView:i}=n;let a=i.getSelection();a.removeAllRanges(),a.addRange(o)}function pt(t,e){return M(t,e,void 0)}function gt(t,e,r){return M(t,e,r?.left)}function w(t,e){e.parentNode,e.parentNode.insertBefore(t,e.nextSibling)}function g(t){t.parentNode,t.parentNode.removeChild(t)}function ht(t,e){t.parentNode,w(e,t.parentNode),g(t)}function y(t){let e=t.parentNode;for(;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t)}function bt(t,e){let r=t.ownerDocument.createElement(e);for(;t.firstChild;)r.appendChild(t.firstChild);return t.parentNode,t.parentNode.replaceChild(r,t),r}function Nt(t,e){e.parentNode,e.parentNode.insertBefore(t,e),t.appendChild(e)}function F(t){let{body:e}=document.implementation.createHTMLDocument("");e.innerHTML=t;let r=e.getElementsByTagName("*"),o=r.length;for(;o--;){let n=r[o];if(n.tagName==="SCRIPT")g(n);else{let i=n.attributes.length;for(;i--;){let{name:a}=n.attributes[i];a.startsWith("on")&&n.removeAttribute(a)}}}return e.innerHTML}function xt(t){t=F(t);let e=document.implementation.createHTMLDocument("");return e.body.innerHTML=t,e.body.textContent||""}function R(t){switch(t.nodeType){case t.TEXT_NODE:return/^[ \f\n\r\t\v\u00a0]*$/.test(t.nodeValue||"");case t.ELEMENT_NODE:return t.hasAttributes()?!1:t.hasChildNodes()?Array.from(t.childNodes).every(R):!0;default:return!0}}var D={strong:{},em:{},s:{},del:{},ins:{},a:{attributes:["href","target","rel","id"]},code:{},abbr:{attributes:["title"]},sub:{},sup:{},br:{},small:{},q:{attributes:["cite"]},dfn:{attributes:["title"]},data:{attributes:["value"]},time:{attributes:["datetime"]},var:{},samp:{},kbd:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{attributes:["dir"]},bdo:{attributes:["dir"]},wbr:{},"#text":{}},Wt=["#text","br"];Object.keys(D).filter(t=>!Wt.includes(t)).forEach(t=>{let{[t]:e,...r}=D;D[t].children=r});var Xt={audio:{attributes:["src","preload","autoplay","mediagroup","loop","muted"]},canvas:{attributes:["width","height"]},embed:{attributes:["src","type","width","height"]},img:{attributes:["alt","src","srcset","usemap","ismap","width","height"]},object:{attributes:["data","type","name","usemap","form","width","height"]},video:{attributes:["src","poster","preload","playsinline","autoplay","mediagroup","loop","muted","controls","width","height"]},math:{attributes:["display","xmlns"],children:"*"}},V={...D,...Xt};function Ct(t){if(t!=="paste")return V;let{u:e,abbr:r,data:o,time:n,wbr:i,bdi:a,bdo:s,...f}={...V,ins:{children:V.ins.children},del:{children:V.del.children}};return f}function A(t){let e=t.nodeName.toLowerCase();return Ct().hasOwnProperty(e)||e==="span"}function Yt(t){let e=t.nodeName.toLowerCase();return D.hasOwnProperty(e)||e==="span"}function Et(t){return!!t&&t.nodeType===t.ELEMENT_NODE}var Zt=()=>{};function I(t,e,r,o){Array.from(t).forEach(n=>{let i=n.nodeName.toLowerCase();if(r.hasOwnProperty(i)&&(!r[i].isMatch||r[i].isMatch?.(n))){if(Et(n)){let{attributes:a=[],classes:s=[],children:f,require:c=[],allowEmpty:d}=r[i];if(f&&!d&&R(n)){g(n);return}if(n.hasAttributes()&&(Array.from(n.attributes).forEach(({name:l})=>{l!=="class"&&!a.includes(l)&&n.removeAttribute(l)}),n.classList&&n.classList.length)){let l=s.map(u=>u==="*"?()=>!0:typeof u=="string"?m=>m===u:u instanceof RegExp?m=>u.test(m):Zt);Array.from(n.classList).forEach(u=>{l.some(m=>m(u))||n.classList.remove(u)}),n.classList.length||n.removeAttribute("class")}if(n.hasChildNodes()){if(f==="*")return;if(f)c.length&&!n.querySelector(c.join(","))?(I(n.childNodes,e,r,o),y(n)):n.parentNode&&n.parentNode.nodeName==="BODY"&&A(n)?(I(n.childNodes,e,r,o),Array.from(n.childNodes).some(l=>!A(l))&&y(n)):I(n.childNodes,e,f,o);else for(;n.firstChild;)g(n.firstChild)}}}else I(n.childNodes,e,r,o),o&&!A(n)&&n.nextElementSibling&&w(e.createElement("br"),n),y(n)})}function Tt(t,e,r){let o=document.implementation.createHTMLDocument("");return o.body.innerHTML=t,I(o.body.childNodes,o,e,r),o.body.innerHTML}function $t(t){let e=Array.from(t.files);return Array.from(t.items).forEach(r=>{let o=r.getAsFile();o&&!e.find(({name:n,type:i,size:a})=>n===o.name&&i===o.type&&a===o.size)&&e.push(o)}),e}var Jt={focusable:z,tabbable:k};return Mt(Kt);})();
//# sourceMappingURL=index.min.js.map