@popmelt.com/core 0.38.1 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/README.md +5 -32
  2. package/claude-plugin/.claude-plugin/plugin.json +1 -1
  3. package/claude-plugin/skills/popmelt-core/SKILL.md +5 -1
  4. package/codex-plugin/.codex-plugin/plugin.json +1 -1
  5. package/codex-plugin/skills/popmelt-core/SKILL.md +5 -1
  6. package/dist/{ExploreAttachment-IIEORQP3.mjs → ExploreAttachment-DBMYVYWK.mjs} +1 -1
  7. package/dist/PagePreviewLayer-CVUA6CTQ.mjs +1 -0
  8. package/dist/ParticipantRuntime-PCBEG3Q2.mjs +1 -0
  9. package/dist/PhoneHostGate-FZLK4R6M.mjs +1 -0
  10. package/dist/PopmeltTasteConnectedPane-62LUNNWZ.mjs +1 -0
  11. package/dist/{PreviewRuntime-3ANAJNFO.mjs → PreviewRuntime-7EQNIOF5.mjs} +1 -1
  12. package/dist/SamplePlacementOverlay-LR7GZVYP.mjs +1 -0
  13. package/dist/ShareProjectPane-U47UTAOP.mjs +1 -0
  14. package/dist/SuppliedContext-F7WKJ5XO.mjs +1 -0
  15. package/dist/ThreadErrorCard-KPP7YUFC.mjs +1 -0
  16. package/dist/ThreadPanel-GOYQEF3I.mjs +1 -0
  17. package/dist/adapter-react-three-fiber.d.mts +4 -37
  18. package/dist/adapter-react-three-fiber.mjs +1 -1
  19. package/dist/adapter-three.d.mts +23 -228
  20. package/dist/adapter-three.mjs +1 -45
  21. package/dist/bridge-entry.mjs +1 -1
  22. package/dist/{bridgeSSEStream-HUFNXYPG.mjs → bridgeSSEStream-2KKFO64A.mjs} +1 -1
  23. package/dist/{bridgeWebSocketStream-AS22Y2FP.mjs → bridgeWebSocketStream-XTHQPBPI.mjs} +1 -1
  24. package/dist/browser-runtime-BBQQQLF7.mjs +1 -0
  25. package/dist/browser.d.mts +4 -4
  26. package/dist/browser.mjs +1 -1
  27. package/dist/canvas-chat-note-XMVKWL2J.mjs +1 -0
  28. package/dist/canvas-text.d.mts +38 -0
  29. package/dist/canvas-text.mjs +1 -0
  30. package/dist/{checkFixture-UNTXJKRN.mjs → checkFixture-VDRYDCUX.mjs} +1 -1
  31. package/dist/{chunk-UOK5LOPJ.mjs → chunk-27WBFE5X.mjs} +1 -1
  32. package/dist/{chunk-5F34UIKL.mjs → chunk-3EYAVOPH.mjs} +1 -1
  33. package/dist/chunk-4EDMISUV.mjs +1 -0
  34. package/dist/chunk-52OTX7DP.mjs +1 -0
  35. package/dist/chunk-53QOGFAT.mjs +1 -0
  36. package/dist/{chunk-3VOEPWRL.mjs → chunk-5TCWBNV4.mjs} +1 -1
  37. package/dist/chunk-6GS4BQVU.mjs +30 -0
  38. package/dist/{chunk-TXL2CR66.mjs → chunk-6U5JWZ4X.mjs} +1 -1
  39. package/dist/{chunk-WJVRGXOS.mjs → chunk-7D4BUDKG.mjs} +1 -1
  40. package/dist/chunk-7DXJSJCI.mjs +1 -0
  41. package/dist/chunk-AKUIREET.mjs +1 -0
  42. package/dist/chunk-B4RLDY5H.mjs +1 -0
  43. package/dist/{chunk-ZHXTB5IN.mjs → chunk-BDUWFDBP.mjs} +1 -1
  44. package/dist/chunk-C4AMAM3W.mjs +1 -0
  45. package/dist/{chunk-2WQXHUEQ.mjs → chunk-CR6TRUUV.mjs} +1 -1
  46. package/dist/{chunk-KHDXOXYF.mjs → chunk-DJFZGYX6.mjs} +1 -1
  47. package/dist/chunk-EHM2ZBQU.mjs +1 -0
  48. package/dist/{chunk-QXFBFKN6.mjs → chunk-EWTZVC7E.mjs} +1 -1
  49. package/dist/{chunk-BJUSVIDN.mjs → chunk-FFBBRCPC.mjs} +1 -1
  50. package/dist/chunk-FR6VIGJ2.mjs +1 -0
  51. package/dist/{chunk-GTVTUWGH.mjs → chunk-FSSHNWMO.mjs} +1 -1
  52. package/dist/{chunk-AEC67LMY.mjs → chunk-HC2SF7KE.mjs} +1 -1
  53. package/dist/chunk-HM6EBJVO.mjs +1 -0
  54. package/dist/chunk-HOWDQUPT.mjs +1 -0
  55. package/dist/{chunk-XJJDBMZI.mjs → chunk-HQVWOBYH.mjs} +1 -1
  56. package/dist/chunk-HTQEMKFA.mjs +1 -0
  57. package/dist/{chunk-GLF7Z5IR.mjs → chunk-K22VZV3V.mjs} +1 -1
  58. package/dist/chunk-KOHR4LAQ.mjs +1 -0
  59. package/dist/chunk-LLVF422C.mjs +1 -0
  60. package/dist/{chunk-F3VZQGPM.mjs → chunk-LUTP7QBD.mjs} +1 -1
  61. package/dist/chunk-MHTX52KW.mjs +1 -0
  62. package/dist/chunk-NC7YXD7Q.mjs +1 -0
  63. package/dist/{chunk-RJWFSAKE.mjs → chunk-NFO2CREV.mjs} +1 -1
  64. package/dist/{chunk-TCGXG7UA.mjs → chunk-OECEYJNK.mjs} +1 -1
  65. package/dist/{chunk-BEGAJYOY.mjs → chunk-OEJXPUAR.mjs} +1 -1
  66. package/dist/{chunk-FQLIJAUB.mjs → chunk-P2LMCRUN.mjs} +1 -1
  67. package/dist/{chunk-43BZCDGL.mjs → chunk-PQITT2QK.mjs} +1 -1
  68. package/dist/chunk-PQKSXNIZ.mjs +1 -0
  69. package/dist/chunk-RCY5N5KQ.mjs +1 -0
  70. package/dist/{chunk-W62YY5IT.mjs → chunk-RDB75FUD.mjs} +1 -1
  71. package/dist/chunk-RIGP4DAV.mjs +1 -0
  72. package/dist/chunk-RXC7B7SX.mjs +1 -0
  73. package/dist/{chunk-JAMYVQFC.mjs → chunk-T4WUQPBS.mjs} +1 -1
  74. package/dist/chunk-TTOCYOEH.mjs +1 -0
  75. package/dist/chunk-U5NROUVA.mjs +24 -0
  76. package/dist/chunk-UBPJIVWE.mjs +1 -0
  77. package/dist/{chunk-SKM4ZXV5.mjs → chunk-UFU5IA3G.mjs} +1 -1
  78. package/dist/chunk-UIADZXVT.mjs +1 -0
  79. package/dist/chunk-UPEEIAVJ.mjs +1 -0
  80. package/dist/{chunk-P2WAXWAZ.mjs → chunk-V5FCWXMN.mjs} +1 -1
  81. package/dist/chunk-VBH2YQLG.mjs +1 -0
  82. package/dist/chunk-VQ76TWRR.mjs +1 -0
  83. package/dist/chunk-WYQZ7DAK.mjs +1 -0
  84. package/dist/{chunk-N3MHDOMU.mjs → chunk-Y2BJZLYU.mjs} +1 -1
  85. package/dist/chunk-ZC2I35WD.mjs +1 -0
  86. package/dist/cli.mjs +1 -1
  87. package/dist/codex-note-context-2CHDGTG3.mjs +1 -0
  88. package/dist/codex-project-TIMWOCE5.mjs +1 -0
  89. package/dist/{codex-store-mount-WJAATWHT.mjs → codex-store-mount-MAQK6VEG.mjs} +1 -1
  90. package/dist/dev-server-ESGE6QNP.mjs +1 -0
  91. package/dist/{focus-inspection-LGIRFL2T.mjs → focus-inspection-BMDJJC5K.mjs} +1 -1
  92. package/dist/guest-admission.mjs +1 -1
  93. package/dist/guest-live-canvas.mjs +1 -1
  94. package/dist/index.d.mts +5 -5
  95. package/dist/index.mjs +1 -1
  96. package/dist/media.d.mts +3 -3
  97. package/dist/memory-legacy.d.mts +43 -1
  98. package/dist/memory-legacy.mjs +1 -1
  99. package/dist/memory-store.d.mts +5 -162
  100. package/dist/memory-store.mjs +1 -1
  101. package/dist/memory.d.mts +3 -531
  102. package/dist/{page-interaction-TV3P6B3X.mjs → page-interaction-YXHXEYOT.mjs} +1 -1
  103. package/dist/{page-planes-2ZepTpen.d.mts → page-planes-Jz2yR_Wk.d.mts} +246 -2
  104. package/dist/{participantBootstrap-BTcD7XgB.d.mts → participantBootstrap-DDOxY-Cy.d.mts} +2 -2
  105. package/dist/peer-client-LPDWWFT4.mjs +1 -0
  106. package/dist/plugin-astro.d.mts +1 -1
  107. package/dist/plugin-astro.mjs +1 -1
  108. package/dist/plugin-nuxt.mjs +1 -1
  109. package/dist/plugin-vite.d.mts +1 -1
  110. package/dist/plugin-vite.mjs +1 -1
  111. package/dist/server.d.mts +6 -4
  112. package/dist/server.mjs +1 -1
  113. package/dist/shared-page-QN2XRXUE.mjs +1 -0
  114. package/dist/{subjects-D_yanOQ2.d.mts → subjects-cLtt9-iK.d.mts} +12 -0
  115. package/dist/{types-CggBG-H6.d.mts → types-XKO-uva0.d.mts} +1 -1
  116. package/dist/{index-CHp2bgs1.d.mts → validate-0kt2EgVe.d.mts} +7 -40
  117. package/dist/{video-adapter-CWpR4NSt.d.mts → video-adapter-xL95wukX.d.mts} +1 -1
  118. package/infra/phone-pairing/binding.mjs +105 -0
  119. package/infra/phone-pairing/machine-config.mjs +134 -0
  120. package/infra/phone-pairing/machine-service.mjs +159 -0
  121. package/infra/phone-pairing/machine.mjs +98 -0
  122. package/infra/phone-pairing/managed-install.mjs +179 -0
  123. package/package.json +12 -1
  124. package/dist/PagePreviewLayer-AFSRCBAX.mjs +0 -1
  125. package/dist/ParticipantRuntime-ZNEFG34O.mjs +0 -1
  126. package/dist/PhoneHostGate-OCIMKPLM.mjs +0 -1
  127. package/dist/PopmeltTasteConnectedPane-N2A5XPRO.mjs +0 -1
  128. package/dist/SamplePlacementOverlay-EOJW6XGE.mjs +0 -1
  129. package/dist/ShareProjectPane-VYWTF3FW.mjs +0 -1
  130. package/dist/SuppliedContext-3S4HT6U6.mjs +0 -1
  131. package/dist/ThreadErrorCard-CTMVMETS.mjs +0 -1
  132. package/dist/ThreadPanel-G7OKSWD4.mjs +0 -1
  133. package/dist/browser-runtime-Q26JF5EA.mjs +0 -1
  134. package/dist/canvas-chat-note-OLVVP55Y.mjs +0 -1
  135. package/dist/chunk-25EXQOPI.mjs +0 -1
  136. package/dist/chunk-2IWVTTYX.mjs +0 -1
  137. package/dist/chunk-3OGSLX4V.mjs +0 -1
  138. package/dist/chunk-AGCS65LT.mjs +0 -1
  139. package/dist/chunk-AYZUOBFI.mjs +0 -1
  140. package/dist/chunk-B3RA4XAR.mjs +0 -1
  141. package/dist/chunk-BOZVNUHJ.mjs +0 -1
  142. package/dist/chunk-DBCBG5J6.mjs +0 -1
  143. package/dist/chunk-EFWBHWHP.mjs +0 -1
  144. package/dist/chunk-FYURSPM3.mjs +0 -1
  145. package/dist/chunk-G6BN5TAZ.mjs +0 -1
  146. package/dist/chunk-IW7V7WNL.mjs +0 -1
  147. package/dist/chunk-JJK4LAN6.mjs +0 -1
  148. package/dist/chunk-JJRKR4X3.mjs +0 -1
  149. package/dist/chunk-KF73S7MG.mjs +0 -1
  150. package/dist/chunk-KL5ODVJA.mjs +0 -1
  151. package/dist/chunk-L356S4EY.mjs +0 -1
  152. package/dist/chunk-OZBMHEOD.mjs +0 -1
  153. package/dist/chunk-QQPUMPKU.mjs +0 -1
  154. package/dist/chunk-TEXVTTWA.mjs +0 -1
  155. package/dist/chunk-TSQEBZYO.mjs +0 -1
  156. package/dist/chunk-UTP56NCY.mjs +0 -1
  157. package/dist/chunk-VG4ZV2OT.mjs +0 -30
  158. package/dist/chunk-WC7B5NU3.mjs +0 -24
  159. package/dist/chunk-WNOLXY3Y.mjs +0 -1
  160. package/dist/codex-note-context-4X7I5AIJ.mjs +0 -1
  161. package/dist/codex-project-Q6YT5P37.mjs +0 -1
  162. package/dist/dev-server-NROXLQKM.mjs +0 -1
  163. package/dist/peer-client-DWC5F6JN.mjs +0 -1
  164. package/dist/shared-page-GO76UP7I.mjs +0 -1
  165. /package/dist/{chunk-L45FX4SU.mjs → chunk-ERPJ6LXX.mjs} +0 -0
package/dist/memory.d.mts CHANGED
@@ -1,533 +1,5 @@
1
- declare const MEMORY_FORMAT_VERSION: 1;
2
- declare const MEMORY_SCHEMA_VERSION: 1;
3
- type MemoryFormatVersion = typeof MEMORY_FORMAT_VERSION;
4
- type MemorySchemaVersion = typeof MEMORY_SCHEMA_VERSION;
5
- type MemoryId = string;
6
- type Timestamp = string;
7
- type JsonPrimitive = string | number | boolean | null;
8
- type JsonValue = JsonPrimitive | JsonValue[] | {
9
- [key: string]: JsonValue;
10
- };
11
- type SourceReferenceKind = 'thread' | 'message' | 'iteration' | 'artifact' | 'event' | 'record' | 'external';
12
- type SourceReference = {
13
- kind: SourceReferenceKind;
14
- id: string;
15
- uri?: string;
16
- excerpt?: string;
17
- };
18
- type Provenance = {
19
- id: MemoryId;
20
- schemaVersion: MemorySchemaVersion;
21
- projectId: MemoryId;
22
- createdAt: Timestamp;
23
- participantId: MemoryId;
24
- sourceRefs: SourceReference[];
25
- };
26
- type ParticipantKind = 'human' | 'ai' | 'system' | 'integration';
27
- type AuthorityLevel = 'owner' | 'delegate' | 'contributor';
28
- type AuthorityMode = 'local_trusted' | 'hosted';
29
- type ExecutionContext = {
30
- sessionId?: string;
31
- provider?: string;
32
- model?: string;
33
- deviceId?: string;
34
- mode?: string;
35
- };
36
- type AuthorityContext = {
37
- level: AuthorityLevel;
38
- mode: AuthorityMode;
39
- grantId?: MemoryId;
40
- authenticatedAt?: Timestamp;
41
- };
42
- type ParticipantRecord = Provenance & {
43
- recordType: 'participant';
44
- kind: ParticipantKind;
45
- displayName: string;
46
- status: 'active' | 'disabled';
47
- };
48
- type AuthorityGrantRecord = Provenance & {
49
- recordType: 'authority_grant';
50
- granteeId: MemoryId;
51
- level: AuthorityLevel;
52
- grantedById: MemoryId;
53
- subjectIds: MemoryId[];
54
- startsAt: Timestamp;
55
- endsAt?: Timestamp;
56
- revokedAt?: Timestamp;
57
- };
58
- type SubjectType = 'project' | 'file' | 'route' | 'component' | 'element' | 'token' | 'interaction';
59
- type SubjectLocatorKind = 'project_root' | 'source_file' | 'route_pattern' | 'file_export' | 'source_span' | 'dom_selector' | 'token_path' | 'interaction_key' | 'custom';
60
- type SubjectLocator = {
61
- id: MemoryId;
62
- kind: SubjectLocatorKind;
63
- value: string;
64
- status: 'current' | 'historical' | 'unresolved';
65
- validFrom: Timestamp;
66
- validUntil?: Timestamp;
67
- sourceRefs: SourceReference[];
68
- };
69
- type SubjectRecord = Provenance & {
70
- recordType: 'subject';
71
- subjectType: SubjectType;
72
- label: string;
73
- aliases: string[];
74
- locators: SubjectLocator[];
75
- };
76
- type ParticipantStance = {
77
- stance: 'supports' | 'opposes' | 'uncertain' | 'needs_evidence';
78
- reason?: string;
79
- };
80
- type CaptureContext = {
81
- route?: string;
82
- subjectIds: MemoryId[];
83
- artifactIds: MemoryId[];
84
- };
85
- type ObservationState = 'open' | 'resolved' | 'dismissed';
86
- type ObservationRecord = Provenance & {
87
- recordType: 'observation';
88
- state: ObservationState;
89
- statement: string;
90
- captureContext: CaptureContext;
91
- stance?: ParticipantStance;
92
- resolvedByIds: MemoryId[];
93
- };
94
- type DecisionKind = 'principle' | 'preference' | 'rule' | 'constraint';
95
- type ProposalState = 'draft' | 'pending' | 'accepted' | 'rejected' | 'withdrawn' | 'deferred';
96
- type AssertionOrigin = {
97
- mode: 'declared' | 'inferred';
98
- sourceText?: string;
99
- iterationId?: MemoryId;
100
- inferredById?: MemoryId;
101
- reviewedById?: MemoryId;
102
- };
103
- type DecisionSubject = {
104
- subjectId: MemoryId;
105
- role: 'governed' | 'consumer' | 'provider' | 'context';
106
- };
107
- type ProposalRecord = Provenance & {
108
- recordType: 'proposal';
109
- state: ProposalState;
110
- claim: string;
111
- rationale?: string;
112
- proposedKind?: DecisionKind;
113
- subjects: DecisionSubject[];
114
- subjectSemantics?: string;
115
- origin: AssertionOrigin;
116
- stance?: ParticipantStance;
117
- bundleId?: MemoryId;
118
- };
119
- type DecisionState = 'active' | 'superseded' | 'revoked';
120
- type DecisionRecord = Provenance & {
121
- recordType: 'decision';
122
- proposalId: MemoryId;
123
- acceptanceEventId: MemoryId;
124
- acceptedById: MemoryId;
125
- authority: AuthorityContext;
126
- state: DecisionState;
127
- kind: DecisionKind;
128
- claim: string;
129
- rationale?: string;
130
- subjects: DecisionSubject[];
131
- subjectSemantics?: string;
132
- noChange: boolean;
133
- effectiveAt?: Timestamp;
134
- effectiveMilestone?: string;
135
- bundleId?: MemoryId;
136
- };
137
- type ThreadOutcome = 'decision_created' | 'proposal_rejected' | 'observation_resolved' | 'observation_dismissed' | 'question_unresolved' | 'implementation_only' | 'no_outcome';
138
- type ThreadRecord = Provenance & {
139
- recordType: 'thread';
140
- title?: string;
141
- state: 'open' | 'resolved';
142
- messageArtifactIds: MemoryId[];
143
- outcome: ThreadOutcome;
144
- resultRefs: EntityReference[];
145
- };
146
- type IterationOutcome = 'completed' | 'cancelled' | 'question_asked' | 'failed' | 'no_change';
147
- type IterationRecord = Provenance & {
148
- recordType: 'iteration';
149
- threadIds: MemoryId[];
150
- startedAt: Timestamp;
151
- completedAt?: Timestamp;
152
- requestSummary: string;
153
- responseSummary?: string;
154
- outcome: IterationOutcome;
155
- execution: ExecutionContext;
156
- artifactIds: MemoryId[];
157
- imprintAssessment?: {
158
- state: 'mutated' | 'none' | 'missing' | 'invalid' | 'not_applicable';
159
- reason?: string;
160
- };
161
- };
162
- type EvidenceKind = 'judgment' | 'artifact' | 'eval' | 'log' | 'user_feedback' | 'external_source' | 'project_state';
163
- type EvidenceRecord = Provenance & {
164
- recordType: 'evidence';
165
- kind: EvidenceKind;
166
- summary: string;
167
- availability: 'available' | 'missing' | 'redacted' | 'forgotten';
168
- stance?: ParticipantStance;
169
- artifactIds: MemoryId[];
170
- };
171
- /**
172
- * An advisory explanation is learned, revisable shared understanding. It can
173
- * guide future work, but it is deliberately distinct from accepted product
174
- * truth (`decision`).
175
- */
176
- type AdvisoryExplanationKind = 'intention' | 'principle' | 'pattern';
177
- type AdvisoryExplanationState = 'emerging' | 'testing' | 'grounded' | 'challenged' | 'retired';
178
- type AdvisoryExplanationScope = {
179
- kind: 'project' | 'route' | 'component' | 'selector' | 'file';
180
- values: string[];
181
- };
182
- type AdvisoryConcreteBinding = {
183
- id: string;
184
- modelPath: string;
185
- value: JsonValue;
186
- createdAt: Timestamp;
187
- updatedAt: Timestamp;
188
- };
189
- type AdvisoryExplanationRecord = Provenance & {
190
- recordType: 'advisory_explanation';
191
- kind: AdvisoryExplanationKind;
192
- state: AdvisoryExplanationState;
193
- statement: string;
194
- rationale: string;
195
- scope: AdvisoryExplanationScope;
196
- subjectIds: MemoryId[];
197
- evidenceIds: MemoryId[];
198
- concreteBindings: AdvisoryConcreteBinding[];
199
- supersededById?: MemoryId;
200
- updatedAt: Timestamp;
201
- };
202
- type CoverageClaim = {
203
- decisionId: MemoryId;
204
- coverage: 'partial' | 'full';
205
- claim: string;
206
- sourceRefs: SourceReference[];
207
- };
208
- type ImplementationState = 'planned' | 'in_progress' | 'completed' | 'failed' | 'abandoned';
209
- type ImplementationAttemptRecord = Provenance & {
210
- recordType: 'implementation_attempt';
211
- state: ImplementationState;
212
- iterationIds: MemoryId[];
213
- coverageClaims: CoverageClaim[];
214
- projectStateRef?: SourceReference;
215
- summary: string;
216
- artifactIds: MemoryId[];
217
- };
218
- type VerificationState = 'queued' | 'running' | 'passed' | 'failed' | 'inconclusive' | 'error' | 'cancelled';
219
- type VerificationTarget = {
220
- entityType: 'decision' | 'implementation_attempt' | 'model_entry';
221
- entityId: MemoryId;
222
- };
223
- /** @deprecated Retained only so existing memory journals remain readable. */
224
- type EvalSpecState = 'draft' | 'active' | 'retired';
225
- /** @deprecated Retained only so existing memory journals remain readable. */
226
- type EvalDependency = {
227
- kind: 'model_path' | 'source_file' | 'route' | 'subject';
228
- value: string;
229
- subjectId?: MemoryId;
230
- };
231
- /** @deprecated Retained only so existing memory journals remain readable. */
232
- type EvalScenario = {
233
- id: string;
234
- label?: string;
235
- route?: string;
236
- routePattern?: string;
237
- components?: Array<{
238
- name: string;
239
- sourceFile?: string;
240
- exportName?: string;
241
- }>;
242
- subjectIds?: MemoryId[];
243
- states?: Array<{
244
- kind: 'viewport' | 'theme' | 'auth' | 'locale' | 'feature_flag' | 'fixture' | 'interaction' | 'custom';
245
- key?: string;
246
- value: string;
247
- }>;
248
- steps?: Array<{
249
- action: 'navigate' | 'click' | 'type' | 'select';
250
- target?: string;
251
- value?: string;
252
- }>;
253
- };
254
- /** @deprecated Retained only so existing memory journals remain readable. */
255
- type EvalSpecRecord = Provenance & {
256
- recordType: 'eval_spec';
257
- state: EvalSpecState;
258
- legacyId: string;
259
- replacesSpecId?: MemoryId;
260
- title: string;
261
- category: 'component' | 'layout' | 'copy' | 'interaction' | 'visual' | 'workflow';
262
- prompt: string;
263
- assertions: string[];
264
- rationale: string;
265
- decisionIds: MemoryId[];
266
- subjectIds: MemoryId[];
267
- threadRefs: string[];
268
- dependencies?: EvalDependency[];
269
- scenarios?: EvalScenario[];
270
- targets: VerificationTarget[];
271
- evaluator: {
272
- kind: 'human' | 'ai' | 'test' | 'external';
273
- name: string;
274
- evidenceTypes: string[];
275
- };
276
- scope: {
277
- kind: 'current_page' | 'project' | 'subject';
278
- route?: string;
279
- };
280
- };
281
- type VerificationAttemptRecord = Provenance & {
282
- recordType: 'verification_attempt';
283
- evalSpecId?: MemoryId;
284
- scopeFingerprint?: string;
285
- state: VerificationState;
286
- evaluator: {
287
- kind: 'human' | 'ai' | 'test' | 'eval' | 'external';
288
- participantId?: MemoryId;
289
- name: string;
290
- };
291
- targets: VerificationTarget[];
292
- summary?: string;
293
- evidenceIds: MemoryId[];
294
- /** @deprecated Historical presentation data retained for journal compatibility. */
295
- evalRun?: {
296
- id: string;
297
- threadId?: string;
298
- createdAt: number;
299
- completedAt: number;
300
- durationMs: number;
301
- scope: {
302
- type: 'current_page';
303
- url: string;
304
- viewport: {
305
- width: number;
306
- height: number;
307
- };
308
- };
309
- assertionResults: Array<{
310
- assertion: string;
311
- status: 'pass' | 'fail' | 'needs_review';
312
- summary: string;
313
- evidence: string[];
314
- }>;
315
- tooling: {
316
- chromeDevtools: 'available' | 'unavailable' | 'unknown';
317
- evidenceTypes: string[];
318
- };
319
- provider?: string;
320
- model?: string;
321
- screenshotPath?: string;
322
- codeFingerprint?: string;
323
- };
324
- };
325
- type ModelEntryRecord = Provenance & {
326
- recordType: 'model_entry';
327
- key: string;
328
- subjectIds: MemoryId[];
329
- decisionIds: MemoryId[];
330
- value: JsonValue;
331
- };
332
- type ModelProjectionRecord = Provenance & {
333
- recordType: 'model_projection';
334
- state: 'applied';
335
- runId: string;
336
- presentationJobId?: string;
337
- appliedById: MemoryId;
338
- authority: AuthorityContext;
339
- appliedAt: Timestamp;
340
- decisionIds: MemoryId[];
341
- entryIds: MemoryId[];
342
- coverage: Array<{
343
- decisionId: MemoryId;
344
- status: 'unprojected' | 'partially_projected' | 'projected' | 'stale';
345
- }>;
346
- };
347
- type EntityType = 'participant' | 'authority_grant' | 'subject' | 'observation' | 'proposal' | 'decision' | 'thread' | 'iteration' | 'evidence' | 'advisory_explanation' | 'implementation_attempt' | 'eval_spec' | 'verification_attempt' | 'model_entry' | 'model_projection' | 'freshness_signal';
348
- type MemoryObjectType = EntityType | 'relationship' | 'lifecycle_event' | 'artifact';
349
- type EntityReference = {
350
- entityType: EntityType;
351
- entityId: MemoryId;
352
- /** Omitted for a reference within the relationship's owning store. */
353
- storeId?: string;
354
- };
355
- type RelationshipType = 'supports' | 'contradicts' | 'supersedes' | 'excepts' | 'duplicates' | 'implements' | 'verifies' | 'replaces' | 'derived_from' | 'expresses'
356
- /** Legacy explanation topology names remain readable at the boundary. */
357
- | 'operationalizes' | 'refines' | 'instantiates';
358
- type RelationshipRecord = Provenance & {
359
- recordType: 'relationship';
360
- relationshipType: RelationshipType;
361
- from: EntityReference;
362
- to: EntityReference;
363
- reason: string;
364
- authority?: AuthorityContext;
365
- };
366
- type FreshnessSignalType = 'subject_unresolved' | 'implementation_drift' | 'evidence_unavailable' | 'new_conflict' | 'verification_expired' | 'review_interval_elapsed' | 'schema_or_tooling_change';
367
- type FreshnessTargetKind = 'subject_locator' | 'implementation_presence' | 'verification_result' | 'model_coverage' | 'evidence_reference' | 'decision_applicability';
368
- type FreshnessSignalRecord = Provenance & {
369
- recordType: 'freshness_signal';
370
- signalType: FreshnessSignalType;
371
- state: 'open' | 'resolved';
372
- targetKind: FreshnessTargetKind;
373
- target: EntityReference;
374
- reason: string;
375
- evidenceIds: MemoryId[];
376
- resolvedAt?: Timestamp;
377
- resolvedByEventId?: MemoryId;
378
- };
379
- type ProposalDeferralContext = {
380
- kind: 'proposal_deferral';
381
- taskContext?: string;
382
- subjectIds: MemoryId[];
383
- resurfaceWhen: Array<'different_action' | 'new_evidence' | 'new_conflict' | 'owner_request' | 'after_date'>;
384
- revisitAfter?: Timestamp;
385
- };
386
- type LifecycleEvent = Provenance & {
387
- recordType: 'lifecycle_event';
388
- entity: EntityReference;
389
- eventType: string;
390
- fromState: string | null;
391
- toState: string;
392
- authority: AuthorityContext;
393
- execution?: ExecutionContext;
394
- reason?: string;
395
- transitionContext?: ProposalDeferralContext;
396
- };
397
- type ArtifactKind = 'message' | 'screenshot' | 'image' | 'diff' | 'file_snapshot' | 'log' | 'eval_output' | 'external_document' | 'other';
398
- type ArtifactManifestEntry = {
399
- id: MemoryId;
400
- kind: ArtifactKind;
401
- mediaType?: string;
402
- byteSize?: number;
403
- contentHash?: string;
404
- location?: string;
405
- availability: 'available' | 'missing' | 'redacted' | 'forgotten';
406
- };
407
- type Tombstone = {
408
- id: MemoryId;
409
- schemaVersion: MemorySchemaVersion;
410
- projectId: MemoryId;
411
- objectId: MemoryId;
412
- objectType: MemoryObjectType;
413
- deletedAt: Timestamp;
414
- deletedById: MemoryId;
415
- authority: AuthorityContext;
416
- reasonCategory: 'privacy' | 'legal' | 'serious_error' | 'intentional_forgetting';
417
- erasureLevel: 'content' | 'content_and_evidence' | 'full_where_permitted';
418
- invalidates: EntityReference[];
419
- };
420
- type CanonicalRecord = ParticipantRecord | AuthorityGrantRecord | SubjectRecord | ObservationRecord | ProposalRecord | DecisionRecord | ThreadRecord | IterationRecord | EvidenceRecord | AdvisoryExplanationRecord | ImplementationAttemptRecord | EvalSpecRecord | VerificationAttemptRecord | ModelEntryRecord | ModelProjectionRecord | FreshnessSignalRecord;
421
- type MemoryFeature = 'authority' | 'subjects' | 'decisions' | 'advisory_explanations' | 'implementations' | 'verification' | 'eval_specs' | 'model_projection' | 'freshness' | 'portable_artifacts' | 'bounded_retrieval';
422
- type ProjectMemoryManifest = {
423
- formatVersion: MemoryFormatVersion;
424
- projectId: MemoryId;
425
- createdAt: Timestamp;
426
- updatedAt: Timestamp;
427
- features: MemoryFeature[];
428
- writer: {
429
- name: string;
430
- version: string;
431
- };
432
- };
433
- type ProjectMemoryBundle = {
434
- manifest: ProjectMemoryManifest;
435
- records: CanonicalRecord[];
436
- events: LifecycleEvent[];
437
- relationships: RelationshipRecord[];
438
- artifacts: ArtifactManifestEntry[];
439
- tombstones: Tombstone[];
440
- };
441
- type SubjectMatch = {
442
- subjectId?: MemoryId;
443
- subjectType?: SubjectType;
444
- label?: string;
445
- confidence: 'exact' | 'strong' | 'weak' | 'unresolved';
446
- matchedBy: 'id' | 'locator' | 'alias' | 'semantic' | 'none';
447
- reason?: string;
448
- };
449
- type RetrievalDecision = {
450
- id: MemoryId;
451
- kind: DecisionKind;
452
- claim: string;
453
- subjectIds: MemoryId[];
454
- authority: AuthorityContext;
455
- effectiveState: 'active' | 'excepted' | 'conflicted';
456
- freshness: FreshnessSignalType[];
457
- expansionRef: SourceReference;
458
- };
459
- type RetrievalConflict = {
460
- id: string;
461
- decisionIds: MemoryId[];
462
- unresolvedQuestion: string;
463
- expansionRefs: SourceReference[];
464
- };
465
- type RetrievalUncertainty = {
466
- code: 'subject_unresolved' | 'no_applicable_decision' | 'evidence_unavailable' | 'known_conflict' | 'retrieval_truncated';
467
- message: string;
468
- expansionRefs: SourceReference[];
469
- };
470
- type RetrievalEvidenceSummary = {
471
- evidenceId: MemoryId;
472
- summary: string;
473
- availability: EvidenceRecord['availability'];
474
- sourceRefs: SourceReference[];
475
- };
476
- type RetrievalPacket = {
477
- contractVersion: 1;
478
- projectId: MemoryId;
479
- retrievedAt: Timestamp;
480
- query: {
481
- text?: string;
482
- action?: string;
483
- subjectHints: string[];
484
- };
485
- budget: {
486
- maxEstimatedTokens: number;
487
- estimatedTokens: number;
488
- };
489
- subjectMatches: SubjectMatch[];
490
- modelEntries: Array<{
491
- id: MemoryId;
492
- key: string;
493
- value: JsonValue;
494
- decisionIds: MemoryId[];
495
- }>;
496
- decisions: RetrievalDecision[];
497
- conflicts: RetrievalConflict[];
498
- uncertainties: RetrievalUncertainty[];
499
- implementation: Array<{
500
- decisionId: MemoryId;
501
- state: 'unimplemented' | 'partial' | 'implemented' | 'unknown';
502
- attemptIds: MemoryId[];
503
- }>;
504
- verification: Array<{
505
- target: VerificationTarget;
506
- state: 'unverified' | 'passing' | 'failing' | 'stale' | 'blocked';
507
- attemptIds: MemoryId[];
508
- }>;
509
- evidence: RetrievalEvidenceSummary[];
510
- completeness: {
511
- status: 'complete' | 'truncated';
512
- omittedDecisionCount: number;
513
- omittedEvidenceCount: number;
514
- conflictsComplete: boolean;
515
- };
516
- };
517
-
518
- type SchemaIssue = {
519
- path: string;
520
- code: string;
521
- message: string;
522
- severity: 'error' | 'warning';
523
- };
524
- type SchemaValidationResult = {
525
- valid: boolean;
526
- issues: SchemaIssue[];
527
- };
528
- declare function isUuidV7(value: string): boolean;
529
- declare function validateProjectMemoryBundle(bundle: ProjectMemoryBundle): SchemaValidationResult;
530
- declare function validateRetrievalPacket(packet: RetrievalPacket): SchemaValidationResult;
1
+ import { d as MemoryId, e as Timestamp, D as DecisionKind, a as ProposalRecord, S as SourceReference, P as ProjectMemoryBundle, f as RetrievalPacket, g as AuthorityContext, h as ProposalDeferralContext, i as DecisionSubject, C as CanonicalRecord, L as LifecycleEvent, R as RelationshipRecord, c as DecisionRecord, j as SchemaValidationResult } from './validate-0kt2EgVe.mjs';
2
+ export { k as AdvisoryConcreteBinding, l as AdvisoryExplanationKind, m as AdvisoryExplanationRecord, n as AdvisoryExplanationScope, o as AdvisoryExplanationState, p as ArtifactKind, A as ArtifactManifestEntry, q as AssertionOrigin, r as AuthorityGrantRecord, s as AuthorityLevel, t as AuthorityMode, u as CaptureContext, v as CoverageClaim, w as DecisionState, E as EntityReference, x as EntityType, y as EvalDependency, z as EvalScenario, B as EvalSpecRecord, F as EvalSpecState, G as EvidenceKind, H as EvidenceRecord, K as ExecutionContext, N as FreshnessSignalRecord, O as FreshnessSignalType, Q as FreshnessTargetKind, U as ImplementationAttemptRecord, V as ImplementationState, I as IterationOutcome, b as IterationRecord, W as JsonPrimitive, J as JsonValue, X as MEMORY_FORMAT_VERSION, Y as MEMORY_SCHEMA_VERSION, Z as MemoryFeature, _ as MemoryFormatVersion, $ as MemoryObjectType, a0 as MemorySchemaVersion, M as ModelEntryRecord, a1 as ModelProjectionRecord, a2 as ObservationRecord, a3 as ObservationState, a4 as ParticipantKind, a5 as ParticipantRecord, a6 as ParticipantStance, a7 as ProjectMemoryManifest, a8 as ProposalState, a9 as Provenance, aa as RelationshipType, ab as RetrievalConflict, ac as RetrievalDecision, ad as RetrievalEvidenceSummary, ae as RetrievalUncertainty, af as SchemaIssue, ag as SourceReferenceKind, ah as SubjectLocator, ai as SubjectLocatorKind, aj as SubjectMatch, ak as SubjectRecord, al as SubjectType, am as ThreadOutcome, an as ThreadRecord, T as Tombstone, ao as VerificationAttemptRecord, ap as VerificationState, aq as VerificationTarget, ar as isUuidV7, as as validateProjectMemoryBundle, at as validateRetrievalPacket } from './validate-0kt2EgVe.mjs';
531
3
 
532
4
  type ContextualReviewQuery = {
533
5
  action?: string;
@@ -693,4 +165,4 @@ declare function applyOwnerReviewActionPlan(bundle: ProjectMemoryBundle, plan: O
693
165
  validation: SchemaValidationResult;
694
166
  };
695
167
 
696
- export { type AcceptReviewCommand, type AdvisoryConcreteBinding, type AdvisoryExplanationKind, type AdvisoryExplanationRecord, type AdvisoryExplanationScope, type AdvisoryExplanationState, type ArtifactKind, type ArtifactManifestEntry, type AssertionOrigin, type AuthorityContext, type AuthorityGrantRecord, type AuthorityLevel, type AuthorityMode, type CanonicalRecord, type CaptureContext, type ContextualReviewPacket, type ContextualReviewQuery, type ContextualReviewSelection, type ContextualSubjectMatch, type CoverageClaim, type DecisionKind, type DecisionRecord, type DecisionState, type DecisionSubject, type DeferReviewCommand, type EditAndAcceptReviewCommand, type EntityReference, type EntityType, type EvalDependency, type EvalScenario, type EvalSpecRecord, type EvalSpecState, type EvidenceKind, type EvidenceRecord, type ExecutionContext, type FreshnessSignalRecord, type FreshnessSignalType, type FreshnessTargetKind, type ImplementationAttemptRecord, type ImplementationState, type IterationOutcome, type IterationRecord, type JsonPrimitive, type JsonValue, type LifecycleEvent, MEMORY_FORMAT_VERSION, MEMORY_SCHEMA_VERSION, type MemoryFeature, type MemoryFormatVersion, type MemoryId, type MemoryObjectType, type MemorySchemaVersion, type ModelEntryRecord, type ModelProjectionRecord, type ObservationRecord, type ObservationState, type OwnerReviewAction, type OwnerReviewActionPlan, type OwnerReviewCommand, type OwnerReviewPlanResult, type ParticipantKind, type ParticipantRecord, type ParticipantStance, type ProjectMemoryBundle, type ProjectMemoryManifest, type ProposalDeferralContext, type ProposalRecord, type ProposalState, type Provenance, type RejectReviewCommand, type RelationshipRecord, type RelationshipType, type RetrievalConflict, type RetrievalDecision, type RetrievalEvidenceSummary, type RetrievalPacket, type RetrievalQuery, type RetrievalUncertainty, type ReviewProjectionUpdate, type SchemaIssue, type SchemaValidationResult, type SourceReference, type SourceReferenceKind, type SubjectLocator, type SubjectLocatorKind, type SubjectMatch, type SubjectRecord, type SubjectType, type ThreadOutcome, type ThreadRecord, type Timestamp, type Tombstone, type VerificationAttemptRecord, type VerificationState, type VerificationTarget, applyOwnerReviewActionPlan, isUuidV7, planOwnerReviewAction, retrieveActionPacket, selectContextualReviewPackets, validateProjectMemoryBundle, validateRetrievalPacket };
168
+ export { type AcceptReviewCommand, AuthorityContext, CanonicalRecord, type ContextualReviewPacket, type ContextualReviewQuery, type ContextualReviewSelection, type ContextualSubjectMatch, DecisionKind, DecisionRecord, DecisionSubject, type DeferReviewCommand, type EditAndAcceptReviewCommand, LifecycleEvent, MemoryId, type OwnerReviewAction, type OwnerReviewActionPlan, type OwnerReviewCommand, type OwnerReviewPlanResult, ProjectMemoryBundle, ProposalDeferralContext, ProposalRecord, type RejectReviewCommand, RelationshipRecord, RetrievalPacket, type RetrievalQuery, type ReviewProjectionUpdate, SchemaValidationResult, SourceReference, Timestamp, applyOwnerReviewActionPlan, planOwnerReviewAction, retrieveActionPacket, selectContextualReviewPackets };
@@ -1 +1 @@
1
- import{a as e,b as t,c as r}from"./chunk-TCGXG7UA.mjs";import"./chunk-MPEVFQ43.mjs";import{a,b as i}from"./chunk-AYZUOBFI.mjs";import{a as n}from"./chunk-IW7V7WNL.mjs";import{b as s}from"./chunk-HKHZBKAN.mjs";import"./chunk-CIKFUS7J.mjs";import"./chunk-GLF7Z5IR.mjs";import"./chunk-YMWXWXPV.mjs";import"./chunk-KF73S7MG.mjs";import{execFile as o}from"child_process";import{createHash as l,randomBytes as c}from"crypto";import{mkdir as p,mkdtemp as u,readFile as f,readdir as m,realpath as d,rm as h,stat as g}from"fs/promises";import{extname as w,join as y,relative as v,resolve as b,sep as x}from"path";import{promisify as S}from"util";import{parse as E,serialize as j}from"parse5";var N=S(o),R=33554432,L=(e,t)=>e.attrs.find(e=>e.name===t)?.value;async function k(o,S,k,A,P){let _=async(e,t,r)=>{let n=new URL(k,t),o=await fetch(n,{redirect:"manual",headers:{Accept:"text/html"},signal:AbortSignal.timeout(15e3)});if(200!==o.status||!o.headers.get("content-type")?.includes("text/html"))throw await(o.body?.cancel()),Error("Page unavailable");return async function(e,t,r,n,o){let p=c(18).toString("base64"),u=Buffer.byteLength(r);if(u>R)throw Error("Shared page exceeds the preview size limit");async function h(r,a,s){let l=new URL(r,a);if(l.origin!==t.origin||l.username||l.password)return;let c=decodeURIComponent(l.pathname);if(c.split("/").some(e=>e.startsWith(".")||"node_modules"===e)||/[\\%?#]/.test(c)||i(c)||!s.has(w(c).toLowerCase()))return;let p="next"===n&&c.startsWith("/_next/static/"),m=p?y(e,".next","static"):o,h=b(m,"."+(p?c.slice(13):c));if(h.startsWith(m+x))try{if(await d(h)!==h)return;let e=await g(h);if(!e.isFile()||e.size>R-u)throw Error("Shared page exceeds the preview size limit");return u+=e.size,{data:await f(h),url:l}}catch(e){if("ENOENT"!==e.code)throw e}}let v=new Set(Object.keys(a).filter(e=>".css"!==e)),S=new Set,N=Object.create(null),k=async(e,r)=>{if(e.startsWith("data:"))return e;let i=new URL(e,r);if(i.origin===t.origin&&N[i.pathname])return N[i.pathname];let n=await h(e,r,v),s=n?"data:"+a[w(n.url.pathname).toLowerCase()]+";base64,"+n.data.toString("base64"):"";return s.startsWith("data:image/")&&(N[i.pathname]=s),s};async function A(e,t){let r=/url\(\s*(['"]?)([^)'"]+)\1\s*\)/gi,a=0,i="";for(let n of e.matchAll(r))n[2].startsWith("#")||(i+=e.slice(a,n.index)+"url("+JSON.stringify(await k(n[2].trim(),t))+")",a=n.index+n[0].length);return i+e.slice(a)}let P=E(r);function _(e,t){e.childNodes=[{nodeName:"#text",value:t,parentNode:e}]}let I=new Set,T=new Set,U=new Set,W=new Set([".js",".mjs"]);function z(e){I.add(e.url.pathname);let t=e.data.toString();for(let e of t.matchAll(/["'](\/(?:[A-Za-z0-9_.%~-]+\/)*[A-Za-z0-9_.%~-]+\.(?:png|jpe?g|gif|webp|avif|svg|ico))["']/gi))S.add(e[1]);for(let e of t.matchAll(/["'](?:\/_next\/)?(static\/chunks\/[\w./%-]+\.js)["']/g))T.add("/_next/"+e[1]);for(let e of t.matchAll(/\b[\w$]+\.e\((\d+)\)/g))U.add(e[1]);return('if(document.currentScript)document.currentScript.setAttribute("src",'+JSON.stringify(e.url.pathname).replace(/</g,"\\u003c")+");\n"+t).replace(/<\/script/gi,"<\\/script")}let F=function(e,t){let r="popmelt-module:/",a=new Map,i=new Map,n=new Map,s=new Map;function o(t,r){if(r&&"object"==typeof r)for(let[a,i]of Object.entries(r)){let r=/^(?:\.{0,2}\/|https?:)/.test(a)?new URL(a,e).href:a;t.has(r)||t.set(r,"string"==typeof i?new URL(i,e).href:null)}}function l(e,t){if(e.has(t))return e.get(t);let r=[...e.keys()].filter(e=>e.endsWith("/")&&t.startsWith(e)).sort((e,t)=>t.length-e.length)[0];if(r){let a=e.get(r);return a?.endsWith("/")?a+t.slice(r.length):null}}function c(t){let i=new URL(t,e).href,n=a.get(i)??"entry-"+a.size;return a.set(i,n),r+n+".js"}return{entry:c,importMap(t){let r=JSON.parse(t);o(n,r.imports);for(let[t,a]of Object.entries(r.scopes??{})){let r=new URL(t,e).href,i=s.get(r)??new Map;o(i,a),s.set(r,i)}},inline(t){let r=new URL(e);return r.hash="inline-"+i.size,i.set(r.href,t),c(r.href)},async compile(){if(!a.size)return;let o={name:"invited-page-modules",setup(r){r.onResolve({filter:/.*/},t=>{let r,a=t.importer||e.href,i=/^(?:\.{0,2}\/|https?:\/\/)/.test(t.path),o=i?new URL(t.path,a).href:t.path;if("entry-point"!==t.kind){for(let e of[...s.keys()].filter(e=>a===e||e.endsWith("/")&&a.startsWith(e)).sort((e,t)=>t.length-e.length))if(r=l(s.get(e),o),void 0!==r)break;void 0===r&&(r=l(n,o))}if(null===r||!i&&!r)return{external:!0};let c=new URL(r??o);return c.origin!==e.origin?{path:c.href,external:!0}:{path:c.href,namespace:"page"}}),r.onLoad({filter:/.*/,namespace:"page"},async({path:r})=>{let a=i.get(r)??(await t(r,e))?.data.toString();if(void 0===a)throw new Error("Invited page module unavailable");return{contents:a,loader:"js"}})}},{build:c}=await(import("esbuild")),p=await c({entryPoints:[...a].map(([e,t])=>({in:e,out:t})),bundle:!0,splitting:!0,format:"esm",platform:"browser",publicPath:r,write:!1,outdir:"/",logLevel:"silent",legalComments:"none",minify:!0,plugins:[o]});return Object.fromEntries(p.outputFiles.map(e=>[r+e.path.split(/[\\/]/).pop(),"data:text/javascript;base64,"+Buffer.from(e.contents).toString("base64")]))}}}(t,(e,t)=>h(e,t,W)),H=new Set;await async function e(r){let a=[];for(let i of r.childNodes){if("tagName"in i){let r=i.tagName;if(["base","iframe","frame","embed","object"].includes(r)||"meta"===r&&L(i,"http-equiv"))continue;if("html"===n)for(let e of i.attrs)/^on[a-z]+$/.test(e.name)&&H.add("'sha256-"+l("sha256").update(e.value).digest("base64")+"'");if("astro"===n&&"astro-island"===r)for(let e of i.attrs)["component-url","renderer-url","before-hydration-url"].includes(e.name)&&e.value&&(e.value=F.entry(e.value));if("script"===r){let e=()=>i.childNodes.map(e=>"value"in e?e.value:"").join("");if("next"!==n&&"importmap"===L(i,"type")){F.importMap(e());continue}let r,a=L(i,"src");if("next"!==n&&"module"===L(i,"type")){let t=a?F.entry(a):F.inline(e());_(i,"import "+JSON.stringify(t)+";")}else if(a){if(void 0!==L(i,"nomodule"))continue;let e=await h(a,t,W);if(!e)continue;"next"===n?_(i,z(e)):r="data:text/javascript;base64,"+e.data.toString("base64")}i.attrs=i.attrs.filter(e=>["type","id","async","defer"].includes(e.name)||e.name.startsWith("data-")),r&&i.attrs.push({name:"src",value:r}),i.attrs.push({name:"nonce",value:p})}else if("link"===r){if("stylesheet"!==L(i,"rel"))continue;let e=await h(L(i,"href")??"",t,new Set([".css"]));if(!e)continue;i.tagName=i.nodeName="style",i.attrs=[],_(i,(await A(e.data.toString(),e.url)).replace(/<\/style/gi,"<\\/style"))}else if("style"===r)for(let e of i.childNodes)"value"in e&&(e.value=(await A(e.value,t)).replace(/<\/style/gi,"<\\/style"));else if("img"===r){let e=L(i,"src")??"";e.startsWith("/_next/image?")&&(e=new URL(e,t).searchParams.get("url")??""),i.attrs=i.attrs.filter(e=>"src"!==e.name&&"srcset"!==e.name),e&&(await k(e,t),i.attrs.push({name:"src",value:e}))}await e(i)}a.push(i)}r.childNodes=a}(P);let D=[],B=await F.compile();B&&D.push('<script type="importmap" nonce="'+p+'">'+JSON.stringify({imports:B})+"<\/script>");let J=U.size?await m(y(e,".next","static","chunks")):[],q=new Map;for(let e of J){let t=/^(\d+)[.-][\w.-]+\.js$/.exec(e);if(t){let r=t[1],a=q.get(r)??[];a.push("/_next/static/chunks/"+e),q.set(r,a)}}let C=()=>{for(let e of U)for(let t of q.get(e)??[])T.add(t);U.clear()};C();for(let e of T){if(I.has(e))continue;let r=await h(e,t,W);r&&D.push('<script nonce="'+p+'">'+z(r)+"<\/script>"),C()}for(let e of S)await k(e,t);let X="("+O.toString()+")("+JSON.stringify(N).replace(/</g,"\\u003c")+","+JSON.stringify(t.pathname).replace(/</g,"\\u003c")+");",G=Buffer.from(await s("live-canvas")).toString().replace(/<\/script/gi,"<\\/script");return{body:j(P).replace(/<head(?: [^>]*)?>/i,e=>e+'<meta name="popmelt-live-canvas" content="1"><script nonce="'+p+'">('+M.toString()+")();"+X+"\n"+G+"<\/script>"+D.join("")),policy:"sandbox allow-scripts; default-src 'none'; script-src 'nonce-"+p+"'"+(B?" data:":"")+(H.size?"; script-src-attr 'unsafe-hashes' "+[...H].join(" "):"")+"; style-src 'unsafe-inline'; img-src data:; font-src data:; connect-src 'none'; form-action 'none'; base-uri 'none'; frame-ancestors 'self'"}}(e,n,await o.text(),A,r)};if("html"===A){let e=await r(o,A,o,void 0,{});try{return await _(o,e.origin,o)}finally{await e.close()}}let I=y(o,".popmelt");await p(I,{recursive:!0});let T,U=await u(y(I,"interact-"));try{let a=await(await n(o,U)).capture(),i=async e=>(await N("git",e,{cwd:o,env:{...process.env,GIT_INDEX_FILE:y(U,"index")}})).stdout.trim(),s=await i(["rev-parse","--show-toplevel"]),l=y(U,"checkout");await N("git",["init","--quiet","--template=",l]),await i(["read-tree",a]),await i(["-C",s,"checkout-index","--all","--prefix="+l+x]);let c=y(l,v(s,o)),{cli:p}=await t(o,A),u="next"===A?await e(S):{},f="nuxt"===A?["--input-type=module","-e","\nimport { loadNuxt, buildNuxt } from 'nuxt/kit';\nimport { createRequire } from 'node:module';\nimport { writeFile } from 'node:fs/promises';\nimport { resolve } from 'node:path';\nconst require = createRequire(import.meta.url);\nconst routerPath = createRequire(require.resolve('nuxt/package.json')).resolve('vue-router');\nconst { createMemoryHistory, createRouter } = await import(routerPath);\nconst route = process.argv[1];\nconst options = resolve('.popmelt-router.mjs');\nawait writeFile(options, 'import { createMemoryHistory } from ' + JSON.stringify(routerPath) +\n ';export default { history: () => createMemoryHistory() };');\nconst nuxt = await loadNuxt({ cwd: process.cwd(), dev: false, overrides: {\n nitro: { preset: 'node-server' }, experimental: { appManifest: false, payloadExtraction: false },\n vite: { build: { modulePreload: false } },\n hooks: {\n 'pages:routerOptions'({files}) { files.push({path: options}); },\n 'pages:resolved'(pages) {\n if (!pages.length) return;\n const record = page => ({ path: page.path, alias: page.alias ?? [],\n component: {}, meta: { page }, children: (page.children || []).map(record) });\n const router = createRouter({ history: createMemoryHistory(), routes: pages.map(record) });\n const selected = new Set(router.resolve(route).matched.map(r => r.meta.page));\n const trim = list => {\n for (let i = list.length - 1; i >= 0; i--) {\n const page = list[i];\n if (!selected.has(page)) list.splice(i, 1);\n else if (page.children) trim(page.children);\n }\n };\n trim(pages);\n },\n },\n}});\ntry { await buildNuxt(nuxt); } finally { await nuxt.close(); }\n",k]:[p,"build",..."next"===A?[...P?[P]:[],"--experimental-build-mode","compile"]:[]];await N(process.execPath,f,{cwd:c,timeout:18e4,maxBuffer:8388608,env:{...u,PATH:process.env.PATH,HOME:process.env.HOME,TMPDIR:process.env.TMPDIR,SystemRoot:process.env.SystemRoot,CI:"1",NODE_ENV:"production",NEXT_TELEMETRY_DISABLED:"1",ASTRO_TELEMETRY_DISABLED:"1",NUXT_TELEMETRY_DISABLED:"1",POPMELT_PLANE_RENDERER:"1"}}),T=await r(c,A,s,void 0,u,!0);let m=y(c,"nuxt"===A?".output/public":"astro"===A?(await g(y(c,"dist/client")).catch(()=>{}))?.isDirectory()?"dist/client":"dist":"public");return await _(c,T.origin,m)}finally{try{await(T?.close())}finally{await h(U,{recursive:!0,force:!0,maxRetries:3})}}}function M(){Object.defineProperty(navigator,"locks",{value:void 0});let e=new Map;Object.defineProperty(document,"cookie",{get:()=>Array.from(e,([e,t])=>e+"="+t).join("; "),set:t=>{let[r,...a]=String(t).split(";"),i=r.indexOf("=");if(i<1)return;let n=r.slice(0,i).trim();a.some(e=>/^\s*max-age=0\s*$/i.test(e))?e.delete(n):e.set(n,r.slice(i+1))}});for(let e of["localStorage","sessionStorage"]){let t=new Map;Object.defineProperty(window,e,{value:{get length(){return t.size},key:e=>Array.from(t.keys())[e]??null,getItem:e=>t.get(String(e))??null,setItem:(e,r)=>{t.set(String(e),String(r))},removeItem:e=>{t.delete(String(e))},clear:()=>t.clear()}})}}function O(e,t){let r=new URL(t,location.href);function a(t){if(t&&!t.startsWith("data:"))try{let a=new URL(t,r);if(a.origin!==r.origin)return;if("/_next/image"===a.pathname&&(a=new URL(a.searchParams.get("url")??"",r)),a.origin===r.origin)return e[a.pathname]}catch{}}function i(e){if(e instanceof HTMLImageElement){let t=a(e.getAttribute("src")??"");t&&(e.removeAttribute("srcset"),e.src=t)}else if(e instanceof HTMLVideoElement){let t=a(e.getAttribute("poster")??"");t&&(e.poster=t)}}new MutationObserver(e=>{for(let t of e)if("attributes"===t.type)i(t.target);else for(let e of t.addedNodes)e instanceof Element&&(i(e),e.querySelectorAll("img,video[poster]").forEach(i))}).observe(document,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["src","poster","srcset"]})}function A(e,t,r,a){let i,n="";return async(s,o)=>{let l=o+"\n"+s;for(;i&&n!==l;){let e=i;await e.catch(()=>{}),i===e&&(i=void 0)}if(!i||n!==l){n=l;let o=k(e,t,s,r,a);i=o,o.catch(()=>{i===o&&(i=void 0)})}return i}}export{A as pageInteraction};
1
+ import{a as e,b as t,c as r}from"./chunk-OECEYJNK.mjs";import"./chunk-MPEVFQ43.mjs";import{a,b as i}from"./chunk-MHTX52KW.mjs";import{a as n}from"./chunk-53QOGFAT.mjs";import{b as s}from"./chunk-HKHZBKAN.mjs";import"./chunk-CIKFUS7J.mjs";import"./chunk-K22VZV3V.mjs";import"./chunk-YMWXWXPV.mjs";import"./chunk-UIADZXVT.mjs";import{execFile as o}from"child_process";import{createHash as l,randomBytes as c}from"crypto";import{mkdir as p,mkdtemp as u,readFile as f,readdir as m,realpath as d,rm as h,stat as g}from"fs/promises";import{extname as w,join as y,relative as v,resolve as b,sep as x}from"path";import{promisify as S}from"util";import{parse as E,serialize as j}from"parse5";var N=S(o),R=33554432,L=(e,t)=>e.attrs.find(e=>e.name===t)?.value;async function k(o,S,k,A,P){let T=async(e,t,r)=>{let n=new URL(k,t),o=await fetch(n,{redirect:"manual",headers:{Accept:"text/html"},signal:AbortSignal.timeout(15e3)});if(200!==o.status||!o.headers.get("content-type")?.includes("text/html"))throw await(o.body?.cancel()),Error("Page unavailable");return async function(e,t,r,n,o){let p=c(18).toString("base64"),u=Buffer.byteLength(r);if(u>R)throw Error("Shared page exceeds the preview size limit");async function h(r,a,s){let l=new URL(r,a);if(l.origin!==t.origin||l.username||l.password)return;let c=decodeURIComponent(l.pathname);if(c.split("/").some(e=>e.startsWith(".")||"node_modules"===e)||/[\\%?#]/.test(c)||i(c)||!s.has(w(c).toLowerCase()))return;let p="next"===n&&c.startsWith("/_next/static/"),m=p?y(e,".next","static"):o,h=b(m,"."+(p?c.slice(13):c));if(h.startsWith(m+x))try{if(await d(h)!==h)return;let e=await g(h);if(!e.isFile()||e.size>R-u)throw Error("Shared page exceeds the preview size limit");return u+=e.size,{data:await f(h),url:l}}catch(e){if("ENOENT"!==e.code)throw e}}let v=new Set(Object.keys(a).filter(e=>".css"!==e)),S=new Set,N=Object.create(null),k=async(e,r)=>{if(e.startsWith("data:"))return e;let i=new URL(e,r);if(i.origin===t.origin&&N[i.pathname])return N[i.pathname];let n=await h(e,r,v),s=n?"data:"+a[w(n.url.pathname).toLowerCase()]+";base64,"+n.data.toString("base64"):"";return s.startsWith("data:image/")&&(N[i.pathname]=s),s};async function A(e,t){let r=/url\(\s*(['"]?)([^)'"]+)\1\s*\)/gi,a=0,i="";for(let n of e.matchAll(r))n[2].startsWith("#")||(i+=e.slice(a,n.index)+"url("+JSON.stringify(await k(n[2].trim(),t))+")",a=n.index+n[0].length);return i+e.slice(a)}let P=E(r);function T(e,t){e.childNodes=[{nodeName:"#text",value:t,parentNode:e}]}let _=new Set,I=new Set,U=new Set,W=new Set([".js",".mjs"]);function z(e){_.add(e.url.pathname);let t=e.data.toString();for(let e of t.matchAll(/["'](\/(?:[A-Za-z0-9_.%~-]+\/)*[A-Za-z0-9_.%~-]+\.(?:png|jpe?g|gif|webp|avif|svg|ico))["']/gi))S.add(e[1]);for(let e of t.matchAll(/["'](?:\/_next\/)?(static\/chunks\/[\w./%-]+\.js)["']/g))I.add("/_next/"+e[1]);for(let e of t.matchAll(/\b[\w$]+\.e\((\d+)\)/g))U.add(e[1]);return('if(document.currentScript)document.currentScript.setAttribute("src",'+JSON.stringify(e.url.pathname).replace(/</g,"\\u003c")+");\n"+t).replace(/<\/script/gi,"<\\/script")}let H=function(e,t){let r="popmelt-module:/",a=new Map,i=new Map,n=new Map,s=new Map;function o(t,r){if(r&&"object"==typeof r)for(let[a,i]of Object.entries(r)){let r=/^(?:\.{0,2}\/|https?:)/.test(a)?new URL(a,e).href:a;t.has(r)||t.set(r,"string"==typeof i?new URL(i,e).href:null)}}function l(e,t){if(e.has(t))return e.get(t);let r=[...e.keys()].filter(e=>e.endsWith("/")&&t.startsWith(e)).sort((e,t)=>t.length-e.length)[0];if(r){let a=e.get(r);return a?.endsWith("/")?a+t.slice(r.length):null}}function c(t){let i=new URL(t,e).href,n=a.get(i)??"entry-"+a.size;return a.set(i,n),r+n+".js"}return{entry:c,importMap(t){let r=JSON.parse(t);o(n,r.imports);for(let[t,a]of Object.entries(r.scopes??{})){let r=new URL(t,e).href,i=s.get(r)??new Map;o(i,a),s.set(r,i)}},inline(t){let r=new URL(e);return r.hash="inline-"+i.size,i.set(r.href,t),c(r.href)},async compile(){if(!a.size)return;let o={name:"invited-page-modules",setup(r){r.onResolve({filter:/.*/},t=>{let r,a=t.importer||e.href,i=/^(?:\.{0,2}\/|https?:\/\/)/.test(t.path),o=i?new URL(t.path,a).href:t.path;if("entry-point"!==t.kind){for(let e of[...s.keys()].filter(e=>a===e||e.endsWith("/")&&a.startsWith(e)).sort((e,t)=>t.length-e.length))if(r=l(s.get(e),o),void 0!==r)break;void 0===r&&(r=l(n,o))}if(null===r||!i&&!r)return{external:!0};let c=new URL(r??o);return c.origin!==e.origin?{path:c.href,external:!0}:{path:c.href,namespace:"page"}}),r.onLoad({filter:/.*/,namespace:"page"},async({path:r})=>{let a=i.get(r)??(await t(r,e))?.data.toString();if(void 0===a)throw new Error("Invited page module unavailable");return{contents:a,loader:"js"}})}},{build:c}=await(import("esbuild")),p=await c({entryPoints:[...a].map(([e,t])=>({in:e,out:t})),bundle:!0,splitting:!0,format:"esm",platform:"browser",publicPath:r,write:!1,outdir:"/",logLevel:"silent",legalComments:"none",minify:!0,plugins:[o]});return Object.fromEntries(p.outputFiles.map(e=>[r+e.path.split(/[\\/]/).pop(),"data:text/javascript;base64,"+Buffer.from(e.contents).toString("base64")]))}}}(t,(e,t)=>h(e,t,W)),D=new Set;await async function e(r){let a=[];for(let i of r.childNodes){if("tagName"in i){let r=i.tagName;if(["base","iframe","frame","embed","object"].includes(r)||"meta"===r&&L(i,"http-equiv"))continue;if("html"===n)for(let e of i.attrs)/^on[a-z]+$/.test(e.name)&&D.add("'sha256-"+l("sha256").update(e.value).digest("base64")+"'");if("astro"===n&&"astro-island"===r)for(let e of i.attrs)["component-url","renderer-url","before-hydration-url"].includes(e.name)&&e.value&&(e.value=H.entry(e.value));if("script"===r){let e=()=>i.childNodes.map(e=>"value"in e?e.value:"").join("");if("next"!==n&&"importmap"===L(i,"type")){H.importMap(e());continue}let r,a=L(i,"src");if("next"!==n&&"module"===L(i,"type")){let t=a?H.entry(a):H.inline(e());T(i,"import "+JSON.stringify(t)+";")}else if(a){if(void 0!==L(i,"nomodule"))continue;let e=await h(a,t,W);if(!e)continue;"next"===n?T(i,z(e)):r="data:text/javascript;base64,"+e.data.toString("base64")}i.attrs=i.attrs.filter(e=>["type","id","async","defer"].includes(e.name)||e.name.startsWith("data-")),r&&i.attrs.push({name:"src",value:r}),i.attrs.push({name:"nonce",value:p})}else if("link"===r){if("stylesheet"!==L(i,"rel"))continue;let e=await h(L(i,"href")??"",t,new Set([".css"]));if(!e)continue;i.tagName=i.nodeName="style",i.attrs=[],T(i,(await A(e.data.toString(),e.url)).replace(/<\/style/gi,"<\\/style"))}else if("style"===r)for(let e of i.childNodes)"value"in e&&(e.value=(await A(e.value,t)).replace(/<\/style/gi,"<\\/style"));else if("img"===r){let e=L(i,"src")??"";e.startsWith("/_next/image?")&&(e=new URL(e,t).searchParams.get("url")??""),i.attrs=i.attrs.filter(e=>"src"!==e.name&&"srcset"!==e.name),e&&(await k(e,t),i.attrs.push({name:"src",value:e}))}await e(i)}a.push(i)}r.childNodes=a}(P);let F=[],J=await H.compile();J&&F.push('<script type="importmap" nonce="'+p+'">'+JSON.stringify({imports:J})+"<\/script>");let B=U.size?await m(y(e,".next","static","chunks")):[],q=new Map;for(let e of B){let t=/^(\d+)[.-][\w.-]+\.js$/.exec(e);if(t){let r=t[1],a=q.get(r)??[];a.push("/_next/static/chunks/"+e),q.set(r,a)}}let C=()=>{for(let e of U)for(let t of q.get(e)??[])I.add(t);U.clear()};C();for(let e of I){if(_.has(e))continue;let r=await h(e,t,W);r&&F.push('<script nonce="'+p+'">'+z(r)+"<\/script>"),C()}for(let e of S)await k(e,t);let V="("+O.toString()+")("+JSON.stringify(N).replace(/</g,"\\u003c")+","+JSON.stringify(t.pathname).replace(/</g,"\\u003c")+");",X=Buffer.from(await s("live-canvas")).toString().replace(/<\/script/gi,"<\\/script");return{body:j(P).replace(/<head(?: [^>]*)?>/i,e=>e+'<meta name="popmelt-live-canvas" content="1"><script nonce="'+p+'">('+M.toString()+")();"+V+"\n"+X+"<\/script>"+F.join("")),policy:"sandbox allow-scripts; default-src 'none'; script-src 'nonce-"+p+"'"+(J?" data:":"")+(D.size?"; script-src-attr 'unsafe-hashes' "+[...D].join(" "):"")+"; style-src 'unsafe-inline'; img-src data:; font-src data:; connect-src 'none'; form-action 'none'; base-uri 'none'; frame-ancestors 'self'"}}(e,n,await o.text(),A,r)};if("html"===A){let e=await r(o,A,o,void 0,{});try{return await T(o,e.origin,o)}finally{await e.close()}}let _=y(o,".popmelt");await p(_,{recursive:!0});let I,U=await u(y(_,"interact-"));try{let a=await(await n(o,U)).capture(),i=async e=>(await N("git",e,{cwd:o,env:{...process.env,GIT_INDEX_FILE:y(U,"index")}})).stdout.trim(),s=await i(["rev-parse","--show-toplevel"]),l=y(U,"checkout");await N("git",["init","--quiet","--template=",l]),await i(["read-tree",a]),await i(["-C",s,"checkout-index","--all","--prefix="+l+x]);let c=y(l,v(s,o)),{cli:p}=await t(o,A),u="next"===A?await e(S):{},f="nuxt"===A?["--input-type=module","-e","\nimport { loadNuxt, buildNuxt } from 'nuxt/kit';\nimport { createRequire } from 'node:module';\nimport { writeFile } from 'node:fs/promises';\nimport { resolve } from 'node:path';\nconst require = createRequire(import.meta.url);\nconst routerPath = createRequire(require.resolve('nuxt/package.json')).resolve('vue-router');\nconst { createMemoryHistory, createRouter } = await import(routerPath);\nconst route = process.argv[1];\nconst options = resolve('.popmelt-router.mjs');\nawait writeFile(options, 'import { createMemoryHistory } from ' + JSON.stringify(routerPath) +\n ';export default { history: () => createMemoryHistory() };');\nconst nuxt = await loadNuxt({ cwd: process.cwd(), dev: false, overrides: {\n nitro: { preset: 'node-server' }, experimental: { appManifest: false, payloadExtraction: false },\n vite: { build: { modulePreload: false } },\n hooks: {\n 'pages:routerOptions'({files}) { files.push({path: options}); },\n 'pages:resolved'(pages) {\n if (!pages.length) return;\n const record = page => ({ path: page.path, alias: page.alias ?? [],\n component: {}, meta: { page }, children: (page.children || []).map(record) });\n const router = createRouter({ history: createMemoryHistory(), routes: pages.map(record) });\n const selected = new Set(router.resolve(route).matched.map(r => r.meta.page));\n const trim = list => {\n for (let i = list.length - 1; i >= 0; i--) {\n const page = list[i];\n if (!selected.has(page)) list.splice(i, 1);\n else if (page.children) trim(page.children);\n }\n };\n trim(pages);\n },\n },\n}});\ntry { await buildNuxt(nuxt); } finally { await nuxt.close(); }\n",k]:[p,"build",..."next"===A?[...P?[P]:[],"--experimental-build-mode","compile"]:[]];await N(process.execPath,f,{cwd:c,timeout:18e4,maxBuffer:8388608,env:{...u,PATH:process.env.PATH,HOME:process.env.HOME,TMPDIR:process.env.TMPDIR,SystemRoot:process.env.SystemRoot,CI:"1",NODE_ENV:"production",NEXT_TELEMETRY_DISABLED:"1",ASTRO_TELEMETRY_DISABLED:"1",NUXT_TELEMETRY_DISABLED:"1",POPMELT_PLANE_RENDERER:"1"}}),I=await r(c,A,s,void 0,u,!0);let m=y(c,"nuxt"===A?".output/public":"astro"===A?(await g(y(c,"dist/client")).catch(()=>{}))?.isDirectory()?"dist/client":"dist":"public");return await T(c,I.origin,m)}finally{try{await(I?.close())}finally{await h(U,{recursive:!0,force:!0,maxRetries:3})}}}function M(){Object.defineProperty(navigator,"locks",{value:void 0});let e=new Map;Object.defineProperty(document,"cookie",{get:()=>Array.from(e,([e,t])=>e+"="+t).join("; "),set:t=>{let[r,...a]=String(t).split(";"),i=r.indexOf("=");if(i<1)return;let n=r.slice(0,i).trim();a.some(e=>/^\s*max-age=0\s*$/i.test(e))?e.delete(n):e.set(n,r.slice(i+1))}});for(let e of["localStorage","sessionStorage"]){let t=new Map;Object.defineProperty(window,e,{value:{get length(){return t.size},key:e=>Array.from(t.keys())[e]??null,getItem:e=>t.get(String(e))??null,setItem:(e,r)=>{t.set(String(e),String(r))},removeItem:e=>{t.delete(String(e))},clear:()=>t.clear()}})}}function O(e,t){let r=new URL(t,location.href);function a(t){if(t&&!t.startsWith("data:"))try{let a=new URL(t,r);if(a.origin!==r.origin)return;if("/_next/image"===a.pathname&&(a=new URL(a.searchParams.get("url")??"",r)),a.origin===r.origin)return e[a.pathname]}catch{}}function i(e){if(e instanceof HTMLImageElement){let t=a(e.getAttribute("src")??"");t&&(e.removeAttribute("srcset"),e.src=t)}else if(e instanceof HTMLVideoElement){let t=a(e.getAttribute("poster")??"");t&&(e.poster=t)}}new MutationObserver(e=>{for(let t of e)if("attributes"===t.type)i(t.target);else for(let e of t.addedNodes)e instanceof Element&&(i(e),e.querySelectorAll("img,video[poster]").forEach(i))}).observe(document,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["src","poster","srcset"]})}function A(e,t,r,a){let i,n="";return async(s,o)=>{let l=o+"\n"+s;for(;i&&n!==l;){let e=i;await e.catch(()=>{}),i===e&&(i=void 0)}if(!i||n!==l){n=l;let o=k(e,t,s,r,a);i=o,o.catch(()=>{i===o&&(i=void 0)})}return i}}export{A as pageInteraction};