WordPress/wp-includes/js/dist/dom.min.js

2 lines
13 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
!function(){"use strict";var t={n:function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},d:function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{__unstableStripHTML:function(){return $},computeCaretRect:function(){return b},documentHasSelection:function(){return w},documentHasTextSelection:function(){return N},documentHasUncollapsedSelection:function(){return C},focus:function(){return ct},getFilesFromDataTransfer:function(){return ut},getOffsetParent:function(){return O},getPhrasingContentSchema:function(){return tt},getRectangleFromRange:function(){return g},getScrollContainer:function(){return v},insertAfter:function(){return z},isEmpty:function(){return J},isEntirelySelected:function(){return A},isFormElement:function(){return D},isHorizontalEdge:function(){return x},isNumberInput:function(){return _},isPhrasingContent:function(){return et},isRTL:function(){return P},isTextContent:function(){return nt},isTextField:function(){return E},isVerticalEdge:function(){return F},placeCaretAtHorizontalEdge:function(){return j},placeCaretAtVerticalEdge:function(){return U},remove:function(){return q},removeInvalidHTML:function(){return it},replace:function(){return W},replaceTag:function(){return X},safeHTML:function(){return Y},unwrap:function(){return k},wrap:function(){return G}});var n={};t.r(n),t.d(n,{find:function(){return i}});var r={};function o(t){return t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0}function i(t,{sequential:e=!1}={}){const n=t.querySelectorAll(function(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","area[href]","[contenteditable]:not([contenteditable=false])"].join(",")}(e));return Array.from(n).filter((t=>{if(!o(t))return!1;const{nodeName:e}=t;return"AREA"!==e||function(t){const e=t.closest("map[name]");if(!e)return!1;const n=t.ownerDocument.querySelector('img[usemap="#'+e.name+'"]');return!!n&&o(n)}(t)}))}function u(t){const e=t.getAttribute("tabindex");return null===e?0:parseInt(e,10)}function c(t){return-1!==u(t)}function a(t,e){return{element:t,index:e}}function s(t){return t.element}function l(t,e){const n=u(t.element),r=u(e.element);return n===r?t.index-e.index:n-r}function f(t){return t.filter(c).map(a).sort(l).map(s).reduce(function(){const t={};return function(e,n){const{nodeName:r,type:o,checked:i,name:u}=n;if("INPUT"!==r||"radio"!==o||!u)return e.concat(n);const c=t.hasOwnProperty(u);if(!i&&c)return e;if(c){const n=t[u];e=e.filter((t=>t!==n))}return t[u]=n,e.concat(n)}}(),[])}function d(t){return f(i(t))}function m(t){return f(i(t.ownerDocument.body)).reverse().find((e=>t.compareDocumentPosition(e)&t.DOCUMENT_POSITION_PRECEDING))}function h(t){return f(i(t.ownerDocument.body)).find((e=>t.compareDocumentPosition(e)&t.DOCUMENT_POSITION_FOLLOWING))}function p(t,e){0}function g(t){if(!t.collapsed){const e=Array.from(t.getClientRects());if(1===e.length)return e[0];const n=e.filter((({width:t})=>t>1));if(0===n.length)return t.getBoundingClientRect();if(1===n.length)return n[0];let{top:r,bottom:o,left:i,right:u}=n[0];for(const{top:t,bottom:e,left:c,right:a}of n)t<r&&(r=t),e>o&&(o=e),c<i&&(i=c),a>u&&(u=a);return new window.DOMRect(i,r,u-i,o-r)}const{startContainer:e}=t,{ownerDocument:n}=e;if("BR"===e.nodeName){const{parentNode:r}=e;p();const o=Array.from(r.childNodes).indexOf(e);p(),(t=n.createRange()).setStart(r,o),t.setEnd(r,o)}const r=t.getClientRects();if(r.length>1)return null;let o=r[0];if(!o||0===o.height){p();const e=n.createTextNode("");(t=t.cloneRange()).insertNode(e),o=t.getClientRects()[0],p(e.parentNode),e.parentNode.removeC