1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3132],{43132:(e,t,a)=>{a.r(t),a.d(t,{default:()=>r}),function(){try{if("u">typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".ce-code__textarea{min-height:200px;font-family:Menlo,Monaco,Consolas,Courier New,monospace;color:#41314e;line-height:1.6em;font-size:12px;background:#f8f7fa;border:1px solid #f1f1f4;box-shadow:none;white-space:pre;word-wrap:normal;overflow-x:auto;resize:vertical}")),document.head.appendChild(e)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();class r{static get isReadOnlySupported(){return!0}static get enableLineBreaks(){return!0}constructor({data:e,config:t,api:a,readOnly:s}){this.api=a,this.readOnly=s,this.placeholder=this.api.i18n.t(t.placeholder||r.DEFAULT_PLACEHOLDER),this.CSS={baseClass:this.api.styles.block,input:this.api.styles.input,wrapper:"ce-code",textarea:"ce-code__textarea"},this.nodes={holder:null,textarea:null},this.data={code:e.code??""},this.nodes.holder=this.drawView()}render(){return this.nodes.holder}save(e){return{code:e.querySelector("textarea").value}}onPaste(e){let t=e.detail;if("data"in t){let e=t.data;this.data={code:e||""}}}get data(){return this._data}set data(e){this._data=e,this.nodes.textarea&&(this.nodes.textarea.value=e.code)}static get toolbox(){return{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 8L5 12L9 16"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 8L19 12L15 16"/></svg>',title:"Code"}}static get DEFAULT_PLACEHOLDER(){return"Enter a code"}static get pasteConfig(){return{tags:["pre"]}}static get sanitize(){return{code:!0}}tabHandler(e){let t;e.stopPropagation(),e.preventDefault();let a=e.target,r=e.shiftKey,s=a.selectionStart,o=a.value;if(r){let e=function(e,t){let a="";for(;a!==` 2`&&t>0;)t-=1,a=e.substr(t,1);return a===` 3`&&(t+=1),t}(o,s);if(" "!==o.substr(e,2))return;a.value=o.substring(0,e)+o.substring(e+2),t=s-2}else t=s+2,a.value=o.substring(0,s)+" "+o.substring(s);a.setSelectionRange(t,t)}drawView(){let e=document.createElement("div"),t=document.createElement("textarea");return e.classList.add(this.CSS.baseClass,this.CSS.wrapper),t.classList.add(this.CSS.textarea,this.CSS.input),t.value=this.data.code,t.placeholder=this.placeholder,this.readOnly&&(t.disabled=!0),e.appendChild(t),t.addEventListener("keydown",e=>{"Tab"===e.code&&this.tabHandler(e)}),this.nodes.textarea=t,e}}}}]);
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.