PageSourceSearch

https://deaflds.notion.site/_assets/performanceObserver-1fc96e4820bfa24d.js

js deaflds.notion.site collected 2026-10-09 23:12:07 UTC 11,135 bytes, 1 lines download raw bytes

1"use strict";(globalThis.rspackChunknotion_next=globalThis.rspackChunknotion_next||[]).push([[22054],{931593(e,t,n){let i;n(435368),n(730330),n(976614),n(139583),n(218043),n(159952),n(765324);let r={preInitialPageRender:p(),postInitialPageRender:p()},o={pageVisitGroups:new Map,highInpEvents:new Map},a=null,s=null;function l(e,t,n){let i=`${t??""}:${e??""}`,r=o.pageVisitGroups.get(i);if(r)return r;let a={pageIdKey:e,pageVisitId:t,events:new Map,collectionData:n()};return o.pageVisitGroups.set(i,a),a}function u(e){return e instanceof HTMLElement?e.className:e instanceof SVGElement?e.className.baseVal:""}function c(e){let t=e.tagName.toLowerCase(),n=e.id?`#${e.id}`:"",i=u(e),r=i?`.${i.trim().split(/\s+/).join(".")}`:"";return`${t}${n}${r}`}function d(e){let t=e,n=0;for(;t&&n<=20;){if(t instanceof Element){let e=t.getAttribute("data-inp-target");if(e)return e;let n=t.getAttribute("data-testid");if(n)return n;let i=u(t);if(i.split(/\s+/).some(e=>e.startsWith("notion-")))return i}t=t.parentNode,n++}}function p(){return{durations:{_100:0,"100_300":0,"300_500":0,"500_1000":0,"1000_":0},blockingDurations:{_100:0,"100_300":0,"300_500":0,"500_1000":0,"1000_":0},inpCandidates:{_100:0,"100_300":0,"300_500":0,"500_1000":0,"1000_":0},eventTypeCounts:{classic_script_count:0,module_script_count:0,frame_request_callback_count:0,idle_request_callback_count:0,resize_observer_callback_count:0,set_timeout_count:0,set_interval_count:0,user_callback_other_count:0,event_listener_count:0,message_port_onmessage_count:0,resolve_promise_count:0,reject_promise_count:0,other_count:0},events:[],highInpAttributions:[]}}function _(e){return e<100?"_100":e<300?"100_300":e<500?"300_500":e<1e3?"500_1000":"1000_"}function g(e,t){return Object.values(e.durations).some(e=>e>0)&&(t.durations={...e.durations}),Object.values(e.blockingDurations).some(e=>e>0)&&(t.blocking_durations={...e.blockingDurations}),Object.values(e.inpCandidates).some(e=>e>0)&&(t.inp_candidates={...e.inpCandidates}),Object.values(e.eventTypeCounts).some(e=>e>0)&&(t.event_type_counts={...e.eventTypeCounts}),e.events.length>0&&(t.events=e.events.map(e=>({scripts:e.scripts,duration:e.duration,blocking_duration:e.blockingDuration}))),e.highInpAttributions.length>0&&(t.high_inp_attributions=[...e.highInpAttributions]),t}function v(e){let t=g(r.preInitialPageRender,{is_pre_ipr:!0}),i=g(r.postInitialPageRender,{is_pre_ipr:!1});(t.durations||t.high_inp_attributions)&&(0,n(104310).u)({event:{eventName:"long_animation_frame",eventProperties:{data:t}}}),(i.durations||i.high_inp_attributions)&&(0,n(104310).u)({event:{eventName:"long_animation_frame",eventProperties:{data:i}}}),r.preInitialPageRender=p(),r.postInitialPageRender=p()}function m(e){let t;return("main"===e?(t=n(506584).c.find(e=>e.getProps().isRootContainer),n(240414).T.filter(e=>e.getContextSelectableContainer()===t)):n(240414).T.filter(e=>{var t,n;return!!(null==(t=e.getContextSelectableContainer())||null==(n=t.isPeekRenderer)?void 0:n.call(t))})).filter(e=>{let t=e.props.store;return!!n(496704).K.findBlockFromStore(t)&&"listItemBlock"===e.refLocation&&!t.isInsideCollection()}).filter(e=>"collection_view"===e.props.store.getType()).length}function h(e){let t=[];for(let e of o.pageVisitGroups.values())(function(e){let t=new Map;for(let n of e.values()){let e=n.name;if(e&&n.duration){let i=t.get(e);i?i.push(n.duration):t.set(e,[n.duration])}}return Array.from(t,([e,t])=>({eventName:e,durations:t}))})(e.events).forEach(n=>{t.push({event_name:n.eventName,durations:n.durations,page_or_route:e.pageIdKey,page_visit_id:e.pageVisitId,...e.collectionData})});let i=[...o.highInpEvents.values()];(t.length>0||i.length>0)&&(0,n(104310).u)({event:{eventName:"inp_data",eventProperties:{data:t,...i.length>0&&{high_inp_events:i}}}}),o.pageVisitGroups.clear(),o.highInpEvents.clear()}function f(e,t){if(!window.PerformanceObserver)return()=>{};let u=new PerformanceObserver(u=>{u.getEntries().forEach(u=>{"event"===u.entryType&&"interactionId"in u&&function(e,t,r){let a=e.interactionId;if(a){var s,u,p,_;let t=function(e){var t;let i=(0,n(965142).s)()||(null==(t=n(127247).b.getForTab(e).getState().route)?void 0:t.name)||null,r=n(287641).T7.getForTab(e).getCurrentPageVisitId(),o=n(192314).AppStoreMainEditorCurrentBlockStore.state,a=o?o.isType(n(955630).w8):void 0;if(n(475097).default.isSidePeekOpen()||n(475097).default.isCenterPeekOpen()){let t=n(475097).default.peekTargetStore.state,o=null==t?void 0:t.id,s=null==t?void 0:t.isType(n(955630).w8);if(o){let t=(0,n(447036).Gb)();return l(t?o:i,t?n(287641).D0.getForTab(e).getCurrentPageVisitId():r,()=>({is_fullscreen_collection:a,inline_collection_count:a?m("main"):void 0,is_peek_open:!0,peek_has_focus:t,peek_is_fullscreen_collection:s,peek_inline_collection_count:s?m("peek"):void 0}))}}return l(i,r,()=>({is_fullscreen_collection:a,inline_collection_count:a?m("main"):void 0,is_peek_open:!1,peek_has_focus:void 0,peek_is_fullscreen_collection:void 0,peek_inline_collection_count:void 0}))}(r),g=t.events,v=null==(s=g.get(a))?void 0:s.duration,h={duration:e.duration,name:e.name};n(566025).w.maybeAddDuration(a,e.duration),v?v&&e.duration>v&&g.set(a,h):(g.set(a,h),n(566025).w.incrementInteractionCount());let f=e.target;if(e.duration>=500){let r=o.highInpEvents.get(a);if(r?e.duration>r.duration:o.highInpEvents.size<10){let r=e.processingStart-e.startTime,s=e.processingEnd-e.processingStart,l=e.startTime+e.duration-e.processingEnd,g=e.name.startsWith("pointer")||"click"===e.name?i:void 0,v=f instanceof Element?c(f):g?c(g.element):void 0,m=d(f)??(null==g?void 0:g.component)??"(detached)",h={event_name:e.name,start_time:Math.round(e.startTime),interaction_id:a,duration:Math.round(e.duration),input_delay:Math.round(r),processing_time:Math.round(s),presentation_delay:Math.round(l),page_or_route:t.pageIdKey,page_visit_id:t.pageVisitId,target_selector:v,target_component:m,...(u=e.startTime,void 0!==n(404931).r.timestamp&&n(329464).A.state.initialRenderCompleted&&u<n(404931).r.timestamp?{is_from_loading_first_chunk_on_navigation:!0,page_source:n(404931).r.source,page_speculation:(p=n(404931).r,_=u,{first_chunk_ready_when_requested:p.wasReadyWhenRequested,first_chunk_loaded_after_ms:Math.round(p.receivedTime-_),held_chunk_parse_after_ms:void 0===p.heldChunkParseStartTime?void 0:Math.round(p.heldChunkParseStartTime-_)})}:{is_from_loading_first_chunk_on_navigation:!1,page_source:void 0})};o.highInpEvents.set(a,h)}}}(function(){let e=0;for(let t of o.pageVisitGroups.values())e+=t.events.size;return e})()>50&&(0,n(934927).$)(()=>h(t),3e3)}
1(u,e,t),"long-animation-frame"===u.entryType&&"hidden"!==document.visibilityState&&function(e){let t=function(){if(null!==a)return a;let e=performance.getEntriesByName("initial_page_render");if(e.length>0){let t=e[0];return a=t.startTime+t.duration}return null}(),n=function(){if(null!==s)return s;let e=performance.getEntriesByName("initial_database_render");if(e.length>0){let t=e[0];return s=t.startTime+t.duration}return null}(),i=null!==t&&e.startTime>t,o=null!==n&&e.startTime>n,l=i||o?r.postInitialPageRender:r.preInitialPageRender,u=_(e.duration);l.durations[u]++;let c=_(e.blockingDuration);if(l.blockingDurations[c]++,e.firstUIEventTimestamp>0){let t=_(e.blockingDuration);l.inpCandidates[t]++}let d=[];if(e.scripts.forEach(e=>{var t,n;if(e.sourceURL&&"classic-script"===e.invokerType){let t=e.sourceURL.split("/").pop()||e.sourceURL;d.push(t),l.eventTypeCounts.classic_script_count++}else if(e.sourceURL&&"module-script"===e.invokerType){let t=e.sourceURL.split("/").pop()||e.sourceURL;d.push(t),l.eventTypeCounts.module_script_count++}else"FrameRequestCallback"===e.invoker?l.eventTypeCounts.frame_request_callback_count++:"IdleRequestCallback"===e.invoker?l.eventTypeCounts.idle_request_callback_count++:"ResizeObserverCallback"===e.invoker?l.eventTypeCounts.resize_observer_callback_count++:null!=(t=e.invoker)&&t.includes("setTimeout")?l.eventTypeCounts.set_timeout_count++:null!=(n=e.invoker)&&n.includes("setInterval")?l.eventTypeCounts.set_interval_count++:"user-callback"===e.invokerType?l.eventTypeCounts.user_callback_other_count++:"event-listener"===e.invokerType&&"MessagePort.onmessage"===e.invoker?l.eventTypeCounts.message_port_onmessage_count++:"event-listener"===e.invokerType?l.eventTypeCounts.event_listener_count++:"resolve-promise"===e.invokerType?l.eventTypeCounts.resolve_promise_count++:"reject-promise"===e.invokerType?l.eventTypeCounts.reject_promise_count++:l.eventTypeCounts.other_count++}),d.length>0){let t={duration:e.duration,blockingDuration:e.blockingDuration,scripts:d};l.events.push(t)}if(e.firstUIEventTimestamp>0&&e.blockingDuration>=500&&l.highInpAttributions.length<5){let t=[...e.scripts].sort((e,t)=>t.duration-e.duration).slice(0,3).map(e=>({invoker_type:e.invokerType,invoker:e.invoker,source_url:function(e,t){if(!e)return"";let n=e.split("/").pop()||e;return t>=0?`${n}:${t}`:n}(e.sourceURL,e.sourceCharPosition),source_function_name:e.sourceFunctionName,duration:Math.round(e.duration),forced_style_and_layout_duration:Math.round(e.forcedStyleAndLayoutDuration)}));l.highInpAttributions.push({start_time:Math.round(e.startTime),first_ui_event_timestamp:Math.round(e.firstUIEventTimestamp),duration:Math.round(e.duration),blocking_duration:Math.round(e.blockingDuration),render_start:Math.round(e.renderStart),style_and_layout_start:Math.round(e.styleAndLayoutStart),scripts:t})}}(u)})});u.observe({type:"event",durationThreshold:16,buffered:!0}),PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")&&u.observe({type:"long-animation-frame",buffered:!0});let p=setInterval(()=>{(0,n(934927).$)(()=>v(e),1e4)},3e5),g=()=>{"hidden"===document.visibilityState&&(v(e),h(e))};document.addEventListener("visibilitychange",g);let f=e=>{let t=e.target;t instanceof Element&&(i={element:t,component:d(t)})};return document.addEventListener("pointerdown",f,!0),()=>{u.disconnect(),clearInterval(p),document.removeEventListener("visibilitychange",g),document.removeEventListener("pointerdown",f,!0)}}n.d(t,{initializePerformanceObserver:()=>f})},566025(e,t,n){n(953925),n(540679);var i=()=>n(546605);class r extends i().Store{getInitialState(){return{longestInteractionMap:new Map,longestInteractionSortedList:[],interactionCount:0}}incrementInteractionCount(){this.state.interactionCount++}maybeAddDuration(e,t){let n=this.state.longestInteractionMap.get(e),i=this.state.longestInteractionSortedList.at(-1);if((!n&&this.state.longestInteractionMap.size<10||!n&&i&&t>i[1]||n&&t>n)&&(this.state.longestInteractionMap.set(e,t),this.state.longestInteractionSortedList=[...this.state.longestInteractionMap.entries()].sort((e,t)=>t[1]-e[1]),this.state.longestInteractionSortedList.length>10))for(let e of this.state.longestInteractionSortedList.splice(10))this.state.longestInteractionMap.delete(e[0])}getP98INPDuration(){if(!this.state.longestInteractionMap.size)return;let e=Math.min(this.state.longestInteractionSortedList.length-1,Math.floor(this.state.interactionCount/50));return this.state.longestInteractionSortedList[e][1]}}let o=new r;(0,n(202146).exposeDebugValue)("interactionToNextPaintStore",o),n.d(t,{},{w:o})}}]);

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.