PageSourceSearch

https://portrio.ai/_next/static/chunks/8709.a9a2d9838b46988c.js

js portrio.ai collected 2026-10-05 12:25:54 UTC 30,577 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8709],{28709:(t,e,o)=>{o.d(e,{Ar:()=>c,Gw:()=>te,closeBrackets:()=>tr,closeBracketsKeymap:()=>tu,et:()=>a});var n=o(69365),i=o(27109),s=o(86875);class l{constructor(t,e,o,n){this.state=t,this.pos=e,this.explicit=o,this.view=n,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let e=(0,s.mv)(this.state).resolveInner(this.pos,-1);for(;e&&0>t.indexOf(e.name);)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),o=Math.max(e.from,this.pos-250),n=e.text.slice(o-e.from,this.pos-e.from),i=n.search(p(t,!1));return i<0?null:{from:o+i,to:this.pos,text:n.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(t,e,o){"abort"==t&&this.abortListeners&&(this.abortListeners.push(e),o&&o.onDocChange&&(this.abortOnDocChange=!0))}}function r(t){let e=Object.keys(t).join(""),o=/\w/.test(e);return o&&(e=e.replace(/\w/g,"")),`[${o?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function a(t){let e=t.map(t=>"string"==typeof t?{label:t}:t),[o,n]=e.every(t=>/^\w+$/.test(t.label))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),o=Object.create(null);for(let{label:n}of t){e[n[0]]=!0;for(let t=1;t<n.length;t++)o[n[t]]=!0}let n=r(e)+r(o)+"*$";return[RegExp("^"+n),new RegExp(n)]}(e);return t=>{let i=t.matchBefore(n);return i||t.explicit?{from:i?i.from:t.pos,options:e,validFor:o}:null}}function c(t,e){return o=>{for(let e=(0,s.mv)(o.state).resolveInner(o.pos,-1);e;e=e.parent){if(t.indexOf(e.name)>-1)return null;if(e.type.isTop)break}return e(o)}}class h{constructor(t,e,o,n){this.completion=t,this.source=e,this.match=o,this.score=n}}function f(t){return t.selection.main.from}function p(t,e){var o;let{source:n}=t,i=e&&"^"!=n[0],s="$"!=n[n.length-1];return i||s?RegExp(`${i?"^":""}(?:${n})${s?"$":""}`,null!=(o=t.flags)?o:t.ignoreCase?"i":""):t}let u=n.YH.define(),d=new WeakMap;function m(t){if(!Array.isArray(t))return t;let e=d.get(t);return e||d.set(t,e=a(t)),e}let g=n.Pe.define(),b=n.Pe.define();class v{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let e=0;e<t.length;){let o=(0,n.vS)(t,e),i=(0,n.Fh)(o);this.chars.push(o);let s=t.slice(e,e+i),l=s.toUpperCase();
1this.folded.push((0,n.vS)(l==s?s.toLowerCase():l,0)),e+=i}this.astral=t.length!=this.chars.length}ret(t,e){return this.score=t,this.matched=e,this}match(t){if(0==this.pattern.length)return this.ret(-100,[]);if(t.length<this.pattern.length)return null;let{chars:e,folded:o,any:i,precise:s,byWord:l}=this;if(1==e.length){let i=(0,n.vS)(t,0),s=(0,n.Fh)(i),l=s==t.length?0:-100;if(i==e[0]);else{if(i!=o[0])return null;l+=-200}return this.ret(l,[0,s])}let r=t.indexOf(this.pattern);if(0==r)return this.ret(t.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=e.length,c=0;if(r<0){for(let s=0,l=Math.min(t.length,200);s<l&&c<a;){let l=(0,n.vS)(t,s);(l==e[c]||l==o[c])&&(i[c++]=s),s+=(0,n.Fh)(l)}if(c<a)return null}let h=0,f=0,p=!1,u=0,d=-1,m=-1,g=/[a-z]/.test(t),b=!0;for(let i=0,c=Math.min(t.length,200),v=0;i<c&&f<a;){let c=(0,n.vS)(t,i);r<0&&(h<a&&c==e[h]&&(s[h++]=i),u<a&&(c==e[u]||c==o[u]?(0==u&&(d=i),m=i+1,u++):u=0));let y,w=c<255?c>=48&&c<=57||c>=97&&c<=122?2:+(c>=65&&c<=90):(y=(0,n.MK)(c))!=y.toLowerCase()?1:2*(y!=y.toUpperCase());(!i||1==w&&g||0==v&&0!=w)&&(e[f]==c||o[f]==c&&(p=!0)?l[f++]=i:l.length&&(b=!1)),v=w,i+=(0,n.Fh)(c)}return f==a&&0==l[0]&&b?this.result(-100+(p?-200:0),l,t):u==a&&0==d?this.ret(-200-t.length+(m==t.length?0:-100),[0,m]):r>-1?this.ret(-700-t.length,[r,r+this.pattern.length]):u==a?this.ret(-900-t.length,[d,m]):f==a?this.result(-100+(p?-200:0)+-700+(b?0:-1100),l,t):2==e.length?null:this.result((i[0]?-700:0)+-200+-1100,i,t)}result(t,e,o){let i=[],s=0;for(let t of e){let e=t+(this.astral?(0,n.Fh)((0,n.vS)(o,t)):1);s&&i[s-1]==t?i[s-1]=e:(i[s++]=t,i[s++]=e)}return this.ret(t-o.length,i)}}class y{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.length<this.pattern.length)return null;let e=t.slice(0,this.pattern.length),o=e==this.pattern?0:e.toLowerCase()==this.folded?-200:null;return null==o?null:(this.matched=[0,e.length],this.score=o+(t.length==this.pattern.length?0:-100),this)}}let w=n.sj.define({combine:t=>(0,n.QR)(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:C,filterStrict:!1,compareCompletions:(t,e)=>(t.sortText||t.label).localeCompare(e.sortText||e.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>o=>x(t(o),e(o)),optionClass:(t,e)=>o=>x(t(o),e(o)),addToOptions:(t,e)=>t.concat(e),filterStrict:(t,e)=>t||e})});function x(t,e){return t?e?t+" "+e:t:e}function C(t,e,o,n,s,l){let r=t.textDirection==i.OP.RTL,a=r,c=!1,h="top",f,p,u=e.left-s.left,d=s.right-e.right,m=n.right-n.left,g=n.bottom-n.top;if(a&&u<Math.min(m,d)?a=!1:!a&&d<Math.min(m,u)&&(a=!0),m<=(a?u:d))f=Math.max(s.top,Math.min(o.top,s.bottom-g))-e.top,p=Math.min(400,a?u:d);else{c=!0,p=Math.min(400,(r?e.right:s.right-e.left)-30);let t=s.bottom-e.bottom;t>=g||t>e.top?f=o.bottom-e.top:(h="bottom",f=e.bottom-o.top)}let b=(e.bottom-e.top)/l.offsetHeight,v=(e.right-e.left)/l.offsetWidth;return{style:`${h}: ${f/b}px; max-width: ${p/v}px`,class:"cm-completionInfo-"+(c?r?"left-narrow":"right-narrow":a?"left":"right")}}function I(t,e,o){if(t<=o)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let t=Math.floor(e/o);return{from:t*o,to:(t+1)*o}}let n=Math.floor((t-e)/o);return{from:t-(n+1)*o,to:t-n*o}}class O{constructor(t,e,o){this.view=t,this.stateField=e,this.applyCompletion=o,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:t=>this.placeInfo(t),key:this},this.space=null,this.currentClass="";let n=t.state.field(e),{options:i,selected:s}=n.open,l=t.state.facet(w);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map(t=>"cm-completionIcon-"+t)),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,o,n){let i=document.createElement("span");
vendor: 2,604 bytes, line 1
1i.className="cm-completionLabel";let s=t.displayLabel||t.label,l=0;for(let t=0;t<n.length;){let e=n[t++],o=n[t++];e>l&&i.appendChild(document.createTextNode(s.slice(l,e)));let r=i.appendChild(document.createElement("span"));r.appendChild(document.createTextNode(s.slice(e,o))),r.className="cm-completionMatchedText",l=o}return l<s.length&&i.appendChild(document.createTextNode(s.slice(l))),i},position:50},{render(t){if(!t.detail)return null;let e=document.createElement("span");return e.className="cm-completionDetail",e.textContent=t.detail,e},position:80}),e.sort((t,e)=>t.position-e.position).map(t=>t.render)}(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=I(i.length,s,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",o=>{let{options:n}=t.state.field(e).open;for(let e=o.target,i;e&&e!=this.dom;e=e.parentNode)if("LI"==e.nodeName&&(i=/-(\d+)$/.exec(e.id))&&+i[1]<n.length){this.applyCompletion(t,n[+i[1]]),o.preventDefault();return}}),this.dom.addEventListener("focusout",e=>{let o=t.state.field(this.stateField,!1);o&&o.tooltip&&t.state.facet(w).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:b.of(null)})}),this.showOptions(i,n.id)}mount(){this.updateSel()}showOptions(t,e){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,e,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(t){var e;let o=t.state.field(this.stateField),n=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),o!=n){let{options:i,selected:s,disabled:l}=o.open;n.open&&n.open.options==i||(this.range=I(i.length,s,t.state.facet(w).maxRenderedOptions),this.showOptions(i,o.id)),this.updateSel(),l!=(null==(e=n.open)?void 0:e.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let t of this.currentClass.split(" "))t&&this.dom.classList.remove(t);for(let t of e.split(" "))t&&this.dom.classList.add(t);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;(e.selected>-1&&e.selected<this.range.from||e.selected>=this.range.to)&&(this.range=I(e.options.length,e.selected,this.view.state.facet(w).maxRenderedOptions),this.showOptions(e.options,t.id));let o=this.updateSelectedOption(e.selected);if(o){this.destroyInfo();
vendor: 12,891 bytes, line 1
1let{completion:n}=e.options[e.selected],{info:s}=n;if(!s)return;let l="string"==typeof s?document.createTextNode(s):s(n);if(!l)return;"then"in l?l.then(e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,n)}).catch(t=>(0,i.c_)(this.view.state,t,"completion info")):(this.addInfoPane(l,n),o.setAttribute("aria-describedby",this.info.id))}}addInfoPane(t,e){this.destroyInfo();let o=this.info=document.createElement("div");if(o.className="cm-tooltip cm-completionInfo",o.id="cm-completionInfo-"+Math.floor(65535*Math.random()).toString(16),null!=t.nodeType)o.appendChild(t),this.infoDestroy=null;else{let{dom:e,destroy:n}=t;o.appendChild(e),this.infoDestroy=n||null}this.dom.appendChild(o),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){var e,o;let n,i,s,l=null;for(let e=this.list.firstChild,o=this.range.from;e;e=e.nextSibling,o++)"LI"==e.nodeName&&e.id?o==t?e.hasAttribute("aria-selected")||(e.setAttribute("aria-selected","true"),l=e):e.hasAttribute("aria-selected")&&(e.removeAttribute("aria-selected"),e.removeAttribute("aria-describedby")):o--;return l&&(e=this.list,o=l,n=e.getBoundingClientRect(),i=o.getBoundingClientRect(),s=n.height/e.offsetHeight,i.top<n.top?e.scrollTop-=(n.top-i.top)/s:i.bottom>n.bottom&&(e.scrollTop+=(i.bottom-n.bottom)/s)),l}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),o=this.info.getBoundingClientRect(),n=t.getBoundingClientRect(),i=this.space;if(!i){let t=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:t.clientWidth,bottom:t.clientHeight}}return n.top>Math.min(i.bottom,e.bottom)-10||n.bottom<Math.max(i.top,e.top)+10?null:this.view.state.facet(w).positionInfo(this.view,e,n,o,i,this.dom)}placeInfo(t){this.info&&(t?(t.style&&(this.info.style.cssText=t.style),this.info.className="cm-tooltip cm-completionInfo "+(t.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(t,e,o){let n=document.createElement("ul");n.id=e,n.setAttribute("role","listbox"),n.setAttribute("aria-expanded","true"),n.setAttribute("aria-label",this.view.state.phrase("Completions")),n.addEventListener("mousedown",t=>{t.target==n&&t.preventDefault()});let i=null;for(let s=o.from;s<o.to;s++){let{completion:l,match:r}=t[s],{section:a}=l;if(a){let t="string"==typeof a?a:a.name;t!=i&&(s>o.from||0==o.from)&&(i=t,"string"!=typeof a&&a.header?n.appendChild(a.header(a)):n.appendChild(document.createElement("completion-section")).textContent=t)}let c=n.appendChild(document.createElement("li"));c.id=e+"-"+s,c.setAttribute("role","option");let h=this.optionClass(l);for(let t of(h&&(c.className=h),this.optionContent)){let e=t(l,this.view.state,this.view,r);e&&c.appendChild(e)}}return o.from&&n.classList.add("cm-completionListIncompleteTop"),o.to<t.length&&n.classList.add("cm-completionListIncompleteBottom"),n}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function k(t){return 100*(t.boost||0)+10*!!t.apply+5*!!t.info+ +!!t.type}class D{constructor(t,e,o,n,i,s){this.options=t,this.attrs=e,this.tooltip=o,this.timestamp=n,this.selected=i,this.disabled=s}setSelected(t,e){return t==this.selected||t>=this.options.length?this:new D(this.options,R(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,o,n,i,s){if(n&&!s&&t.some(t=>t.isPending))return n.setDisabled();let l=function(t,e){let o=[],n=null,i=null,s=t=>{o.push(t);let{section:e}=t.completion;if(e){n||(n=[]);let t="string"==typeof e?e:e.name;n.some(e=>e.name==t)||n.push("string"==typeof e?{name:t}:e)}},l=e.facet(w);for(let n of t)if(n.hasResult()){let t=n.result.getMatch;if(!1===n.result.filter)for(let e of n.result.options)s(new h(e,n.source,t?t(e):[],1e9-o.length));else{let o=e.sliceDoc(n.from,n.to),r,a=l.filterStrict?new y(o):new v(o);for(let e of n.result.options)if(r=a.match(e.label)){let o=e.displayLabel?t?t(e,r.matched):[]:r.matched,l=r.score+(e.boost||0);if(s(new h(e,n.source,o,l)),"object"==typeof e.section&&"dynamic"===e.section.rank){let{name:t}=e.section;i||(i=Object.create(null)),i[t]=Math.max(l,i[t]||-1e9)}}}}if(n){let t=Object.create(null),e=0;for(let o of n.sort((t,e)=>("dynamic"===t.rank&&"dynamic"===e.rank?i[e.name]-i[t.name]:0)||("number"==typeof t.rank?t.rank:1e9)-("number"==typeof e.rank?e.rank:1e9)||(t.name<e.name?-1:1)))e-=1e5,t[o.name]=e;for(let e of o){let{section:o}=e.completion;o&&(e.score+=t["string"==typeof o?o:o.name])}}let r=[],a=null,c=l.compareCompletions;for(let t of o.sort((t,e)=>e.score-t.score||c(t.completion,e.completion))){let e=t.completion;a&&a.label==e.label&&a.detail==e.detail&&(null==a.type||null==e.type||a.type==e.type)&&a.apply==e.apply&&a.boost==e.boost?k(t.completion)>k(a)&&(r[r.length-1]=t):r.push(t),a=t.completion}return r}(t,e);if(!l.length)return n&&t.some(t=>t.isPending)?n.setDisabled():null;let r=e.facet(w).selectOnOpen?0:-1;if(n&&n.selected!=r&&-1!=n.selected){let t=n.options[n.selected].completion;for(let e=0;e<l.length;e++)if(l[e].completion==t){r=e;break}}return new D(l,R(o,r),{pos:t.reduce((t,e)=>e.hasResult()?Math.min(t,e.from):t,1e8),create:$,above:i.aboveCursor},n?n.timestamp:Date.now(),r,!1)}map(t){return new D(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new D(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class S{constructor(t,e,o){this.active=t,this.id=e,this.open=o}static start(){return new S(L,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,o=e.facet(w),n=(o.override||e.languageDataAt("autocomplete",f(e)).map(m)).map(e=>(this.active.find(t=>t.source==e)||new M(e,+!!this.active.some(t=>0!=t.state))).update(t,o));n.length==this.active.length&&n.every((t,e)=>t==this.active[e])&&(n=this.active);let i=this.open,s=t.effects.some(t=>t.is(T));for(let l of(i&&t.docChanged&&(i=i.map(t.changes)),t.selection||n.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!function(t,e){if(t==e)return!0;for(let o=0,n=0;;){for(;o<t.length&&!t[o].hasResult();)o++;for(;n<e.length&&!e[n].hasResult();)n++;let i=o==t.length,s=n==e.length;if(i||s)return i==s;if(t[o++].result!=e[n++].result)return!1}}(n,this.active)||s?i=D.build(n,e,this.id,i,o,s):i&&i.disabled&&!n.some(t=>t.isPending)&&(i=null),!i&&n.every(t=>!t.isPending)&&n.some(t=>t.hasResult())&&(n=n.map(t=>t.hasResult()?new M(t.source,0):t)),t.effects))l.is(A)&&(i=i&&i.setSelected(l.value,this.id));return n==this.active&&i==this.open?this:new S(n,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?E:F}}let E={"aria-autocomplete":"list"},F={};function R(t,e){let o={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(o["aria-activedescendant"]=t+"-"+e),o}let L=[];class M{constructor(t,e,o=!1){this.source=t,this.state=e,this.explicit=o}hasResult(){return!1}get isPending(){return 1==this.state}update(t,e){let o=function(t,e){if(t.isUserEvent("input.complete")){let o=t.annotation(u);if(o&&e.activateOnCompletion(o))return 12}let o=t.isUserEvent("input.type");return o&&e.activateOnTyping?5:o?1:t.isUserEvent("delete.backward")?2:t.selection?8:16*!!t.docChanged}(t,e),n=this;for(let e of((8&o||16&o&&this.touches(t))&&(n=new M(n.source,0)),4&o&&0==n.state&&(n=new M(this.source,1)),n=n.updateFor(t,o),t.effects))if(e.is(g))n=new M(n.source,1,e.value);else if(e.is(b))n=new M(n.source,0);else if(e.is(T))for(let t of e.value)t.source==n.source&&(n=t);return n}updateFor(t,e){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(f(t.state))}}class P extends M{constructor(t,e,o,n,i,s){super(t,3,e),this.limit=o,this.result=n,this.from=i,this.to=s}hasResult(){return!0}updateFor(t,e){var o;if(!(3&e))return this.map(t.changes);let n=this.result;n.map&&!t.changes.empty&&(n=n.map(n,t.changes));let i=t.changes.mapPos(this.from),s=t.changes.mapPos(this.to,1),r=f(t.state);if(r>s||!n||2&e&&(f(t.startState)==this.from||r<this.limit))return new M(this.source,4&e?1:0);let a=t.changes.mapPos(this.limit);return!function(t,e,o,n){if(!t)return!1;let i=e.sliceDoc(o,n);return"function"==typeof t?t(i,o,n,e):p(t,!0).test(i)}(n.validFor,t.state,i,s)?n.update&&(n=n.update(n,i,s,new l(t.state,r,!1)))?new P(this.source,this.explicit,a,n,n.from,null!=(o=n.to)?o:f(t.state)):new M(this.source,1,this.explicit):new P(this.source,this.explicit,a,n,i,s)}map(t){return t.empty?this:(this.result.map?this.result.map(this.result,t):this.result)?new P(this.source,this.explicit,t.mapPos(this.limit),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new M(this.source,0)}touches(t){return t.changes.touchesRange(this.from,this.to)}}let T=n.Pe.define({map:(t,e)=>t.map(t=>t.map(e))}),A=n.Pe.define(),B=n.sU.define({create:()=>S.start(),update:(t,e)=>t.update(e),provide:t=>[i.DK.from(t,t=>t.tooltip),i.EditorView.contentAttributes.from(t,t=>t.attrs)]});function N(t,e){let o=e.completion.apply||e.completion.label,i=t.state.field(B).active.find(t=>t.source==e.source);return i instanceof P&&("string"==typeof o?t.dispatch({...function(t,e,o,i){let{main:s}=t.selection,l=o-s.from,r=i-s.from;return{...t.changeByRange(a=>{if(a!=s&&o!=i&&t.sliceDoc(a.from+l,a.from+r)!=t.sliceDoc(o,i))return{range:a};let c=t.toText(e);return{changes:{from:a.from+l,to:i==s.from?a.to:a.from+r,insert:c},range:n.OF.cursor(a.from+l+c.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}(t.state,o,i.from,i.to),annotations:u.of(e.completion)}):o(t,e.completion,i.from,i.to),!0)}let $=t=>new O(t,B,N);function V(t,e="option"){return o=>{let n=o.state.field(B,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp<o.state.facet(w).interactionDelay)return!1;let s=1,l;"page"==e&&(l=(0,i.Eg)(o,n.open.tooltip))&&(s=Math.max(2,Math.floor(l.dom.offsetHeight/l.dom.querySelector("li").offsetHeight)-1));let{length:r}=n.open.options,a=n.open.selected>-1?n.open.selected+s*(t?1:-1):t?0:r-1;return a<0?a="page"==e?0:r-1:a>=r&&(a="page"==e?r-1:0),o.dispatch({effects:A.of(a)}),!0}}"object"==typeof navigator&&navigator.platform;let q=i.EditorView.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'\uD835\uDC65'"}},".cm-completionIcon-constant":{"&:after":{content:"'\uD835\uDC36'"}},".cm-completionIcon-type":{"&:after":{content:"'\uD835\uDC61'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\uD83D\uDD11︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});
1class j{constructor(t,e,o,n){this.field=t,this.line=e,this.from=o,this.to=n}}class W{constructor(t,e,o){this.field=t,this.from=e,this.to=o}map(t){let e=t.mapPos(this.from,-1,n.iR.TrackDel),o=t.mapPos(this.to,1,n.iR.TrackDel);return null==e||null==o?null:new W(this.field,e,o)}}class H{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let o=[],n=[e],i=t.doc.lineAt(e),l=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(o.length){let o=l,r=/^\t*/.exec(i)[0].length;for(let e=0;e<r;e++)o+=t.facet(s.Xt);n.push(e+o.length-r),i=o+i.slice(r)}o.push(i),e+=i.length+1}return{text:o,ranges:this.fieldPositions.map(t=>new W(t.field,n[t.line]+t.from,n[t.line]+t.to))}}static parse(t){let e=[],o=[],n=[],i;for(let s of t.split(/\r\n?|\n/)){for(;i=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(s);){let t=i[1]?+i[1]:null,l=i[2]||i[3]||"",r=-1,a=l.replace(/\\[{}]/g,t=>t[1]);for(let o=0;o<e.length;o++)(null!=t?e[o].seq==t:a&&e[o].name==a)&&(r=o);if(r<0){let o=0;for(;o<e.length&&(null==t||null!=e[o].seq&&e[o].seq<t);)o++;for(let i of(e.splice(o,0,{seq:t,name:a}),r=o,n))i.field>=r&&i.field++}for(let t of n)if(t.line==o.length&&t.from>i.index){let e=i[2]?3+(i[1]||"").length:2;t.from-=e,t.to-=e}n.push(new j(r,o.length,i.index,i.index+a.length)),s=s.slice(0,i.index)+l+s.slice(i.index+i[0].length)}s=s.replace(/\\([{}])/g,(t,e,i)=>{for(let t of n)t.line==o.length&&t.from>i&&(t.from--,t.to--);return e}),o.push(s)}return new H(o,n)}}let U=i.NZ.widget({widget:new class extends i.xO{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),z=i.NZ.mark({class:"cm-snippetField"});class K{constructor(t,e){this.ranges=t,this.active=e,this.deco=i.NZ.set(t.map(t=>(t.from==t.to?U:z).range(t.from,t.to)),!0)}map(t){let e=[];for(let o of this.ranges){let n=o.map(t);if(!n)return null;e.push(n)}return new K(e,this.active)}selectionInsideField(t){return t.ranges.every(t=>this.ranges.some(e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))}}let _=n.Pe.define({map:(t,e)=>t&&t.map(e)}),Z=n.Pe.define(),X=n.sU.define({create:()=>null,update(t,e){for(let o of e.effects){if(o.is(_))return o.value;if(o.is(Z)&&t)return new K(t.ranges,o.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>i.EditorView.decorations.from(t,t=>t?t.deco:i.NZ.none)});function J(t,e){return n.OF.create(t.filter(t=>t.field==e).map(t=>n.OF.range(t.from,t.to)))}function Y(t){return({state:e,dispatch:o})=>{let n=e.field(X,!1);if(!n||t<0&&0==n.active)return!1;let i=n.active+t,s=t>0&&!n.ranges.some(e=>e.field==i+t);return o(e.update({selection:J(n.ranges,i),effects:_.of(s?null:new K(n.ranges,i)),scrollIntoView:!0})),!0}}let G=[{key:"Tab",run:Y(1),shift:Y(-1)},{key:"Escape",run:({state:t,dispatch:e})=>!!t.field(X,!1)&&(e(t.update({effects:_.of(null)})),!0)}],Q=n.sj.define({combine:t=>t.length?t[0]:G}),tt=n.Nb.highest(i.keymap.compute([Q],t=>t.facet(Q)));function te(t,e){let o;return{...e,apply:(o=H.parse(t),(t,e,i,s)=>{let{text:l,ranges:r}=o.instantiate(t.state,i),{main:a}=t.state.selection,c={changes:{from:i,to:s==a.from?a.to:s,insert:n.EY.of(l)},scrollIntoView:!0,annotations:e?[u.of(e),n.ZX.userEvent.of("input.complete")]:void 0};if(r.length&&(c.selection=J(r,0)),r.some(t=>t.field>0)){let e=new K(r,0),o=c.effects=[_.of(e)];void 0===t.state.field(X,!1)&&o.push(n.Pe.appendConfig.of([X,tt,to,q]))}t.dispatch(t.state.update(c))})}}let to=i.EditorView.domEventHandlers({mousedown(t,e){let o=e.state.field(X,!1),n;if(!o||null==(n=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let i=o.ranges.find(t=>t.from<=n&&t.to>=n);return!!i&&i.field!=o.active&&(e.dispatch({selection:J(o.ranges,i.field),effects:_.of(o.ranges.some(t=>t.field>i.field)?new K(o.ranges,i.field):null),scrollIntoView:!0}),!0)}}),tn={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ti=n.Pe.define({map(t,e){let o=e.mapPos(t,-1,n.iR.TrackAfter);return null==o?void 0:o}}),ts=new class extends n.FB{};ts.startSide=1,ts.endSide=-1;let tl=n.sU.define({create:()=>n.om.empty,update(t,e){if(t=t.map(e.changes),e.selection){let o=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:t=>t>=o.from&&t<=o.to})}for(let o of e.effects)o.is(ti)&&(t=t.update({add:[ts.range(o.value,o.value+1)]}));return t}});function tr(){return[tp,tl]}let ta="()[]{}<>\xab\xbb\xbb\xab[]{}";function tc(t){for(let e=0;e<ta.length;e+=2)if(ta.charCodeAt(e)==t)return ta.charAt(e+1);return(0,n.MK)(t<128?t:t+1)}function th(t,e){return t.languageDataAt("closeBrackets",e)[0]||tn}let tf="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),tp=i.EditorView.inputHandler.of((t,e,o,i)=>{if((tf?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let l=t.state.selection.main;if(i.length>2||2==i.length&&1==(0,n.Fh)((0,n.vS)(i,0))||e!=l.from||o!=l.to)return!1;let r=function(t,e){let o=th(t,t.selection.main.head),i=o.brackets||tn.brackets;for(let l of i){let r=tc((0,n.vS)(l,0));if(e==l)return r==l?function(t,e,o,i){let l=i.stringPrefixes||tn.stringPrefixes,r=null,a=t.changeByRange(i=>{if(!i.empty)return{changes:[{insert:e,from:i.from},{insert:e,from:i.to}],effects:ti.of(i.to+e.length),range:n.OF.range(i.anchor+e.length,i.head+e.length)};let a=i.head,c=tm(t.doc,a),h;if(c==e){if(tg(t,a))return{changes:{insert:e+e,from:a},effects:ti.of(a+e.length),range:n.OF.cursor(a+e.length)};else if(td(t,a)){let i=o&&t.sliceDoc(a,a+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+i.length,insert:i},range:n.OF.cursor(a+i.length)}}}else if(o&&t.sliceDoc(a-2*e.length,a)==e+e&&(h=tb(t,a-2*e.length,l))>-1&&tg(t,h))return{changes:{insert:e+e+e+e,from:a},effects:ti.of(a+e.length),range:n.OF.cursor(a+e.length)};else if(t.charCategorizer(a)(c)!=n.Je.Word&&tb(t,a,l)>-1&&!function(t,e,o,n){let i=(0,s.mv)(t).resolveInner(e,-1),l=n.reduce((t,e)=>Math.max(t,e.length),0);for(let s=0;s<5;s++){let s=t.sliceDoc(i.from,Math.min(i.to,i.from+o.length+l)),r=s.indexOf(o);if(!r||r>-1&&n.indexOf(s.slice(0,r))>-1){let e=i.firstChild;for(;e&&e.from==i.from&&e.to-e.from>o.length+r;){if(t.sliceDoc(e.to-o.length,e.to)==o)return!1;e=e.firstChild}return!0}let a=i.to==e&&i.parent;if(!a)break;i=a}return!1}(t,a,e,l))return{changes:{insert:e+e,from:a},effects:ti.of(a+e.length),range:n.OF.cursor(a+e.length)};return{range:r=i}});return r?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}(t,l,i.indexOf(l+l+l)>-1,o):function(t,e,o,i){let s=null,l=t.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:o,from:l.to}],effects:ti.of(l.to+e.length),range:n.OF.range(l.anchor+e.length,l.head+e.length)};let r=tm(t.doc,l.head);return!r||/\s/.test(r)||i.indexOf(r)>-1?{changes:{insert:e+o,from:l.head},effects:ti.of(l.head+e.length),range:n.OF.cursor(l.head+e.length)}:{range:s=l}});return s?null:t.update(l,{scrollIntoView:!0,userEvent:"input.type"})}(t,l,r,o.before||tn.before);if(e==r&&td(t,t.selection.main.from))return function(t,e,o){let i=null,s=t.changeByRange(e=>e.empty&&tm(t.doc,e.head)==o?{changes:{from:e.head,to:e.head+o.length,insert:o},range:n.OF.cursor(e.head+o.length)}:i={range:e});return i?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}(t,0,r)}return null}(t.state,i);return!!r&&(t.dispatch(r),!0)}),tu=[{key:"Backspace",run:({state:t,dispatch:e})=>
1{if(t.readOnly)return!1;let o=th(t,t.selection.main.head).brackets||tn.brackets,i=null,s=t.changeByRange(e=>{if(e.empty){let i=function(t,e){let o=t.sliceString(e-2,e);return(0,n.Fh)((0,n.vS)(o,0))==o.length?o:o.slice(1)}(t.doc,e.head);for(let s of o)if(s==i&&tm(t.doc,e.head)==tc((0,n.vS)(s,0)))return{changes:{from:e.head-s.length,to:e.head+s.length},range:n.OF.cursor(e.head-s.length)}}return{range:i=e}});return i||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i}}];function td(t,e){let o=!1;return t.field(tl).between(0,t.doc.length,t=>{t==e&&(o=!0)}),o}function tm(t,e){let o=t.sliceString(e,e+2);return o.slice(0,(0,n.Fh)((0,n.vS)(o,0)))}function tg(t,e){let o=(0,s.mv)(t).resolveInner(e+1);return o.parent&&o.from==e}function tb(t,e,o){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=n.Je.Word)return e;for(let s of o){let o=e-s.length;if(t.sliceDoc(o,e)==s&&i(t.sliceDoc(o-1,o))!=n.Je.Word)return o}return -1}t=>{let e=t.state.field(B,!1);return!!e&&!!e.active.some(t=>0!=t.state)&&(t.dispatch({effects:b.of(null)}),!0)},t=>{let e=t.state.field(B,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(w).interactionDelay)&&N(t,e.open.options[e.open.selected])}}}]);

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.