PageSourceSearch

https://studypod.app/_next/static/chunks/8240.1a9a24ce66a4400e.js

js studypod.app collected 2026-09-24 14:33:33 UTC 6,486 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8240],{48240:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return m}});var n=r(57437),i=r(21211);r(91389);var s=r(84553),o=r(25865),l=r(29159),a=r(2265),u=r(19003),c=r(50726);let d=new Set;function g(e){let{altText:t,className:r,imageRef:i,src:s,width:o,height:l,maxWidth:a}=e;return!function(e){if(!d.has(e))throw new Promise(t=>{let r=new Image;r.src=e,r.onload=()=>{d.add(e),t(null)}})}(s),(0,n.jsx)("img",{className:r||void 0,src:s,alt:t,ref:i,style:{height:l,maxWidth:a,width:o},draggable:"false"})}function m(e){let{src:t,altText:r,nodeKey:d,width:m,height:h,maxWidth:f,resizable:p}=e,y=(0,a.useRef)(null),R=(0,a.useRef)(null),[w,C,N]=(0,o.useLexicalNodeSelection)(d),[M,v]=(0,a.useState)(!1),[_]=(0,s.useLexicalComposerContext)(),[x,O]=(0,a.useState)(null),P=(0,a.useRef)(null),D=(0,a.useCallback)(e=>{if(w&&(0,i.$isNodeSelection)((0,i.$getSelection)())){e.preventDefault();let t=(0,i.$getNodeByKey)(d);(0,u.dP)(t)&&t.remove()}return!1},[w,d]),z=(0,a.useCallback)(e=>{let t=(0,i.$getSelection)(),r=R.current;return!!(w&&(0,i.$isNodeSelection)(t))&&1===t.getNodes().length&&null!==r&&r!==document.activeElement&&(e.preventDefault(),r.focus(),!0)},[w]),E=(0,a.useCallback)(e=>R.current===e.target&&((0,i.$setSelection)(null),_.update(()=>{C(!0);let e=_.getRootElement();null!==e&&e.focus()}),!0),[_,C]);(0,a.useEffect)(()=>{let e=!0,t=(0,l.mergeRegister)(_.registerUpdateListener(t=>{let{editorState:r}=t;e&&O(r.read(()=>(0,i.$getSelection)()))}),_.registerCommand(i.SELECTION_CHANGE_COMMAND,(e,t)=>(P.current=t,!1),i.COMMAND_PRIORITY_LOW),_.registerCommand(i.CLICK_COMMAND,e=>!!M||e.target===y.current&&(e.shiftKey?C(!w):(N(),C(!0)),!0),i.COMMAND_PRIORITY_LOW),_.registerCommand(i.DRAGSTART_COMMAND,e=>e.target===y.current&&(e.preventDefault(),!0),i.COMMAND_PRIORITY_LOW),_.registerCommand(i.KEY_DELETE_COMMAND,D,i.COMMAND_PRIORITY_LOW),_.registerCommand(i.KEY_BACKSPACE_COMMAND,D,i.COMMAND_PRIORITY_LOW),_.registerCommand(i.KEY_ENTER_COMMAND,z,i.COMMAND_PRIORITY_LOW),_.registerCommand(i.KEY_ESCAPE_COMMAND,E,i.COMMAND_PRIORITY_LOW));return()=>{e=!1,t()}},[N,_,M,w,d,D,z,E,C]);let b=w&&(0,i.$isNodeSelection)(x)&&!M,A=w||M;return(0,n.jsx)(a.Suspense,{fallback:null,children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{draggable:b,children:(0,n.jsx)(g,{className:A?"focused ".concat((0,i.$isNodeSelection)(x)?"draggable":""):null,src:t,altText:r,imageRef:y,width:m,height:h,maxWidth:f})}),p&&(0,i.$isNodeSelection)(x)&&A&&(0,n.jsx)(c.Z,{editor:_,buttonRef:R,imageRef:y,maxWidth:f,onResizeStart:()=>{v(!0)},onResizeEnd:(e,t)=>{setTimeout(()=>{v(!1)},200),_.update(()=>{let r=(0,i.$getNodeByKey)(d);(0,u.dP)(r)&&r.setWidthAndHeight(e,t)})}})]})})}},50726:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(57437),i=r(2265);function s(e,t,r){return Math.min(Math.max(e,t),r)}let o={east:1,north:8,south:2,west:4};function l(e){let{onResizeStart:t,onResizeEnd:r,imageRef:l,maxWidth:a,editor:u}=e,c=(0,i.useRef)(null),d=(0,i.useRef)({priority:"",value:"default"}),g=(0,i.useRef)({currentHeight:0,currentWidth:0,direction:0,isResizing:!1,ratio:0,startHeight:0,startWidth:0,startX:0,startY:0}),m=u.getRootElement(),h=a||(null!==m?m.getBoundingClientRect().width-20:100),f=null!==m?m.getBoundingClientRect().height-20:100,p=e=>{let t=e===o.east||e===o.west,r=e===o.north||e===o.south,n=e&o.north&&e&o.west||e&o.south&&e&o.east,i=t?"ew":r?"ns":n?"nwse":"nesw";null!==m&&m.style.setProperty("cursor","".concat(i,"-resize"),"important"),null!==document.body&&(document.body.style.setProperty("cursor","".concat(i,"-resize"),"important"),d.current.value=document.body.style.getPropertyValue("-webkit-user-select"),d.current.priority=document.body.style.getPropertyPriority("-webkit-user-select"),document.body.style.setProperty("-webkit-user-select","none","important"))},y=()=>{null!==m&&m.style.setProperty("cursor","text"),null!==document.body&&(document.body.style.setProperty("cursor","default"),document.body.style.setProperty("-webkit-user-select",d.current.value,d.current.priority))},R=(e,r)=>{if(!u.isEditable())return;let n=l.current,i=c.current;if(null!==n&&null!==i){e.preventDefault();let{width:s,height:o}=n.getBoundingClientRect(),l=g.current;l.startWidth=s,l.startHeight=o,l.ratio=s/o,l.currentWidth=s,l.currentHeight=o,l.startX=e.clientX,l.startY=e.clientY,l.isResizing=!0,l.direction=r,p(r),t(),i.classList.add("image-control-wrapper--resizing"),n.style.height="".concat(o,"px"),n.style.width="".concat(s,"px"),document.addEventListener("pointermove",w),document.addEventListener("pointerup",C)}},w=e=>{let t=l.current,r=g.current,n=r.direction&(o.east|o.west),i=r.direction&(o.south|o.north);if(null!==t&&r.isResizing){if(n&&i){let n=Math.floor(r.startX-e.clientX);n=r.direction&o.east?-n:n;let i=s(r.startWidth+n,100,h),l=i/r.ratio;t.style.width="".concat(i,"px"),t.style.height="".concat(l,"px"),r.currentHeight=l,r.currentWidth=i}else if(i){let n=Math.floor(r.startY-e.clientY);n=r.direction&o.south?-n:n;let i=s(r.startHeight+n,100,f);t.style.height="".concat(i,"px"),r.currentHeight=i}else{let n=Math.floor(r.startX-e.clientX);n=r.direction&o.east?-n:n;let i=s(r.startWidth+n,100,h);t.style.width="".concat(i,"px"),r.currentWidth=i}}},C=()=>{let e=l.current,t=g.current,n=c.current;if(null!==e&&null!==n&&t.isResizing){let e=t.currentWidth,i=t.currentHeight;t.startWidth=0,t.startHeight=0,t.ratio=0,t.startX=0,t.startY=0,t.currentWidth=0,t.currentHeight=0,t.isResizing=!1,n.classList.remove("image-control-wrapper--resizing"),y(),r(e,i),document.removeEventListener("pointermove",w),document.removeEventListener("pointerup",C)}};return(0,n.jsxs)("div",{ref:c,children:[(0,n.jsx)("div",{className:"image-resizer image-resizer-n",onPointerDown:e=>{R(e,o.north)}}),(0,n.jsx)("div",{className:"image-resizer image-resizer-ne",onPointerDown:e=>{R(e,o.north|o.east)}}),(0,n.jsx)("div",{className:"image-resizer image-resizer-e",onPointerDown:e=>{R(e,o.east)}}),(0,n.jsx)("div",{className:"image-resizer image-resizer-se",onPointerDown:e=>{R(e,o.south|o.east)}}),(0,n.jsx)("div",{className:"image-resizer image-resizer-s",onPointerDown:e=>{R(e,o.south)}}),(0,n.jsx)("div",{className:"image-resizer image-resizer-sw",onPointerDown:e=>{R(e,o.south|o.west)}
1}),(0,n.jsx)("div",{className:"image-resizer image-resizer-w",onPointerDown:e=>{R(e,o.west)}}),(0,n.jsx)("div",{className:"image-resizer image-resizer-nw",onPointerDown:e=>{R(e,o.north|o.west)}})]})}},91389:function(){}}]);

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.