ngx-ratio-image 0.0.16 → 0.1.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.
- package/.editorconfig +16 -0
- package/.eslintrc.json +38 -0
- package/.github/workflows/node.js.yml +45 -0
- package/.github/workflows/npm-publish.yml +64 -0
- package/.husky/pre-commit +1 -0
- package/.npmrc.bak +2 -0
- package/.nvmrc +1 -0
- package/.prettierignore +2 -0
- package/.run/lint.run.xml +12 -0
- package/.run/test.run.xml +12 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/tasks.json +42 -0
- package/angular.json +167 -0
- package/copyVersion.js +40 -0
- package/dist/ngx-ratio-image/LICENSE +21 -0
- package/dist/ngx-ratio-image/README.md +27 -0
- package/dist/ngx-ratio-image/esm2022/lib/ratio-image/ratio-image.component.mjs +77 -0
- package/{esm2022 → dist/ngx-ratio-image/esm2022}/lib/ratio-image.module.mjs +5 -5
- package/{fesm2022 → dist/ngx-ratio-image/fesm2022}/ngx-ratio-image.mjs +9 -9
- package/{fesm2022 → dist/ngx-ratio-image/fesm2022}/ngx-ratio-image.mjs.map +1 -1
- package/dist/ratio-image-app/3rdpartylicenses.txt +363 -0
- package/dist/ratio-image-app/assets/1to1.jpg +0 -0
- package/dist/ratio-image-app/assets/3to4.jpg +0 -0
- package/dist/ratio-image-app/assets/4to3.jpg +0 -0
- package/dist/ratio-image-app/favicon.ico +0 -0
- package/dist/ratio-image-app/index.html +16 -0
- package/dist/ratio-image-app/main.cd7d3f0091564799.js +1 -0
- package/dist/ratio-image-app/polyfills.89916ba7b8964ab6.js +1 -0
- package/dist/ratio-image-app/runtime.404a4a95eb22c4fe.js +1 -0
- package/dist/ratio-image-app/styles.0a5653d1595871d1.css +1 -0
- package/ng-package.json +8 -0
- package/package.json +96 -45
- package/prettier.config.js +16 -0
- package/projects/ngx-ratio-image/.eslintrc.json +31 -0
- package/projects/ngx-ratio-image/LICENSE +21 -0
- package/projects/ngx-ratio-image/README.md +27 -0
- package/projects/ngx-ratio-image/ng-package.json +7 -0
- package/projects/ngx-ratio-image/node_modules/.package-lock.json +14 -0
- package/projects/ngx-ratio-image/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/projects/ngx-ratio-image/node_modules/tslib/LICENSE.txt +12 -0
- package/projects/ngx-ratio-image/node_modules/tslib/README.md +164 -0
- package/projects/ngx-ratio-image/node_modules/tslib/SECURITY.md +41 -0
- package/projects/ngx-ratio-image/node_modules/tslib/modules/index.d.ts +38 -0
- package/projects/ngx-ratio-image/node_modules/tslib/modules/index.js +70 -0
- package/projects/ngx-ratio-image/node_modules/tslib/modules/package.json +3 -0
- package/projects/ngx-ratio-image/node_modules/tslib/package.json +47 -0
- package/projects/ngx-ratio-image/node_modules/tslib/tslib.d.ts +460 -0
- package/projects/ngx-ratio-image/node_modules/tslib/tslib.es6.html +1 -0
- package/projects/ngx-ratio-image/node_modules/tslib/tslib.es6.js +402 -0
- package/projects/ngx-ratio-image/node_modules/tslib/tslib.es6.mjs +401 -0
- package/projects/ngx-ratio-image/node_modules/tslib/tslib.html +1 -0
- package/projects/ngx-ratio-image/node_modules/tslib/tslib.js +484 -0
- package/projects/ngx-ratio-image/package-lock.json +26 -0
- package/projects/ngx-ratio-image/package.json +34 -0
- package/projects/ngx-ratio-image/src/lib/ratio-image/ratio-image.component.html +42 -0
- package/projects/ngx-ratio-image/src/lib/ratio-image/ratio-image.component.spec.ts +21 -0
- package/projects/ngx-ratio-image/src/lib/ratio-image/ratio-image.component.ts +75 -0
- package/projects/ngx-ratio-image/src/lib/ratio-image.module.ts +10 -0
- package/projects/ngx-ratio-image/src/public-api.ts +6 -0
- package/projects/ngx-ratio-image/tsconfig.lib.json +12 -0
- package/projects/ngx-ratio-image/tsconfig.lib.prod.json +10 -0
- package/projects/ngx-ratio-image/tsconfig.spec.json +9 -0
- package/projects/ratio-image-app/.eslintrc.json +31 -0
- package/projects/ratio-image-app/src/app/app-routing.module.ts +26 -0
- package/projects/ratio-image-app/src/app/app.component.html +14 -0
- package/projects/ratio-image-app/src/app/app.component.scss +25 -0
- package/projects/ratio-image-app/src/app/app.component.spec.ts +38 -0
- package/projects/ratio-image-app/src/app/app.component.ts +19 -0
- package/projects/ratio-image-app/src/app/app.module.ts +33 -0
- package/projects/ratio-image-app/src/app/header.component.html +10 -0
- package/projects/ratio-image-app/src/app/header.component.scss +25 -0
- package/projects/ratio-image-app/src/app/header.component.spec.ts +35 -0
- package/projects/ratio-image-app/src/app/header.component.ts +13 -0
- package/projects/ratio-image-app/src/app/home/home-routing.module.ts +17 -0
- package/projects/ratio-image-app/src/app/home/home.component.html +24 -0
- package/projects/ratio-image-app/src/app/home/home.component.scss +0 -0
- package/projects/ratio-image-app/src/app/home/home.component.spec.ts +24 -0
- package/projects/ratio-image-app/src/app/home/home.component.ts +12 -0
- package/projects/ratio-image-app/src/app/home/home.module.ts +14 -0
- package/projects/ratio-image-app/src/app/interactive/interactive-routing.module.ts +17 -0
- package/projects/ratio-image-app/src/app/interactive/interactive.component.html +40 -0
- package/projects/ratio-image-app/src/app/interactive/interactive.component.scss +0 -0
- package/projects/ratio-image-app/src/app/interactive/interactive.component.spec.ts +43 -0
- package/projects/ratio-image-app/src/app/interactive/interactive.component.ts +32 -0
- package/projects/ratio-image-app/src/app/interactive/interactive.module.ts +31 -0
- package/projects/ratio-image-app/src/assets/.gitkeep +0 -0
- package/projects/ratio-image-app/src/assets/1to1.jpg +0 -0
- package/projects/ratio-image-app/src/assets/3to4.jpg +0 -0
- package/projects/ratio-image-app/src/assets/4to3.jpg +0 -0
- package/projects/ratio-image-app/src/favicon.ico +0 -0
- package/projects/ratio-image-app/src/index.html +16 -0
- package/projects/ratio-image-app/src/main.ts +7 -0
- package/projects/ratio-image-app/src/styles.scss +15 -0
- package/projects/ratio-image-app/tsconfig.app.json +10 -0
- package/projects/ratio-image-app/tsconfig.spec.json +9 -0
- package/tsconfig.json +33 -0
- package/esm2022/lib/ratio-image/ratio-image.component.mjs +0 -77
- /package/{esm2022 → dist/ngx-ratio-image/esm2022}/ngx-ratio-image.mjs +0 -0
- /package/{esm2022 → dist/ngx-ratio-image/esm2022}/public-api.mjs +0 -0
- /package/{index.d.ts → dist/ngx-ratio-image/index.d.ts} +0 -0
- /package/{lib → dist/ngx-ratio-image/lib}/ratio-image/ratio-image.component.d.ts +0 -0
- /package/{lib → dist/ngx-ratio-image/lib}/ratio-image.module.d.ts +0 -0
- /package/{public-api.d.ts → dist/ngx-ratio-image/public-api.d.ts} +0 -0
package/.editorconfig
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Editor configuration, see https://editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
charset = utf-8
|
|
6
|
+
indent_style = tab
|
|
7
|
+
indent_size = 4
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
|
|
11
|
+
[*.ts]
|
|
12
|
+
quote_type = single
|
|
13
|
+
|
|
14
|
+
[*.md]
|
|
15
|
+
max_line_length = off
|
|
16
|
+
trim_trailing_whitespace = false
|
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"ignorePatterns": ["projects/**/*"],
|
|
4
|
+
"overrides": [
|
|
5
|
+
{
|
|
6
|
+
"files": ["*.ts"],
|
|
7
|
+
"extends": [
|
|
8
|
+
"eslint:recommended",
|
|
9
|
+
"plugin:@typescript-eslint/recommended",
|
|
10
|
+
"plugin:@angular-eslint/recommended",
|
|
11
|
+
"plugin:@angular-eslint/template/process-inline-templates"
|
|
12
|
+
],
|
|
13
|
+
"rules": {
|
|
14
|
+
"@angular-eslint/directive-selector": [
|
|
15
|
+
"error",
|
|
16
|
+
{
|
|
17
|
+
"type": "attribute",
|
|
18
|
+
"prefix": "",
|
|
19
|
+
"style": "camelCase"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"@angular-eslint/component-selector": [
|
|
23
|
+
"error",
|
|
24
|
+
{
|
|
25
|
+
"type": "element",
|
|
26
|
+
"prefix": "",
|
|
27
|
+
"style": "kebab-case"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"files": ["*.html"],
|
|
34
|
+
"extends": ["plugin:@angular-eslint/template/recommended", "plugin:@angular-eslint/template/accessibility"],
|
|
35
|
+
"rules": {}
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
|
|
3
|
+
|
|
4
|
+
name: Node.js CI
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
push:
|
|
9
|
+
branches: ['main']
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: ['main']
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
CI: true
|
|
15
|
+
DISPLAY: ':10.0'
|
|
16
|
+
CHROME_BIN: '/usr/bin/chromium'
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build:
|
|
20
|
+
runs-on: ubuntu-22.04
|
|
21
|
+
timeout-minutes: 5
|
|
22
|
+
strategy:
|
|
23
|
+
matrix:
|
|
24
|
+
node-version: [ 18.x, 20.x ]
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v3
|
|
28
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
29
|
+
uses: actions/setup-node@v3
|
|
30
|
+
with:
|
|
31
|
+
node-version: ${{ matrix.node-version }}
|
|
32
|
+
cache: 'npm'
|
|
33
|
+
- name: Setup Chrome
|
|
34
|
+
uses: browser-actions/setup-chrome@v1.7.3
|
|
35
|
+
- run: npm ci
|
|
36
|
+
- run: npm run build --if-present
|
|
37
|
+
- run: npm run test:ci
|
|
38
|
+
|
|
39
|
+
# NEU: Lädt das fertige Paket hoch, sobald die Tests bestanden sind (nur für Node 20)
|
|
40
|
+
- name: Save the Lib dist folder for inspection
|
|
41
|
+
if: matrix.node-version == '20.x'
|
|
42
|
+
uses: actions/upload-artifact@v4
|
|
43
|
+
with:
|
|
44
|
+
name: ngx-ratio-image
|
|
45
|
+
path: dist/ngx-ratio-image
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: Node.js Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [ created ]
|
|
6
|
+
|
|
7
|
+
env:
|
|
8
|
+
CI: true
|
|
9
|
+
DISPLAY: ':10.0'
|
|
10
|
+
CHROME_BIN: '/usr/bin/chromium'
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
runs-on: ubuntu-22.04
|
|
15
|
+
timeout-minutes: 10
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Setup Node.js
|
|
21
|
+
uses: actions/setup-node@v4
|
|
22
|
+
with:
|
|
23
|
+
node-version: 20
|
|
24
|
+
cache: 'npm'
|
|
25
|
+
|
|
26
|
+
- run: npm ci
|
|
27
|
+
- run: npm run build
|
|
28
|
+
|
|
29
|
+
# Das gebaute Paket temporär zwischenspeichern
|
|
30
|
+
- name: Save the Lib dist folder
|
|
31
|
+
uses: actions/upload-artifact@v4
|
|
32
|
+
with:
|
|
33
|
+
name: ngx-ratio-image
|
|
34
|
+
path: dist/ngx-ratio-image
|
|
35
|
+
|
|
36
|
+
- name: Setup Chrome
|
|
37
|
+
uses: browser-actions/setup-chrome@v1
|
|
38
|
+
- run: npm run test:ci
|
|
39
|
+
|
|
40
|
+
publish-npm:
|
|
41
|
+
needs: build
|
|
42
|
+
runs-on: ubuntu-22.04
|
|
43
|
+
steps:
|
|
44
|
+
- name: Checkout
|
|
45
|
+
uses: actions/checkout@v4
|
|
46
|
+
|
|
47
|
+
- name: Setup Node.js
|
|
48
|
+
uses: actions/setup-node@v4
|
|
49
|
+
with:
|
|
50
|
+
node-version: 20
|
|
51
|
+
registry-url: https://registry.npmjs.org/
|
|
52
|
+
|
|
53
|
+
# Holt das fertige Build-Ergebnis aus dem "build"-Job ab
|
|
54
|
+
- name: Download Built Package
|
|
55
|
+
uses: actions/download-artifact@v4
|
|
56
|
+
with:
|
|
57
|
+
name: ngx-ratio-image
|
|
58
|
+
path: ./dist-package
|
|
59
|
+
|
|
60
|
+
# Veröffentlicht das Paket mit korrekt geschriebenem Secret
|
|
61
|
+
- name: Publish to NPM
|
|
62
|
+
run: npm publish ./dist-package
|
|
63
|
+
env:
|
|
64
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
echo pre-commit
|
package/.npmrc.bak
ADDED
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
20
|
package/.prettierignore
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<component name="ProjectRunConfigurationManager">
|
|
2
|
+
<configuration default="false" name="lint" type="js.build_tools.npm" singleton="false" nameIsGenerated="true">
|
|
3
|
+
<package-json value="$PROJECT_DIR$/package.json" />
|
|
4
|
+
<command value="run" />
|
|
5
|
+
<scripts>
|
|
6
|
+
<script value="lint" />
|
|
7
|
+
</scripts>
|
|
8
|
+
<node-interpreter value="project" />
|
|
9
|
+
<envs />
|
|
10
|
+
<method v="2" />
|
|
11
|
+
</configuration>
|
|
12
|
+
</component>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<component name="ProjectRunConfigurationManager">
|
|
2
|
+
<configuration default="false" name="test" type="js.build_tools.npm" singleton="false" nameIsGenerated="true">
|
|
3
|
+
<package-json value="$PROJECT_DIR$/package.json" />
|
|
4
|
+
<command value="run" />
|
|
5
|
+
<scripts>
|
|
6
|
+
<script value="test" />
|
|
7
|
+
</scripts>
|
|
8
|
+
<node-interpreter value="project" />
|
|
9
|
+
<envs />
|
|
10
|
+
<method v="2" />
|
|
11
|
+
</configuration>
|
|
12
|
+
</component>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"configurations": [
|
|
5
|
+
{
|
|
6
|
+
"name": "ng serve",
|
|
7
|
+
"type": "chrome",
|
|
8
|
+
"request": "launch",
|
|
9
|
+
"preLaunchTask": "npm: start",
|
|
10
|
+
"url": "http://localhost:4200/"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "ng test",
|
|
14
|
+
"type": "chrome",
|
|
15
|
+
"request": "launch",
|
|
16
|
+
"preLaunchTask": "npm: test",
|
|
17
|
+
"url": "http://localhost:9876/debug.html"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"tasks": [
|
|
5
|
+
{
|
|
6
|
+
"type": "npm",
|
|
7
|
+
"script": "start",
|
|
8
|
+
"isBackground": true,
|
|
9
|
+
"problemMatcher": {
|
|
10
|
+
"owner": "typescript",
|
|
11
|
+
"pattern": "$tsc",
|
|
12
|
+
"background": {
|
|
13
|
+
"activeOnStart": true,
|
|
14
|
+
"beginsPattern": {
|
|
15
|
+
"regexp": "(.*?)"
|
|
16
|
+
},
|
|
17
|
+
"endsPattern": {
|
|
18
|
+
"regexp": "bundle generation complete"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "npm",
|
|
25
|
+
"script": "test",
|
|
26
|
+
"isBackground": true,
|
|
27
|
+
"problemMatcher": {
|
|
28
|
+
"owner": "typescript",
|
|
29
|
+
"pattern": "$tsc",
|
|
30
|
+
"background": {
|
|
31
|
+
"activeOnStart": true,
|
|
32
|
+
"beginsPattern": {
|
|
33
|
+
"regexp": "(.*?)"
|
|
34
|
+
},
|
|
35
|
+
"endsPattern": {
|
|
36
|
+
"regexp": "bundle generation complete"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
package/angular.json
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"cli": {
|
|
5
|
+
"packageManager": "npm",
|
|
6
|
+
"schematicCollections": [
|
|
7
|
+
"@angular-eslint/schematics"
|
|
8
|
+
],
|
|
9
|
+
"analytics": false
|
|
10
|
+
},
|
|
11
|
+
"newProjectRoot": "projects",
|
|
12
|
+
"projects": {
|
|
13
|
+
"ratioImageApp": {
|
|
14
|
+
"projectType": "application",
|
|
15
|
+
"schematics": {
|
|
16
|
+
"@schematics/angular:component": {
|
|
17
|
+
"style": "scss"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"root": "projects/ratio-image-app",
|
|
21
|
+
"sourceRoot": "projects/ratio-image-app/src",
|
|
22
|
+
"prefix": "app",
|
|
23
|
+
"architect": {
|
|
24
|
+
"build": {
|
|
25
|
+
"builder": "@angular-devkit/build-angular:browser",
|
|
26
|
+
"options": {
|
|
27
|
+
"outputPath": "dist/ratio-image-app",
|
|
28
|
+
"index": "projects/ratio-image-app/src/index.html",
|
|
29
|
+
"main": "projects/ratio-image-app/src/main.ts",
|
|
30
|
+
"polyfills": [
|
|
31
|
+
"zone.js"
|
|
32
|
+
],
|
|
33
|
+
"tsConfig": "projects/ratio-image-app/tsconfig.app.json",
|
|
34
|
+
"inlineStyleLanguage": "scss",
|
|
35
|
+
"assets": [
|
|
36
|
+
"projects/ratio-image-app/src/favicon.ico",
|
|
37
|
+
"projects/ratio-image-app/src/assets"
|
|
38
|
+
],
|
|
39
|
+
"styles": [
|
|
40
|
+
"@angular/material/prebuilt-themes/pink-bluegrey.css",
|
|
41
|
+
"projects/ratio-image-app/src/styles.scss"
|
|
42
|
+
],
|
|
43
|
+
"scripts": []
|
|
44
|
+
},
|
|
45
|
+
"configurations": {
|
|
46
|
+
"production": {
|
|
47
|
+
"budgets": [
|
|
48
|
+
{
|
|
49
|
+
"type": "initial",
|
|
50
|
+
"maximumWarning": "500kb",
|
|
51
|
+
"maximumError": "1mb"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "anyComponentStyle",
|
|
55
|
+
"maximumWarning": "2kb",
|
|
56
|
+
"maximumError": "4kb"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"outputHashing": "all"
|
|
60
|
+
},
|
|
61
|
+
"development": {
|
|
62
|
+
"buildOptimizer": false,
|
|
63
|
+
"optimization": false,
|
|
64
|
+
"vendorChunk": true,
|
|
65
|
+
"extractLicenses": false,
|
|
66
|
+
"sourceMap": true,
|
|
67
|
+
"namedChunks": true
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"defaultConfiguration": "production"
|
|
71
|
+
},
|
|
72
|
+
"serve": {
|
|
73
|
+
"builder": "@angular-devkit/build-angular:dev-server",
|
|
74
|
+
"configurations": {
|
|
75
|
+
"production": {
|
|
76
|
+
"buildTarget": "ratioImageApp:build:production"
|
|
77
|
+
},
|
|
78
|
+
"development": {
|
|
79
|
+
"buildTarget": "ratioImageApp:build:development"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"options": {
|
|
83
|
+
"port": 4202
|
|
84
|
+
},
|
|
85
|
+
"defaultConfiguration": "development"
|
|
86
|
+
},
|
|
87
|
+
"extract-i18n": {
|
|
88
|
+
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
89
|
+
"options": {
|
|
90
|
+
"buildTarget": "ratioImageApp:build"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"test": {
|
|
94
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
95
|
+
"options": {
|
|
96
|
+
"polyfills": [
|
|
97
|
+
"zone.js",
|
|
98
|
+
"zone.js/testing"
|
|
99
|
+
],
|
|
100
|
+
"tsConfig": "projects/ratio-image-app/tsconfig.spec.json",
|
|
101
|
+
"inlineStyleLanguage": "scss",
|
|
102
|
+
"assets": [
|
|
103
|
+
"projects/ratio-image-app/src/favicon.ico",
|
|
104
|
+
"projects/ratio-image-app/src/assets"
|
|
105
|
+
],
|
|
106
|
+
"styles": [
|
|
107
|
+
"@angular/material/prebuilt-themes/pink-bluegrey.css",
|
|
108
|
+
"projects/ratio-image-app/src/styles.scss"
|
|
109
|
+
],
|
|
110
|
+
"scripts": []
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"lint": {
|
|
114
|
+
"builder": "@angular-eslint/builder:lint",
|
|
115
|
+
"options": {
|
|
116
|
+
"lintFilePatterns": [
|
|
117
|
+
"projects/ratio-image-app/**/*.ts",
|
|
118
|
+
"projects/ratio-image-app/**/*.html"
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"ratioImage": {
|
|
125
|
+
"projectType": "library",
|
|
126
|
+
"root": "projects/ngx-ratio-image",
|
|
127
|
+
"sourceRoot": "projects/ngx-ratio-image/src",
|
|
128
|
+
"prefix": "lib",
|
|
129
|
+
"architect": {
|
|
130
|
+
"build": {
|
|
131
|
+
"builder": "@angular-devkit/build-angular:ng-packagr",
|
|
132
|
+
"options": {
|
|
133
|
+
"project": "projects/ngx-ratio-image/ng-package.json"
|
|
134
|
+
},
|
|
135
|
+
"configurations": {
|
|
136
|
+
"production": {
|
|
137
|
+
"tsConfig": "projects/ngx-ratio-image/tsconfig.lib.prod.json"
|
|
138
|
+
},
|
|
139
|
+
"development": {
|
|
140
|
+
"tsConfig": "projects/ngx-ratio-image/tsconfig.lib.json"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"defaultConfiguration": "production"
|
|
144
|
+
},
|
|
145
|
+
"test": {
|
|
146
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
147
|
+
"options": {
|
|
148
|
+
"tsConfig": "projects/ngx-ratio-image/tsconfig.spec.json",
|
|
149
|
+
"polyfills": [
|
|
150
|
+
"zone.js",
|
|
151
|
+
"zone.js/testing"
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"lint": {
|
|
156
|
+
"builder": "@angular-eslint/builder:lint",
|
|
157
|
+
"options": {
|
|
158
|
+
"lintFilePatterns": [
|
|
159
|
+
"projects/ngx-ratio-image/**/*.ts",
|
|
160
|
+
"projects/ngx-ratio-image/**/*.html"
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
package/copyVersion.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
// Pfade zu den package.json-Dateien
|
|
5
|
+
const mainPackagePath = path.join(__dirname, 'package.json');
|
|
6
|
+
const libPackagePath = path.join(__dirname, 'projects', 'ngx-ratio-image', 'package.json');
|
|
7
|
+
|
|
8
|
+
// Funktion zum Lesen und Parsen der package.json-Dateien
|
|
9
|
+
function readPackageJson(filePath) {
|
|
10
|
+
return JSON.parse(fs.readFileSync(filePath, 'utf8'));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Funktion zum Schreiben der aktualisierten package.json-Dateien
|
|
14
|
+
function writePackageJson(filePath, data) {
|
|
15
|
+
fs.writeFileSync(filePath, JSON.stringify(data, null, 2), 'utf8');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Funktion zur Erhöhung der Version
|
|
19
|
+
function incrementVersion(version) {
|
|
20
|
+
const versionParts = version.split('.').map(Number);
|
|
21
|
+
versionParts[2] += 1; // Patch-Version erhöhen
|
|
22
|
+
return versionParts.join('.');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Hauptlogik
|
|
26
|
+
function copyVersions() {
|
|
27
|
+
// Haupt-package.json lesen und Version hochsetzen
|
|
28
|
+
const mainPackageJson = readPackageJson(mainPackagePath);
|
|
29
|
+
const newVersion = mainPackageJson.version;
|
|
30
|
+
|
|
31
|
+
// lib/package.json lesen und Version synchronisieren
|
|
32
|
+
const libPackageJson = readPackageJson(libPackagePath);
|
|
33
|
+
libPackageJson.version = newVersion;
|
|
34
|
+
writePackageJson(libPackagePath, libPackageJson);
|
|
35
|
+
|
|
36
|
+
console.log(`Version updated to ${newVersion} in both package.json files.`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Skript ausführen
|
|
40
|
+
copyVersions();
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 gerd-siebert
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# RatioImage
|
|
2
|
+
|
|
3
|
+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.1.0.
|
|
4
|
+
|
|
5
|
+
## Development server
|
|
6
|
+
|
|
7
|
+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
|
|
8
|
+
|
|
9
|
+
## Code scaffolding
|
|
10
|
+
|
|
11
|
+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
|
|
12
|
+
|
|
13
|
+
## Build
|
|
14
|
+
|
|
15
|
+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
16
|
+
|
|
17
|
+
## Running unit tests
|
|
18
|
+
|
|
19
|
+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
20
|
+
|
|
21
|
+
## Running end-to-end tests
|
|
22
|
+
|
|
23
|
+
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
|
|
24
|
+
|
|
25
|
+
## Further help
|
|
26
|
+
|
|
27
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/common";
|
|
4
|
+
export class RatioImageComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.src = '';
|
|
7
|
+
this.width = 0;
|
|
8
|
+
this.height = 0;
|
|
9
|
+
this.debug = false;
|
|
10
|
+
this.imageWidth = 0;
|
|
11
|
+
this.imageHeight = 0;
|
|
12
|
+
this.naturalWidth = 0;
|
|
13
|
+
this.naturalHeight = 0;
|
|
14
|
+
this.imageLeft = 0;
|
|
15
|
+
this.imageTop = 0;
|
|
16
|
+
this.ratioImage = 1;
|
|
17
|
+
this.ratioBox = 1;
|
|
18
|
+
this.scale = 1;
|
|
19
|
+
if (this.debug)
|
|
20
|
+
console.log('constructor', this.src);
|
|
21
|
+
}
|
|
22
|
+
ngAfterViewInit() {
|
|
23
|
+
if (this.debug)
|
|
24
|
+
console.log('ngAfterViewInit', this.src, this.width, this.height);
|
|
25
|
+
}
|
|
26
|
+
onImageLoad(img) {
|
|
27
|
+
if (this.debug)
|
|
28
|
+
console.log('onImageLoad ', img);
|
|
29
|
+
if (img) {
|
|
30
|
+
this.naturalWidth = img.naturalWidth;
|
|
31
|
+
this.naturalHeight = img.naturalHeight;
|
|
32
|
+
if (this.width > 0 && this.height > 0) {
|
|
33
|
+
this.calculate();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
ngOnChanges() {
|
|
38
|
+
this.calculate();
|
|
39
|
+
}
|
|
40
|
+
calculate() {
|
|
41
|
+
this.ratioImage = this.naturalWidth / this.naturalHeight;
|
|
42
|
+
this.ratioBox = this.width / this.height;
|
|
43
|
+
if (this.ratioBox > this.ratioImage) {
|
|
44
|
+
this.scale = this.height / this.naturalHeight;
|
|
45
|
+
this.imageLeft = (this.width - this.naturalWidth * this.scale) / 2;
|
|
46
|
+
}
|
|
47
|
+
else if (this.ratioBox < this.ratioImage) {
|
|
48
|
+
this.scale = this.width / this.naturalWidth;
|
|
49
|
+
this.imageTop = (this.height - this.naturalHeight * this.scale) / 2;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
this.scale = this.width / this.naturalWidth;
|
|
53
|
+
this.imageLeft = 0;
|
|
54
|
+
this.imageTop = 0;
|
|
55
|
+
}
|
|
56
|
+
if (this.debug)
|
|
57
|
+
console.log('calculate', this.src, this.naturalWidth + ' x ' + this.naturalHeight);
|
|
58
|
+
}
|
|
59
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RatioImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
60
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: RatioImageComponent, selector: "ngx-ratio-image", inputs: { src: "src", width: "width", height: "height", debug: "debug" }, usesOnChanges: true, ngImport: i0, template: "<div\n\t[style.position]=\"'relative'\"\n\t[style.z-index]=\"2\"\n\t[style.border]=\"debug ? '1px solid red' : ''\"\n\t[style.width]=\"width + 'px'\"\n\t[style.height]=\"height + 'px'\"\n>\n\t<img\n\t\tclass=\"img-background\"\n\t\t#img\n\t\t[src]=\"src\"\n\t\t[style.position]=\"'absolute'\"\n\t\t[style.z-index]=\"1\"\n\t\t[style.filter]=\"'blur(5px)'\"\n\t\t[style.opacity]=\"0.5\"\n\t\t[width]=\"width\"\n\t\t[height]=\"height\"\n\t\t[style.overflow]=\"'hidden'\"\n\t\t(load)=\"onImageLoad(img)\"\n\t\talt=\"\"\n\t/>\n\t<img\n\t\tclass=\"img-main\"\n\t\t[src]=\"src\"\n\t\t[width]=\"naturalWidth * scale\"\n\t\t[height]=\"naturalHeight * scale\"\n\t\t[style.position]=\"'absolute'\"\n\t\t[style.z-index]=\"2\"\n\t\t[style.left]=\"imageLeft + 'px'\"\n\t\t[style.top]=\"imageTop + 'px'\"\n\t\talt=\"\"\n\t/>\n</div>\n<div *ngIf=\"debug\" style=\"margin-top: 10px\">\n\t<div>Container: {{ width }} x {{ height }}</div>\n\t<div>Natural: {{ naturalWidth }} x {{ naturalHeight }}</div>\n\t<div>Pos: {{ imageLeft }} , {{ imageTop }}</div>\n\t<div>Scale: {{ scale | number: '0.0-2' }}</div>\n\t<div>\n\t\tRatio Box , Image: {{ this.ratioBox | number: '0.0-2' }} : 1 , {{ this.ratioImage | number: '0.0-2' }} : 1\n\t</div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }] }); }
|
|
61
|
+
}
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RatioImageComponent, decorators: [{
|
|
63
|
+
type: Component,
|
|
64
|
+
args: [{ selector: 'ngx-ratio-image', template: "<div\n\t[style.position]=\"'relative'\"\n\t[style.z-index]=\"2\"\n\t[style.border]=\"debug ? '1px solid red' : ''\"\n\t[style.width]=\"width + 'px'\"\n\t[style.height]=\"height + 'px'\"\n>\n\t<img\n\t\tclass=\"img-background\"\n\t\t#img\n\t\t[src]=\"src\"\n\t\t[style.position]=\"'absolute'\"\n\t\t[style.z-index]=\"1\"\n\t\t[style.filter]=\"'blur(5px)'\"\n\t\t[style.opacity]=\"0.5\"\n\t\t[width]=\"width\"\n\t\t[height]=\"height\"\n\t\t[style.overflow]=\"'hidden'\"\n\t\t(load)=\"onImageLoad(img)\"\n\t\talt=\"\"\n\t/>\n\t<img\n\t\tclass=\"img-main\"\n\t\t[src]=\"src\"\n\t\t[width]=\"naturalWidth * scale\"\n\t\t[height]=\"naturalHeight * scale\"\n\t\t[style.position]=\"'absolute'\"\n\t\t[style.z-index]=\"2\"\n\t\t[style.left]=\"imageLeft + 'px'\"\n\t\t[style.top]=\"imageTop + 'px'\"\n\t\talt=\"\"\n\t/>\n</div>\n<div *ngIf=\"debug\" style=\"margin-top: 10px\">\n\t<div>Container: {{ width }} x {{ height }}</div>\n\t<div>Natural: {{ naturalWidth }} x {{ naturalHeight }}</div>\n\t<div>Pos: {{ imageLeft }} , {{ imageTop }}</div>\n\t<div>Scale: {{ scale | number: '0.0-2' }}</div>\n\t<div>\n\t\tRatio Box , Image: {{ this.ratioBox | number: '0.0-2' }} : 1 , {{ this.ratioImage | number: '0.0-2' }} : 1\n\t</div>\n</div>\n" }]
|
|
65
|
+
}], ctorParameters: () => [], propDecorators: { src: [{
|
|
66
|
+
type: Input,
|
|
67
|
+
args: [{ required: true }]
|
|
68
|
+
}], width: [{
|
|
69
|
+
type: Input,
|
|
70
|
+
args: [{ required: true }]
|
|
71
|
+
}], height: [{
|
|
72
|
+
type: Input,
|
|
73
|
+
args: [{ required: true }]
|
|
74
|
+
}], debug: [{
|
|
75
|
+
type: Input
|
|
76
|
+
}] } });
|
|
77
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmF0aW8taW1hZ2UuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXJhdGlvLWltYWdlL3NyYy9saWIvcmF0aW8taW1hZ2UvcmF0aW8taW1hZ2UuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXJhdGlvLWltYWdlL3NyYy9saWIvcmF0aW8taW1hZ2UvcmF0aW8taW1hZ2UuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFpQixTQUFTLEVBQUUsS0FBSyxFQUFhLE1BQU0sZUFBZSxDQUFDOzs7QUFjM0UsTUFBTSxPQUFPLG1CQUFtQjtJQW1CL0I7UUFsQmtDLFFBQUcsR0FBRyxFQUFFLENBQUM7UUFDVCxVQUFLLEdBQUcsQ0FBQyxDQUFDO1FBQ1YsV0FBTSxHQUFHLENBQUMsQ0FBQztRQUM3QixVQUFLLEdBQUcsS0FBSyxDQUFDO1FBRXZCLGVBQVUsR0FBRyxDQUFDLENBQUM7UU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CJuYXR1cmFsSGVpZ2h0ICogc2NhbGVcIlxuXHRcdFtzdHlsZS5wb3NpdGlvbl09XCInYWJzb2x1dGUnXCJcblx0XHRbc3R5bGUuei1pbmRleF09XCIyXCJcblx0XHRbc3R5bGUubGVmdF09XCJpbWFnZUxlZnQgKyAncHgnXCJcblx0XHRbc3R5bGUudG9wXT1cImltYWdlVG9wICsgJ3B4J1wiXG5cdFx0YWx0PVwiXCJcblx0Lz5cbjwvZGl2PlxuPGRpdiAqbmdJZj1cImRlYnVnXCIgc3R5bGU9XCJtYXJnaW4tdG9wOiAxMHB4XCI+XG5cdDxkaXY+Q29udGFpbmVyOiB7eyB3aWR0aCB9fSB4IHt7IGhlaWdodCB9fTwvZGl2PlxuXHQ8ZGl2Pk5hdHVyYWw6IHt7IG5hdHVyYWxXaWR0aCB9fSB4IHt7IG5hdHVyYWxIZWlnaHQgfX08L2Rpdj5cblx0PGRpdj5Qb3M6IHt7IGltYWdlTGVmdCB9fSAsIHt7IGltYWdlVG9wIH19PC9kaXY+XG5cdDxkaXY+U2NhbGU6IHt7IHNjYWxlIHwgbnVtYmVyOiAnMC4wLTInIH19PC9kaXY+XG5cdDxkaXY+XG5cdFx0UmF0aW8gQm94ICwgSW1hZ2U6IHt7IHRoaXMucmF0aW9Cb3ggfCBudW1iZXI6ICcwLjAtMicgfX0gOiAxICwge3sgdGhpcy5yYXRpb0ltYWdlIHwgbnVtYmVyOiAnMC4wLTInIH19IDogMVxuXHQ8L2Rpdj5cbjwvZGl2PlxuIl19
|
|
@@ -3,11 +3,11 @@ import { RatioImageComponent } from './ratio-image/ratio-image.component';
|
|
|
3
3
|
import { DecimalPipe, NgIf } from '@angular/common';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export class RatioImageModule {
|
|
6
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
8
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
6
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RatioImageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: RatioImageModule, declarations: [RatioImageComponent], imports: [NgIf, DecimalPipe], exports: [RatioImageComponent] }); }
|
|
8
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RatioImageModule }); }
|
|
9
9
|
}
|
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RatioImageModule, decorators: [{
|
|
11
11
|
type: NgModule,
|
|
12
12
|
args: [{
|
|
13
13
|
declarations: [RatioImageComponent],
|
|
@@ -15,4 +15,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
15
15
|
exports: [RatioImageComponent]
|
|
16
16
|
}]
|
|
17
17
|
}] });
|
|
18
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmF0aW8taW1hZ2UubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXJhdGlvLWltYWdlL3NyYy9saWIvcmF0aW8taW1hZ2UubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLG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