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 o={preInitialPageRender:d(),postInitialPageRender:d()},r={pageVisitGroups:new Map,highInpEvents:new Map},a=null,s=null;function l(e,t,n){let i=`${t??""}:${e??""}`,o=r.pageVisitGroups.get(i);if(o)return o;let a={pageIdKey:e,pageVisitId:t,events:new Map,collectionData:n()};return r.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),o=i?`.${i.trim().split(/\s+/).join(".")}`:"";return`${t}${n}${o}`}function p(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 d(){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(o.preInitialPageRender,{is_pre_ipr:!0}),i=g(o.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}}}),o.preInitialPageRender=d(),o.postInitialPageRender=d()}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 f(e){let t=[];for(let e of r.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=[...r.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}}}}),r.pageVisitGroups.clear(),r.highInpEvents.clear()}function h(e,t){if(!window.PerformanceObserver)return()=>{};let u=new PerformanceObserver(u=>{u.getEntries().forEach(u=>{"event"===u.entryType&&"interactionId"in u&&function(e,t,o){let a=e.interactionId;if(a){var s,u;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,o=n(287641).T7.getForTab(e).getCurrentPageVisitId(),r=n(192314).AppStoreMainEditorCurrentBlockStore.state,a=r?r.isType(n(955630).w8):void 0;if(n(475097).default.isSidePeekOpen()||n(475097).default.isCenterPeekOpen()){let t=n(475097).default.peekTargetStore.state,r=null==t?void 0:t.id,s=null==t?void 0:t.isType(n(955630).w8);if(r){let t=(0,n(447036).Gb)();return l(t?r:i,t?n(287641).D0.getForTab(e).getCurrentPageVisitId():o,()=>({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,o,()=>({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}))}(o),d=t.events,_=null==(s=d.get(a))?void 0:s.duration,g={duration:e.duration,name:e.name};n(566025).w.maybeAddDuration(a,e.duration),_?_&&e.duration>_&&d.set(a,g):(d.set(a,g),n(566025).w.incrementInteractionCount());let v=e.target;if(e.duration>=500){let o=r.highInpEvents.get(a);if(o?e.duration>o.duration:r.highInpEvents.size<10){let o=e.processingStart-e.startTime,s=e.processingEnd-e.processingStart,l=e.startTime+e.duration-e.processingEnd,d=e.name.startsWith("pointer")||"click"===e.name?i:void 0,_=v instanceof Element?c(v):d?c(d.element):void 0,g=p(v)??(null==d?void 0:d.component)??"(detached)",m={event_name:e.name,start_time:Math.round(e.startTime),interaction_id:a,duration:Math.round(e.duration),input_delay:Math.round(o),processing_time:Math.round(s),presentation_delay:Math.round(l),page_or_route:t.pageIdKey,page_visit_id:t.pageVisitId,target_selector:_,target_component:g,...(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}:{is_from_loading_first_chunk_on_navigation:!1,page_source:void 0})};r.highInpEvents.set(a,m)}}}(function(){let e=0;for(let t of r.pageVisitGroups.values())e+=t.events.size;return e})()>50&&(0,n(934927).$)(()=>f(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,r=null!==n&&e.startTime>n,l=i||r?o.postInitialPageRender:o.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 p=[];if(e.scripts.forEach(e=>{var t,n;if(e.sourceURL&&"classic-script"===e.invokerType){let t=e.sourceURL.split("/").pop()||e.sourceURL;p.push(t),l.eventTypeCounts.classic_script_count++}else if(e.sourceURL&&"module-script"===e.invokerType){let t=e.sourceURL.split("/").pop()||e.sourceURL;p.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++}),p.length>0){let t={duration:e.duration,blockingDuration:e.blockingDuration,scripts:p};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 d=setInterval(()=>{(0,n(934927).$)(()=>v(e),1e4)},3e5),g=()=>{"hidden"===document.visibilityState&&(v(e),f(e))};document.addEventListener("visibilitychange",g);let h=e=>{let t=e.target;t instanceof Element&&(i={element:t,component:p(t)})};return document.addEventListener("pointerdown",h,!0),()=>{u.disconnect(),clearInterval(d),document.removeEventListener("visibilitychange",g),document.removeEventListener("pointerdown",h,!0)}}n.d(t,{initializePerformanceObserver:()=>h})},566025(e,t,n){n(953925),n(540679);var i=()=>n(546605);class o 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 r=new o;(0,n(202146).exposeDebugValue)("interactionToNextPaintStore",r),n.d(t,{},{w:r})}}]);
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.