2023-09-05 17:29:16 +08:00
|
|
|
(()=>{var e={1073:e=>{e.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},996:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeRules=void 0;var n=r(1073),i=/[-[\]{}()*+?.,\\^$|#\s]/g;function o(e){return e.replace(i,"\\$&")}var a=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function s(e,t){return"boolean"==typeof e.ignoreCase?e.ignoreCase:"quirks"===e.ignoreCase?!!t.quirksMode:!t.xmlMode&&a.has(e.name)}t.attributeRules={equals:function(e,t,r){var n=r.adapter,i=t.name,o=t.value;return s(t,r)?(o=o.toLowerCase(),function(t){var r=n.getAttributeValue(t,i);return null!=r&&r.length===o.length&&r.toLowerCase()===o&&e(t)}):function(t){return n.getAttributeValue(t,i)===o&&e(t)}},hyphen:function(e,t,r){var n=r.adapter,i=t.name,o=t.value,a=o.length;return s(t,r)?(o=o.toLowerCase(),function(t){var r=n.getAttributeValue(t,i);return null!=r&&(r.length===a||"-"===r.charAt(a))&&r.substr(0,a).toLowerCase()===o&&e(t)}):function(t){var r=n.getAttributeValue(t,i);return null!=r&&(r.length===a||"-"===r.charAt(a))&&r.substr(0,a)===o&&e(t)}},element:function(e,t,r){var i=r.adapter,a=t.name,l=t.value;if(/\s/.test(l))return n.falseFunc;var c=new RegExp("(?:^|\\s)".concat(o(l),"(?:$|\\s)"),s(t,r)?"i":"");return function(t){var r=i.getAttributeValue(t,a);return null!=r&&r.length>=l.length&&c.test(r)&&e(t)}},exists:function(e,t,r){var n=t.name,i=r.adapter;return function(t){return i.hasAttrib(t,n)&&e(t)}},start:function(e,t,r){var i=r.adapter,o=t.name,a=t.value,l=a.length;return 0===l?n.falseFunc:s(t,r)?(a=a.toLowerCase(),function(t){var r=i.getAttributeValue(t,o);return null!=r&&r.length>=l&&r.substr(0,l).toLowerCase()===a&&e(t)}):function(t){var r;return!!(null===(r=i.getAttributeValue(t,o))||void 0===r?void 0:r.startsWith(a))&&e(t)}},end:function(e,t,r){var i=r.adapter,o=t.name,a=t.value,l=-a.length;return 0===l?n.falseFunc:s(t,r)?(a=a.toLowerCase(),function(t){var r;return(null===(r=i.getAttributeValue(t,o))||void 0===r?void 0:r.substr(l).toLowerCase())===a&&e(t)}):function(t){var r;return!!(null===(r=i.getAttributeValue(t,o))||void 0===r?void 0:r.endsWith(a))&&e(t)}},any:function(e,t,r){var i=r.adapter,a=t.name,l=t.value;if(""===l)return n.falseFunc;if(s(t,r)){var c=new RegExp(o(l),"i");return function(t){var r=i.getAttributeValue(t,a);return null!=r&&r.length>=l.length&&c.test(r)&&e(t)}}return function(t){var r;return!!(null===(r=i.getAttributeValue(t,a))||void 0===r?void 0:r.includes(l))&&e(t)}},not:function(e,t,r){var n=r.adapter,i=t.name,o=t.value;return""===o?function(t){return!!n.getAttributeValue(t,i)&&e(t)}:s(t,r)?(o=o.toLowerCase(),function(t){var r=n.getAttributeValue(t,i);return(null==r||r.length!==o.length||r.toLowerCase()!==o)&&e(t)}):function(t){return n.getAttributeValue(t,i)!==o&&e(t)}}}},8866:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.compileToken=t.compileUnsafe=t.compile=void 0;var i=r(7763),o=r(1073),a=n(r(7353)),s=r(7177),l=r(3621),c=r(1768);function u(e,t,r){return m("string"==typeof e?(0,i.parse)(e):e,t,r)}function p(e){return"pseudo"===e.type&&("scope"===e.name||Array.isArray(e.data)&&e.data.some((function(e){return e.some(p)})))}t.compile=function(e,t,r){var n=u(e,t,r);return(0,c.ensureIsTag)(n,t.adapter)},t.compileUnsafe=u;var d={type:i.SelectorType.Descendant},f={type:"_flexibleDescendant"},h={type:i.SelectorType.Pseudo,name:"scope",data:null};function m(e,t,r){var n;(e=e.filter((function(e){return e.length>0}))).forEach(a.default),r=null!==(n=t.context)&&void 0!==n?n:r;var i=Array.isArray(r),u=r&&(Array.isArray(r)?r:[r]);!function(e,t,r){for(var n=t.adapter
|