angular2-credit-card-draw 1.0.8 → 2.0.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/.storybook/main.ts +12 -0
- package/.storybook/preview.ts +15 -0
- package/.storybook/tsconfig.json +7 -0
- package/.travis.yml +6 -4
- package/README.MD +132 -87
- package/dist/angular2-credit-card-draw/README.MD +132 -0
- package/dist/angular2-credit-card-draw/fesm2022/angular2-credit-card-draw.mjs +60 -0
- package/dist/angular2-credit-card-draw/fesm2022/angular2-credit-card-draw.mjs.map +1 -0
- package/dist/angular2-credit-card-draw/types/angular2-credit-card-draw.d.ts +24 -0
- package/ng-package.json +10 -0
- package/package.json +54 -47
- package/src/card.component.stories.ts +36 -0
- package/src/card.component.ts +16 -21
- package/src/card.html +388 -388
- package/src/card.module.ts +14 -0
- package/src/public-api.ts +2 -0
- package/storybook-static/assets/Color-6AOWCN3U-BHKwsHJb.js +1 -0
- package/storybook-static/assets/DocsRenderer-JROSPFPF-CPN4diXU.js +290 -0
- package/storybook-static/assets/WithTooltip-CDUNV5IS-CxkNVblN.js +9 -0
- package/storybook-static/assets/angular-platform-BykChHPp.js +7 -0
- package/storybook-static/assets/card.component.stories-Cbn8dXwJ.js +393 -0
- package/storybook-static/assets/chunk-242VQQM5-Jx3JgJO8.js +1 -0
- package/storybook-static/assets/chunk-DRQKCCAG-DvhnS67P.js +1 -0
- package/storybook-static/assets/chunk-QQBDHPVZ-wyKC71kO.js +1 -0
- package/storybook-static/assets/chunk-W22LQPXL-I4qw3Lnf.js +18 -0
- package/storybook-static/assets/components-fboz0Wwr.js +1 -0
- package/storybook-static/assets/formatter-L2YTDE3Q-Bcc5sJgv.js +1 -0
- package/storybook-static/assets/iframe-C2YkrQlr.js +1 -0
- package/storybook-static/assets/iframe-D-RwILkF.js +1099 -0
- package/storybook-static/assets/preload-helper-C313MjYS.js +1 -0
- package/storybook-static/assets/react-BxCz-S_c.js +1 -0
- package/storybook-static/assets/react-DL9pMoMl.js +1 -0
- package/storybook-static/assets/rolldown-runtime-vtgMY1y5.js +1 -0
- package/storybook-static/assets/syntaxhighlighter-4REYKNEV-Donq5IPh.js +6 -0
- package/storybook-static/assets/theming-CXmlqL_e.js +39 -0
- package/storybook-static/favicon-wrapper.svg +46 -0
- package/storybook-static/favicon.svg +1 -0
- package/storybook-static/iframe.html +680 -0
- package/storybook-static/index.html +149 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/sb-addons/docs-1/manager-bundle.js +18 -0
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +632 -0
- package/storybook-static/sb-common-assets/favicon-wrapper.svg +46 -0
- package/storybook-static/sb-common-assets/favicon.svg +1 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/globals-runtime.js +79237 -0
- package/storybook-static/sb-manager/globals.js +24 -0
- package/storybook-static/sb-manager/manager-stores.js +23 -0
- package/storybook-static/sb-manager/runtime.js +29276 -0
- package/storybook-static/services/core/docgen/components-carddraw.json +151 -0
- package/storybook-static/services/core/story-docs/components-carddraw.json +21 -0
- package/storybook-static/vite-inject-mocker-entry.js +2 -0
- package/tsconfig.json +15 -20
- package/tsconfig.lib.json +15 -0
- package/.npmignore +0 -24
- package/dist/card.component.ts +0 -22
- package/dist/dist/card.component.d.ts +0 -11
- package/dist/dist/card.component.js +0 -57
- package/dist/dist/card.component.js.map +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.js +0 -40
- package/dist/index.js.map +0 -1
- package/gulpfile.js +0 -8
- package/index.ts +0 -24
- package/tslint.json +0 -110
- package/typings/globals/angular-protractor/index.d.ts +0 -1844
- package/typings/globals/angular-protractor/typings.json +0 -8
- package/typings/globals/es6-shim/index.d.ts +0 -665
- package/typings/globals/es6-shim/typings.json +0 -8
- package/typings/globals/jasmine/index.d.ts +0 -499
- package/typings/globals/jasmine/typings.json +0 -8
- package/typings/globals/selenium-webdriver/index.d.ts +0 -5390
- package/typings/globals/selenium-webdriver/typings.json +0 -8
- package/typings/index.d.ts +0 -4
- package/typings.json +0 -10
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": {
|
|
3
|
+
"components-carddraw": {
|
|
4
|
+
"id": "components-carddraw",
|
|
5
|
+
"name": "CardDraw",
|
|
6
|
+
"path": "./src/card.component.stories.ts",
|
|
7
|
+
"jsDocTags": {},
|
|
8
|
+
"argTypes": {
|
|
9
|
+
"background": {
|
|
10
|
+
"name": "background",
|
|
11
|
+
"type": {
|
|
12
|
+
"name": "string"
|
|
13
|
+
},
|
|
14
|
+
"table": {
|
|
15
|
+
"category": "inputs",
|
|
16
|
+
"type": {
|
|
17
|
+
"summary": "string"
|
|
18
|
+
},
|
|
19
|
+
"defaultValue": {
|
|
20
|
+
"summary": ""
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"ccv": {
|
|
25
|
+
"name": "ccv",
|
|
26
|
+
"type": {
|
|
27
|
+
"name": "string"
|
|
28
|
+
},
|
|
29
|
+
"table": {
|
|
30
|
+
"category": "inputs",
|
|
31
|
+
"type": {
|
|
32
|
+
"summary": "string"
|
|
33
|
+
},
|
|
34
|
+
"defaultValue": {
|
|
35
|
+
"summary": ""
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"expiration": {
|
|
40
|
+
"name": "expiration",
|
|
41
|
+
"type": {
|
|
42
|
+
"name": "string"
|
|
43
|
+
},
|
|
44
|
+
"table": {
|
|
45
|
+
"category": "inputs",
|
|
46
|
+
"type": {
|
|
47
|
+
"summary": "string"
|
|
48
|
+
},
|
|
49
|
+
"defaultValue": {
|
|
50
|
+
"summary": ""
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"height": {
|
|
55
|
+
"name": "height",
|
|
56
|
+
"type": {
|
|
57
|
+
"name": "string"
|
|
58
|
+
},
|
|
59
|
+
"table": {
|
|
60
|
+
"category": "inputs",
|
|
61
|
+
"type": {
|
|
62
|
+
"summary": "string"
|
|
63
|
+
},
|
|
64
|
+
"defaultValue": {
|
|
65
|
+
"summary": ""
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"name": {
|
|
70
|
+
"name": "name",
|
|
71
|
+
"type": {
|
|
72
|
+
"name": "string"
|
|
73
|
+
},
|
|
74
|
+
"table": {
|
|
75
|
+
"category": "inputs",
|
|
76
|
+
"type": {
|
|
77
|
+
"summary": "string"
|
|
78
|
+
},
|
|
79
|
+
"defaultValue": {
|
|
80
|
+
"summary": ""
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"number": {
|
|
85
|
+
"name": "number",
|
|
86
|
+
"type": {
|
|
87
|
+
"name": "string"
|
|
88
|
+
},
|
|
89
|
+
"table": {
|
|
90
|
+
"category": "inputs",
|
|
91
|
+
"type": {
|
|
92
|
+
"summary": "string"
|
|
93
|
+
},
|
|
94
|
+
"defaultValue": {
|
|
95
|
+
"summary": ""
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"toggle": {
|
|
100
|
+
"name": "toggle",
|
|
101
|
+
"type": {
|
|
102
|
+
"name": "boolean"
|
|
103
|
+
},
|
|
104
|
+
"table": {
|
|
105
|
+
"category": "inputs",
|
|
106
|
+
"type": {
|
|
107
|
+
"summary": "boolean"
|
|
108
|
+
},
|
|
109
|
+
"defaultValue": {
|
|
110
|
+
"summary": false
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"width": {
|
|
115
|
+
"name": "width",
|
|
116
|
+
"type": {
|
|
117
|
+
"name": "string"
|
|
118
|
+
},
|
|
119
|
+
"table": {
|
|
120
|
+
"category": "inputs",
|
|
121
|
+
"type": {
|
|
122
|
+
"summary": "string"
|
|
123
|
+
},
|
|
124
|
+
"defaultValue": {
|
|
125
|
+
"summary": ""
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"apiDescription": "## Inputs\n\n```\nexport type CardDrawInputs = {\n /** @default '' */\n background?: string;\n /** @default '' */\n ccv?: string;\n /** @default '' */\n expiration?: string;\n /** @default '' */\n height?: string;\n /** @default '' */\n name?: string;\n /** @default '' */\n number?: string;\n /** @default false */\n toggle?: boolean;\n /** @default '' */\n width?: string;\n}\n```",
|
|
131
|
+
"renderer": "angular",
|
|
132
|
+
"angularComponentMeta": {
|
|
133
|
+
"name": "CardDraw",
|
|
134
|
+
"selector": "card-draw",
|
|
135
|
+
"standalone": true,
|
|
136
|
+
"inputs": [
|
|
137
|
+
"background",
|
|
138
|
+
"ccv",
|
|
139
|
+
"expiration",
|
|
140
|
+
"height",
|
|
141
|
+
"name",
|
|
142
|
+
"number",
|
|
143
|
+
"toggle",
|
|
144
|
+
"width"
|
|
145
|
+
],
|
|
146
|
+
"outputs": [],
|
|
147
|
+
"enums": []
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": {
|
|
3
|
+
"components-carddraw": {
|
|
4
|
+
"id": "components-carddraw",
|
|
5
|
+
"name": "CardDraw",
|
|
6
|
+
"path": "./src/card.component.stories.ts",
|
|
7
|
+
"stories": {
|
|
8
|
+
"components-carddraw--front": {
|
|
9
|
+
"id": "components-carddraw--front",
|
|
10
|
+
"name": "Front",
|
|
11
|
+
"snippet": "import { Component } from '@angular/core';\nimport { CardDraw } from './card.component';\n\n@Component({\n selector: 'app-demo',\n imports: [CardDraw],\n template: `\n <card-draw\n [number]=\"'1234 5678 9012 3456'\"\n [name]=\"'Emma Watson'\"\n [expiration]=\"'12/29'\"\n [ccv]=\"'999'\"\n [background]=\"'#1a1f71'\"\n [height]=\"'250px'\"\n [width]=\"'400px'\"\n [toggle]=\"false\"\n />`,\n})\nexport class DemoComponent {}"
|
|
12
|
+
},
|
|
13
|
+
"components-carddraw--back": {
|
|
14
|
+
"id": "components-carddraw--back",
|
|
15
|
+
"name": "Back",
|
|
16
|
+
"snippet": "import { Component } from '@angular/core';\nimport { CardDraw } from './card.component';\n\n@Component({\n selector: 'app-demo',\n imports: [CardDraw],\n template: `\n <card-draw\n [number]=\"'1234 5678 9012 3456'\"\n [name]=\"'Emma Watson'\"\n [expiration]=\"'12/29'\"\n [ccv]=\"'999'\"\n [background]=\"'#1a1f71'\"\n [height]=\"'250px'\"\n [width]=\"'400px'\"\n [toggle]=\"true\"\n />`,\n})\nexport class DemoComponent {}"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./assets/rolldown-runtime-vtgMY1y5.js";import{n as t,t as n}from"./assets/preload-helper-C313MjYS.js";function mockObject(e,t,n={}){let r=[],s=new RefTracker,define=(e,t,n)=>{try{return e[t]=n,!0}catch{return!1}},mockPropertiesOf=(t,n)=>{let c=getType(t),l=c===`Module`||!!t.__esModule;for(let{key:u,descriptor:f}of getAllMockableProperties(t,l,e.globalConstructors)){if(!l&&f.get){try{Object.defineProperty(n,u,f)}catch{}continue}if(isSpecialProp(u,c))continue;let m=t[u],h=s.getId(m);if(h!==void 0){r.push(()=>define(n,u,s.getMockedValue(h)));continue}let _=getType(m);if(Array.isArray(m)){define(n,u,[]);continue}let y=_.includes(`Function`)&&typeof m==`function`;if((!y||m._isMockFunction)&&_!==`Object`&&_!==`Module`)define(n,u,m);else if(define(n,u,y?m:{})){if(y){let mockFunction=function(){if(this instanceof n[u])for(let{key:n,descriptor:r}of getAllMockableProperties(this,!1,e.globalConstructors)){if(r.get)continue;let e=this[n];if(getType(e).includes(`Function`)&&typeof e==`function`){let e=this[n],r=t(this,n).mockImplementation(e),s=r.mockReset;r.mockRestore=r.mockReset=()=>(s.call(r),r.mockImplementation(e),r)}}};if(!e.spyOn)throw Error("[@vitest/mocker] `spyOn` is not defined. This is a Vitest error. Please open a new issue with reproduction.");let t=e.spyOn,r=t(n,u);if(e.type===`automock`){r.mockImplementation(mockFunction);let e=r.mockReset;r.mockRestore=r.mockReset=()=>(e.call(r),r.mockImplementation(mockFunction),r)}Object.defineProperty(n[u],"length",{value:0})}s.track(m,n[u]),mockPropertiesOf(m,n[u])}}},c=n;mockPropertiesOf(t,c);for(let e of r)e();return c}function getType(e){return Object.prototype.toString.apply(e).slice(8,-1)}function isSpecialProp(e,t){return t.includes(`Function`)&&typeof e==`string`&&[`arguments`,`callee`,`caller`,`length`,`name`].includes(e)}function getAllMockableProperties(e,t,n){let{Map:r,Object:s,Function:c,RegExp:l,Array:u}=n,f=new r,m=e;do{if(m===s.prototype||m===c.prototype||m===l.prototype)break;collectOwnProperties(m,e=>{let t=s.getOwnPropertyDescriptor(m,e);t&&f.set(e,{key:e,descriptor:t})})}while(m=s.getPrototypeOf(m));if(t&&!f.has(`default`)&&`default`in e){let t=s.getOwnPropertyDescriptor(e,`default`);t&&f.set(`default`,{key:`default`,descriptor:t})}return u.from(f.values())}function collectOwnProperties(e,t){let n=typeof t==`function`?t:e=>t.add(e);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}function normalizeWindowsPath(e=``){return e&&e.replace(/\\/g,`/`).replace(l,e=>e.toUpperCase())}function normalizeString(e,t){let n=``,r=0,s=-1,c=0,l=null;for(let u=0;u<=e.length;++u){if(u<e.length)l=e[u];else{if(l===`/`)break;l=`/`}if(l===`/`){if(s!==u-1&&c!==1){if(c===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),s=u,c=0;continue}if(n.length>0){n=``,r=0,s=u,c=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(s+1,u)}`:n=e.slice(s+1,u),r=u-s-1}s=u,c=0}else l===`.`&&c!==-1?++c:c=-1}return n}function a(e){return String(e)}function C(e=!1){let t=typeof process<`u`?process:void 0,n=t?.env||{},r=t?.argv||[];return!(`NO_COLOR`in n||r.includes(`--no-color`))&&(`FORCE_COLOR`in n||r.includes(`--color`)||t?.platform===`win32`||e&&n.TERM!==`dumb`||`CI`in n)||typeof window<`u`&&!!window.chrome}function p(e=!1){let t=C(e),i=(e,t,n,r)=>{let s=``,c=0;do s+=e.substring(c,r)+n,c=r+t.length,r=e.indexOf(t,c);while(~r);return s+e.substring(c)},g=(e,t,n=e)=>{let o=r=>{let s=String(r),c=s.indexOf(t,e.length);return~c?e+i(s,t,n,c)+t:e+s+t};return o.open=e,o.close=t,o},n={isColorSupported:t},d=e=>`\x1B[${e}m`;for(let[e,r]of _)n[e]=t?g(d(r[0]),d(r[1]),r[2]):a;return n}function _mergeNamespaces(e,t){return t.forEach(function(t){t&&typeof t!=`string`&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if(n!=="default"&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function requireReactIs_production(){if(x)return b;x=1;var e=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.portal`),n=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),s=Symbol.for(`react.profiler`),c=Symbol.for(`react.consumer`),l=Symbol.for(`react.context`),u=Symbol.for(`react.forward_ref`),f=Symbol.for(`react.suspense`),m=Symbol.for(`react.suspense_list`),h=Symbol.for(`react.memo`),_=Symbol.for(`react.lazy`),y=Symbol.for(`react.view_transition`),S=Symbol.for(`react.client.reference`);function typeOf(b){if(typeof b==`object`&&b){var x=b.$$typeof;switch(x){case e:switch(b=b.type,b){case n:case s:case r:case f:case m:case y:return b;default:switch(b&&=b.$$typeof,b){case l:case u:case _:case h:return b;case c:return b;default:return x}}case t:return x}}}return b.ContextConsumer=c,b.ContextProvider=l,b.Element=e,b.ForwardRef=u,b.Fragment=n,b.Lazy=_,b.Memo=h,b.Portal=t,b.Profiler=s,b.StrictMode=r,b.Suspense=f,b.SuspenseList=m,b.isContextConsumer=function(e){return typeOf(e)===c},b.isContextProvider=function(e){return typeOf(e)===l},b.isElement=function(t){return typeof t==`object`&&!!t&&t.$$typeof===e},b.isForwardRef=function(e){return typeOf(e)===u},b.isFragment=function(e){return typeOf(e)===n},b.isLazy=function(e){return typeOf(e)===_},b.isMemo=function(e){return typeOf(e)===h},b.isPortal=function(e){return typeOf(e)===t},b.isProfiler=function(e){return typeOf(e)===s},b.isStrictMode=function(e){return typeOf(e)===r},b.isSuspense=function(e){return typeOf(e)===f},b.isSuspenseList=function(e){return typeOf(e)===m},b.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===n||e===s||e===r||e===f||e===m||typeof e==`object`&&!!e&&(e.$$typeof===_||e.$$typeof===h||e.$$typeof===l||e.$$typeof===c||e.$$typeof===u||e.$$typeof===S||e.getModuleId!==void 0)},b.typeOf=typeOf,b}function requireReactIs$1(){return S||(S=1,y.exports=requireReactIs_production()),y.exports}function requireReactIs_production_min(){if(O)return D;O=1;var e=Symbol.for(`react.element`),t=Symbol.for(`react.portal`),n=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),s=Symbol.for(`react.profiler`),c=Symbol.for(`react.provider`),l=Symbol.for(`react.context`),u=Symbol.for(`react.server_context`),f=Symbol.for(`react.forward_ref`),m=Symbol.for(`react.suspense`),h=Symbol.for(`react.suspense_list`),_=Symbol.for(`react.memo`),y=Symbol.for(`react.lazy`),b=Symbol.for(`react.offscreen`),x=Symbol.for(`react.module.reference`);function v(b){if(typeof b==`object`&&b){var x=b.$$typeof;switch(x){case e:switch(b=b.type,b){case n:case s:case r:case m:case h:return b;default:switch(b&&=b.$$typeof,b){case u:case l:case f:case y:case _:case c:return b;default:return x}}case t:return x}}}return D.ContextConsumer=l,D.ContextProvider=c,D.Element=e,D.ForwardRef=f,D.Fragment=n,D.Lazy=y,D.Memo=_,D.Portal=t,D.Profiler=s,D.StrictMode=r,D.Suspense=m,D.SuspenseList=h,D.isAsyncMode=function(){return!1},D.isConcurrentMode=function(){return!1},D.isContextConsumer=function(e){return v(e)===l},D.isContextProvider=function(e){return v(e)===c},D.isElement=function(t){return typeof t==`object`&&!!t&&t.$$typeof===e},D.isForwardRef=function(e){return v(e)===f},D.isFragment=function(e){return v(e)===n},D.isLazy=function(e){return v(e)===y},D.isMemo=function(e){return v(e)===_},D.isPortal=function(e){return v(e)===t},D.isProfiler=function(e){return v(e)===s},D.isStrictMode=function(e){return v(e)===r},D.isSuspense=function(e){return v(e)===m},D.isSuspenseList=function(e){return v(e)===h},D.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===n||e===s||e===r||e===m||e===h||e===b||typeof e==`object`&&!!e&&(e.$$typeof===y||e.$$typeof===_||e.$$typeof===c||e.$$typeof===l||e.$$typeof===f||e.$$typeof===x||e.getModuleId!==void 0)},D.typeOf=v,D}function requireReactIs(){return k||(k=1,E.exports=requireReactIs_production_min()),E.exports}function createSimpleStackTrace(e){let{message:t=`$$stack trace error`,stackTraceLimit:n=1}=e||{},r=Error.stackTraceLimit,s=Error.prepareStackTrace;Error.stackTraceLimit=n,Error.prepareStackTrace=e=>e.stack;let c=Error(t).stack||``;return Error.prepareStackTrace=s,Error.stackTraceLimit=r,c}function requireJsTokens(){if(M)return jsTokens_1;M=1;var e,t,n,r,s,c,l,u,f,m,h,_,y=/\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy,b,x,S,w,T,E;return _=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,e=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/uy,x=/(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y,h=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,S=/[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y,E=/[\t\v\f\ufeff\p{Zs}]+/uy,u=/\r?\n|[\r\u2028\u2029]/y,f=/\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y,b=/\/\/.*/y,n=/[<>.:={}]|\/(?![\/*])/y,t=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/uy,r=/(['"])(?:(?!\1)[^])*(\1)?/y,s=/[^<>{}]+/y,T=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,w=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,c=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,l=/^(?:return|throw|yield)$/,m=RegExp(u.source),jsTokens_1=function*(D,{jsx:O=!1}={}){var k,A,j,M,N,P,F,I,L,R,z,B,V,H;for({length:P}=D,M=0,N=``,H=[{tag:`JS`}],k=[],z=0,B=!1;M<P;){switch(I=H[H.length-1],I.tag){case`JS`:case`JSNonExpressionParen`:case`InterpolationInTemplate`:case`InterpolationInJSX`:if(D[M]===`/`&&(T.test(N)||c.test(N))&&(y.lastIndex=M,F=y.exec(D))){M=y.lastIndex,N=F[0],B=!0,yield{type:`RegularExpressionLiteral`,value:F[0],closed:F[1]!==void 0&&F[1]!==`\\`};continue}if(_.lastIndex=M,F=_.exec(D)){switch(V=F[0],L=_.lastIndex,R=V,V){case`(`:N===`?NonExpressionParenKeyword`&&H.push({tag:`JSNonExpressionParen`,nesting:z}),z++,B=!1;break;case`)`:z--,B=!0,I.tag===`JSNonExpressionParen`&&z===I.nesting&&(H.pop(),R=`?NonExpressionParenEnd`,B=!1);break;case`{`:_.lastIndex=0,j=!w.test(N)&&(T.test(N)||c.test(N)),k.push(j),B=!1;break;case`}`:switch(I.tag){case`InterpolationInTemplate`:if(k.length===I.nesting){S.lastIndex=M,F=S.exec(D),M=S.lastIndex,N=F[0],F[1]==="${"?(N=`?InterpolationInTemplate`,B=!1,yield{type:`TemplateMiddle`,value:F[0]}):(H.pop(),B=!0,yield{type:`TemplateTail`,value:F[0],closed:F[1]==="`"});continue}break;case`InterpolationInJSX`:if(k.length===I.nesting){H.pop(),M+=1,N=`}`,yield{type:`JSXPunctuator`,value:`}`};continue}}B=k.pop(),R=B?`?ExpressionBraceEnd`:`}`;break;case`]`:B=!0;break;case`++`:case`--`:R=B?`?PostfixIncDec`:`?UnaryIncDec`;break;case`<`:if(O&&(T.test(N)||c.test(N))){H.push({tag:`JSXTag`}),M+=1,N=`<`,yield{type:`JSXPunctuator`,value:V};continue}B=!1;break;default:B=!1}M=L,N=R,yield{type:`Punctuator`,value:V};continue}if(e.lastIndex=M,F=e.exec(D)){switch(M=e.lastIndex,R=F[0],F[0]){case`for`:case`if`:case`while`:case`with`:N!==`.`&&N!==`?.`&&(R=`?NonExpressionParenKeyword`)}N=R,B=!c.test(F[0]),yield{type:F[1]===`#`?`PrivateIdentifier`:`IdentifierName`,value:F[0]};continue}if(x.lastIndex=M,F=x.exec(D)){M=x.lastIndex,N=F[0],B=!0,yield{type:`StringLiteral`,value:F[0],closed:F[2]!==void 0};continue}if(h.lastIndex=M,F=h.exec(D)){M=h.lastIndex,N=F[0],B=!0,yield{type:`NumericLiteral`,value:F[0]};continue}if(S.lastIndex=M,F=S.exec(D)){M=S.lastIndex,N=F[0],F[1]==="${"?(N=`?InterpolationInTemplate`,H.push({tag:`InterpolationInTemplate`,nesting:k.length}),B=!1,yield{type:`TemplateHead`,value:F[0]}):(B=!0,yield{type:`NoSubstitutionTemplate`,value:F[0],closed:F[1]==="`"});continue}break;case`JSXTag`:case`JSXTagEnd`:if(n.lastIndex=M,F=n.exec(D)){switch(M=n.lastIndex,R=F[0],F[0]){case`<`:H.push({tag:`JSXTag`});break;case`>`:H.pop(),N===`/`||I.tag===`JSXTagEnd`?(R=`?JSX`,B=!0):H.push({tag:`JSXChildren`});break;case`{`:H.push({tag:`InterpolationInJSX`,nesting:k.length}),R=`?InterpolationInJSX`,B=!1;break;case`/`:N===`<`&&(H.pop(),H[H.length-1].tag===`JSXChildren`&&H.pop(),H.push({tag:`JSXTagEnd`}))}N=R,yield{type:`JSXPunctuator`,value:F[0]};continue}if(t.lastIndex=M,F=t.exec(D)){M=t.lastIndex,N=F[0],yield{type:`JSXIdentifier`,value:F[0]};continue}if(r.lastIndex=M,F=r.exec(D)){M=r.lastIndex,N=F[0],yield{type:`JSXString`,value:F[0],closed:F[2]!==void 0};continue}break;case`JSXChildren`:if(s.lastIndex=M,F=s.exec(D)){M=s.lastIndex,N=F[0],yield{type:`JSXText`,value:F[0]};continue}switch(D[M]){case`<`:H.push({tag:`JSXTag`}),M++,N=`<`,yield{type:`JSXPunctuator`,value:`<`};continue;case`{`:H.push({tag:`InterpolationInJSX`,nesting:k.length}),M++,N=`?InterpolationInJSX`,B=!1,yield{type:`JSXPunctuator`,value:`{`};continue}}E.lastIndex=M,(F=E.exec(D))?(M=E.lastIndex,yield{type:`WhiteSpace`,value:F[0]}):(u.lastIndex=M,(F=u.exec(D))?(M=u.lastIndex,B=!1,l.test(N)&&(N=`?NoLineTerminatorHere`),yield{type:`LineTerminatorSequence`,value:F[0]}):(f.lastIndex=M,(F=f.exec(D))?(M=f.lastIndex,m.test(F[0])&&(B=!1,l.test(N)&&(N=`?NoLineTerminatorHere`)),yield{type:`MultiLineComment`,value:F[0],closed:F[1]!==void 0}):(b.lastIndex=M,(F=b.exec(D))?(M=b.lastIndex,B=!1,yield{type:`SingleLineComment`,value:F[0]}):(A=String.fromCodePoint(D.codePointAt(M)),M+=A.length,N=A,B=!1,yield{type:I.tag.startsWith(`JSX`)?`JSXInvalid`:`Invalid`,value:A}))))}},jsTokens_1}function normalizeWindowsPath2(e=``){return e&&e.replace(/\\/g,`/`).replace(R,e=>e.toUpperCase())}function cwd(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}function normalizeString2(e,t){let n=``,r=0,s=-1,c=0,l=null;for(let u=0;u<=e.length;++u){if(u<e.length)l=e[u];else{if(l===`/`)break;l=`/`}if(l===`/`){if(s!==u-1&&c!==1){if(c===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),s=u,c=0;continue}if(n.length>0){n=``,r=0,s=u,c=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(s+1,u)}`:n=e.slice(s+1,u),r=u-s-1}s=u,c=0}else l===`.`&&c!==-1?++c:c=-1}return n}function extractLocation(e){if(!e.includes(`:`))return[e];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,``));if(!t)return[e];let n=t[1];if(n.startsWith(`async `)&&(n=n.slice(6)),n.startsWith(`http:`)||n.startsWith(`https:`)){let e=new URL(n);e.searchParams.delete(`import`),e.searchParams.delete(`browserv`),n=e.pathname+e.hash+e.search}if(n.startsWith(`/@fs/`)){let e=/^\/@fs\/[a-zA-Z]:\//.test(n);n=n.slice(e?5:4)}return[n,t[2]||void 0,t[3]||void 0]}function parseSingleFFOrSafariStack(e){let t=e.trim();if(V.test(t)||(t.includes(` > eval`)&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,`:$1`)),!t.includes(`@`)&&!t.includes(`:`)))return null;let n=/((.*".+"[^@]*)?[^@]*)(@)/,r=t.match(n),s=r&&r[1]?r[1]:void 0,[c,l,u]=extractLocation(t.replace(n,``));return!c||!l||!u?null:{file:c,method:s||``,line:Number.parseInt(l),column:Number.parseInt(u)}}function parseSingleStack(e){let t=e.trim();return B.test(t)?parseSingleV8Stack(t):parseSingleFFOrSafariStack(t)}function parseSingleV8Stack(e){let t=e.trim();if(!B.test(t))return null;t.includes(`(eval `)&&(t=t.replace(/eval code/g,`eval`).replace(/(\(eval at [^()]*)|(,.*$)/g,``));let n=t.replace(/^\s+/,``).replace(/\(eval code/g,`(`).replace(/^.*?\s+/,``),r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],``):n;let[s,c,l]=extractLocation(r?r[1]:n),u=r&&n||``,f=s&&[`eval`,`<anonymous>`].includes(s)?void 0:s;return!f||!c||!l?null:(u.startsWith(`async `)&&(u=u.slice(6)),f.startsWith(`file://`)&&(f=f.slice(7)),f=f.startsWith(`node:`)||f.startsWith(`internal:`)?f:resolve(f),u&&=u.replace(/__vite_ssr_import_\d+__\./g,``),{method:u,file:f,line:Number.parseInt(c),column:Number.parseInt(l)})}function createCompilerHints(e){let t=e?.globalThisKey||`__vitest_mocker__`;function _mocker(){return typeof globalThis[t]<`u`?globalThis[t]:new Proxy({},{get(e,t){throw Error(`Vitest mocker was not initialized in this environment. vi.${String(t)}() is forbidden.`)}})}return{hoisted(e){if(typeof e!=`function`)throw TypeError(`vi.hoisted() expects a function, but received a ${typeof e}`);return e()},mock(e,t){if(typeof e!=`string`)throw TypeError(`vi.mock() expects a string path, but received a ${typeof e}`);let n=getImporter(`mock`);_mocker().queueMock(e,n,typeof t==`function`?()=>t(()=>_mocker().importActual(e,n)):t)},unmock(e){if(typeof e!=`string`)throw TypeError(`vi.unmock() expects a string path, but received a ${typeof e}`);_mocker().queueUnmock(e,getImporter(`unmock`))},doMock(e,t){if(typeof e!=`string`)throw TypeError(`vi.doMock() expects a string path, but received a ${typeof e}`);let n=getImporter(`doMock`);_mocker().queueMock(e,n,typeof t==`function`?()=>t(()=>_mocker().importActual(e,n)):t)},doUnmock(e){if(typeof e!=`string`)throw TypeError(`vi.doUnmock() expects a string path, but received a ${typeof e}`);_mocker().queueUnmock(e,getImporter(`doUnmock`))},async importActual(e){return _mocker().importActual(e,getImporter(`importActual`))},async importMock(e){return _mocker().importMock(e,getImporter(`importMock`))}}}function getImporter(e){let t=createSimpleStackTrace({stackTraceLimit:5}).split(`
|
|
2
|
+
`);return parseSingleStack(t[t.findIndex(t=>t.includes(` at Object.${e}`)||t.includes(`${e}@`))+1])?.file||``}function cleanVersion(e){return e.replace(U,``)}function registerModuleMocker(e){let t=new BuildModuleMocker(e(`__vitest_mocker__`),{resolveId(e,t){return rpc2(`resolveId`,{id:e,importer:t})},resolveMock(e,t,n){return rpc2(`resolveMock`,{id:e,importer:t,options:n})},async invalidate(e){return rpc2(`invalidate`,{ids:e})}},(...e)=>globalThis.__STORYBOOK_MODULE_TEST__.spyOn(...e),{root:``});return globalThis.__vitest_mocker__=t,createCompilerHints({globalThisKey:`__vitest_mocker__`})}var MockerRegistry,AutomockedModule,r,s,c,RefTracker,l,u,f,m,h,normalize,join,isAbsolute,extname,_,y,b,x,S,w,T,E,D,O,k,A,j,jsTokens_1,M,N,P,F,I,L,R,z,resolve,isAbsolute2,B,V,H,ModuleMocker,U,ModuleMockerInterceptor,rpc2,BuildModuleMocker;function init_mocker_runtime(){return(init_mocker_runtime=e((()=>{t(),MockerRegistry=class{registryByUrl=new Map;registryById=new Map;clear(){this.registryByUrl.clear(),this.registryById.clear()}keys(){return this.registryByUrl.keys()}add(e){this.registryByUrl.set(e.url,e),this.registryById.set(e.id,e)}register(e,t,n,l,u){let f=typeof e==`object`?e.type:e;if(typeof e==`object`){let t=e;if(t instanceof AutomockedModule||t instanceof r||t instanceof c||t instanceof s)throw TypeError(`[vitest] Cannot register a mock that is already defined. Expected a JSON representation from \`MockedModule.toJSON\`, instead got "${t.type}". Use "registry.add()" to update a mock instead.`);if(t.type===`automock`){let e=AutomockedModule.fromJSON(t);return this.add(e),e}if(t.type===`autospy`){let e=r.fromJSON(t);return this.add(e),e}if(t.type===`redirect`){let e=s.fromJSON(t);return this.add(e),e}throw t.type===`manual`?Error("Cannot set serialized manual mock. Define a factory function manually with `ManualMockedModule.fromJSON()`."):Error(`Unknown mock type: ${t.type}`)}if(typeof t!=`string`)throw TypeError(`[vitest] Mocks require a raw string.`);if(typeof l!=`string`)throw TypeError(`[vitest] Mocks require a url string.`);if(typeof n!=`string`)throw TypeError(`[vitest] Mocks require an id string.`);if(f===`manual`){if(typeof u!=`function`)throw TypeError(`[vitest] Manual mocks require a factory function.`);let e=new c(t,n,l,u);return this.add(e),e}if(f===`automock`||f===`autospy`){let e=f===`automock`?new AutomockedModule(t,n,l):new r(t,n,l);return this.add(e),e}if(f===`redirect`){if(typeof u!=`string`)throw TypeError(`[vitest] Redirect mocks require a redirect string.`);let e=new s(t,n,l,u);return this.add(e),e}throw Error(`[vitest] Unknown mock type: ${f}`)}delete(e){this.registryByUrl.delete(e)}get(e){return this.registryByUrl.get(e)}getById(e){return this.registryById.get(e)}has(e){return this.registryByUrl.has(e)}},AutomockedModule=class{type=`automock`;constructor(e,t,n){this.raw=e,this.id=t,this.url=n}static fromJSON(e){return new r(e.raw,e.id,e.url)}toJSON(){return{type:this.type,url:this.url,raw:this.raw,id:this.id}}},r=class _AutospiedModule{type=`autospy`;constructor(e,t,n){this.raw=e,this.id=t,this.url=n}static fromJSON(e){return new _AutospiedModule(e.raw,e.id,e.url)}toJSON(){return{type:this.type,url:this.url,id:this.id,raw:this.raw}}},s=class _RedirectedModule{type=`redirect`;constructor(e,t,n,r){this.raw=e,this.id=t,this.url=n,this.redirect=r}static fromJSON(e){return new _RedirectedModule(e.raw,e.id,e.url,e.redirect)}toJSON(){return{type:this.type,url:this.url,raw:this.raw,id:this.id,redirect:this.redirect}}},c=class _ManualMockedModule{cache;type=`manual`;constructor(e,t,n,r){this.raw=e,this.id=t,this.url=n,this.factory=r}async resolve(){if(this.cache)return this.cache;let e;try{e=await this.factory()}catch(e){let t=Error(`[vitest] There was an error when mocking a module. If you are using "vi.mock" factory, make sure there are no top level variables inside, since this call is hoisted to top of the file. Read more: https://vitest.dev/api/vi.html#vi-mock`);throw t.cause=e,t}if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`[vitest] vi.mock("${this.raw}", factory?: () => unknown) is not returning an object. Did you mean to return an object with a "default" key?`);return this.cache=e}static fromJSON(e,t){return new _ManualMockedModule(e.raw,e.id,e.url,t)}toJSON(){return{type:this.type,url:this.url,id:this.id,raw:this.raw}}},RefTracker=class{idMap=new Map;mockedValueMap=new Map;getId(e){return this.idMap.get(e)}getMockedValue(e){return this.mockedValueMap.get(e)}track(e,t){let n=this.idMap.size;return this.idMap.set(e,n),this.mockedValueMap.set(n,t),n}},l=/^[A-Za-z]:\//,u=/^[/\\]{2}/,f=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,m=/^[A-Za-z]:$/,h=/.(\.[^./]+|\.)$/,normalize=function(e){if(e.length===0)return`.`;e=normalizeWindowsPath(e);let t=e.match(u),n=isAbsolute(e),r=e[e.length-1]===`/`;return e=normalizeString(e,!n),e.length===0?n?`/`:r?`./`:`.`:(r&&(e+=`/`),m.test(e)&&(e+=`/`),t?n?`//${e}`:`//./${e}`:n&&!isAbsolute(e)?`/${e}`:e)},join=function(...e){let t=``;for(let n of e)if(n){if(t.length>0){let e=t[t.length-1]===`/`,r=n[0]===`/`;t+=e&&r?n.slice(1):e||r?n:`/${n}`}else t+=n}return normalize(t)},isAbsolute=function(e){return f.test(e)},extname=function(e){if(e===`..`)return``;let t=h.exec(normalizeWindowsPath(e));return t&&t[1]||``},_=Object.entries({reset:[0,0],bold:[1,22,`\x1B[22m\x1B[1m`],dim:[2,22,`\x1B[22m\x1B[2m`],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}),a.open=``,a.close=``,p(),y={exports:{}},b={},w=requireReactIs$1(),T=_mergeNamespaces({__proto__:null,default:getDefaultExportFromCjs(w)},[w]),E={exports:{}},D={},A=requireReactIs(),j=_mergeNamespaces({__proto__:null,default:getDefaultExportFromCjs(A)},[A]),Object.fromEntries([`isAsyncMode`,`isConcurrentMode`,`isContextConsumer`,`isContextProvider`,`isElement`,`isForwardRef`,`isFragment`,`isLazy`,`isMemo`,`isPortal`,`isProfiler`,`isStrictMode`,`isSuspense`,`isSuspenseList`,`isValidElementType`].map(e=>[e,t=>j[e](t)||T[e](t)]));try{let{getPromiseDetails:e,kPending:t,kRejected:n}=process.binding(`util`);Array.isArray(e(Promise.resolve()))}catch{}requireJsTokens(),N={keyword:`break.case.catch.continue.debugger.default.do.else.finally.for.function.if.return.switch.throw.try.var.const.while.with.new.this.super.class.extends.export.import.null.true.false.in.instanceof.typeof.void.delete`.split(`.`),strict:[`implements`,`interface`,`let`,`package`,`private`,`protected`,`public`,`static`,`yield`]},new Set(N.keyword),new Set(N.strict),P=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,F=new Uint8Array(64),I=new Uint8Array(128);for(let e=0;e<P.length;e++){let t=P.charCodeAt(e);F[e]=t,I[t]=e}(function(e){e[e.Empty=1]=`Empty`,e[e.Hash=2]=`Hash`,e[e.Query=3]=`Query`,e[e.RelativePath=4]=`RelativePath`,e[e.AbsolutePath=5]=`AbsolutePath`,e[e.SchemeRelative=6]=`SchemeRelative`,e[e.Absolute=7]=`Absolute`})(L||={}),R=/^[A-Za-z]:\//,z=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,resolve=function(...e){e=e.map(e=>normalizeWindowsPath2(e));let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let s=r>=0?e[r]:cwd();!s||s.length===0||(t=`${s}/${t}`,n=isAbsolute2(s))}return t=normalizeString2(t,!n),n&&!isAbsolute2(t)?`/${t}`:t.length>0?t:`.`},isAbsolute2=function(e){return z.test(e)},B=/^\s*at .*(?:\S:\d+|\(native\))/m,V=/^(?:eval@)?(?:\[native code\])?$/,{now:H}=Date,ModuleMocker=class{registry=new MockerRegistry;queue=new Set;mockedIds=new Set;constructor(e,t,n,r){this.interceptor=e,this.rpc=t,this.spyOn=n,this.config=r}async prepare(){this.queue.size&&await Promise.all([...this.queue.values()])}async resolveFactoryModule(e){let t=this.registry.get(e);if(!t||t.type!==`manual`)throw Error(`Mock ${e} wasn't registered. This is probably a Vitest error. Please, open a new issue with reproduction.`);return await t.resolve()}getFactoryModule(e){let t=this.registry.get(e);if(!t||t.type!==`manual`)throw Error(`Mock ${e} wasn't registered. This is probably a Vitest error. Please, open a new issue with reproduction.`);if(!t.cache)throw Error(`Mock ${e} wasn't resolved. This is probably a Vitest error. Please, open a new issue with reproduction.`);return t.cache}async invalidate(){let e=Array.from(this.mockedIds);e.length&&(await this.rpc.invalidate(e),await this.interceptor.invalidate(),this.registry.clear())}async importActual(e,t){let n=await this.rpc.resolveId(e,t);if(n==null)throw Error(`[vitest] Cannot resolve "${e}" imported from "${t}"`);let r=extname(n.id),s=new URL(n.url,location.href),c=`_vitest_original&ext${r}`,l=`${s.pathname}${s.search?`${s.search}&${c}`:`?${c}`}${s.hash}`;return this.wrapDynamicImport(()=>import(l)).then(e=>{if(!n.optimized||typeof e.default>`u`)return e;let t=e.default;return t?.__esModule?t:{...typeof t==`object`&&!Array.isArray(t)||typeof t==`function`?t:{},default:t}})}async importMock(e,t){await this.prepare();let{resolvedId:r,resolvedUrl:c,redirectUrl:l}=await this.rpc.resolveMock(e,t,{mock:`auto`}),u=this.resolveMockPath(cleanVersion(c)),f=this.registry.get(u);if(f||=l?new s(e,r,u,new URL(this.resolveMockPath(cleanVersion(l)),location.href).toString()):new AutomockedModule(e,r,u),f.type===`manual`)return await f.resolve();if(f.type===`automock`||f.type===`autospy`){let e=new URL(`/@id/${r}`,location.href),t=e.search?`${e.search}&t=${H()}`:`?t=${H()}`,s=await n(()=>import(`${e.pathname}${t}&mock=${f.type}${e.hash}`),[],import.meta.url);return this.mockObject(s,f.type)}return import(f.redirect)}mockObject(e,t=`automock`){return mockObject({globalConstructors:{Object,Function,Array,Map,RegExp},spyOn:this.spyOn,type:t},e)}queueMock(e,t,n){let r=this.rpc.resolveMock(e,t,{mock:typeof n==`function`?`factory`:n?.spy?`spy`:`auto`}).then(async({redirectUrl:t,resolvedId:r,resolvedUrl:s,needsInterop:c,mockType:l})=>{let u=this.resolveMockPath(cleanVersion(s));this.mockedIds.add(r);let f=typeof n==`function`?async()=>{let e=await n();return c?{default:e}:e}:void 0,m=typeof t==`string`?new URL(this.resolveMockPath(cleanVersion(t)),location.href).toString():null,h;h=l===`manual`?this.registry.register(`manual`,e,r,u,f):l===`autospy`?this.registry.register(`autospy`,e,r,u):l===`redirect`?this.registry.register(`redirect`,e,r,u,m):this.registry.register(`automock`,e,r,u),await this.interceptor.register(h)}).finally(()=>{this.queue.delete(r)});this.queue.add(r)}queueUnmock(e,t){let n=this.rpc.resolveId(e,t).then(async e=>{if(!e)return;let t=this.resolveMockPath(cleanVersion(e.url));this.mockedIds.add(e.id),this.registry.delete(t),await this.interceptor.delete(t)}).finally(()=>{this.queue.delete(n)});this.queue.add(n)}wrapDynamicImport(e){return typeof e==`function`?new Promise((t,n)=>{this.prepare().finally(()=>{e().then(t,n)})}):e}resolveMockPath(e){let t=this.config,n=join(`/@fs/`,t.root);return e.startsWith(t.root)?e.slice(t.root.length):e.startsWith(n)?e.slice(n.length):e}},U=/(\?|&)v=\w{8}/,ModuleMockerInterceptor=class{mocks=new MockerRegistry;constructor(){}async register(e){this.mocks.add(e)}async delete(e){this.mocks.delete(e)}async invalidate(){this.mocks.clear()}},rpc2=e=>{switch(e){case`resolveId`:return Promise.resolve({id:``,url:``,optimized:!1});case`resolveMock`:return Promise.resolve({mockType:`dummy`,resolvedId:``,resolvedUrl:``,redirectUrl:``,needsInterop:!1});case`invalidate`:return Promise.resolve()}},BuildModuleMocker=class extends ModuleMocker{queueMock(){}},globalThis.__STORYBOOK_MOCKER__=registerModuleMocker(()=>new ModuleMockerInterceptor)})))()}init_mocker_runtime();
|
package/tsconfig.json
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"
|
|
4
|
-
"module": "
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
},
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"exclude": [
|
|
17
|
-
"node_modules",
|
|
18
|
-
"dist"
|
|
19
|
-
]
|
|
20
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "preserve",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"experimentalDecorators": true,
|
|
9
|
+
"importHelpers": true,
|
|
10
|
+
"declaration": true
|
|
11
|
+
},
|
|
12
|
+
"angularCompilerOptions": {
|
|
13
|
+
"strictTemplates": true
|
|
14
|
+
}
|
|
15
|
+
}
|
package/.npmignore
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Node
|
|
2
|
-
node_modules/*
|
|
3
|
-
npm-debug.log
|
|
4
|
-
|
|
5
|
-
# DO NOT IGNORE TYPESCRIPT FILES FOR NPM
|
|
6
|
-
# TypeScript
|
|
7
|
-
# *.js
|
|
8
|
-
# *.map
|
|
9
|
-
# *.d.ts
|
|
10
|
-
|
|
11
|
-
# JetBrains
|
|
12
|
-
.idea
|
|
13
|
-
.project
|
|
14
|
-
.settings
|
|
15
|
-
.idea/*
|
|
16
|
-
*.iml
|
|
17
|
-
|
|
18
|
-
# Windows
|
|
19
|
-
Thumbs.db
|
|
20
|
-
Desktop.ini
|
|
21
|
-
|
|
22
|
-
# Mac
|
|
23
|
-
.DS_Store
|
|
24
|
-
**/.DS_Store
|
package/dist/card.component.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Component,Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'card-draw',
|
|
5
|
-
template:'<div><div class="checkout"><div class="credit-card-box {{toggle ? \'hover\':\'\'}}"><div class="flip"><div [style.width]="width" [style.height]="height" [style.background]="background" class="front"><div class="chip"></div><div class="logo"><svg version="1.1" id="visa" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="47.834px" height="47.834px" viewBox="0 0 47.834 47.834" style="enable-background:new 0 0 47.834 47.834;"><g><g><path d="M44.688,16.814h-3.004c-0.933,0-1.627,0.254-2.037,1.184l-5.773,13.074h4.083c0,0,0.666-1.758,0.817-2.143 c0.447,0,4.414,0.006,4.979,0.006c0.116,0.498,0.474,2.137,0.474,2.137h3.607L44.688,16.814z M39.893,26.01 c0.32-0.819,1.549-3.987,1.549-3.987c-0.021,0.039,0.317-0.825,0.518-1.362l0.262,1.23c0,0,0.745,3.406,0.901,4.119H39.893z M34.146,26.404c-0.028,2.963-2.684,4.875-6.771,4.875c-1.743-0.018-3.422-0.361-4.332-0.76l0.547-3.193l0.501,0.228 c1.277,0.532,2.104,0.747,3.661,0.747c1.117,0,2.313-0.438,2.325-1.393c0.007-0.625-0.501-1.07-2.016-1.77 c-1.476-0.683-3.43-1.827-3.405-3.876c0.021-2.773,2.729-4.708,6.571-4.708c1.506,0,2.713,0.31,3.483,0.599l-0.526,3.092 l-0.351-0.165c-0.716-0.288-1.638-0.566-2.91-0.546c-1.522,0-2.228,0.634-2.228,1.227c-0.008,0.668,0.824,1.108,2.184,1.77 C33.126,23.546,34.163,24.783,34.146,26.404z M0,16.962l0.05-0.286h6.028c0.813,0.031,1.468,0.29,1.694,1.159l1.311,6.304 C7.795,20.842,4.691,18.099,0,16.962z M17.581,16.812l-6.123,14.239l-4.114,0.007L3.862,19.161 c2.503,1.602,4.635,4.144,5.386,5.914l0.406,1.469l3.808-9.729L17.581,16.812L17.581,16.812z M19.153,16.8h3.89L20.61,31.066 h-3.888L19.153,16.8z"></path></g></g></svg></div><div class="number">{{number}}</div><div class="card-holder"><label>Card holder</label><div>{{name}}</div></div><div class="card-expiration-date"><label>Expires</label><div>{{expiration}}</div></div></div><div [style.width]="width" [style.height]="height" [style.background]="background" class="back"><div class="strip"></div><div class="logo"><svg version="1.1" id="visa" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="47.834px" height="47.834px" viewBox="0 0 47.834 47.834" style="enable-background:new 0 0 47.834 47.834;"><g><g><path d="M44.688,16.814h-3.004c-0.933,0-1.627,0.254-2.037,1.184l-5.773,13.074h4.083c0,0,0.666-1.758,0.817-2.143 c0.447,0,4.414,0.006,4.979,0.006c0.116,0.498,0.474,2.137,0.474,2.137h3.607L44.688,16.814z M39.893,26.01 c0.32-0.819,1.549-3.987,1.549-3.987c-0.021,0.039,0.317-0.825,0.518-1.362l0.262,1.23c0,0,0.745,3.406,0.901,4.119H39.893z M34.146,26.404c-0.028,2.963-2.684,4.875-6.771,4.875c-1.743-0.018-3.422-0.361-4.332-0.76l0.547-3.193l0.501,0.228 c1.277,0.532,2.104,0.747,3.661,0.747c1.117,0,2.313-0.438,2.325-1.393c0.007-0.625-0.501-1.07-2.016-1.77 c-1.476-0.683-3.43-1.827-3.405-3.876c0.021-2.773,2.729-4.708,6.571-4.708c1.506,0,2.713,0.31,3.483,0.599l-0.526,3.092 l-0.351-0.165c-0.716-0.288-1.638-0.566-2.91-0.546c-1.522,0-2.228,0.634-2.228,1.227c-0.008,0.668,0.824,1.108,2.184,1.77 C33.126,23.546,34.163,24.783,34.146,26.404z M0,16.962l0.05-0.286h6.028c0.813,0.031,1.468,0.29,1.694,1.159l1.311,6.304 C7.795,20.842,4.691,18.099,0,16.962z M17.581,16.812l-6.123,14.239l-4.114,0.007L3.862,19.161 c2.503,1.602,4.635,4.144,5.386,5.914l0.406,1.469l3.808-9.729L17.581,16.812L17.581,16.812z M19.153,16.8h3.89L20.61,31.066 h-3.888L19.153,16.8z"></path></g></g></svg></div><div class="ccv"><label>CCV</label><div>{{ccv}}</div></div></div></div></div></div><style>\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n html,\n body {\n min-height: 100%;\n font-family: \'Open sans\', sans-serif;\n }\n\n body {\n background: -webkit-linear-gradient(40deg, #f3c680, #a1e3e2);\n background: linear-gradient(50deg, #f3c680, #a1e3e2);\n }\n\n /*--------------------\n Buttons\n --------------------*/\n .btn {\n display: block;\n background: #bded7d;\n color: white;\n text-decoration: none;\n margin: 20px 0;\n padding: 15px 15px;\n border-radius: 5px;\n position: relative;\n }\n .btn::after {\n content: \'\';\n position: absolute;\n z-index: 1;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n -webkit-transition: all .2s ease-in-out;\n transition: all .2s ease-in-out;\n box-shadow: inset 0 3px 0 transparent, 0 3px 3px rgba(0, 0, 0, 0.2);\n border-radius: 5px;\n }\n .btn:hover::after {\n background: rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.2);\n }\n\n /*--------------------\n Form\n --------------------*/\n .form fieldset {\n border: none;\n padding: 0;\n padding: 10px 0;\n position: relative;\n clear: both;\n }\n .form fieldset.fieldset-expiration {\n float: left;\n width: 60%;\n }\n .form fieldset.fieldset-expiration .select {\n width: 84px;\n margin-right: 12px;\n float: left;\n }\n .form fieldset.fieldset-ccv {\n clear: none;\n float: right;\n width: 86px;\n }\n .form fieldset label {\n display: block;\n text-transform: uppercase;\n font-size: 11px;\n color: rgba(0, 0, 0, 0.6);\n margin-bottom: 5px;\n font-weight: bold;\n font-family: Inconsolata;\n }\n .form fieldset input,\n .form fieldset .select {\n width: 100%;\n height: 38px;\n color: #333333;\n padding: 10px;\n border-radius: 5px;\n font-size: 15px;\n outline: none !important;\n border: 1px solid rgba(0, 0, 0, 0.3);\n box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.2);\n }\n .form fieldset input.input-cart-number,\n .form fieldset .select.input-cart-number {\n width: 82px;\n display: inline-block;\n margin-right: 8px;\n }\n .form fieldset input.input-cart-number:last-child,\n .form fieldset .select.input-cart-number:last-child {\n margin-right: 0;\n }\n .form fieldset .select {\n position: relative;\n }\n .form fieldset .select::after {\n content: \'\';\n border-top: 8px solid #222;\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n position: absolute;\n z-index: 2;\n top: 14px;\n right: 10px;\n pointer-events: none;\n }\n .form fieldset .select select {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n position: absolute;\n padding: 0;\n border: none;\n width: 100%;\n outline: none !important;\n top: 6px;\n left: 6px;\n background: none;\n }\n .form fieldset .select select :-moz-focusring {\n color: transparent;\n text-shadow: 0 0 0 #000;\n }\n .form button {\n width: 100%;\n outline: none !important;\n background: -webkit-linear-gradient(top, #49a09b, #3d8291);\n background: linear-gradient(180deg, #49a09b, #3d8291);\n text-transform: uppercase;\n font-weight: bold;\n border: none;\n box-shadow: none;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n margin-top: 90px;\n }\n .form button .fa {\n margin-right: 6px;\n }\n\n /*--------------------\n Checkout\n --------------------*/\n .checkout {\n margin: 20px auto 0px;\n position: relative;\n max-width: 460px;\n border-radius: 15px;\n }\n\n /*--------------------\n Credit Card\n --------------------*/\n .credit-card-box {\n -webkit-perspective: 1000;\n perspective: 1000;\n width: 400px;\n height: 280px;\n position: relative;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n }\n .credit-card-box:hover .flip, .credit-card-box.hover .flip {\n -webkit-transform: rotateY(180deg);\n transform: rotateY(180deg);\n }\n .credit-card-box .front,\n .credit-card-box .back {\n width: 400px;\n height: 250px;\n border-radius: 15px;\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n background: linear-gradient(135deg, #bd6772, #53223f);\n position: absolute;\n color: #fff;\n font-family: Inconsolata;\n top: 0;\n left: 0;\n text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);\n box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);\n }\n .credit-card-box .front::before,\n .credit-card-box .back::before {\n content: \'\';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: url("http://cdn.flaticon.com/svg/44/44386.svg") no-repeat center;\n background-size: cover;\n opacity: .05;\n }\n .credit-card-box .flip {\n -webkit-transition: 0.6s;\n transition: 0.6s;\n -webkit-transform-style: preserve-3d;\n transform-style: preserve-3d;\n position: relative;\n }\n .credit-card-box .logo {\n position: absolute;\n top: 9px;\n right: 20px;\n width: 60px;\n }\n .credit-card-box .logo svg {\n width: 100%;\n height: auto;\n fill: #fff;\n }\n .credit-card-box .front {\n z-index: 2;\n -webkit-transform: rotateY(0deg);\n transform: rotateY(0deg);\n }\n .credit-card-box .back {\n -webkit-transform: rotateY(180deg);\n transform: rotateY(180deg);\n }\n .credit-card-box .back .logo {\n top: 185px;\n }\n .credit-card-box .chip {\n position: absolute;\n width: 60px;\n height: 45px;\n top: 20px;\n left: 20px;\n background: -webkit-linear-gradient(315deg, #ddccf0 0%, #d1e9f5 44%, #f8ece7 100%);\n background: linear-gradient(135deg, #ddccf0 0%, #d1e9f5 44%, #f8ece7 100%);\n border-radius: 8px;\n }\n .credit-card-box .chip::before {\n content: \'\';\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n border: 4px solid rgba(128, 128, 128, 0.1);\n width: 80%;\n height: 70%;\n border-radius: 5px;\n }\n .credit-card-box .strip {\n background: -webkit-linear-gradient(315deg, #404040, #1a1a1a);\n background: linear-gradient(135deg, #404040, #1a1a1a);\n position: absolute;\n width: 100%;\n height: 50px;\n top: 30px;\n left: 0;\n }\n .credit-card-box .number {\n position: absolute;\n margin: 0 auto;\n top: 103px;\n left: 19px;\n font-size: 30px;\n }\n .credit-card-box label {\n font-size: 10px;\n letter-spacing: 1px;\n text-shadow: none;\n text-transform: uppercase;\n font-weight: normal;\n opacity: 0.5;\n display: block;\n margin-bottom: 3px;\n }\n .credit-card-box .card-holder,\n .credit-card-box .card-expiration-date {\n position: absolute;\n margin: 0 auto;\n top: 180px;\n left: 19px;\n font-size: 22px;\n text-transform: capitalize;\n }\n .credit-card-box .card-expiration-date {\n text-align: right;\n left: auto;\n right: 20px;\n }\n .credit-card-box .ccv {\n height: 36px;\n background: #fff;\n width: 91%;\n border-radius: 5px;\n top: 110px;\n left: 0;\n right: 0;\n position: absolute;\n margin: 0 auto;\n color: #000;\n text-align: right;\n padding: 10px;\n }\n .credit-card-box .ccv label {\n margin: -25px 0 14px;\n color: #fff;\n }\n\n </style></div>'
|
|
6
|
-
})
|
|
7
|
-
export class CardDraw{
|
|
8
|
-
@Input() number: string;
|
|
9
|
-
@Input() name: string;
|
|
10
|
-
@Input() expiration:string;
|
|
11
|
-
@Input() ccv:string;
|
|
12
|
-
@Input() background:string;
|
|
13
|
-
@Input() height:string;
|
|
14
|
-
@Input() width:string;
|
|
15
|
-
@Input() toggle:boolean;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
constructor() {
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var core_1 = require("@angular/core");
|
|
12
|
-
var CardDraw = (function () {
|
|
13
|
-
function CardDraw() {
|
|
14
|
-
}
|
|
15
|
-
return CardDraw;
|
|
16
|
-
}());
|
|
17
|
-
__decorate([
|
|
18
|
-
core_1.Input(),
|
|
19
|
-
__metadata("design:type", String)
|
|
20
|
-
], CardDraw.prototype, "number", void 0);
|
|
21
|
-
__decorate([
|
|
22
|
-
core_1.Input(),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], CardDraw.prototype, "name", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
core_1.Input(),
|
|
27
|
-
__metadata("design:type", String)
|
|
28
|
-
], CardDraw.prototype, "expiration", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
core_1.Input(),
|
|
31
|
-
__metadata("design:type", String)
|
|
32
|
-
], CardDraw.prototype, "ccv", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
core_1.Input(),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], CardDraw.prototype, "background", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
core_1.Input(),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], CardDraw.prototype, "height", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
core_1.Input(),
|
|
43
|
-
__metadata("design:type", String)
|
|
44
|
-
], CardDraw.prototype, "width", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
core_1.Input(),
|
|
47
|
-
__metadata("design:type", Boolean)
|
|
48
|
-
], CardDraw.prototype, "toggle", void 0);
|
|
49
|
-
CardDraw = __decorate([
|
|
50
|
-
core_1.Component({
|
|
51
|
-
selector: 'card-draw',
|
|
52
|
-
template: '<div><div class="checkout"><div class="credit-card-box {{toggle ? \'hover\':\'\'}}"><div class="flip"><div [style.width]="width" [style.height]="height" [style.background]="background" class="front"><div class="chip"></div><div class="logo"><svg version="1.1" id="visa" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="47.834px" height="47.834px" viewBox="0 0 47.834 47.834" style="enable-background:new 0 0 47.834 47.834;"><g><g><path d="M44.688,16.814h-3.004c-0.933,0-1.627,0.254-2.037,1.184l-5.773,13.074h4.083c0,0,0.666-1.758,0.817-2.143 c0.447,0,4.414,0.006,4.979,0.006c0.116,0.498,0.474,2.137,0.474,2.137h3.607L44.688,16.814z M39.893,26.01 c0.32-0.819,1.549-3.987,1.549-3.987c-0.021,0.039,0.317-0.825,0.518-1.362l0.262,1.23c0,0,0.745,3.406,0.901,4.119H39.893z M34.146,26.404c-0.028,2.963-2.684,4.875-6.771,4.875c-1.743-0.018-3.422-0.361-4.332-0.76l0.547-3.193l0.501,0.228 c1.277,0.532,2.104,0.747,3.661,0.747c1.117,0,2.313-0.438,2.325-1.393c0.007-0.625-0.501-1.07-2.016-1.77 c-1.476-0.683-3.43-1.827-3.405-3.876c0.021-2.773,2.729-4.708,6.571-4.708c1.506,0,2.713,0.31,3.483,0.599l-0.526,3.092 l-0.351-0.165c-0.716-0.288-1.638-0.566-2.91-0.546c-1.522,0-2.228,0.634-2.228,1.227c-0.008,0.668,0.824,1.108,2.184,1.77 C33.126,23.546,34.163,24.783,34.146,26.404z M0,16.962l0.05-0.286h6.028c0.813,0.031,1.468,0.29,1.694,1.159l1.311,6.304 C7.795,20.842,4.691,18.099,0,16.962z M17.581,16.812l-6.123,14.239l-4.114,0.007L3.862,19.161 c2.503,1.602,4.635,4.144,5.386,5.914l0.406,1.469l3.808-9.729L17.581,16.812L17.581,16.812z M19.153,16.8h3.89L20.61,31.066 h-3.888L19.153,16.8z"></path></g></g></svg></div><div class="number">{{number}}</div><div class="card-holder"><label>Card holder</label><div>{{name}}</div></div><div class="card-expiration-date"><label>Expires</label><div>{{expiration}}</div></div></div><div [style.width]="width" [style.height]="height" [style.background]="background" class="back"><div class="strip"></div><div class="logo"><svg version="1.1" id="visa" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="47.834px" height="47.834px" viewBox="0 0 47.834 47.834" style="enable-background:new 0 0 47.834 47.834;"><g><g><path d="M44.688,16.814h-3.004c-0.933,0-1.627,0.254-2.037,1.184l-5.773,13.074h4.083c0,0,0.666-1.758,0.817-2.143 c0.447,0,4.414,0.006,4.979,0.006c0.116,0.498,0.474,2.137,0.474,2.137h3.607L44.688,16.814z M39.893,26.01 c0.32-0.819,1.549-3.987,1.549-3.987c-0.021,0.039,0.317-0.825,0.518-1.362l0.262,1.23c0,0,0.745,3.406,0.901,4.119H39.893z M34.146,26.404c-0.028,2.963-2.684,4.875-6.771,4.875c-1.743-0.018-3.422-0.361-4.332-0.76l0.547-3.193l0.501,0.228 c1.277,0.532,2.104,0.747,3.661,0.747c1.117,0,2.313-0.438,2.325-1.393c0.007-0.625-0.501-1.07-2.016-1.77 c-1.476-0.683-3.43-1.827-3.405-3.876c0.021-2.773,2.729-4.708,6.571-4.708c1.506,0,2.713,0.31,3.483,0.599l-0.526,3.092 l-0.351-0.165c-0.716-0.288-1.638-0.566-2.91-0.546c-1.522,0-2.228,0.634-2.228,1.227c-0.008,0.668,0.824,1.108,2.184,1.77 C33.126,23.546,34.163,24.783,34.146,26.404z M0,16.962l0.05-0.286h6.028c0.813,0.031,1.468,0.29,1.694,1.159l1.311,6.304 C7.795,20.842,4.691,18.099,0,16.962z M17.581,16.812l-6.123,14.239l-4.114,0.007L3.862,19.161 c2.503,1.602,4.635,4.144,5.386,5.914l0.406,1.469l3.808-9.729L17.581,16.812L17.581,16.812z M19.153,16.8h3.89L20.61,31.066 h-3.888L19.153,16.8z"></path></g></g></svg></div><div class="ccv"><label>CCV</label><div>{{ccv}}</div></div></div></div></div></div><style>\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n html,\n body {\n min-height: 100%;\n font-family: \'Open sans\', sans-serif;\n }\n\n body {\n background: -webkit-linear-gradient(40deg, #f3c680, #a1e3e2);\n background: linear-gradient(50deg, #f3c680, #a1e3e2);\n }\n\n /*--------------------\n Buttons\n --------------------*/\n .btn {\n display: block;\n background: #bded7d;\n color: white;\n text-decoration: none;\n margin: 20px 0;\n padding: 15px 15px;\n border-radius: 5px;\n position: relative;\n }\n .btn::after {\n content: \'\';\n position: absolute;\n z-index: 1;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n -webkit-transition: all .2s ease-in-out;\n transition: all .2s ease-in-out;\n box-shadow: inset 0 3px 0 transparent, 0 3px 3px rgba(0, 0, 0, 0.2);\n border-radius: 5px;\n }\n .btn:hover::after {\n background: rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.2);\n }\n\n /*--------------------\n Form\n --------------------*/\n .form fieldset {\n border: none;\n padding: 0;\n padding: 10px 0;\n position: relative;\n clear: both;\n }\n .form fieldset.fieldset-expiration {\n float: left;\n width: 60%;\n }\n .form fieldset.fieldset-expiration .select {\n width: 84px;\n margin-right: 12px;\n float: left;\n }\n .form fieldset.fieldset-ccv {\n clear: none;\n float: right;\n width: 86px;\n }\n .form fieldset label {\n display: block;\n text-transform: uppercase;\n font-size: 11px;\n color: rgba(0, 0, 0, 0.6);\n margin-bottom: 5px;\n font-weight: bold;\n font-family: Inconsolata;\n }\n .form fieldset input,\n .form fieldset .select {\n width: 100%;\n height: 38px;\n color: #333333;\n padding: 10px;\n border-radius: 5px;\n font-size: 15px;\n outline: none !important;\n border: 1px solid rgba(0, 0, 0, 0.3);\n box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.2);\n }\n .form fieldset input.input-cart-number,\n .form fieldset .select.input-cart-number {\n width: 82px;\n display: inline-block;\n margin-right: 8px;\n }\n .form fieldset input.input-cart-number:last-child,\n .form fieldset .select.input-cart-number:last-child {\n margin-right: 0;\n }\n .form fieldset .select {\n position: relative;\n }\n .form fieldset .select::after {\n content: \'\';\n border-top: 8px solid #222;\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n position: absolute;\n z-index: 2;\n top: 14px;\n right: 10px;\n pointer-events: none;\n }\n .form fieldset .select select {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n position: absolute;\n padding: 0;\n border: none;\n width: 100%;\n outline: none !important;\n top: 6px;\n left: 6px;\n background: none;\n }\n .form fieldset .select select :-moz-focusring {\n color: transparent;\n text-shadow: 0 0 0 #000;\n }\n .form button {\n width: 100%;\n outline: none !important;\n background: -webkit-linear-gradient(top, #49a09b, #3d8291);\n background: linear-gradient(180deg, #49a09b, #3d8291);\n text-transform: uppercase;\n font-weight: bold;\n border: none;\n box-shadow: none;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n margin-top: 90px;\n }\n .form button .fa {\n margin-right: 6px;\n }\n\n /*--------------------\n Checkout\n --------------------*/\n .checkout {\n margin: 20px auto 0px;\n position: relative;\n max-width: 460px;\n border-radius: 15px;\n }\n\n /*--------------------\n Credit Card\n --------------------*/\n .credit-card-box {\n -webkit-perspective: 1000;\n perspective: 1000;\n width: 400px;\n height: 280px;\n position: relative;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n }\n .credit-card-box:hover .flip, .credit-card-box.hover .flip {\n -webkit-transform: rotateY(180deg);\n transform: rotateY(180deg);\n }\n .credit-card-box .front,\n .credit-card-box .back {\n width: 400px;\n height: 250px;\n border-radius: 15px;\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n background: linear-gradient(135deg, #bd6772, #53223f);\n position: absolute;\n color: #fff;\n font-family: Inconsolata;\n top: 0;\n left: 0;\n text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);\n box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);\n }\n .credit-card-box .front::before,\n .credit-card-box .back::before {\n content: \'\';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: url("http://cdn.flaticon.com/svg/44/44386.svg") no-repeat center;\n background-size: cover;\n opacity: .05;\n }\n .credit-card-box .flip {\n -webkit-transition: 0.6s;\n transition: 0.6s;\n -webkit-transform-style: preserve-3d;\n transform-style: preserve-3d;\n position: relative;\n }\n .credit-card-box .logo {\n position: absolute;\n top: 9px;\n right: 20px;\n width: 60px;\n }\n .credit-card-box .logo svg {\n width: 100%;\n height: auto;\n fill: #fff;\n }\n .credit-card-box .front {\n z-index: 2;\n -webkit-transform: rotateY(0deg);\n transform: rotateY(0deg);\n }\n .credit-card-box .back {\n -webkit-transform: rotateY(180deg);\n transform: rotateY(180deg);\n }\n .credit-card-box .back .logo {\n top: 185px;\n }\n .credit-card-box .chip {\n position: absolute;\n width: 60px;\n height: 45px;\n top: 20px;\n left: 20px;\n background: -webkit-linear-gradient(315deg, #ddccf0 0%, #d1e9f5 44%, #f8ece7 100%);\n background: linear-gradient(135deg, #ddccf0 0%, #d1e9f5 44%, #f8ece7 100%);\n border-radius: 8px;\n }\n .credit-card-box .chip::before {\n content: \'\';\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n border: 4px solid rgba(128, 128, 128, 0.1);\n width: 80%;\n height: 70%;\n border-radius: 5px;\n }\n .credit-card-box .strip {\n background: -webkit-linear-gradient(315deg, #404040, #1a1a1a);\n background: linear-gradient(135deg, #404040, #1a1a1a);\n position: absolute;\n width: 100%;\n height: 50px;\n top: 30px;\n left: 0;\n }\n .credit-card-box .number {\n position: absolute;\n margin: 0 auto;\n top: 103px;\n left: 19px;\n font-size: 30px;\n }\n .credit-card-box label {\n font-size: 10px;\n letter-spacing: 1px;\n text-shadow: none;\n text-transform: uppercase;\n font-weight: normal;\n opacity: 0.5;\n display: block;\n margin-bottom: 3px;\n }\n .credit-card-box .card-holder,\n .credit-card-box .card-expiration-date {\n position: absolute;\n margin: 0 auto;\n top: 180px;\n left: 19px;\n font-size: 22px;\n text-transform: capitalize;\n }\n .credit-card-box .card-expiration-date {\n text-align: right;\n left: auto;\n right: 20px;\n }\n .credit-card-box .ccv {\n height: 36px;\n background: #fff;\n width: 91%;\n border-radius: 5px;\n top: 110px;\n left: 0;\n right: 0;\n position: absolute;\n margin: 0 auto;\n color: #000;\n text-align: right;\n padding: 10px;\n }\n .credit-card-box .ccv label {\n margin: -25px 0 14px;\n color: #fff;\n }\n\n </style></div>'
|
|
53
|
-
}),
|
|
54
|
-
__metadata("design:paramtypes", [])
|
|
55
|
-
], CardDraw);
|
|
56
|
-
exports.CardDraw = CardDraw;
|
|
57
|
-
//# sourceMappingURL=card.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.component.js","sourceRoot":"","sources":["../card.component.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,sCAAgD;AAMhD,IAAa,QAAQ;IAYjB;IAEA,CAAC;IACL,eAAC;AAAD,CAAC,AAfD,IAeC;AAdS;IAAR,YAAK,EAAE;;wCAAgB;AACf;IAAR,YAAK,EAAE;;sCAAc;AACb;IAAR,YAAK,EAAE;;4CAAmB;AAClB;IAAR,YAAK,EAAE;;qCAAY;AACX;IAAR,YAAK,EAAE;;4CAAmB;AAClB;IAAR,YAAK,EAAE;;wCAAe;AACd;IAAR,YAAK,EAAE;;uCAAc;AACb;IAAR,YAAK,EAAE;;wCAAgB;AARZ,QAAQ;IAJpB,gBAAS,CAAC;QACV,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAC,gyVAAgyV;KACzyV,CAAC;;GACW,QAAQ,CAepB;AAfY,4BAAQ"}
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
function __export(m) {
|
|
9
|
-
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
10
|
-
}
|
|
11
|
-
var core_1 = require("@angular/core");
|
|
12
|
-
var common_1 = require("@angular/common");
|
|
13
|
-
var card_component_1 = require("./dist/card.component");
|
|
14
|
-
__export(require("./dist/card.component"));
|
|
15
|
-
var CardModule = CardModule_1 = (function () {
|
|
16
|
-
function CardModule() {
|
|
17
|
-
}
|
|
18
|
-
CardModule.forRoot = function () {
|
|
19
|
-
return {
|
|
20
|
-
ngModule: CardModule_1
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
return CardModule;
|
|
24
|
-
}());
|
|
25
|
-
CardModule = CardModule_1 = __decorate([
|
|
26
|
-
core_1.NgModule({
|
|
27
|
-
imports: [
|
|
28
|
-
common_1.CommonModule
|
|
29
|
-
],
|
|
30
|
-
declarations: [
|
|
31
|
-
card_component_1.CardDraw
|
|
32
|
-
],
|
|
33
|
-
exports: [
|
|
34
|
-
card_component_1.CardDraw
|
|
35
|
-
]
|
|
36
|
-
})
|
|
37
|
-
], CardModule);
|
|
38
|
-
exports.CardModule = CardModule;
|
|
39
|
-
var CardModule_1;
|
|
40
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,sCAA4D;AAC5D,0CAA6C;AAC7C,wDAA+C;AAE/C,2CAAsC;AAatC,IAAa,UAAU;IAAvB;IAMA,CAAC;IALQ,kBAAO,GAAd;QACE,MAAM,CAAC;YACL,QAAQ,EAAE,YAAU;SACrB,CAAC;IACJ,CAAC;IACH,iBAAC;AAAD,CAAC,AAND,IAMC;AANY,UAAU;IAXtB,eAAQ,CAAC;QACR,OAAO,EAAE;YACP,qBAAY;SACb;QACD,YAAY,EAAE;YACZ,yBAAQ;SACT;QACD,OAAO,EAAE;YACP,yBAAQ;SACT;KACF,CAAC;GACW,UAAU,CAMtB;AANY,gCAAU"}
|
package/gulpfile.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var gulp = require('gulp');
|
|
2
|
-
var embedTemplates = require('gulp-angular-embed-templates');
|
|
3
|
-
|
|
4
|
-
gulp.task('js:build', function () {
|
|
5
|
-
gulp.src('./src/card.component.ts') // also can use *.js files
|
|
6
|
-
.pipe(embedTemplates({sourceType:'ts'}))
|
|
7
|
-
.pipe(gulp.dest('./dist'));
|
|
8
|
-
});
|
package/index.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import {NgModule, ModuleWithProviders} from "@angular/core";
|
|
2
|
-
import {CommonModule} from "@angular/common";
|
|
3
|
-
import {CardDraw} from "./dist/card.component";
|
|
4
|
-
|
|
5
|
-
export * from './dist/card.component';
|
|
6
|
-
|
|
7
|
-
@NgModule({
|
|
8
|
-
imports: [
|
|
9
|
-
CommonModule
|
|
10
|
-
],
|
|
11
|
-
declarations: [
|
|
12
|
-
CardDraw
|
|
13
|
-
],
|
|
14
|
-
exports: [
|
|
15
|
-
CardDraw
|
|
16
|
-
]
|
|
17
|
-
})
|
|
18
|
-
export class CardModule {
|
|
19
|
-
static forRoot(): ModuleWithProviders {
|
|
20
|
-
return {
|
|
21
|
-
ngModule: CardModule
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
}
|