PageSourceSearch

https://pika.style/_next/static/chunks/4637.018c2f571856c48e.js

js pika.style collected 2026-10-03 21:22:28 UTC 13,970 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4637],{34637:(e,t,o)=>{o.r(t),o.d(t,{default:()=>a});var r=o(75038),i=o(71623),n=o(50876),s=o(38592),d=o(34530);let a=({code:e,setCode:t,options:o,editorOptions:a,editorRef:p,isSafari:c})=>(0,r.jsx)("div",{style:{boxShadow:n.C[o?.imageShadow]?.css,borderRadius:`${o?.imageRoundness}px`},className:(0,i.A)("w-full",o?.editorTheme==="dark"?"bg-[#30293D]":"bg-gray-200"),children:(0,r.jsxs)("div",{style:{borderRadius:`${o?.imageRoundness}px`,fontFamily:`${o?.editorFont}, Roboto`,borderRadius:`${o?.imageRoundness}px`,fontSize:`${o?.codeFontSize||17}px`},className:(0,i.A)("w-full flex items-center mx-auto pt-8 text-left",(o?.editorTheme,"text-[#bb51b8]")),children:[(0,r.jsxs)("div",{className:(0,i.A)("absolute inset-0 p-[4px] w-full h-full"),children:[(0,r.jsx)("div",{style:{borderRadius:`${o?.imageRoundness}px`},className:(0,i.A)("w-full h-full absolute bottom-0 left-0",o?.editorTheme==="dark"?"bg-[#211e26]":"bg-white")}),(0,r.jsx)(({color:e})=>(0,r.jsxs)("div",{className:"absolute top-[16px] left-0 flex items-center space-x-2 pt-[6px] px-6",children:[(0,r.jsx)("div",{className:(0,i.A)("w-2 h-2 rounded-full shadow-lg md:w-[10px] md:h-[10px]",e??"bg-[#EB6B5E]")}),(0,r.jsx)("div",{className:(0,i.A)("w-2 h-2 rounded-full shadow-lg md:w-[10px] md:h-[10px]",e??"bg-[#F3BD50]")}),(0,r.jsx)("div",{className:(0,i.A)("w-2 h-2 rounded-full shadow-lg md:w-[10px] md:h-[10px]",e??"bg-[#62C454]")})]}),{}),(0,r.jsx)("div",{style:{borderRadius:`${o?.imageRoundness}px`},className:(0,i.A)("w-[calc(100%-1px)] h-[calc(100%-1px)] border absolute inset-0",o?.editorTheme==="dark"?"border-white/20 shadow":"border-gray-500/20")}),(0,r.jsx)("div",{className:(0,i.A)("absolute top-[17px] text-[0.8rem] font-sans left-[50%] translate-x-[-50%] z-30"),children:(0,r.jsx)(d.m_,{text:"Enter an empty space to hide title",children:(0,r.jsx)("input",{type:"text",placeholder:"Untitled",spellCheck:!1,className:(0,i.A)("bg-transparent text-center ring-1 ring-transparent focus:ring-pink-400 rounded-md focus:outline-none hover:ring-pink-400 focus:shadow-inner hover:shadow-inner",o?.editorTheme==="dark"?"text-gray-400/80 placeholder-gray-600":"text-gray-600/70 placeholder-gray-400")})})})]}),(0,r.jsx)(s.xL,{editorDidMount:e=>p.current=e,onBeforeChange:(e,o,r)=>{t(r)},value:e,options:a})]})})},38592:(e,t,o)=>{function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)({}).hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e}).apply(null,arguments)}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n,s,d=(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});t.xL=void 0;var a=o(76430),p="u"<typeof window||void 0!==o.g&&!0===o.g.PREVENT_CODEMIRROR_RENDER;p||(s=o(86400));var c=function(){function e(){}return e.equals=function(e,t){var o=this,r=Object.keys,n=i(e),s=i(t);return e&&t&&"object"===n&&n===s?r(e).length===r(t).length&&r(e).every(function(r){return o.equals(e[r],t[r])}):e===t},e}(),u=function(){function e(e,t){this.editor=e,this.props=t}return e.prototype.delegateCursor=function(e,t,o){var r=this.editor.getDoc();o&&this.editor.focus(),t?r.setCursor(e):r.setCursor(e,null,{scroll:!1})},e.prototype.delegateScroll=function(e){this.editor.scrollTo(e.x,e.y)},e.prototype.delegateSelection=function(e,t){this.editor.getDoc().setSelections(e),t&&this.editor.focus()},e.prototype.apply=function(e){e&&e.selection&&e.selection.ranges&&this.delegateSelection(e.selection.ranges,e.selection.focus||!1),e&&e.cursor&&this.delegateCursor(e.cursor,e.autoScroll||!1,this.editor.getOption("autofocus")||!1),e&&e.scroll&&this.delegateScroll(e.scroll)},e.prototype.applyNext=function(e,t,o){e&&e.selection&&e.selection.ranges&&t&&t.selection&&t.selection.ranges&&!c.equals(e.selection.ranges,t.selection.ranges)&&this.delegateSelection(t.selection.ranges,t.selection.focus||!1),e&&e.cursor&&t&&t.cursor&&!c.equals(e.curs
1or,t.cursor)&&this.delegateCursor(o.cursor||t.cursor,t.autoScroll||!1,t.autoCursor||!1),e&&e.scroll&&t&&t.scroll&&!c.equals(e.scroll,t.scroll)&&this.delegateScroll(t.scroll)},e.prototype.applyUserDefined=function(e,t){t&&t.cursor&&this.delegateCursor(t.cursor,e.autoScroll||!1,this.editor.getOption("autofocus")||!1)},e.prototype.wire=function(e){var t=this;Object.keys(e||{}).filter(function(e){return/^on/.test(e)}).forEach(function(e){switch(e){case"onBlur":t.editor.on("blur",function(e,o){t.props.onBlur(t.editor,o)});break;case"onContextMenu":t.editor.on("contextmenu",function(e,o){t.props.onContextMenu(t.editor,o)});break;case"onCopy":t.editor.on("copy",function(e,o){t.props.onCopy(t.editor,o)});break;case"onCursor":t.editor.on("cursorActivity",function(e){t.props.onCursor(t.editor,t.editor.getDoc().getCursor())});break;case"onCursorActivity":t.editor.on("cursorActivity",function(e){t.props.onCursorActivity(t.editor)});break;case"onCut":t.editor.on("cut",function(e,o){t.props.onCut(t.editor,o)});break;case"onDblClick":t.editor.on("dblclick",function(e,o){t.props.onDblClick(t.editor,o)});break;case"onDragEnter":t.editor.on("dragenter",function(e,o){t.props.onDragEnter(t.editor,o)});break;case"onDragLeave":t.editor.on("dragleave",function(e,o){t.props.onDragLeave(t.editor,o)});break;case"onDragOver":t.editor.on("dragover",function(e,o){t.props.onDragOver(t.editor,o)});break;case"onDragStart":t.editor.on("dragstart",function(e,o){t.props.onDragStart(t.editor,o)});break;case"onDrop":t.editor.on("drop",function(e,o){t.props.onDrop(t.editor,o)});break;case"onFocus":t.editor.on("focus",function(e,o){t.props.onFocus(t.editor,o)});break;case"onGutterClick":t.editor.on("gutterClick",function(e,o,r,i){t.props.onGutterClick(t.editor,o,r,i)});break;case"onInputRead":t.editor.on("inputRead",function(e,o){t.props.onInputRead(t.editor,o)});break;case"onKeyDown":t.editor.on("keydown",function(e,o){t.props.onKeyDown(t.editor,o)});break;case"onKeyHandled":t.editor.on("keyHandled",function(e,o,r){t.props.onKeyHandled(t.editor,o,r)});break;case"onKeyPress":t.editor.on("keypress",function(e,o){t.props.onKeyPress(t.editor,o)});break;case"onKeyUp":t.editor.on("keyup",function(e,o){t.props.onKeyUp(t.editor,o)});break;case"onMouseDown":t.editor.on("mousedown",function(e,o){t.props.onMouseDown(t.editor,o)});break;case"onPaste":t.editor.on("paste",function(e,o){t.props.onPaste(t.editor,o)});break;case"onRenderLine":t.editor.on("renderLine",function(e,o,r){t.props.onRenderLine(t.editor,o,r)});break;case"onScroll":t.editor.on("scroll",function(e){t.props.onScroll(t.editor,t.editor.getScrollInfo())});break;case"onSelection":t.editor.on("beforeSelectionChange",function(e,o){t.props.onSelection(t.editor,o)});break;case"onTouchStart":t.editor.on("touchstart",function(e,o){t.props.onTouchStart(t.editor,o)});break;case"onUpdate":t.editor.on("update",function(e){t.props.onUpdate(t.editor)});break;case"onViewportChange":t.editor.on("viewportChange",function(e,o,r){t.props.onViewportChange(t.editor,o,r)})}})},e}();t.xL=function(e){function t(t){var o=e.call(this,t)||this;return p||(o.applied=!1,o.appliedNext=!1,o.appliedUserDefined=!1,o.deferred=null,o.emulating=!1,o.hydrated=!1,o.initCb=function(){o.props.editorDidConfigure&&o.props.editorDidConfigure(o.editor)},o.mounted=!1),o}return d(t,e),t.prototype.hydrate=function(e){var t=this,o=e&&e.options?e.options:{},i=r({},s.defaults,this.editor.options,o);Object.keys(i).some(function(e){return t.editor.getOption(e)!==i[e]}
1)&&Object.keys(i).forEach(function(e){o.hasOwnProperty(e)&&t.editor.getOption(e)!==i[e]&&(t.editor.setOption(e,i[e]),t.mirror.setOption(e,i[e]))}),this.hydrated||(this.deferred?this.resolveChange(e.value):this.initChange(e.value||"")),this.hydrated=!0},t.prototype.initChange=function(e){this.emulating=!0;var t=this.editor.getDoc(),o=t.lastLine(),r=t.getLine(t.lastLine()).length;t.replaceRange(e||"",{line:0,ch:0},{line:o,ch:r}),this.mirror.setValue(e),t.clearHistory(),this.mirror.clearHistory(),this.emulating=!1},t.prototype.resolveChange=function(e){this.emulating=!0;var t=this.editor.getDoc();if("undo"===this.deferred.origin?t.undo():"redo"===this.deferred.origin?t.redo():t.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),e&&e!==t.getValue()){var o=t.getCursor();t.setValue(e),t.setCursor(o)}this.emulating=!1,this.deferred=null},t.prototype.mirrorChange=function(e){var t=this.editor.getDoc();return"undo"===e.origin?(t.setHistory(this.mirror.getHistory()),this.mirror.undo()):"redo"===e.origin?(t.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(e.text,e.from,e.to,e.origin),this.mirror.getValue()},t.prototype.componentDidMount=function(){var e=this;!p&&(this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&s.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=s(this.ref,this.props.options),this.shared=new u(this.editor,this.props),this.mirror=s(function(){},this.props.options),this.editor.on("electricInput",function(){e.mirror.setHistory(e.editor.getDoc().getHistory())}),this.editor.on("cursorActivity",function(){e.mirror.setCursor(e.editor.getDoc().getCursor())}),this.editor.on("beforeChange",function(t,o){if(!e.emulating){o.cancel(),e.deferred=o;var r=e.mirrorChange(e.deferred);e.props.onBeforeChange&&e.props.onBeforeChange(e.editor,e.deferred,r)}}),this.editor.on("change",function(t,o){e.mounted&&e.props.onChange&&e.props.onChange(e.editor,o,e.editor.getValue())}),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getOption("autofocus")&&this.editor.focus(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},t.prototype.componentDidUpdate=function(e){if(!p){var t={cursor:null};this.props.value!==e.value&&(this.hydrated=!1),this.props.autoCursor||void 0===this.props.autoCursor||(t.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.appliedNext||(this.shared.applyNext(e,this.props,t),this.appliedNext=!0),this.shared.applyUserDefined(e,t),this.appliedUserDefined=!0}},t.prototype.componentWillUnmount=function(){p||(this.props.editorWillUnmount&&this.props.editorWillUnmount(s),this.hydrated=!1)},t.prototype.shouldComponentUpdate=function(e,t){return!p},t.prototype.render=function(){var e=this;if(p)return null;var t=this.props.className?"react-codemirror2 ".concat(this.props.className):"react-codemirror2";return a.createElement("div",{className:t,ref:function(t){return e.ref=t}})},t}(a.Component),function(e){function t(t){var o=e.call(this,t)||this;return p||(o.applied=!1,o.appliedUserDefined=!1,o.continueChange=!1,o.detached=!1,o.hydrated=!1,o.initCb=function(){o.props.editorDidConfigure&&o.props.editorDidConfigure(o.editor)},o.mounted=!1,o.onBeforeChangeCb=function(){o.continueChange=!0}),o}d(t,e),t.prototype.hydrate=function(e){var t=this,o=e&&e.options?e.options:{},i=r({},s.defaults,this.editor.options,o);if(Object.keys(i).some(function(e){return t.editor.getOption(e)!==i[e]}
1)&&Object.keys(i).forEach(function(e){o.hasOwnProperty(e)&&t.editor.getOption(e)!==i[e]&&t.editor.setOption(e,i[e])}),!this.hydrated){var n=this.editor.getDoc(),d=n.lastLine(),a=n.getLine(n.lastLine()).length;n.replaceRange(e.value||"",{line:0,ch:0},{line:d,ch:a})}this.hydrated=!0},t.prototype.componentDidMount=function(){var e=this;!p&&(this.detached=!0===this.props.detach,this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&s.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=s(this.ref,this.props.options),this.shared=new u(this.editor,this.props),this.editor.on("beforeChange",function(t,o){e.props.onBeforeChange&&e.props.onBeforeChange(e.editor,o,e.editor.getValue(),e.onBeforeChangeCb)}),this.editor.on("change",function(t,o){e.mounted&&e.props.onChange&&(e.props.onBeforeChange?e.continueChange&&e.props.onChange(e.editor,o,e.editor.getValue()):e.props.onChange(e.editor,o,e.editor.getValue()))}),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getDoc().clearHistory(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},t.prototype.componentDidUpdate=function(e){if(this.detached&&!1===this.props.detach&&(this.detached=!1,e.editorDidAttach&&e.editorDidAttach(this.editor)),!this.detached&&!0===this.props.detach&&(this.detached=!0,e.editorDidDetach&&e.editorDidDetach(this.editor)),!p&&!this.detached){var t={cursor:null};this.props.value!==e.value&&(this.hydrated=!1,this.applied=!1,this.appliedUserDefined=!1),e.autoCursor||void 0===e.autoCursor||(t.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.applied||(this.shared.apply(e),this.applied=!0),this.appliedUserDefined||(this.shared.applyUserDefined(e,t),this.appliedUserDefined=!0)}},t.prototype.componentWillUnmount=function(){p||(this.props.editorWillUnmount&&this.props.editorWillUnmount(s),this.hydrated=!1)},t.prototype.shouldComponentUpdate=function(e,t){var o=!0;return p&&(o=!1),this.detached&&e.detach&&(o=!1),o},t.prototype.render=function(){var e=this;if(p)return null;var t=this.props.className?"react-codemirror2 ".concat(this.props.className):"react-codemirror2";return a.createElement("div",{className:t,ref:function(t){return e.ref=t}})}}(a.Component)}}]);

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.