@angular/platform-server 22.0.0 → 22.0.2
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.
- package/fesm2022/_server-chunk.mjs +49 -34
- package/fesm2022/_server-chunk.mjs.map +1 -1
- package/fesm2022/init.mjs +1 -1
- package/fesm2022/platform-server.mjs +4 -4
- package/fesm2022/platform-server.mjs.map +1 -1
- package/fesm2022/testing.mjs +5 -5
- package/fesm2022/testing.mjs.map +1 -1
- package/package.json +5 -5
- package/third_party/domino/bundled-domino.mjs.map +1 -1
- package/types/init.d.ts +1 -1
- package/types/platform-server.d.ts +16 -2
- package/types/testing.d.ts +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v22.0.
|
|
2
|
+
* @license Angular v22.0.2
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { ɵsetRootDomAdapter as _setRootDomAdapter, DOCUMENT, XhrFactory, PlatformLocation, ɵgetDOM as _getDOM, ɵPLATFORM_SERVER_ID as _PLATFORM_SERVER_ID, ɵNullViewportScroller as _NullViewportScroller, ViewportScroller } from '@angular/common';
|
|
8
8
|
import * as i0 from '@angular/core';
|
|
9
|
-
import { InjectionToken, inject, Injector, ɵstartMeasuring as _startMeasuring, ɵstopMeasuring as _stopMeasuring, Inject, Injectable, APP_ID, TransferState, PLATFORM_ID, PLATFORM_INITIALIZER, Testability, ɵTESTABILITY as _TESTABILITY, createPlatformFactory, platformCore, ɵsetDocument as _setDocument, NgModule } from '@angular/core';
|
|
9
|
+
import { ɵRuntimeError as _RuntimeError, InjectionToken, inject, Injector, ɵstartMeasuring as _startMeasuring, ɵstopMeasuring as _stopMeasuring, Inject, Injectable, APP_ID, TransferState, PLATFORM_ID, PLATFORM_INITIALIZER, Testability, ɵTESTABILITY as _TESTABILITY, createPlatformFactory, platformCore, ɵsetDocument as _setDocument, NgModule } from '@angular/core';
|
|
10
10
|
import { ɵBrowserDomAdapter as _BrowserDomAdapter, EventManagerPlugin, EVENT_MANAGER_PLUGINS, BrowserModule } from '@angular/platform-browser';
|
|
11
11
|
import domino from '../third_party/domino/bundled-domino.mjs';
|
|
12
12
|
import { ɵHTTP_ROOT_INTERCEPTOR_FNS as _HTTP_ROOT_INTERCEPTOR_FNS } from '@angular/common/http';
|
|
@@ -80,7 +80,7 @@ class DominoAdapter extends _BrowserDomAdapter {
|
|
|
80
80
|
return 'Fake user agent';
|
|
81
81
|
}
|
|
82
82
|
getCookie(name) {
|
|
83
|
-
throw new
|
|
83
|
+
throw new _RuntimeError(5700, (typeof ngDevMode === 'undefined' || ngDevMode) && 'getCookie has not been implemented');
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -96,7 +96,7 @@ class PlatformState {
|
|
|
96
96
|
}
|
|
97
97
|
renderToString() {
|
|
98
98
|
if (ngDevMode && !this._enableDomEmulation && !window?.document) {
|
|
99
|
-
throw new
|
|
99
|
+
throw new _RuntimeError(5704, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Disabled DOM emulation should only run in browser environments');
|
|
100
100
|
}
|
|
101
101
|
const measuringLabel = 'renderToString';
|
|
102
102
|
_startMeasuring(measuringLabel);
|
|
@@ -109,7 +109,7 @@ class PlatformState {
|
|
|
109
109
|
}
|
|
110
110
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
111
111
|
minVersion: "12.0.0",
|
|
112
|
-
version: "22.0.
|
|
112
|
+
version: "22.0.2",
|
|
113
113
|
ngImport: i0,
|
|
114
114
|
type: PlatformState,
|
|
115
115
|
deps: [{
|
|
@@ -119,14 +119,14 @@ class PlatformState {
|
|
|
119
119
|
});
|
|
120
120
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
121
121
|
minVersion: "12.0.0",
|
|
122
|
-
version: "22.0.
|
|
122
|
+
version: "22.0.2",
|
|
123
123
|
ngImport: i0,
|
|
124
124
|
type: PlatformState
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
i0.ɵɵngDeclareClassMetadata({
|
|
128
128
|
minVersion: "12.0.0",
|
|
129
|
-
version: "22.0.
|
|
129
|
+
version: "22.0.2",
|
|
130
130
|
ngImport: i0,
|
|
131
131
|
type: PlatformState,
|
|
132
132
|
decorators: [{
|
|
@@ -155,44 +155,54 @@ function resolveUrl(urlStr, origin, options = {}) {
|
|
|
155
155
|
try {
|
|
156
156
|
resolved = new URL(urlStr);
|
|
157
157
|
} catch {}
|
|
158
|
+
const {
|
|
159
|
+
allowProtocolRelative = false,
|
|
160
|
+
allowOriginChange = true
|
|
161
|
+
} = options;
|
|
158
162
|
if (resolved) {
|
|
159
|
-
if (originUrl && !isSafeOriginChange(resolved, originUrl, urlStr)) {
|
|
163
|
+
if (originUrl && !isSafeOriginChange(resolved, originUrl, urlStr, allowOriginChange)) {
|
|
160
164
|
throwSuspiciousUrlError(urlStr);
|
|
161
165
|
}
|
|
162
166
|
return resolved;
|
|
163
167
|
}
|
|
164
168
|
if (!URL.canParse(urlStr, 'http://fake')) {
|
|
165
|
-
throw new
|
|
169
|
+
throw new _RuntimeError(5701, typeof ngDevMode === 'undefined' || ngDevMode ? `Invalid URL: ${urlStr}` : urlStr);
|
|
166
170
|
}
|
|
167
171
|
if (!originUrl) {
|
|
168
172
|
return null;
|
|
169
173
|
}
|
|
170
|
-
const {
|
|
171
|
-
allowProtocolRelative = false
|
|
172
|
-
} = options;
|
|
173
174
|
if (urlStr.startsWith('//')) {
|
|
174
175
|
if (!allowProtocolRelative) {
|
|
175
|
-
throw new
|
|
176
|
+
throw new _RuntimeError(5702, typeof ngDevMode === 'undefined' || ngDevMode ? `Protocol relative URLs are not allowed in this context. URL: ${urlStr}` : urlStr);
|
|
176
177
|
}
|
|
177
178
|
return new URL(urlStr, origin);
|
|
178
179
|
}
|
|
179
180
|
resolved = new URL(urlStr, origin);
|
|
180
|
-
if (!isSafeOriginChange(resolved, originUrl, urlStr)) {
|
|
181
|
+
if (!isSafeOriginChange(resolved, originUrl, urlStr, allowOriginChange)) {
|
|
181
182
|
throwSuspiciousUrlError(urlStr);
|
|
182
183
|
}
|
|
183
184
|
return resolved;
|
|
184
185
|
}
|
|
185
186
|
function throwSuspiciousUrlError(urlStr) {
|
|
186
|
-
throw new
|
|
187
|
+
throw new _RuntimeError(5703, typeof ngDevMode === 'undefined' || ngDevMode ? `URL ${urlStr} changed origin unexpectedly. This is suspicious and may indicate a security bypass attempt.` : urlStr);
|
|
187
188
|
}
|
|
188
|
-
function isSafeOriginChange(resolved, origin, urlStr) {
|
|
189
|
-
|
|
189
|
+
function isSafeOriginChange(resolved, origin, urlStr, allowOriginChange) {
|
|
190
|
+
if (origin.origin === resolved.origin) {
|
|
191
|
+
return true;
|
|
192
|
+
}
|
|
193
|
+
if (!allowOriginChange) {
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
return HTTP_OR_HTTPS_PROTOCOL_REGEX.test(urlStr);
|
|
190
197
|
}
|
|
191
198
|
|
|
192
199
|
class ServerXhr {
|
|
193
200
|
xhrImpl;
|
|
194
201
|
async ɵloadImpl() {
|
|
195
202
|
if (!this.xhrImpl) {
|
|
203
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
204
|
+
console.warn('XHR support in `@angular/platform-server` is deprecated and will be removed ' + 'in Angular 23. It has known security and performance issues in server ' + 'environments, such as forwarding `Authorization` headers on cross-origin ' + 'redirects and susceptibility to denial-of-service (DoS) via redirect loops. ' + 'Please use the HttpClient fetch backend instead, which is the default since Angular 22.');
|
|
205
|
+
}
|
|
196
206
|
const {
|
|
197
207
|
default: xhr
|
|
198
208
|
} = await import('xhr2');
|
|
@@ -202,13 +212,13 @@ class ServerXhr {
|
|
|
202
212
|
build() {
|
|
203
213
|
const impl = this.xhrImpl;
|
|
204
214
|
if (!impl) {
|
|
205
|
-
throw new
|
|
215
|
+
throw new _RuntimeError(5705, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Unexpected state in ServerXhr: XHR implementation is not loaded.');
|
|
206
216
|
}
|
|
207
217
|
return new impl.XMLHttpRequest();
|
|
208
218
|
}
|
|
209
219
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
210
220
|
minVersion: "12.0.0",
|
|
211
|
-
version: "22.0.
|
|
221
|
+
version: "22.0.2",
|
|
212
222
|
ngImport: i0,
|
|
213
223
|
type: ServerXhr,
|
|
214
224
|
deps: [],
|
|
@@ -216,14 +226,14 @@ class ServerXhr {
|
|
|
216
226
|
});
|
|
217
227
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
218
228
|
minVersion: "12.0.0",
|
|
219
|
-
version: "22.0.
|
|
229
|
+
version: "22.0.2",
|
|
220
230
|
ngImport: i0,
|
|
221
231
|
type: ServerXhr
|
|
222
232
|
});
|
|
223
233
|
}
|
|
224
234
|
i0.ɵɵngDeclareClassMetadata({
|
|
225
235
|
minVersion: "12.0.0",
|
|
226
|
-
version: "22.0.
|
|
236
|
+
version: "22.0.2",
|
|
227
237
|
ngImport: i0,
|
|
228
238
|
type: ServerXhr,
|
|
229
239
|
decorators: [{
|
|
@@ -278,6 +288,7 @@ class ServerPlatformLocation {
|
|
|
278
288
|
hash = '';
|
|
279
289
|
_hashUpdate = new Subject();
|
|
280
290
|
_doc = inject(DOCUMENT);
|
|
291
|
+
origin = this._doc.location.origin;
|
|
281
292
|
constructor() {
|
|
282
293
|
const config = inject(INITIAL_CONFIG, {
|
|
283
294
|
optional: true
|
|
@@ -293,8 +304,9 @@ class ServerPlatformLocation {
|
|
|
293
304
|
pathname,
|
|
294
305
|
search,
|
|
295
306
|
hash,
|
|
296
|
-
href
|
|
297
|
-
|
|
307
|
+
href,
|
|
308
|
+
origin
|
|
309
|
+
} = resolveUrl(config.url, this.origin);
|
|
298
310
|
this.protocol = protocol;
|
|
299
311
|
this.hostname = hostname;
|
|
300
312
|
this.port = port;
|
|
@@ -302,6 +314,7 @@ class ServerPlatformLocation {
|
|
|
302
314
|
this.search = search;
|
|
303
315
|
this.hash = hash;
|
|
304
316
|
this.href = href;
|
|
317
|
+
this.origin = origin;
|
|
305
318
|
}
|
|
306
319
|
}
|
|
307
320
|
getBaseHrefFromDOM() {
|
|
@@ -338,7 +351,9 @@ class ServerPlatformLocation {
|
|
|
338
351
|
hash,
|
|
339
352
|
href,
|
|
340
353
|
protocol
|
|
341
|
-
} = resolveUrl(newUrl, this.
|
|
354
|
+
} = resolveUrl(newUrl, this.origin, {
|
|
355
|
+
allowOriginChange: false
|
|
356
|
+
});
|
|
342
357
|
const writableThis = this;
|
|
343
358
|
writableThis.pathname = pathname;
|
|
344
359
|
writableThis.search = search;
|
|
@@ -360,7 +375,7 @@ class ServerPlatformLocation {
|
|
|
360
375
|
}
|
|
361
376
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
362
377
|
minVersion: "12.0.0",
|
|
363
|
-
version: "22.0.
|
|
378
|
+
version: "22.0.2",
|
|
364
379
|
ngImport: i0,
|
|
365
380
|
type: ServerPlatformLocation,
|
|
366
381
|
deps: [],
|
|
@@ -368,14 +383,14 @@ class ServerPlatformLocation {
|
|
|
368
383
|
});
|
|
369
384
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
370
385
|
minVersion: "12.0.0",
|
|
371
|
-
version: "22.0.
|
|
386
|
+
version: "22.0.2",
|
|
372
387
|
ngImport: i0,
|
|
373
388
|
type: ServerPlatformLocation
|
|
374
389
|
});
|
|
375
390
|
}
|
|
376
391
|
i0.ɵɵngDeclareClassMetadata({
|
|
377
392
|
minVersion: "12.0.0",
|
|
378
|
-
version: "22.0.
|
|
393
|
+
version: "22.0.2",
|
|
379
394
|
ngImport: i0,
|
|
380
395
|
type: ServerPlatformLocation,
|
|
381
396
|
decorators: [{
|
|
@@ -398,7 +413,7 @@ class ServerEventManagerPlugin extends EventManagerPlugin {
|
|
|
398
413
|
}
|
|
399
414
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
400
415
|
minVersion: "12.0.0",
|
|
401
|
-
version: "22.0.
|
|
416
|
+
version: "22.0.2",
|
|
402
417
|
ngImport: i0,
|
|
403
418
|
type: ServerEventManagerPlugin,
|
|
404
419
|
deps: [{
|
|
@@ -408,14 +423,14 @@ class ServerEventManagerPlugin extends EventManagerPlugin {
|
|
|
408
423
|
});
|
|
409
424
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
410
425
|
minVersion: "12.0.0",
|
|
411
|
-
version: "22.0.
|
|
426
|
+
version: "22.0.2",
|
|
412
427
|
ngImport: i0,
|
|
413
428
|
type: ServerEventManagerPlugin
|
|
414
429
|
});
|
|
415
430
|
}
|
|
416
431
|
i0.ɵɵngDeclareClassMetadata({
|
|
417
432
|
minVersion: "12.0.0",
|
|
418
|
-
version: "22.0.
|
|
433
|
+
version: "22.0.2",
|
|
419
434
|
ngImport: i0,
|
|
420
435
|
type: ServerEventManagerPlugin,
|
|
421
436
|
decorators: [{
|
|
@@ -525,7 +540,7 @@ const PLATFORM_SERVER_PROVIDERS = [TRANSFER_STATE_SERIALIZATION_PROVIDERS, SERVE
|
|
|
525
540
|
class ServerModule {
|
|
526
541
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
527
542
|
minVersion: "12.0.0",
|
|
528
|
-
version: "22.0.
|
|
543
|
+
version: "22.0.2",
|
|
529
544
|
ngImport: i0,
|
|
530
545
|
type: ServerModule,
|
|
531
546
|
deps: [],
|
|
@@ -533,14 +548,14 @@ class ServerModule {
|
|
|
533
548
|
});
|
|
534
549
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
535
550
|
minVersion: "14.0.0",
|
|
536
|
-
version: "22.0.
|
|
551
|
+
version: "22.0.2",
|
|
537
552
|
ngImport: i0,
|
|
538
553
|
type: ServerModule,
|
|
539
554
|
exports: [BrowserModule]
|
|
540
555
|
});
|
|
541
556
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
542
557
|
minVersion: "12.0.0",
|
|
543
|
-
version: "22.0.
|
|
558
|
+
version: "22.0.2",
|
|
544
559
|
ngImport: i0,
|
|
545
560
|
type: ServerModule,
|
|
546
561
|
providers: PLATFORM_SERVER_PROVIDERS,
|
|
@@ -549,7 +564,7 @@ class ServerModule {
|
|
|
549
564
|
}
|
|
550
565
|
i0.ɵɵngDeclareClassMetadata({
|
|
551
566
|
minVersion: "12.0.0",
|
|
552
|
-
version: "22.0.
|
|
567
|
+
version: "22.0.2",
|
|
553
568
|
ngImport: i0,
|
|
554
569
|
type: ServerModule,
|
|
555
570
|
decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_server-chunk.mjs","sources":[".../third_party/domino/bundled-domino.mjs';\n\nexport function setDomTypes() {\n // Make all Domino types available in the global env.\n // NB: Any changes here should also be done in `packages/platform-server/init/src/shims.ts`.\n Object.assign(globalThis, domino.impl);\n (globalThis as any)['KeyboardEvent'] = domino.impl.Event;\n}\n\n/**\n * Parses a document string to a Document object.\n */\nexport function parseDocument(html: string, url = '/') {\n let window = domino.createWindow(html, url);\n let doc = window.document;\n return doc;\n}\n\n/**\n * Serializes a document to string.\n */\nexport function serializeDocument(doc: Document): string {\n return (doc as any).serialize();\n}\n\n/**\n * DOM Adapter for the server platform based on https://github.com/fgnass/domino.\n */\nexport class DominoAdapter extends BrowserDomAdapter {\n static override makeCurrent() {\n setDomTypes();\n setRootDomAdapter(new DominoAdapter());\n }\n\n override readonly supportsDOMEvents = false;\n private static defaultDoc: Document;\n\n override createHtmlDocument(): Document {\n return parseDocument('<html><head><title>fakeTitle</title></head><body></body></html>');\n }\n\n override getDefaultDocument(): Document {\n if (!DominoAdapter.defaultDoc) {\n DominoAdapter.defaultDoc = domino.createDocument();\n }\n return DominoAdapter.defaultDoc;\n }\n\n override isElementNode(node: any): boolean {\n return node ? node.nodeType === DominoAdapter.defaultDoc.ELEMENT_NODE : false;\n }\n override isShadowRoot(node: any): boolean {\n return node.shadowRoot == node;\n }\n\n /** @deprecated No longer being used in Ivy code. To be removed in version 14. */\n override getGlobalEventTarget(doc: Document, target: string): EventTarget | null {\n if (target === 'window') {\n return doc.defaultView;\n }\n if (target === 'document') {\n return doc;\n }\n if (target === 'body') {\n return doc.body;\n }\n return null;\n }\n\n override getBaseHref(doc: Document): string {\n const length = doc.head.children.length;\n\n // The `<base>` can only be a direct child of `<head>` so we can save some\n // execution time by looking through them directly instead of querying for it.\n // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/base\n // Note that we can't cache the `href` value itself, because this method gets called with a\n // different document every time which means that in theory the value can be different too.\n for (let i = 0; i < length; i++) {\n const child = doc.head.children[i];\n\n // Tag names are always uppercase for HTML nodes.\n if (child.tagName === 'BASE') {\n // TODO(alxhub): Need relative path logic from BrowserDomAdapter here?\n return child.getAttribute('href') || '';\n }\n }\n\n return '';\n }\n\n override dispatchEvent(el: Node, evt: any) {\n el.dispatchEvent(evt);\n\n // Dispatch the event to the window also.\n const doc = el.ownerDocument || el;\n const win = (doc as any).defaultView;\n if (win) {\n win.dispatchEvent(evt);\n }\n }\n\n override getUserAgent(): string {\n return 'Fake user agent';\n }\n\n override getCookie(name: string): string {\n throw new Error('getCookie has not been implemented');\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\n/**\n * Config object passed to initialize the platform.\n *\n * @publicApi\n */\nexport interface PlatformConfig {\n /**\n * The initial DOM to use to bootstrap the server application.\n * @default create a new DOM using Domino\n */\n document?: string;\n /**\n * The URL for the current application state. This is used for initializing\n * the platform's location. `protocol`, `hostname`, and `port`.\n */\n url?: string;\n}\n\n/**\n * The DI token for setting the initial config for the platform.\n *\n * @publicApi\n */\nexport const INITIAL_CONFIG = new InjectionToken<PlatformConfig>('Server.INITIAL_CONFIG');\n\n/**\n * A function that will be executed when calling `renderApplication` or\n * `renderModule` just before current platform state is rendered to string.\n *\n * @publicApi\n */\nexport const BEFORE_APP_SERIALIZED = new InjectionToken<ReadonlyArray<() => void | Promise<void>>>(\n 'Server.RENDER_MODULE_HOOK',\n);\n\nexport const ENABLE_DOM_EMULATION = new InjectionToken<boolean>('ENABLE_DOM_EMULATION');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n inject,\n Inject,\n Injectable,\n Injector,\n ɵstartMeasuring as startMeasuring,\n ɵstopMeasuring as stopMeasuring,\n} from '@angular/core';\n\nimport {serializeDocument} from './domino_adapter';\nimport {ENABLE_DOM_EMULATION} from './tokens';\n\n/**\n * Representation of the current platform state.\n *\n * @publicApi\n */\n@Injectable()\nexport class PlatformState {\n /* @internal */\n _enableDomEmulation = enableDomEmulation(inject(Injector));\n\n constructor(@Inject(DOCUMENT) private _doc: any) {}\n\n /**\n * Renders the current state of the platform to string.\n */\n renderToString(): string {\n if (ngDevMode && !this._enableDomEmulation && !window?.document) {\n throw new Error('Disabled DOM emulation should only run in browser environments');\n }\n\n const measuringLabel = 'renderToString';\n startMeasuring(measuringLabel);\n const rendered = this._enableDomEmulation\n ? serializeDocument(this._doc)\n : // In the case we run/test the platform-server in a browser environment\n this._doc.documentElement.outerHTML;\n stopMeasuring(measuringLabel);\n return rendered;\n }\n\n /**\n * Returns the current DOM state.\n */\n getDocument(): any {\n return this._doc;\n }\n}\n\nexport function enableDomEmulation(injector: Injector): boolean {\n return injector.get(ENABLE_DOM_EMULATION, true);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Matches http: or https:\n */\nconst HTTP_OR_HTTPS_PROTOCOL_REGEX = /^https?:/i;\n\n/**\n * Options for {@link resolveUrl}.\n */\nexport interface ResolveUrlOptions {\n /**\n * Allow protocol-relative URLs (e.g. `//example.com`).\n */\n allowProtocolRelative?: boolean;\n}\n\n/**\n * Resolves a URL string.\n *\n * If an origin is provided, the URL is resolved against it. Otherwise, the URL is parsed as-is.\n * @param urlStr The URL to resolve.\n * @param origin The origin to resolve the URL against.\n * @param options Options for resolving the URL.\n * @returns A resolved URL object.\n */\nexport function resolveUrl(urlStr: string | undefined): URL | null;\nexport function resolveUrl(\n urlStr: string | undefined,\n origin: string | URL,\n options?: ResolveUrlOptions,\n): URL;\nexport function resolveUrl(\n urlStr: string | undefined,\n origin?: string | URL,\n options: ResolveUrlOptions = {},\n): URL | null {\n const originUrl = typeof origin === 'string' ? new URL('/', origin) : origin;\n\n if (!urlStr) {\n return originUrl || null;\n }\n\n urlStr = urlStr.trim();\n\n // Fast-path: if the URL is a valid, standard absolute URL, parse and return it immediately.\n let resolved: URL | undefined;\n try {\n resolved = new URL(urlStr);\n } catch {}\n\n if (resolved) {\n if (originUrl && !isSafeOriginChange(resolved, originUrl, urlStr)) {\n throwSuspiciousUrlError(urlStr);\n }\n\n return resolved;\n }\n\n // We identify and throw on malformed absolute URLs (like double port).\n // Per the WHATWG URL standard, parsing an input starting with a scheme (like 'http:') against\n // a standard base (like 'http://fake') ignores the base argument and parses strictly as an\n // absolute URL. Since it is malformed, the native URL constructor will throw a validation\n // error. Standard relative/protocol-relative paths parse successfully, allowing the flow to continue.\n if (!URL.canParse(urlStr, 'http://fake')) {\n throw new Error(`Invalid URL: ${urlStr}`);\n }\n\n if (!originUrl) {\n return null;\n }\n\n const {allowProtocolRelative = false} = options;\n\n // Check if we have a legitimate protocol-relative URL (starts with '//' and not a duplicate/backslash bypass)\n // and we are configured to allow and preserve standard cross-origin protocol-relative requests.\n if (urlStr.startsWith('//')) {\n if (!allowProtocolRelative) {\n throw new Error(`Protocol relative URLs are not allowed in this context. URL: ${urlStr}`);\n }\n\n return new URL(urlStr, origin);\n }\n\n resolved = new URL(urlStr, origin);\n\n if (!isSafeOriginChange(resolved, originUrl, urlStr)) {\n throwSuspiciousUrlError(urlStr);\n }\n\n return resolved;\n}\n\n/**\n * Throws a suspicious URL error indicating a security bypass attempt.\n */\nfunction throwSuspiciousUrlError(urlStr: string): never {\n throw new Error(\n `URL ${urlStr} changed origin unexpectedly. This is suspicious and may indicate a security bypass attempt.`,\n );\n}\n\n/**\n * Checks if the origin has changed in a safe way.\n *\n * @param resolved The resolved URL.\n * @param origin The origin URL.\n * @param urlStr The URL string.\n * @returns True if the origin has changed in a safe way, false otherwise.\n */\nfunction isSafeOriginChange(resolved: URL, origin: URL, urlStr: string): boolean {\n return origin.origin === resolved.origin || HTTP_OR_HTTPS_PROTOCOL_REGEX.test(urlStr);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {PlatformLocation, XhrFactory} from '@angular/common';\nimport {\n ɵHTTP_ROOT_INTERCEPTOR_FNS as HTTP_ROOT_INTERCEPTOR_FNS,\n HttpEvent,\n HttpHandlerFn,\n HttpRequest,\n} from '@angular/common/http';\nimport {inject, Injectable, Provider} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {resolveUrl} from './url';\n\n@Injectable()\nexport class ServerXhr implements XhrFactory {\n private xhrImpl: typeof import('xhr2') | undefined;\n\n // The `xhr2` dependency has a side-effect of accessing and modifying a\n // global scope. Loading `xhr2` dynamically allows us to delay the loading\n // and start the process once the global scope is established by the underlying\n // server platform (via shims, etc).\n private async ɵloadImpl(): Promise<void> {\n if (!this.xhrImpl) {\n const {default: xhr} = await import('xhr2');\n this.xhrImpl = xhr;\n }\n }\n\n build(): XMLHttpRequest {\n const impl = this.xhrImpl;\n if (!impl) {\n throw new Error('Unexpected state in ServerXhr: XHR implementation is not loaded.');\n }\n\n return new impl.XMLHttpRequest();\n }\n}\n\n/**\n * Regex to match a URL schema.\n */\nconst URL_SCHEMA_REGEXP = /^(?:[a-zA-Z][a-zA-Z0-9+\\-.]*:)/;\n\nfunction relativeUrlsTransformerInterceptorFn(\n request: HttpRequest<unknown>,\n next: HttpHandlerFn,\n): Observable<HttpEvent<unknown>> {\n const trimmedUrl = request.url.trim();\n if (URL_SCHEMA_REGEXP.test(trimmedUrl)) {\n // URLs with a schema should be left unchanged.\n return next(request);\n }\n\n const platformLocation = inject(PlatformLocation);\n const {href, protocol, hostname, port} = platformLocation;\n if (!protocol.startsWith('http')) {\n return next(request);\n }\n\n let urlPrefix = `${protocol}//${hostname}`;\n if (port) {\n urlPrefix += `:${port}`;\n }\n\n const baseHref = platformLocation.getBaseHrefFromDOM() || href;\n const baseUrl = new URL(baseHref, urlPrefix);\n\n const parsedUrl = resolveUrl(request.url, baseUrl, {\n allowProtocolRelative: true,\n });\n\n return next(request.clone({url: parsedUrl.toString()}));\n}\n\nexport const SERVER_HTTP_PROVIDERS: Provider[] = [\n {provide: XhrFactory, useClass: ServerXhr},\n {\n provide: HTTP_ROOT_INTERCEPTOR_FNS,\n useValue: relativeUrlsTransformerInterceptorFn,\n multi: true,\n },\n];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n DOCUMENT,\n LocationChangeEvent,\n LocationChangeListener,\n PlatformLocation,\n ɵgetDOM as getDOM,\n} from '@angular/common';\nimport {inject, Injectable, ɵWritable as Writable} from '@angular/core';\nimport {Subject} from 'rxjs';\n\nimport {INITIAL_CONFIG} from './tokens';\nimport {resolveUrl} from './url';\n\n/**\n * Server-side implementation of URL state. Implements `pathname`, `search`, and `hash`\n * but not the state stack.\n */\n@Injectable()\nexport class ServerPlatformLocation implements PlatformLocation {\n public readonly href: string = '/';\n public readonly hostname: string = '/';\n public readonly protocol: string = '/';\n public readonly port: string = '/';\n public readonly pathname: string = '/';\n public readonly search: string = '';\n public readonly hash: string = '';\n private _hashUpdate = new Subject<LocationChangeEvent>();\n private _doc = inject(DOCUMENT);\n\n constructor() {\n const config = inject(INITIAL_CONFIG, {optional: true});\n if (!config) {\n return;\n }\n if (config.url) {\n const {protocol, hostname, port, pathname, search, hash, href} = resolveUrl(\n config.url,\n this._doc.location.origin,\n );\n this.protocol = protocol;\n this.hostname = hostname;\n this.port = port;\n this.pathname = pathname;\n this.search = search;\n this.hash = hash;\n this.href = href;\n }\n }\n\n getBaseHrefFromDOM(): string {\n return getDOM().getBaseHref(this._doc)!;\n }\n\n onPopState(fn: LocationChangeListener): VoidFunction {\n // No-op: a state stack is not implemented, so\n // no events will ever come.\n return () => {};\n }\n\n onHashChange(fn: LocationChangeListener): VoidFunction {\n const subscription = this._hashUpdate.subscribe(fn);\n return () => subscription.unsubscribe();\n }\n\n get url(): string {\n return `${this.pathname}${this.search}${this.hash}`;\n }\n\n private setHash(value: string, oldUrl: string) {\n if (this.hash === value) {\n // Don't fire events if the hash has not changed.\n return;\n }\n (this as Writable<this>).hash = value;\n const newUrl = this.url;\n queueMicrotask(() =>\n this._hashUpdate.next({\n type: 'hashchange',\n state: null,\n oldUrl,\n newUrl,\n } as LocationChangeEvent),\n );\n }\n\n replaceState(state: any, title: string, newUrl: string): void {\n const oldUrl = this.url;\n const {pathname, search, hash, href, protocol} = resolveUrl(newUrl, this._doc.location.origin);\n const writableThis = this as Writable<this>;\n writableThis.pathname = pathname;\n writableThis.search = search;\n writableThis.href = href;\n writableThis.protocol = protocol;\n this.setHash(hash, oldUrl);\n }\n\n pushState(state: any, title: string, newUrl: string): void {\n this.replaceState(state, title, newUrl);\n }\n\n forward(): void {\n throw new Error('Not implemented');\n }\n\n back(): void {\n throw new Error('Not implemented');\n }\n\n // History API isn't available on server, therefore return undefined\n getState(): unknown {\n return undefined;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable, type ListenerOptions} from '@angular/core';\nimport {EventManagerPlugin} from '@angular/platform-browser';\n\n@Injectable()\nexport class ServerEventManagerPlugin extends EventManagerPlugin {\n constructor(@Inject(DOCUMENT) private doc: any) {\n super(doc);\n }\n\n // Handle all events on the server.\n override supports(eventName: string) {\n return true;\n }\n\n override addEventListener(\n element: HTMLElement,\n eventName: string,\n handler: Function,\n options?: ListenerOptions,\n ): Function {\n return getDOM().onAndCancel(element, eventName, handler, options);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n APP_ID,\n inject,\n InjectionToken,\n Injector,\n Provider,\n TransferState,\n ɵstartMeasuring as startMeasuring,\n ɵstopMeasuring as stopMeasuring,\n} from '@angular/core';\n\nimport {BEFORE_APP_SERIALIZED} from './tokens';\n\n/** Tracks whether the server-side application transfer state has already been serialized. */\nconst TRANSFER_STATE_STATUS = new InjectionToken<{serialized: boolean}>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'TRANSFER_STATE_STATUS' : '',\n {\n factory: () => ({serialized: false}),\n },\n);\n\nexport const TRANSFER_STATE_SERIALIZATION_PROVIDERS: Provider[] = [\n {\n provide: BEFORE_APP_SERIALIZED,\n useFactory: serializeTransferStateFactory,\n multi: true,\n },\n];\n\n/** TODO: Move this to a utils folder and convert to use SafeValues. */\nexport function createScript(\n doc: Document,\n textContent: string,\n nonce: string | null,\n): HTMLScriptElement {\n const script = doc.createElement('script');\n script.textContent = textContent;\n if (nonce) {\n script.setAttribute('nonce', nonce);\n }\n\n return script;\n}\n\nfunction warnIfStateTransferHappened(injector: Injector): void {\n const transferStateStatus = injector.get(TRANSFER_STATE_STATUS);\n\n if (transferStateStatus.serialized) {\n console.warn(\n `Angular detected an incompatible configuration, which causes duplicate serialization of the server-side application state.\\n\\n` +\n `This can happen if the server providers have been provided more than once using different mechanisms. For example:\\n\\n` +\n ` imports: [ServerModule], // Registers server providers\\n` +\n ` providers: [provideServerRendering()] // Also registers server providers\\n\\n` +\n `To fix this, ensure that the \\`provideServerRendering()\\` function is the only provider used and remove the other(s).`,\n );\n }\n\n transferStateStatus.serialized = true;\n}\n\nfunction serializeTransferStateFactory() {\n const doc = inject(DOCUMENT);\n const appId = inject(APP_ID);\n const transferStore = inject(TransferState);\n const injector = inject(Injector);\n\n return () => {\n const measuringLabel = 'serializeTransferStateFactory';\n startMeasuring(measuringLabel);\n // The `.toJSON` here causes the `onSerialize` callbacks to be called.\n // These callbacks can be used to provide the value for a given key.\n const content = transferStore.toJson();\n\n if (transferStore.isEmpty) {\n // The state is empty, nothing to transfer,\n // avoid creating an extra `<script>` tag in this case.\n return;\n }\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n warnIfStateTransferHappened(injector);\n }\n\n const script = createScript(\n doc,\n content,\n /**\n * `nonce` is not required for 'application/json'\n * See: https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type\n */\n null,\n );\n script.id = appId + '-state';\n script.setAttribute('type', 'application/json');\n\n // It is intentional that we add the script at the very bottom. Angular CLI script tags for\n // bundles are always `type=\"module\"`. These are deferred by default and cause the\n // transfer data to be queried only after the browser has finished parsing the DOM.\n doc.body.appendChild(script);\n stopMeasuring(measuringLabel);\n };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n DOCUMENT,\n PlatformLocation,\n ViewportScroller,\n ɵgetDOM as getDOM,\n ɵNullViewportScroller as NullViewportScroller,\n ɵPLATFORM_SERVER_ID as PLATFORM_SERVER_ID,\n} from '@angular/common';\nimport {\n createPlatformFactory,\n Injector,\n NgModule,\n PLATFORM_ID,\n PLATFORM_INITIALIZER,\n platformCore,\n PlatformRef,\n Provider,\n Testability,\n ɵsetDocument,\n ɵTESTABILITY as TESTABILITY,\n inject,\n StaticProvider,\n} from '@angular/core';\nimport {\n BrowserModule,\n EVENT_MANAGER_PLUGINS,\n ɵBrowserDomAdapter as BrowserDomAdapter,\n} from '@angular/platform-browser';\n\nimport {DominoAdapter, parseDocument} from './domino_adapter';\nimport {SERVER_HTTP_PROVIDERS} from './http';\nimport {resolveUrl} from './url';\nimport {ServerPlatformLocation} from './location';\nimport {enableDomEmulation, PlatformState} from './platform_state';\nimport {ServerEventManagerPlugin} from './server_events';\nimport {INITIAL_CONFIG, PlatformConfig} from './tokens';\nimport {TRANSFER_STATE_SERIALIZATION_PROVIDERS} from './transfer_state';\n\nexport const INTERNAL_SERVER_PLATFORM_PROVIDERS: StaticProvider[] = [\n {provide: DOCUMENT, useFactory: _document},\n {provide: PLATFORM_ID, useValue: PLATFORM_SERVER_ID},\n {provide: PLATFORM_INITIALIZER, useFactory: initDominoAdapter, multi: true},\n {\n provide: PlatformLocation,\n useClass: ServerPlatformLocation,\n deps: [],\n },\n {provide: PlatformState, deps: [DOCUMENT]},\n];\n\nfunction initDominoAdapter() {\n const injector = inject(Injector);\n const _enableDomEmulation = enableDomEmulation(injector);\n return () => {\n if (_enableDomEmulation) {\n DominoAdapter.makeCurrent();\n } else {\n BrowserDomAdapter.makeCurrent();\n }\n };\n}\n\nexport const SERVER_RENDER_PROVIDERS: Provider[] = [\n {provide: EVENT_MANAGER_PLUGINS, multi: true, useClass: ServerEventManagerPlugin},\n];\n\nexport const PLATFORM_SERVER_PROVIDERS: Provider[] = [\n TRANSFER_STATE_SERIALIZATION_PROVIDERS,\n SERVER_RENDER_PROVIDERS,\n SERVER_HTTP_PROVIDERS,\n {provide: Testability, useValue: null}, // Keep for backwards-compatibility.\n {provide: TESTABILITY, useValue: null},\n {provide: ViewportScroller, useClass: NullViewportScroller},\n];\n\n/**\n * The ng module for the server.\n *\n * @publicApi\n */\n@NgModule({\n exports: [BrowserModule],\n providers: PLATFORM_SERVER_PROVIDERS,\n})\nexport class ServerModule {}\n\nfunction _document() {\n const injector = inject(Injector);\n const config: PlatformConfig | null = injector.get(INITIAL_CONFIG, null);\n const _enableDomEmulation = enableDomEmulation(injector);\n let document: Document;\n if (config && config.document) {\n document =\n typeof config.document === 'string'\n ? _enableDomEmulation\n ? parseDocument(\n config.document,\n config.url !== undefined\n ? resolveUrl(config.url, 'http://localhost').href\n : undefined,\n )\n : window.document\n : config.document;\n } else {\n document = getDOM().createHtmlDocument();\n }\n // Tell ivy about the global document\n ɵsetDocument(document);\n return document;\n}\n\n/**\n * Creates a server-side instance of an Angular platform.\n *\n * This platform should be used when performing server-side rendering of an Angular application.\n * Standalone applications can be bootstrapped on the server using the `bootstrapApplication`\n * function from `@angular/platform-browser`. When using `bootstrapApplication`, the `platformServer`\n * should be created first and passed to the bootstrap function using the `BootstrapContext`.\n *\n * @publicApi\n */\nexport function platformServer(extraProviders?: StaticProvider[] | undefined): PlatformRef {\n const noServerModeSet = typeof ngServerMode === 'undefined';\n if (noServerModeSet) {\n globalThis['ngServerMode'] = true;\n }\n\n const platform = createPlatformFactory(\n platformCore,\n 'server',\n INTERNAL_SERVER_PLATFORM_PROVIDERS,\n )(extraProviders);\n\n if (noServerModeSet) {\n platform.onDestroy(() => {\n globalThis['ngServerMode'] = undefined;\n });\n }\n\n return platform;\n}\n"],"names":["setDomTypes","Object","assign","globalThis","domino","impl","Event","parseDocument","html","url","window","createWindow","doc","document","serializeDocument","serialize","DominoAdapter","BrowserDomAdapter","makeCurrent","setRootDomAdapter","supportsDOMEvents","defaultDoc","createHtmlDocument","getDefaultDocument","createDocument","isElementNode","node","nodeType","ELEMENT_NODE","isShadowRoot","shadowRoot","getGlobalEventTarget","target","defaultView","body","getBaseHref","length","head","children","i","child","tagName","getAttribute","dispatchEvent","el","evt","ownerDocument","win","getUserAgent","getCookie","name","Error","INITIAL_CONFIG","InjectionToken","BEFORE_APP_SERIALIZED","ENABLE_DOM_EMULATION","PlatformState","_doc","_enableDomEmulation","enableDomEmulation","inject","Injector","constructor","renderToString","ngDevMode","measuringLabel","startMeasuring","rendered","documentElement","outerHTML","stopMeasuring","getDocument","ɵfac","i0","ɵɵngDeclareFactory","minVersion","version","ngImport","type","DOCUMENT","ɵɵFactoryTarget","Injectable","decorators","Inject","injector","get","HTTP_OR_HTTPS_PROTOCOL_REGEX","resolveUrl","urlStr","origin","options","originUrl","URL","trim","resolved","isSafeOriginChange","throwSuspiciousUrlError","canParse","allowProtocolRelative","startsWith","test","ServerXhr","xhrImpl","ɵloadImpl","default","xhr","build","XMLHttpRequest","deps","URL_SCHEMA_REGEXP","relativeUrlsTransformerInterceptorFn","request","next","trimmedUrl","platformLocation","PlatformLocation","href","protocol","hostname","port","urlPrefix","baseHref","getBaseHrefFromDOM","baseUrl","parsedUrl","clone","toString","SERVER_HTTP_PROVIDERS","provide","XhrFactory","useClass","HTTP_ROOT_INTERCEPTOR_FNS","useValue","multi","ServerPlatformLocation","pathname","search","hash","_hashUpdate","Subject","config","optional","location","getDOM","onPopState","fn","onHashChange","subscription","subscribe","unsubscribe","setHash","value","oldUrl","newUrl","queueMicrotask","state","replaceState","title","writableThis","pushState","forward","back","getState","undefined","ServerEventManagerPlugin","EventManagerPlugin","supports","eventName","addEventListener","element","handler","onAndCancel","TRANSFER_STATE_STATUS","factory","serialized","TRANSFER_STATE_SERIALIZATION_PROVIDERS","useFactory","serializeTransferStateFactory","createScript","textContent","nonce","script","createElement","setAttribute","warnIfStateTransferHappened","transferStateStatus","console","warn","appId","APP_ID","transferStore","TransferState","content","toJson","isEmpty","id","appendChild","INTERNAL_SERVER_PLATFORM_PROVIDERS","_document","PLATFORM_ID","PLATFORM_SERVER_ID","PLATFORM_INITIALIZER","initDominoAdapter","SERVER_RENDER_PROVIDERS","EVENT_MANAGER_PLUGINS","PLATFORM_SERVER_PROVIDERS","Testability","TESTABILITY","ViewportScroller","NullViewportScroller","ServerModule","NgModule","ɵmod","ɵɵngDeclareNgModule","BrowserModule","providers","imports","args","exports","ɵsetDocument","platformServer","extraProviders","noServerModeSet","ngServerMode","platform","createPlatformFactory","platformCore","onDestro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AA,CAAC,CAAC;AACJ,EAAA;AAEA,EAAA,OAAO6D,QAAQ;AACjB;;;;"}
|
|
1
|
+
{"version":3,"file":"_server-chunk.mjs","sources":[".../third_party/domino/bundled-domino.mjs';\n\nexport function setDomTypes() {\n // Make all Domino types available in the global env.\n // NB: Any changes here should also be done in `packages/platform-server/init/src/shims.ts`.\n Object.assign(globalThis, domino.impl);\n (globalThis as any)['KeyboardEvent'] = domino.impl.Event;\n}\n\n/**\n * Parses a document string to a Document object.\n */\nexport function parseDocument(html: string, url = '/') {\n let window = domino.createWindow(html, url);\n let doc = window.document;\n return doc;\n}\n\n/**\n * Serializes a document to string.\n */\nexport function serializeDocument(doc: Document): string {\n return (doc as any).serialize();\n}\n\n/**\n * DOM Adapter for the server platform based on https://github.com/fgnass/domino.\n */\nexport class DominoAdapter extends BrowserDomAdapter {\n static override makeCurrent() {\n setDomTypes();\n setRootDomAdapter(new DominoAdapter());\n }\n\n override readonly supportsDOMEvents = false;\n private static defaultDoc: Document;\n\n override createHtmlDocument(): Document {\n return parseDocument('<html><head><title>fakeTitle</title></head><body></body></html>');\n }\n\n override getDefaultDocument(): Document {\n if (!DominoAdapter.defaultDoc) {\n DominoAdapter.defaultDoc = domino.createDocument();\n }\n return DominoAdapter.defaultDoc;\n }\n\n override isElementNode(node: any): boolean {\n return node ? node.nodeType === DominoAdapter.defaultDoc.ELEMENT_NODE : false;\n }\n override isShadowRoot(node: any): boolean {\n return node.shadowRoot == node;\n }\n\n /** @deprecated No longer being used in Ivy code. To be removed in version 14. */\n override getGlobalEventTarget(doc: Document, target: string): EventTarget | null {\n if (target === 'window') {\n return doc.defaultView;\n }\n if (target === 'document') {\n return doc;\n }\n if (target === 'body') {\n return doc.body;\n }\n return null;\n }\n\n override getBaseHref(doc: Document): string {\n const length = doc.head.children.length;\n\n // The `<base>` can only be a direct child of `<head>` so we can save some\n // execution time by looking through them directly instead of querying for it.\n // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/base\n // Note that we can't cache the `href` value itself, because this method gets called with a\n // different document every time which means that in theory the value can be different too.\n for (let i = 0; i < length; i++) {\n const child = doc.head.children[i];\n\n // Tag names are always uppercase for HTML nodes.\n if (child.tagName === 'BASE') {\n // TODO(alxhub): Need relative path logic from BrowserDomAdapter here?\n return child.getAttribute('href') || '';\n }\n }\n\n return '';\n }\n\n override dispatchEvent(el: Node, evt: any) {\n el.dispatchEvent(evt);\n\n // Dispatch the event to the window also.\n const doc = el.ownerDocument || el;\n const win = (doc as any).defaultView;\n if (win) {\n win.dispatchEvent(evt);\n }\n }\n\n override getUserAgent(): string {\n return 'Fake user agent';\n }\n\n override getCookie(name: string): string {\n throw new RuntimeError(\n RuntimeErrorCode.GET_COOKIE_NOT_IMPLEMENTED,\n (typeof ngDevMode === 'undefined' || ngDevMode) && 'getCookie has not been implemented',\n );\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\n/**\n * Config object passed to initialize the platform.\n *\n * @publicApi\n */\nexport interface PlatformConfig {\n /**\n * The initial DOM to use to bootstrap the server application.\n * @default create a new DOM using Domino\n */\n document?: string;\n /**\n * The URL for the current application state. This is used for initializing\n * the platform's location. `protocol`, `hostname`, and `port`.\n */\n url?: string;\n}\n\n/**\n * The DI token for setting the initial config for the platform.\n *\n * @publicApi\n */\nexport const INITIAL_CONFIG = new InjectionToken<PlatformConfig>('Server.INITIAL_CONFIG');\n\n/**\n * A function that will be executed when calling `renderApplication` or\n * `renderModule` just before current platform state is rendered to string.\n *\n * @publicApi\n */\nexport const BEFORE_APP_SERIALIZED = new InjectionToken<ReadonlyArray<() => void | Promise<void>>>(\n 'Server.RENDER_MODULE_HOOK',\n);\n\nexport const ENABLE_DOM_EMULATION = new InjectionToken<boolean>('ENABLE_DOM_EMULATION');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n inject,\n Inject,\n Injectable,\n Injector,\n ɵstartMeasuring as startMeasuring,\n ɵstopMeasuring as stopMeasuring,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from './errors';\nimport {serializeDocument} from './domino_adapter';\nimport {ENABLE_DOM_EMULATION} from './tokens';\n\n/**\n * Representation of the current platform state.\n *\n * @publicApi\n */\n@Injectable()\nexport class PlatformState {\n /* @internal */\n _enableDomEmulation = enableDomEmulation(inject(Injector));\n\n constructor(@Inject(DOCUMENT) private _doc: any) {}\n\n /**\n * Renders the current state of the platform to string.\n */\n renderToString(): string {\n if (ngDevMode && !this._enableDomEmulation && !window?.document) {\n throw new RuntimeError(\n RuntimeErrorCode.DISABLED_DOM_EMULATION_IN_NON_BROWSER,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Disabled DOM emulation should only run in browser environments',\n );\n }\n\n const measuringLabel = 'renderToString';\n startMeasuring(measuringLabel);\n const rendered = this._enableDomEmulation\n ? serializeDocument(this._doc)\n : // In the case we run/test the platform-server in a browser environment\n this._doc.documentElement.outerHTML;\n stopMeasuring(measuringLabel);\n return rendered;\n }\n\n /**\n * Returns the current DOM state.\n */\n getDocument(): any {\n return this._doc;\n }\n}\n\nexport function enableDomEmulation(injector: Injector): boolean {\n return injector.get(ENABLE_DOM_EMULATION, true);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ɵRuntimeError as RuntimeError} from '@angular/core';\n\nimport {RuntimeErrorCode} from './errors';\n\n/**\n * Matches http: or https:\n */\nconst HTTP_OR_HTTPS_PROTOCOL_REGEX = /^https?:/i;\n\n/**\n * Options for {@link resolveUrl}.\n */\nexport interface ResolveUrlOptions {\n /**\n * Allow protocol-relative URLs (e.g. `//example.com`).\n * @default false\n */\n allowProtocolRelative?: boolean;\n /**\n * Allow origin changes.\n * @default true\n */\n allowOriginChange?: boolean;\n}\n\n/**\n * Resolves a URL string.\n *\n * If an origin is provided, the URL is resolved against it. Otherwise, the URL is parsed as-is.\n * @param urlStr The URL to resolve.\n * @param origin The origin to resolve the URL against.\n * @param options Options for resolving the URL.\n * @returns A resolved URL object.\n */\nexport function resolveUrl(urlStr: string | undefined): URL | null;\nexport function resolveUrl(\n urlStr: string | undefined,\n origin: string | URL,\n options?: ResolveUrlOptions,\n): URL;\nexport function resolveUrl(\n urlStr: string | undefined,\n origin?: string | URL,\n options: ResolveUrlOptions = {},\n): URL | null {\n const originUrl = typeof origin === 'string' ? new URL('/', origin) : origin;\n\n if (!urlStr) {\n return originUrl || null;\n }\n\n urlStr = urlStr.trim();\n\n // Fast-path: if the URL is a valid, standard absolute URL, parse and return it immediately.\n let resolved: URL | undefined;\n try {\n resolved = new URL(urlStr);\n } catch {}\n const {allowProtocolRelative = false, allowOriginChange = true} = options;\n\n if (resolved) {\n if (originUrl && !isSafeOriginChange(resolved, originUrl, urlStr, allowOriginChange)) {\n throwSuspiciousUrlError(urlStr);\n }\n\n return resolved;\n }\n\n // We identify and throw on malformed absolute URLs (like double port).\n // Per the WHATWG URL standard, parsing an input starting with a scheme (like 'http:') against\n // a standard base (like 'http://fake') ignores the base argument and parses strictly as an\n // absolute URL. Since it is malformed, the native URL constructor will throw a validation\n // error. Standard relative/protocol-relative paths parse successfully, allowing the flow to continue.\n if (!URL.canParse(urlStr, 'http://fake')) {\n throw new RuntimeError(\n RuntimeErrorCode.INVALID_URL,\n typeof ngDevMode === 'undefined' || ngDevMode ? `Invalid URL: ${urlStr}` : urlStr,\n );\n }\n\n if (!originUrl) {\n return null;\n }\n\n // Check if we have a legitimate protocol-relative URL (starts with '//' and not a duplicate/backslash bypass)\n // and we are configured to allow and preserve standard cross-origin protocol-relative requests.\n if (urlStr.startsWith('//')) {\n if (!allowProtocolRelative) {\n throw new RuntimeError(\n RuntimeErrorCode.PROTOCOL_RELATIVE_URL_NOT_ALLOWED,\n typeof ngDevMode === 'undefined' || ngDevMode\n ? `Protocol relative URLs are not allowed in this context. URL: ${urlStr}`\n : urlStr,\n );\n }\n\n return new URL(urlStr, origin);\n }\n\n resolved = new URL(urlStr, origin);\n\n if (!isSafeOriginChange(resolved, originUrl, urlStr, allowOriginChange)) {\n throwSuspiciousUrlError(urlStr);\n }\n\n return resolved;\n}\n\n/**\n * Throws a suspicious URL error indicating a security bypass attempt.\n */\nfunction throwSuspiciousUrlError(urlStr: string): never {\n throw new RuntimeError(\n RuntimeErrorCode.SUSPICIOUS_URL_CHANGE_ORIGIN,\n typeof ngDevMode === 'undefined' || ngDevMode\n ? `URL ${urlStr} changed origin unexpectedly. This is suspicious and may indicate a security bypass attempt.`\n : urlStr,\n );\n}\n\n/**\n * Checks if the origin has changed in a safe way.\n *\n * @param resolved The resolved URL.\n * @param origin The origin URL.\n * @param urlStr The URL string.\n * @param allowOriginChange Whether to allow origin changes.\n * @returns True if the origin has changed in a safe way, false otherwise.\n */\nfunction isSafeOriginChange(\n resolved: URL,\n origin: URL,\n urlStr: string,\n allowOriginChange: boolean,\n): boolean {\n if (origin.origin === resolved.origin) {\n return true;\n }\n\n if (!allowOriginChange) {\n return false;\n }\n\n return HTTP_OR_HTTPS_PROTOCOL_REGEX.test(urlStr);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {PlatformLocation, XhrFactory} from '@angular/common';\nimport {\n ɵHTTP_ROOT_INTERCEPTOR_FNS as HTTP_ROOT_INTERCEPTOR_FNS,\n HttpEvent,\n HttpHandlerFn,\n HttpRequest,\n} from '@angular/common/http';\nimport {inject, Injectable, Provider, ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {RuntimeErrorCode} from './errors';\nimport {resolveUrl} from './url';\n\n@Injectable()\n/**\n * @deprecated Use the HttpClient fetch backend instead. Intent to remove in Angular 23.\n * XHR support in `@angular/platform-server` is deprecated because the underlying `xhr2`\n * library does not safely handle redirects (e.g. it can forward `Authorization` headers\n * on cross-origin redirects and is susceptible to denial-of-service (DoS) via redirect loops).\n */\nexport class ServerXhr implements XhrFactory {\n private xhrImpl: typeof import('xhr2') | undefined;\n\n // The `xhr2` dependency has a side-effect of accessing and modifying a\n // global scope. Loading `xhr2` dynamically allows us to delay the loading\n // and start the process once the global scope is established by the underlying\n // server platform (via shims, etc).\n private async ɵloadImpl(): Promise<void> {\n if (!this.xhrImpl) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(\n 'XHR support in `@angular/platform-server` is deprecated and will be removed ' +\n 'in Angular 23. It has known security and performance issues in server ' +\n 'environments, such as forwarding `Authorization` headers on cross-origin ' +\n 'redirects and susceptibility to denial-of-service (DoS) via redirect loops. ' +\n 'Please use the HttpClient fetch backend instead, which is the default since Angular 22.',\n );\n }\n\n const {default: xhr} = await import('xhr2');\n this.xhrImpl = xhr;\n }\n }\n\n build(): XMLHttpRequest {\n const impl = this.xhrImpl;\n if (!impl) {\n throw new RuntimeError(\n RuntimeErrorCode.XHR_NOT_LOADED,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Unexpected state in ServerXhr: XHR implementation is not loaded.',\n );\n }\n\n return new impl.XMLHttpRequest();\n }\n}\n\n/**\n * Regex to match a URL schema.\n */\nconst URL_SCHEMA_REGEXP = /^(?:[a-zA-Z][a-zA-Z0-9+\\-.]*:)/;\n\nfunction relativeUrlsTransformerInterceptorFn(\n request: HttpRequest<unknown>,\n next: HttpHandlerFn,\n): Observable<HttpEvent<unknown>> {\n const trimmedUrl = request.url.trim();\n if (URL_SCHEMA_REGEXP.test(trimmedUrl)) {\n // URLs with a schema should be left unchanged.\n return next(request);\n }\n\n const platformLocation = inject(PlatformLocation);\n const {href, protocol, hostname, port} = platformLocation;\n if (!protocol.startsWith('http')) {\n return next(request);\n }\n\n let urlPrefix = `${protocol}//${hostname}`;\n if (port) {\n urlPrefix += `:${port}`;\n }\n\n const baseHref = platformLocation.getBaseHrefFromDOM() || href;\n const baseUrl = new URL(baseHref, urlPrefix);\n\n const parsedUrl = resolveUrl(request.url, baseUrl, {\n allowProtocolRelative: true,\n });\n\n return next(request.clone({url: parsedUrl.toString()}));\n}\n\nexport const SERVER_HTTP_PROVIDERS: Provider[] = [\n {provide: XhrFactory, useClass: ServerXhr},\n {\n provide: HTTP_ROOT_INTERCEPTOR_FNS,\n useValue: relativeUrlsTransformerInterceptorFn,\n multi: true,\n },\n];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n DOCUMENT,\n LocationChangeEvent,\n LocationChangeListener,\n PlatformLocation,\n ɵgetDOM as getDOM,\n} from '@angular/common';\nimport {inject, Injectable, ɵWritable as Writable} from '@angular/core';\nimport {Subject} from 'rxjs';\n\nimport {INITIAL_CONFIG} from './tokens';\nimport {resolveUrl} from './url';\n\n/**\n * Server-side implementation of URL state. Implements `pathname`, `search`, and `hash`\n * but not the state stack.\n */\n@Injectable()\nexport class ServerPlatformLocation implements PlatformLocation {\n public readonly href: string = '/';\n public readonly hostname: string = '/';\n public readonly protocol: string = '/';\n public readonly port: string = '/';\n public readonly pathname: string = '/';\n public readonly search: string = '';\n public readonly hash: string = '';\n private _hashUpdate = new Subject<LocationChangeEvent>();\n private readonly _doc = inject(DOCUMENT);\n private readonly origin = this._doc.location.origin;\n\n constructor() {\n const config = inject(INITIAL_CONFIG, {optional: true});\n if (!config) {\n return;\n }\n if (config.url) {\n const {protocol, hostname, port, pathname, search, hash, href, origin} = resolveUrl(\n config.url,\n this.origin,\n );\n this.protocol = protocol;\n this.hostname = hostname;\n this.port = port;\n this.pathname = pathname;\n this.search = search;\n this.hash = hash;\n this.href = href;\n this.origin = origin;\n }\n }\n\n getBaseHrefFromDOM(): string {\n return getDOM().getBaseHref(this._doc)!;\n }\n\n onPopState(fn: LocationChangeListener): VoidFunction {\n // No-op: a state stack is not implemented, so\n // no events will ever come.\n return () => {};\n }\n\n onHashChange(fn: LocationChangeListener): VoidFunction {\n const subscription = this._hashUpdate.subscribe(fn);\n return () => subscription.unsubscribe();\n }\n\n get url(): string {\n return `${this.pathname}${this.search}${this.hash}`;\n }\n\n private setHash(value: string, oldUrl: string) {\n if (this.hash === value) {\n // Don't fire events if the hash has not changed.\n return;\n }\n (this as Writable<this>).hash = value;\n const newUrl = this.url;\n queueMicrotask(() =>\n this._hashUpdate.next({\n type: 'hashchange',\n state: null,\n oldUrl,\n newUrl,\n } as LocationChangeEvent),\n );\n }\n\n replaceState(state: any, title: string, newUrl: string): void {\n const oldUrl = this.url;\n const {pathname, search, hash, href, protocol} = resolveUrl(newUrl, this.origin, {\n allowOriginChange: false,\n });\n const writableThis = this as Writable<this>;\n writableThis.pathname = pathname;\n writableThis.search = search;\n writableThis.href = href;\n writableThis.protocol = protocol;\n this.setHash(hash, oldUrl);\n }\n\n pushState(state: any, title: string, newUrl: string): void {\n this.replaceState(state, title, newUrl);\n }\n\n forward(): void {\n throw new Error('Not implemented');\n }\n\n back(): void {\n throw new Error('Not implemented');\n }\n\n // History API isn't available on server, therefore return undefined\n getState(): unknown {\n return undefined;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable, type ListenerOptions} from '@angular/core';\nimport {EventManagerPlugin} from '@angular/platform-browser';\n\n@Injectable()\nexport class ServerEventManagerPlugin extends EventManagerPlugin {\n constructor(@Inject(DOCUMENT) private doc: any) {\n super(doc);\n }\n\n // Handle all events on the server.\n override supports(eventName: string) {\n return true;\n }\n\n override addEventListener(\n element: HTMLElement,\n eventName: string,\n handler: Function,\n options?: ListenerOptions,\n ): Function {\n return getDOM().onAndCancel(element, eventName, handler, options);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n APP_ID,\n inject,\n InjectionToken,\n Injector,\n Provider,\n TransferState,\n ɵstartMeasuring as startMeasuring,\n ɵstopMeasuring as stopMeasuring,\n} from '@angular/core';\n\nimport {BEFORE_APP_SERIALIZED} from './tokens';\n\n/** Tracks whether the server-side application transfer state has already been serialized. */\nconst TRANSFER_STATE_STATUS = new InjectionToken<{serialized: boolean}>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'TRANSFER_STATE_STATUS' : '',\n {\n factory: () => ({serialized: false}),\n },\n);\n\nexport const TRANSFER_STATE_SERIALIZATION_PROVIDERS: Provider[] = [\n {\n provide: BEFORE_APP_SERIALIZED,\n useFactory: serializeTransferStateFactory,\n multi: true,\n },\n];\n\n/** TODO: Move this to a utils folder and convert to use SafeValues. */\nexport function createScript(\n doc: Document,\n textContent: string,\n nonce: string | null,\n): HTMLScriptElement {\n const script = doc.createElement('script');\n script.textContent = textContent;\n if (nonce) {\n script.setAttribute('nonce', nonce);\n }\n\n return script;\n}\n\nfunction warnIfStateTransferHappened(injector: Injector): void {\n const transferStateStatus = injector.get(TRANSFER_STATE_STATUS);\n\n if (transferStateStatus.serialized) {\n console.warn(\n `Angular detected an incompatible configuration, which causes duplicate serialization of the server-side application state.\\n\\n` +\n `This can happen if the server providers have been provided more than once using different mechanisms. For example:\\n\\n` +\n ` imports: [ServerModule], // Registers server providers\\n` +\n ` providers: [provideServerRendering()] // Also registers server providers\\n\\n` +\n `To fix this, ensure that the \\`provideServerRendering()\\` function is the only provider used and remove the other(s).`,\n );\n }\n\n transferStateStatus.serialized = true;\n}\n\nfunction serializeTransferStateFactory() {\n const doc = inject(DOCUMENT);\n const appId = inject(APP_ID);\n const transferStore = inject(TransferState);\n const injector = inject(Injector);\n\n return () => {\n const measuringLabel = 'serializeTransferStateFactory';\n startMeasuring(measuringLabel);\n // The `.toJSON` here causes the `onSerialize` callbacks to be called.\n // These callbacks can be used to provide the value for a given key.\n const content = transferStore.toJson();\n\n if (transferStore.isEmpty) {\n // The state is empty, nothing to transfer,\n // avoid creating an extra `<script>` tag in this case.\n return;\n }\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n warnIfStateTransferHappened(injector);\n }\n\n const script = createScript(\n doc,\n content,\n /**\n * `nonce` is not required for 'application/json'\n * See: https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type\n */\n null,\n );\n script.id = appId + '-state';\n script.setAttribute('type', 'application/json');\n\n // It is intentional that we add the script at the very bottom. Angular CLI script tags for\n // bundles are always `type=\"module\"`. These are deferred by default and cause the\n // transfer data to be queried only after the browser has finished parsing the DOM.\n doc.body.appendChild(script);\n stopMeasuring(measuringLabel);\n };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n DOCUMENT,\n PlatformLocation,\n ViewportScroller,\n ɵgetDOM as getDOM,\n ɵNullViewportScroller as NullViewportScroller,\n ɵPLATFORM_SERVER_ID as PLATFORM_SERVER_ID,\n} from '@angular/common';\nimport {\n createPlatformFactory,\n Injector,\n NgModule,\n PLATFORM_ID,\n PLATFORM_INITIALIZER,\n platformCore,\n PlatformRef,\n Provider,\n Testability,\n ɵsetDocument,\n ɵTESTABILITY as TESTABILITY,\n inject,\n StaticProvider,\n} from '@angular/core';\nimport {\n BrowserModule,\n EVENT_MANAGER_PLUGINS,\n ɵBrowserDomAdapter as BrowserDomAdapter,\n} from '@angular/platform-browser';\n\nimport {DominoAdapter, parseDocument} from './domino_adapter';\nimport {SERVER_HTTP_PROVIDERS} from './http';\nimport {resolveUrl} from './url';\nimport {ServerPlatformLocation} from './location';\nimport {enableDomEmulation, PlatformState} from './platform_state';\nimport {ServerEventManagerPlugin} from './server_events';\nimport {INITIAL_CONFIG, PlatformConfig} from './tokens';\nimport {TRANSFER_STATE_SERIALIZATION_PROVIDERS} from './transfer_state';\n\nexport const INTERNAL_SERVER_PLATFORM_PROVIDERS: StaticProvider[] = [\n {provide: DOCUMENT, useFactory: _document},\n {provide: PLATFORM_ID, useValue: PLATFORM_SERVER_ID},\n {provide: PLATFORM_INITIALIZER, useFactory: initDominoAdapter, multi: true},\n {\n provide: PlatformLocation,\n useClass: ServerPlatformLocation,\n deps: [],\n },\n {provide: PlatformState, deps: [DOCUMENT]},\n];\n\nfunction initDominoAdapter() {\n const injector = inject(Injector);\n const _enableDomEmulation = enableDomEmulation(injector);\n return () => {\n if (_enableDomEmulation) {\n DominoAdapter.makeCurrent();\n } else {\n BrowserDomAdapter.makeCurrent();\n }\n };\n}\n\nexport const SERVER_RENDER_PROVIDERS: Provider[] = [\n {provide: EVENT_MANAGER_PLUGINS, multi: true, useClass: ServerEventManagerPlugin},\n];\n\nexport const PLATFORM_SERVER_PROVIDERS: Provider[] = [\n TRANSFER_STATE_SERIALIZATION_PROVIDERS,\n SERVER_RENDER_PROVIDERS,\n SERVER_HTTP_PROVIDERS,\n {provide: Testability, useValue: null}, // Keep for backwards-compatibility.\n {provide: TESTABILITY, useValue: null},\n {provide: ViewportScroller, useClass: NullViewportScroller},\n];\n\n/**\n * The ng module for the server.\n *\n * @publicApi\n */\n@NgModule({\n exports: [BrowserModule],\n providers: PLATFORM_SERVER_PROVIDERS,\n})\nexport class ServerModule {}\n\nfunction _document() {\n const injector = inject(Injector);\n const config: PlatformConfig | null = injector.get(INITIAL_CONFIG, null);\n const _enableDomEmulation = enableDomEmulation(injector);\n let document: Document;\n if (config && config.document) {\n document =\n typeof config.document === 'string'\n ? _enableDomEmulation\n ? parseDocument(\n config.document,\n config.url !== undefined\n ? resolveUrl(config.url, 'http://localhost').href\n : undefined,\n )\n : window.document\n : config.document;\n } else {\n document = getDOM().createHtmlDocument();\n }\n // Tell ivy about the global document\n ɵsetDocument(document);\n return document;\n}\n\n/**\n * Creates a server-side instance of an Angular platform.\n *\n * This platform should be used when performing server-side rendering of an Angular application.\n * Standalone applications can be bootstrapped on the server using the `bootstrapApplication`\n * function from `@angular/platform-browser`. When using `bootstrapApplication`, the `platformServer`\n * should be created first and passed to the bootstrap function using the `BootstrapContext`.\n *\n * @publicApi\n */\nexport function platformServer(extraProviders?: StaticProvider[] | undefined): PlatformRef {\n const noServerModeSet = typeof ngServerMode === 'undefined';\n if (noServerModeSet) {\n globalThis['ngServerMode'] = true;\n }\n\n const platform = createPlatformFactory(\n platformCore,\n 'server',\n INTERNAL_SERVER_PLATFORM_PROVIDERS,\n )(extraProviders);\n\n if (noServerModeSet) {\n platform.onDestroy(() => {\n globalThis['ngServerMode'] = undefined;\n });\n }\n\n return platform;\n}\n"],"names":["setDomTypes","Object","assign","globalThis","domino","impl","Event","parseDocument","html","url","window","createWindow","doc","document","serializeDocument","serialize","DominoAdapter","BrowserDomAdapter","makeCurrent","setRootDomAdapter","supportsDOMEvents","defaultDoc","createHtmlDocument","getDefaultDocument","createDocument","isElementNode","node","nodeType","ELEMENT_NODE","isShadowRoot","shadowRoot","getGlobalEventTarget","target","defaultView","body","getBaseHref","length","head","children","i","child","tagName","getAttribute","dispatchEvent","el","evt","ownerDocument","win","getUserAgent","getCookie","name","RuntimeError","ngDevMode","INITIAL_CONFIG","InjectionToken","BEFORE_APP_SERIALIZED","ENABLE_DOM_EMULATION","PlatformState","_doc","_enableDomEmulation","enableDomEmulation","inject","Injector","constructor","renderToString","measuringLabel","startMeasuring","rendered","documentElement","outerHTML","stopMeasuring","getDocument","ɵfac","i0","ɵɵngDeclareFactory","minVersion","version","ngImport","type","DOCUMENT","ɵɵFactoryTarget","Injectable","decorators","Inject","injector","get","HTTP_OR_HTTPS_PROTOCOL_REGEX","resolveUrl","urlStr","origin","options","originUrl","URL","trim","resolved","allowProtocolRelative","allowOriginChange","isSafeOriginChange","throwSuspiciousUrlError","canParse","startsWith","test","ServerXhr","xhrImpl","ɵloadImpl","console","warn","default","xhr","build","XMLHttpRequest","deps","URL_SCHEMA_REGEXP","relativeUrlsTransformerInterceptorFn","request","next","trimmedUrl","platformLocation","PlatformLocation","href","protocol","hostname","port","urlPrefix","baseHref","getBaseHrefFromDOM","baseUrl","parsedUrl","clone","toString","SERVER_HTTP_PROVIDERS","provide","XhrFactory","useClass","HTTP_ROOT_INTERCEPTOR_FNS","useValue","multi","ServerPlatformLocation","pathname","search","hash","_hashUpdate","Subject","location","config","optional","getDOM","onPopState","fn","onHashChange","subscription","subscribe","unsubscribe","setHash","value","oldUrl","newUrl","queueMicrotask","state","replaceState","title","writableThis","pushState","forward","Error","back","getState","undefined","ServerEventManagerPlugin","EventManagerPlugin","supports","eventName","addEventListener","element","handler","onAndCancel","TRANSFER_STATE_STATUS","factory","serialized","TRANSFER_STATE_SERIALIZATION_PROVIDERS","useFactory","serializeTransferStateFactory","createScript","textContent","nonce","script","createElement","setAttribute","warnIfStateTransferHappened","transferStateStatus","appId","APP_ID","transferStore","TransferState","content","toJson","isEmpty","id","appendChild","INTERNAL_SERVER_PLATFORM_PROVIDERS","_document","PLATFORM_ID","PLATFORM_SERVER_ID","PLATFORM_INITIALIZER","initDominoAdapter","SERVER_RENDER_PROVIDERS","EVENT_MANAGER_PLUGINS","PLATFORM_SERVER_PROVIDERS","Testability","TESTABILITY","ViewportScroller","NullViewportScroller","ServerModule","NgModule","ɵmod","ɵɵngDeclareNgModule","BrowserModule","providers","imports","args","exports","ɵsetDocument","platformServer","extraProviders","noServerModeSet","ngServerMode","platform","createPlatformFactory","platformCore","onDestroy"],"mappings":";;;;;;;;;;;;;;SAegBA,WAAWA,GAAA;EAGzBC,MAAM,CAACC,MAAM,CAACC,UAAU,EAAEC,MAAM,CAACC,IAAI,CAAC;EACrCF,UAAkB,CAAC,eAAe,CAAC,GAAGC,MAAM,CAACC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AU,CAACyD,MAAM,CAACvI,GAAG,EAAE,kBAAkB,CAAC,CAAC8G,IAAA,GAC3CgD,SAAS,CAAA,GAEf7J,MAAM,CAACG,QAAA,GACTmI,MAAM,CAACnI,QAAQ;AACvB,EAAA,CAAA,MAAO;AACLA,IAAAA,QAAQ,GAAGqI,OAAM,EAAE,CAAC5H,kBAAkB,EAAE;AAC1C,EAAA;EAEAuM,YAAY,CAAChN,QAAQ,CAAC;AACtB,EAAA,OAAOA,QAAQ;AACjB;AAYM,SAAUiN,cAAcA,CAACC,cAA6C,EAAA;AAC1E,EAAA,MAAMC,eAAe,GAAG,OAAOC,YAAY,KAAK,WAAW;AAC3D,EAAA,IAAID,eAAe,EAAE;AACnB7N,IAAAA,UAAU,CAAC,cAAc,CAAC,GAAG,IAAI;AACnC,EAAA;AAEA,EAAA,MAAM+N,QAAQ,GAAGC,qBAAqB,CACpCC,YAAY,EACZ,QAAQ,EACR7B,kCAAkC,CACnC,CAACwB,cAAc,CAAC;AAEjB,EAAA,IAAIC,eAAe,EAAE;IACnBE,QAAQ,CAACG,SAAS,CAAC,MAAK;AACtBlO,MAAAA,UAAU,CAAC,cAAc,CAAC,GAAGoK,SAAS;AACxC,IAAA,CAAC,CAAC;AACJ,EAAA;AAEA,EAAA,OAAO2D,QAAQ;AACjB;;;;"}
|
package/fesm2022/init.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v22.0.
|
|
2
|
+
* @license Angular v22.0.2
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { PLATFORM_SERVER_PROVIDERS, PlatformState, BEFORE_APP_SERIALIZED, resolveUrl, platformServer, INITIAL_CONFIG, createScript } from './_server-chunk.mjs';
|
|
8
8
|
export { ServerModule, DominoAdapter as ɵDominoAdapter, ENABLE_DOM_EMULATION as ɵENABLE_DOM_EMULATION, INTERNAL_SERVER_PLATFORM_PROVIDERS as ɵINTERNAL_SERVER_PLATFORM_PROVIDERS, SERVER_RENDER_PROVIDERS as ɵSERVER_RENDER_PROVIDERS } from './_server-chunk.mjs';
|
|
9
|
-
import { makeEnvironmentProviders, InjectionToken, ɵstartMeasuring as _startMeasuring, ɵstopMeasuring as _stopMeasuring, ApplicationRef, ɵINTERNAL_APPLICATION_ERROR_HANDLER as _INTERNAL_APPLICATION_ERROR_HANDLER, ɵIS_HYDRATION_DOM_REUSE_ENABLED as _IS_HYDRATION_DOM_REUSE_ENABLED, ɵannotateForHydration as _annotateForHydration, CSP_NONCE, APP_ID, Renderer2, ɵSSR_CONTENT_INTEGRITY_MARKER as _SSR_CONTENT_INTEGRITY_MARKER, Version } from '@angular/core';
|
|
9
|
+
import { makeEnvironmentProviders, InjectionToken, ɵstartMeasuring as _startMeasuring, ɵstopMeasuring as _stopMeasuring, ApplicationRef, ɵINTERNAL_APPLICATION_ERROR_HANDLER as _INTERNAL_APPLICATION_ERROR_HANDLER, ɵRuntimeError as _RuntimeError, ɵIS_HYDRATION_DOM_REUSE_ENABLED as _IS_HYDRATION_DOM_REUSE_ENABLED, ɵannotateForHydration as _annotateForHydration, CSP_NONCE, APP_ID, Renderer2, ɵSSR_CONTENT_INTEGRITY_MARKER as _SSR_CONTENT_INTEGRITY_MARKER, Version } from '@angular/core';
|
|
10
10
|
import { ɵHTTP_FETCH_MAX_RESPONSE_SIZE as _HTTP_FETCH_MAX_RESPONSE_SIZE } from '@angular/common/http';
|
|
11
11
|
import '@angular/common';
|
|
12
12
|
import '@angular/platform-browser';
|
|
@@ -205,7 +205,7 @@ function validateAllowedHosts(url, allowedHosts) {
|
|
|
205
205
|
const hostname = parsedUrl.hostname;
|
|
206
206
|
const allowedHostsSet = new Set(allowedHosts);
|
|
207
207
|
if (!isHostAllowed(hostname, allowedHostsSet)) {
|
|
208
|
-
throw new
|
|
208
|
+
throw new _RuntimeError(5706, typeof ngDevMode === 'undefined' || ngDevMode ? `Host ${url} is not allowed. You can configure \`allowedHosts\` option.` : url);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
}
|
|
@@ -226,7 +226,7 @@ function isHostAllowed(hostname, allowedHosts) {
|
|
|
226
226
|
return false;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
const VERSION = /* @__PURE__ */new Version('22.0.
|
|
229
|
+
const VERSION = /* @__PURE__ */new Version('22.0.2');
|
|
230
230
|
|
|
231
231
|
export { BEFORE_APP_SERIALIZED, INITIAL_CONFIG, PlatformState, VERSION, platformServer, provideServerRendering, renderApplication, renderModule, SERVER_CONTEXT as ɵSERVER_CONTEXT, isHostAllowed as ɵisHostAllowed, renderInternal as ɵrenderInternal };
|
|
232
232
|
//# sourceMappingURL=platform-server.mjs.map
|