PageSourceSearch

https://electionjudgments.org/4924.2baf60d2c81ac9d6db82.bundle.js

js electionjudgments.org collected 2026-09-25 00:31:41 UTC 4,529 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkuwazi=self.webpackChunkuwazi||[]).push([[4924],{24924(e,t,n){n.r(t);var o=n(96540),r=n(12841),l=n(16014);n.d(t,["TextProperty",0,({onSelect:e,onDeselect:t,propertyName:n,entity:i,template:c,className:a=""})=>{var d,s;if(!n)return;const u="title"===n?o.createElement(l.HT,null,"Title"):o.createElement(l.HT,{context:null==c?void 0:c._id.toString()},null==c||null===(d=c.properties)||void 0===d||null===(s=d.find(e=>e.name===n))||void 0===s?void 0:s.label);let g=null==i?void 0:i.title;if("title"!==n){const e=(null==i?void 0:i.metadata)&&i.metadata[n]&&i.metadata[n][0];g="string"==typeof(null==e?void 0:e.value)&&e.value||void 0}return o.createElement("dl",null,o.createElement("div",{className:`flex flex-col gap-2 ${a}`},o.createElement("dt",{className:"font-semibold not-italic text-black"},u),o.createElement(r.sY,{onSelect:e,onDeselect:t},o.createElement("dd",null,g||o.createElement(l.HT,null,"No value")))))}])},12841(e,t,n){n.d(t,{sY:()=>s,f4:()=>i,rr:()=>l});var o=n(96540);const r=o.createContext(""),l=({regionId:e="selectionRegion",children:t})=>o.createElement(r.Provider,{value:e},o.createElement("div",{"data-region-selector-id":e},t)),i=({textSelection:e,color:t})=>{const n=(0,o.useContext)(r);return o.createElement(o.Fragment,null,e.selectionRectangles.filter(e=>!e.regionId||!n||e.regionId===n).map(e=>{const n={top:e.top,left:e.left,width:e.width,height:e.height,padding:0,margin:0,position:"absolute",display:"block",mixBlendMode:"darken",opacity:.5,backgroundColor:t||"orange",zIndex:1};return o.createElement("div",{className:"highlight-rectangle",style:n,key:[e.top,e.left].join("")})}))},c=()=>{const e=window.getSelection();if(!e||!e.rangeCount)return[];const t=e.getRangeAt(0).cloneContents(),n=Array.from(t.querySelectorAll("*")).filter(e=>!e.children.length),o=[];return n.forEach((e,t)=>{const r=n[t-1];if(r&&((e,t)=>{var n,o;if(!e||!t)return!1;const r=null===(n=null==e?void 0:e.style)||void 0===n?void 0:n.left,l=null===(o=null==t?void 0:t.style)||void 0===o?void 0:o.left;return parseFloat(r)>parseFloat(l)})(r,e)){const e=document.createElement("span");e.innerText=" ",o.push(e)}o.push(e)}),o},a=()=>{const e=c();if(e.length<=1){const e=window.getSelection();return e&&e.toString()||""}return e.reduce((e,t)=>{let n=e;return n+=t.innerText,"BR"===t.tagName&&(n+="\n"),n},"")},d=e=>null!==e,s=({onSelect:e,onDeselect:t=()=>{},children:n})=>{const r=(0,o.useRef)(null),l=()=>{const n=window.getSelection();if(!r.current)return;if(!(null==n?void 0:n.toString().trim()))return void t();const o=Array.from(r.current.querySelectorAll("div[data-region-selector-id]")),l=(e=>{const t=e.getRangeAt(e.rangeCount-1),n=e.getRangeAt(0),o=document.createRange();return o.setStart(n.startContainer,n.startOffset),o.setEnd(t.endContainer,t.endOffset),o})(n),i=(e=>{var t,n,o;const r=document.createNodeIterator(e.commonAncestorContainer,NodeFilter.SHOW_TEXT),l=window.getSelection();if(null===l)return[];const i=(null===(n=null===(t=l.focusNode)||void 0===t?void 0:t.childNodes)||void 0===n?void 0:n.length)||!1,c=4===(null===(o=l.anchorNode)||void 0===o?void 0:o.compareDocumentPosition(l.focusNode))?"FOLLOWING":"PRECEDING",a=i||"PRECEDING"===c?l.anchorNode:l.focusNode,d=[];for(;r.nextNode()&&(!(0===d.length&&r.referenceNode!==e.startContainer)&&d.push(r.referenceNode),a!==r.referenceNode&&a!==r.referenceNode.parentElement););return d.reduce((t,n,o)=>{const r=document.createRange();return r.selectNode(n),0===o&&r.setStart(n,e.startOffset),o===d.length-1&&r.setEnd(n,i?n.length:e.endOffset),[...t,...Array.from(r.getClientRects())]},[])})(l).map(e=>{const t=o.find((n=e,e=>{const t=e.getBoundingClientRect(),o=t.x<=n.x&&n.x<=t.x+t.width,r=t.y<=n.y&&n.y<=t.y+t.height;return o&&r}));var n;return t?((e,t)=>{const n=t.getBoundingClientRect(),o=t.getAttribute("data-region-selector-id");return Object.assign({top:e.y-n.y,left:e.x-n.x,width:e.width,height:e.height},o?{regionId:o}:{})})(e,t):null}).filter(d),c=a();e({text:c,selectionRectangles:i})};return(0,o.useEffect)(()=>{const e=r.current;if(!e)return()=>{};const t=e=>{if((e.ctrlKey||e.metaKey)&&"c"===e.key){e.preventDefault();const t=window.getSelection();if(t&&t.toString().trim()){const e=a();navigator.clipboard.writeText(e)}}};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}},[r]),o.createElement("div",{role:"none",ref:r,onMouseDown:e=>{var t;0===e.button&&(e.shiftKey||null===(t=window.getSelection())||void 0===t||t.removeAllRanges())},onMouseUp:e=>{0===e.button&&l()}},n)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.