| Server IP : 121.121.20.254 / Your IP : 216.73.217.141 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/excellentvege/wp-content/plugins/wpcode-premium/build/ |
Upload File : |
(()=>{"use strict";(window.WPCodeCssSelectorPicker||function(t,e){const n={state:{selectedEl:null,hoverEl:null,hoverSelector:"",selector:"",matchCount:0,useIndex:!1,targetAll:!1,navigateMode:!1,pageScopeSelector:"",specificityStep:null,specificityCandidates:[]},init:function(){"undefined"!=typeof wpcodeCssSelectorPicker&&(n.injectUi(),n.injectOverlay(),n.bindEvents(),n.ensurePickerNavigation(),n.restoreNavigateMode(),t.documentElement.classList.add("wpcode-css-picker-active"),t.documentElement.style.cursor="crosshair",t.body.style.cursor="crosshair",n.state.pageScopeSelector=n.getPageScopeSelector())},injectUi:function(){const e=wpcodeCssSelectorPicker&&wpcodeCssSelectorPicker.logoUrl?String(wpcodeCssSelectorPicker.logoUrl):"";n.bar=t.createElement("div"),n.bar.className="wpcode-css-picker-bar",n.bar.innerHTML=`\n\t\t\t\t\t<div class = "wpcode-css-picker-inner">\n\t\t\t\t\t\t${e?` <img class = "wpcode-css-picker-logo" src = "${e}" alt = "WPCode" /> `:""}\n\t\t\t\t\t\t<div class = "wpcode-css-picker-center">\n\t\t\t\t\t\t\t<div class = "wpcode-css-picker-title"> CSS Selector </div>\n\t\t\t\t\t\t\t<div class = "wpcode-css-picker-meta">\n\t\t\t\t\t\t\t\t<div class = "wpcode-css-picker-selected" id = "wpcode-css-picker-selected"> Click an element to select it… </div>\n\t\t\t\t\t\t\t\t<div class = "wpcode-css-picker-sub" id = "wpcode-css-picker-sub"> Tip: Hover to highlight. Press Esc to cancel. Toggle “Navigate” to browse.</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class = "wpcode-css-picker-controls">\n\t\t\t\t\t\t\t<div class = "wpcode-css-picker-toggle-wrap" title = "Turn off selection/highlight so you can navigate the page">\n\t\t\t\t\t\t\t\t<label class = "wpcode-checkbox-toggle">\n\t\t\t\t\t\t\t\t\t<input type = "checkbox" id = "wpcode-css-picker-navigate"/>\n\t\t\t\t\t\t\t\t\t<span class = "wpcode-checkbox-toggle-slider" > </span>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t<label class = "wpcode-css-picker-toggle-label" for = "wpcode-css-picker-navigate" > Disable picker </label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class = "wpcode-css-picker-toggle-wrap" title = "Target all matching elements" >\n\t\t\t\t\t\t\t\t<label class = "wpcode-checkbox-toggle" >\n\t\t\t\t\t\t\t\t\t<input type = "checkbox" id = "wpcode-css-picker-target-all" />\n\t\t\t\t\t\t\t\t\t<span class = "wpcode-checkbox-toggle-slider" > </span>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t<label class = "wpcode-css-picker-toggle-label" for = "wpcode-css-picker-target-all" > Target all </label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class = "wpcode-css-picker-specificity" title = "Adjust how broad or specific the selector is (Target all)" >\n\t\t\t\t\t\t\t\t<button type = "button" class = "wpcode-button wpcode-button-secondary wpcode-css-picker-specificity-btn" id = "wpcode-css-picker-specificity-less" disabled aria-label = "Less specific" > − </button>\n\t\t\t\t\t\t\t\t<button type = "button" class = "wpcode-button wpcode-button-secondary wpcode-css-picker-specificity-btn" id = "wpcode-css-picker-specificity-more" disabled aria-label = "More specific" > + </button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class = "wpcode-css-picker-toggle-wrap" id = "wpcode-css-picker-use-index-wrap" title = "Use element index if selector matches multiple elements" style = "display:none;" >\n\t\t\t\t\t\t\t\t<label class = "wpcode-checkbox-toggle" >\n\t\t\t\t\t\t\t\t\t<input type = "checkbox" id = "wpcode-css-picker-use-index" />\n\t\t\t\t\t\t\t\t\t<span class = "wpcode-checkbox-toggle-slider" > </span>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t<label class = "wpcode-css-picker-toggle-label" for = "wpcode-css-picker-use-index" > Use index </label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<button type = "button" class = "wpcode-button wpcode-button-secondary" id = "wpcode-css-picker-cancel" > Cancel </button>\n\t\t\t\t\t\t\t<button type = "button" class = "wpcode-button" id = "wpcode-css-picker-done" disabled > Done </button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t`,t.body.appendChild(n.bar),n.selectedText=t.getElementById("wpcode-css-picker-selected"),n.subText=t.getElementById("wpcode-css-picker-sub"),n.doneBtn=t.getElementById("wpcode-css-picker-done"),n.cancelBtn=t.getElementById("wpcode-css-picker-cancel"),n.navigate=t.getElementById("wpcode-css-picker-navigate"),n.targetAll=t.getElementById("wpcode-css-picker-target-all"),n.specLessBtn=t.getElementById("wpcode-css-picker-specificity-less"),n.specMoreBtn=t.getElementById("wpcode-css-picker-specificity-more"),n.useIndexWrap=t.getElementById("wpcode-css-picker-use-index-wrap"),n.useIndex=t.getElementById("wpcode-css-picker-use-index")},injectOverlay:function(){n.highlight=t.createElement("div"),n.highlight.className="wpcode-css-picker-highlight",n.highlight.style.display="none",t.body.appendChild(n.highlight),n.selectedHighlight=t.createElement("div"),n.selectedHighlight.className="wpcode-css-picker-highlight wpcode-css-picker-selected-highlight",n.selectedHighlight.style.display="none",t.body.appendChild(n.selectedHighlight),n.tooltip=t.createElement("div"),n.tooltip.className="wpcode-css-picker-tooltip",n.tooltip.style.display="none",t.body.appendChild(n.tooltip)},bindEvents:function(){n._rafPending=!1,n._onMouseMoveRaf=function(t){n._rafPending||(n._rafPending=!0,e.requestAnimationFrame(function(){n._rafPending=!1,n.onMouseMove(t)}))},t.addEventListener("mousemove",n._onMouseMoveRaf,!0),t.addEventListener("click",n.onClick,!0),e.addEventListener("scroll",n.onScroll,!0),e.addEventListener("resize",n.onScroll,!0),n.cancelBtn.addEventListener("click",function(){n.close()}),n.doneBtn.addEventListener("click",function(){n.done()}),n.navigate.addEventListener("change",function(){n.setNavigateMode(!!n.navigate.checked)}),n.targetAll.addEventListener("change",function(){n.state.targetAll=!!n.targetAll.checked,n.state.specificityStep=null,n.recompute()}),n.specLessBtn.addEventListener("click",function(){n.adjustSpecificity(-1)}),n.specMoreBtn.addEventListener("click",function(){n.adjustSpecificity(1)}),n.useIndex.addEventListener("change",function(){n.state.useIndex=!!n.useIndex.checked,n.updateSubText()}),t.addEventListener("keydown",function(t){"n"!==t.key&&"N"!==t.key||(n.navigate.checked=!n.navigate.checked,n.setNavigateMode(!!n.navigate.checked)),"Escape"===t.key&&(t.preventDefault(),n.close())},!0)},setNavigateMode:function(s){n.state.navigateMode=!!s;try{e.sessionStorage.setItem(n.getNavigateStorageKey(),n.state.navigateMode?"1":"0")}catch(t){}n.state.navigateMode?(n.state.hoverEl=null,n.hideHighlight(),n.hideSelectedHighlight(),n.hideTooltip(),n.clearMatchHighlights(),t.documentElement.style.cursor="auto",t.body.style.cursor="auto",n.subText.textContent="Navigate mode is ON. Toggle it off to select an element."):(t.documentElement.style.cursor="crosshair",t.body.style.cursor="crosshair",n.updateSubText(),n.updateMatchHighlights())},restoreNavigateMode:function(){let t=null;try{t=e.sessionStorage.getItem(n.getNavigateStorageKey())}catch(e){t=null}"1"===t&&(n.navigate.checked=!0,n.setNavigateMode(!0))},getNavigateStorageKey:function(){return"wpcode_css_picker_navigate_"+(n.getToken()||"no_token")},onMouseMove:function(t){if(n.state.navigateMode)return;if(!t||!t.target)return;const e=n.getPickableElement(t.target);e&&(n.bar.contains(e)||n.highlight===e||n.tooltip===e?n.hideHighlight():(n.state.hoverEl!==e&&(n.state.hoverEl=e,n.state.hoverSelector=n.getProposedSelectorForElement(e)),n.showHighlight(e),n.showTooltip(e)))},onClick:function(t){if(n.state.navigateMode)return;if(t&&t.target&&n.bar.contains(t.target))return;t&&(t.preventDefault(),t.stopPropagation());const e=n.state.hoverEl||(t&&t.target?n.getPickableElement(t.target):null);e&&(n.state.selectedEl=e,n.showSelectedHighlight(e),n.state.specificityStep=null,n.recompute())},onScroll:function(){n.state.navigateMode||(n.state.hoverEl&&(n.showHighlight(n.state.hoverEl),n.showTooltip(n.state.hoverEl)),n.state.selectedEl&&n.showSelectedHighlight(n.state.selectedEl))},recompute:function(){if(!n.state.selectedEl)return;let e="";if(n.state.targetAll){const t=n.buildTargetAllSelectorCandidates(n.state.selectedEl,n.state.pageScopeSelector);n.state.specificityCandidates=t,null===n.state.specificityStep&&(n.state.specificityStep=n.pickDefaultTargetAllStep(t,n.state.selectedEl,n.state.pageScopeSelector)),n.state.specificityStep<0&&(n.state.specificityStep=0),n.state.specificityStep>t.length-1&&(n.state.specificityStep=t.length-1),e=t[n.state.specificityStep]||""}else e=n.buildBestSelector(n.state.selectedEl,{targetAll:!1,pageScopeSelector:n.state.pageScopeSelector})||"",n.state.specificityCandidates=[],n.state.specificityStep=null;n.state.selector=e;let s=[];if(e)try{s=Array.from(t.querySelectorAll(e))}catch(t){s=[]}n.state.matchCount=s.length,n.selectedText.textContent=n.state.selector?n.state.selector:"Unable to build a selector for this element.",n.doneBtn.disabled=!n.state.selector,n.updateMatchHighlights(s),n.updateSpecificityControls(),n.state.selector&&n.state.matchCount>1&&!n.state.targetAll?(n.useIndexWrap.style.display="",n.state.useIndex=!0,n.useIndex.checked=!0):(n.useIndexWrap.style.display="none",n.state.useIndex=!1,n.useIndex.checked=!1),n.updateSubText()},updateMatchHighlights:function(e){if(n.state.navigateMode)return void n.clearMatchHighlights();if(!n.state.targetAll||!n.state.selector)return void n.clearMatchHighlights();let s=[];if(e)s=e;else try{s=Array.from(t.querySelectorAll(n.state.selector))}catch(t){s=[]}s=s.filter(function(t){return!(!t||1!==t.nodeType||n.bar&&n.bar.contains(t)||n.highlight&&t===n.highlight||n.selectedHighlight&&t===n.selectedHighlight||n.tooltip&&t===n.tooltip)}),n.clearMatchHighlights();const c=s.slice(0,500),i=c.length;for(let t=0;t<i;t++)c[t]&&c[t].classList&&c[t].classList.add("wpcode-css-picker-match-highlight");n.matchHighlights=c},clearMatchHighlights:function(){const t=n.matchHighlights?n.matchHighlights:[],e=t.length;for(let n=0;n<e;n++)t[n]&&t[n].classList&&t[n].classList.remove("wpcode-css-picker-match-highlight");n.matchHighlights=[]},adjustSpecificity:function(t){if(!n.state.targetAll)return;if(!n.state.selectedEl)return;const e=null===n.state.specificityStep?0:n.state.specificityStep;n.state.specificityStep=e+t,n.recompute()},updateSpecificityControls:function(){if(!n.specLessBtn||!n.specMoreBtn)return;if(!n.state.targetAll||!n.state.selectedEl)return n.specLessBtn.disabled=!0,void(n.specMoreBtn.disabled=!0);const t=(n.state.specificityCandidates||[]).length,e=null===n.state.specificityStep?0:n.state.specificityStep;if(t<=1)return n.specLessBtn.disabled=!0,void(n.specMoreBtn.disabled=!0);n.specLessBtn.disabled=e<=0,n.specMoreBtn.disabled=e>=t-1},updateSubText:function(){if(!n.state.selector)return void(n.subText.textContent="Tip: Hover to highlight. Press Esc to cancel.");let t=`Matches ${n.state.matchCount} element${1===n.state.matchCount?"":"s"}.`;n.state.targetAll?t+=" This will target all matches.":n.state.matchCount>1&&n.state.useIndex?t+=" Using index to target only the selected element.":n.state.matchCount>1&&(t+=" This will target all matches unless you enable “Use index”."),n.subText.textContent=t},done:function(){if(!n.state.selector)return;const s=n.getToken();let c=null;!n.state.targetAll&&n.state.useIndex&&(c=Array.from(t.querySelectorAll(n.state.selector)).indexOf(n.state.selectedEl),c<0&&(c=null));try{e.localStorage.setItem("wpcode_css_picker_result",JSON.stringify({action:"wpcodeCssPickerDone",selector:n.state.selector,index:c,token:s,ts:Date.now()}))}catch(t){}if(e.opener&&e.opener!==e)try{e.opener.postMessage({action:"wpcodeCssPickerDone",selector:n.state.selector,index:c,token:s},e.location.origin)}catch(t){}n.close()},close:function(){n.cleanup();try{e.close()}catch(t){}},cleanup:function(){t.documentElement.classList.remove("wpcode-css-picker-active"),t.documentElement.style.cursor="",t.body.style.cursor="",n.hideHighlight(),n.hideSelectedHighlight(),n.hideTooltip(),n.clearMatchHighlights();try{e.sessionStorage.removeItem(n.getNavigateStorageKey())}catch(t){}},getToken:function(){if(wpcodeCssSelectorPicker&&wpcodeCssSelectorPicker.token)return String(wpcodeCssSelectorPicker.token);try{return new URL(e.location.href).searchParams.get("token")||""}catch(t){return""}},getPickableElement:function(e){if(!e||e===t||e===t.documentElement)return null;let n=1===e.nodeType?e:e.parentElement;return n?n===t.body||n===t.documentElement?null:n:null},positionOverlay:function(t,e){if(!t||!e||!e.getBoundingClientRect)return;const n=e.getBoundingClientRect();t.style.display="block",t.style.left=n.left+"px",t.style.top=n.top+"px",t.style.width=n.width+"px",t.style.height=n.height+"px"},hideOverlay:function(t){t&&(t.style.display="none")},showHighlight:function(t){n.positionOverlay(n.highlight,t)},showSelectedHighlight:function(t){n.positionOverlay(n.selectedHighlight,t)},hideHighlight:function(){n.hideOverlay(n.highlight)},hideSelectedHighlight:function(){n.hideOverlay(n.selectedHighlight)},showTooltip:function(t){if(!t)return;const e=t===n.state.hoverEl&&n.state.hoverSelector?n.state.hoverSelector:n.getElementLabel(t);n.tooltip.textContent=e||n.getElementLabel(t),n.tooltip.style.display="block";const s=t.getBoundingClientRect(),c=Math.max(8,s.top-28),i=Math.max(8,s.left);n.tooltip.style.top=c+"px",n.tooltip.style.left=i+"px"},hideTooltip:function(){n.tooltip&&(n.tooltip.style.display="none")},getElementLabel:function(t){const e=[t.tagName.toLowerCase()];t.id&&e.push("#"+t.id);const s=n.getStableClasses(t);return s.length&&e.push("."+s.join(".")),e.join("")},getProposedSelectorForElement:function(t){if(!t||1!==t.nodeType)return"";if(n.state.targetAll){const e=n.buildTargetAllSelectorCandidates(t,n.state.pageScopeSelector);if(!e.length)return t.tagName?t.tagName.toLowerCase():"";let s=null;return n.state.selectedEl&&t===n.state.selectedEl&&(s=n.state.specificityStep),null===s&&(s=n.pickDefaultTargetAllStep(e,t,n.state.pageScopeSelector)),s<0&&(s=0),s>e.length-1&&(s=e.length-1),e[s]||""}return n.buildBestSelector(t,{targetAll:!1,pageScopeSelector:n.state.pageScopeSelector})||""},getStableClasses:function(t){return Array.from(t.classList||[]).filter(function(t){return!(!t||t.length>32||/^[0-9]+$/.test(t)||/^(active|current|open|closed|selected|hover|focus|focus-visible|is-|has-)/.test(t)||/[a-f0-9]{10,}/i.test(t))}).slice(0,3)},buildBestSelector:function(e,s){const c=(s=s||{}).pageScopeSelector?String(s.pageScopeSelector):"",i=function(t){return t?c?c+" "+t:t:""};if(s.targetAll)return e&&e.tagName?e.tagName.toLowerCase():"";if(e.id){const t=i("#"+CSS.escape(e.id));if(n.isUnique(t))return t}const o=n.buildExactScopedPathSelector(e,c);if(o)return o;const l=n.getStableClasses(e);if(l.length){const t="."+l.map(CSS.escape).join(".");if(s.targetAll)return i(t);if(n.isUnique(i(t)))return i(t);const c=e.tagName.toLowerCase()+t;if(n.isUnique(i(c)))return i(c)}const r=[];let a=e,d=0;for(;a&&1===a.nodeType&&a!==t.body&&d<5;){const t=n.segmentFor(a);if(t){r.unshift(t);const e=i(r.join(" > "));if(s.targetAll){if(d<=1)return e}else if(n.isUnique(e))return e}a=a.parentElement,d++}return i(n.addNthOfType(e))||""},buildExactScopedPathSelector:function(e,s){if(!e||1!==e.nodeType)return"";const c=n.getBestExactPathRoot(e,s),i=c.rootSelector,o=c.stopEl,l=[];let r=e;for(;r&&1===r.nodeType&&r!==o&&r!==t.body&&r!==t.documentElement;){const t=n.exactSegmentFor(r);if(!t)return"";l.unshift(t),r=r.parentElement}if(!l.length)return"";const a=i+" "+l.join(" > ");return n.isUnique(a)?a:""},getBestExactPathRoot:function(e,s){let c=e&&e.parentElement?e.parentElement:null,i=0;const o=s&&""!==String(s).trim()?String(s).trim():"",l=o?o+" ":"";for(;c&&1===c.nodeType&&c!==t.body&&c!==t.documentElement&&i<8;){if(c.id){const t=l+"#"+CSS.escape(c.id);if(n.isUnique(t))return{rootSelector:t,stopEl:c}}const t=n.getStableClasses(c);if(t.length){const e=t.map(CSS.escape),s=l+(c.tagName.toLowerCase()+".")+e.join(".");if(n.isUnique(s))return{rootSelector:s,stopEl:c}}c=c.parentElement,i++}return o?{rootSelector:o,stopEl:t.body}:{rootSelector:"body",stopEl:t.body}},exactSegmentFor:function(t){if(!t||1!==t.nodeType)return"";const e=t.tagName?t.tagName.toLowerCase():"";if(!e)return"";const s=n.getNthOfTypeIndex(t);return s>0?e+":nth-of-type("+s+")":e},getNthOfTypeIndex:function(t){if(!t||!t.parentElement)return 0;const e=t.parentElement,n=t.tagName?t.tagName.toLowerCase():"";if(!n)return 0;const s=e.children,c=s.length;let i=0;for(let e=0;e<c;e++){const c=s[e];if(c&&c.tagName&&(c.tagName.toLowerCase()===n&&i++,c===t))return i}return 0},getPageScopeSelector:function(){if(!t.body||!t.body.classList)return"";const e=Array.from(t.body.classList),n=e.find(t=>/^page-id-\d+$/.test(t));if(n)return"body."+n;const s=e.find(t=>/^postid-\d+$/.test(t));return s?"body."+s:""},buildTargetAllSelectorCandidates:function(t,e){if(!t||1!==t.nodeType||!t.tagName)return[];const s=t.tagName.toLowerCase(),c=n.getStableClasses(t).map(CSS.escape),i=e&&""!==String(e).trim()?String(e).trim():"",o=[s];if(c.length)o.push("."+c[0]),o.push(s+"."+c[0]),c.length>1&&(o.push("."+c.join(".")),o.push(s+"."+c.join(".")));else{const e=n.findClosestAncestorWithStableClass(t);e&&o.push(e+" "+s)}let l=n.uniqueValidSelectors(o);if(i){const e=n.getDesiredTargetAllDefaultSelector(t),c=e?i+" "+e:"",o=[],r=l.length;for(let t=0;t<r;t++){const n=String(l[t]||"").trim();n&&(o.push(n),e&&n===e&&c&&o.push(c))}const a=[];for(let t=0;t<r;t++){const n=String(l[t]||"").trim();if(!n)continue;if(n===s)continue;if(e&&n===e)continue;const c=i+" "+n;a.push(c)}return n.uniqueValidSelectors(o.concat(a))}return l},findClosestAncestorWithStableClass:function(e){if(!e||1!==e.nodeType)return"";let s=e.parentElement,c=0;for(;s&&1===s.nodeType&&s!==t.body&&s!==t.documentElement&&c<8;){const t=n.getStableClasses(s);if(t.length)return"."+CSS.escape(t[0]);s=s.parentElement,c++}return""},getDesiredTargetAllDefaultSelector:function(t){if(!t||1!==t.nodeType||!t.tagName)return"";const e=t.tagName.toLowerCase(),s=n.getStableClasses(t).map(CSS.escape);if(s.length)return"."+s[0];const c=n.findClosestAncestorWithStableClass(t);return c?c+" "+e:e},pickDefaultTargetAllStep:function(t,e,s){const c=n.getDesiredTargetAllDefaultSelector(e);if(c){const e=t.indexOf(c);if(e>=0)return e}return n.pickDefaultSpecificityStep(t)},uniqueValidSelectors:function(e){const n={},s=[],c=e.length;for(let i=0;i<c;i++){const c=String(e[i]||"").trim();if(c&&!n[c]){try{t.querySelector(c)}catch(t){continue}n[c]=!0,s.push(c)}}return s},pickDefaultSpecificityStep:function(e){const n=e.length;let s=0;for(let c=0;c<n;c++){const n=e[c];let i=0;try{i=n?t.querySelectorAll(n).length:0}catch(t){i=0}if(i>1&&i<=50)return c;i>1&&(s=c)}return s},segmentFor:function(t){if(!t||1!==t.nodeType)return"";const e=t.tagName.toLowerCase();if(t.id){const e="#"+CSS.escape(t.id);if(n.isUnique(e))return e}const s=n.getStableClasses(t);return s.length?e+"."+s.map(CSS.escape).join("."):e},addNthOfType:function(t){if(!t||!t.parentElement)return"";const e=t.parentElement,s=t.tagName.toLowerCase(),c=n.getNthOfTypeIndex(t);if(c<=0)return"";const i=s+":nth-of-type("+c+")",o=n.segmentFor(e),l=o?o+" > "+i:i;return n.isUnique(l)?l:""},isUnique:function(e){try{return 1===t.querySelectorAll(e).length}catch(t){return!1}},ensurePickerNavigation:function(){const n=wpcodeCssSelectorPicker&&wpcodeCssSelectorPicker.params?wpcodeCssSelectorPicker.params:null;if(!n)return;const s=function(t){try{const s=new URL(t,e.location.href);return s.origin!==e.location.origin?t:(Object.keys(n).forEach(function(t){void 0!==n[t]&&null!==n[t]&&""!==n[t]&&s.searchParams.set(t,String(n[t]))}),s.toString())}catch(e){return t}};!function(){const e=t.getElementsByTagName("a"),c=e.length;for(let t=0;t<c;t++){const n=e[t].getAttribute("href");n&&""!==n.trim()&&0!==n.indexOf("#")&&e[t].setAttribute("href",s(n))}const i=t.getElementsByTagName("form"),o=i.length;for(let e=0;e<o;e++)Object.keys(n).forEach(function(s){if(!n[s])return;if(i[e].querySelector('input[name="'+s+'"]'))return;const c=t.createElement("input");c.type="hidden",c.name=s,c.value=String(n[s]),i[e].appendChild(c)})}(),t.addEventListener("click",function(e){if(e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let n=e.target;for(;n&&n!==t.body;){if(n.tagName&&"a"===n.tagName.toLowerCase()){const t=n.getAttribute("href");t&&""!==t.trim()&&0!==t.indexOf("#")&&n.setAttribute("href",s(t));break}n=n.parentNode}},!0),new MutationObserver(function(t){const e=t.length;for(let n=0;n<e;n++){const e=t[n].addedNodes||[],c=e.length;for(let t=0;t<c;t++){const n=e[t];n&&1===n.nodeType&&n.querySelectorAll&&(n.matches&&n.matches("a[href]")?[n]:Array.from(n.querySelectorAll("a[href]"))).forEach(function(t){const e=t.getAttribute("href");e&&""!==e.trim()&&0!==e.indexOf("#")&&t.setAttribute("href",s(e))})}}}).observe(t.documentElement||t.body,{childList:!0,subtree:!0})}};return n}(document,window)).init()})();