@iziui/react 0.0.82-rc → 0.0.83-rc
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.stories.d.ts","sourceRoot":"","sources":["../../../../src/fields/Input/Input.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAOlD,OAAO,KAAyB,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,KAAK,CAW7C,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Input.stories.d.ts","sourceRoot":"","sources":["../../../../src/fields/Input/Input.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAOlD,OAAO,KAAyB,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,KAAK,CAW7C,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,OAAO,KAAK,CA6B3C,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,QAAQ,CAAC,OAAO,KAAK,CAMxC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,KAAK,CAM7C,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,KAAK,CAM7C,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,QAAQ,CAAC,OAAO,KAAK,CAaxC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,KAAK,CAE7C,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CA8G5B,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),h=require("react"),e=require("../../chunks/index-DYxwT4uW.cjs"),i=require("../../chunks/joinClass-Jk3EszKD.cjs"),q=require("../../chunks/createComponent-D4pr5s4h.cjs");require("../../chunks/useTheme-JY_BIRt8.cjs");require("../../chunks/generateSupportColors-CTMoGhDf.cjs");function N({error:r,label:p,helperText:o,endIcon:a,startIcon:u,type:f="text",disabled:n,width:C="100%",...l}){const j=i.joinClass(`${e.prefix}-input-container`),m=i.joinClass(`${e.prefix}-input-label`,r&&`${e.prefix}-input-label--error`),_=i.joinClass(`${e.prefix}-input-container`,`${e.prefix}-input`,n&&`${e.prefix}-input--disabled`,r&&`${e.prefix}-input--error`,l.className),$=i.joinClass(`${e.prefix}-input__helper-text`,o&&`${e.prefix}-input__helper-text--visible`,r&&`${e.prefix}-input__helper-text--error`),c=(s,d)=>h.cloneElement(s,{disabled:n,size:30,type:"button",color:"grey",style:{...s.props.style},className:i.joinClass(s.props.className,`${e.prefix}-input__icon`,`${e.prefix}-input__icon--margin-${d}`),onClick:x=>{x.stopPropagation(),s.props.onClick&&s.props.onClick(x)}});return t.jsxs("div",{className:j,style:{width:C},children:[p&&t.jsxs("label",{className:m,children:[p," ",l.required&&"*"]}),t.jsxs("div",{className:_,children:[u&&c(u,"right"),t.jsx("input",{...l,type:f,disabled:n}),a&&c(a,"left")]}),t.jsx("p",{className:$,children:o})]})}const b=q.createComponent(N);exports.default=b;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),h=require("react"),e=require("../../chunks/index-DYxwT4uW.cjs"),i=require("../../chunks/joinClass-Jk3EszKD.cjs"),q=require("../../chunks/createComponent-D4pr5s4h.cjs");require("../../chunks/useTheme-JY_BIRt8.cjs");require("../../chunks/generateSupportColors-CTMoGhDf.cjs");function N({error:r,label:p,helperText:o,endIcon:a,startIcon:u,type:f="text",disabled:n,width:C="100%",...l}){const j=i.joinClass(`${e.prefix}-input-container`),m=i.joinClass(`${e.prefix}-input-label`,r&&`${e.prefix}-input-label--error`),_=i.joinClass(`${e.prefix}-input-container`,`${e.prefix}-input`,n&&`${e.prefix}-input--disabled`,r&&`${e.prefix}-input--error`,l.className),$=i.joinClass(`${e.prefix}-input__helper-text`,o&&`${e.prefix}-input__helper-text--visible`,r&&`${e.prefix}-input__helper-text--error`),c=(s,d)=>h.cloneElement(s,{disabled:n,size:s.props.size||30,type:"button",color:"grey",style:{...s.props.style},className:i.joinClass(s.props.className,`${e.prefix}-input__icon`,`${e.prefix}-input__icon--margin-${d}`),onClick:x=>{x.stopPropagation(),s.props.onClick&&s.props.onClick(x)}});return t.jsxs("div",{className:j,style:{width:C},children:[p&&t.jsxs("label",{className:m,children:[p," ",l.required&&"*"]}),t.jsxs("div",{className:_,children:[u&&c(u,"right"),t.jsx("input",{...l,type:f,disabled:n}),a&&c(a,"left")]}),t.jsx("p",{className:$,children:o})]})}const b=q.createComponent(N);exports.default=b;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/fields/Input/Input.tsx"],"sourcesContent":["import { type InputHTMLAttributes, type ReactElement, type MouseEvent, cloneElement, CSSProperties } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport type { ButtonIconProps } from '@/actions/ButtonIcon';\nimport createComponent from '@/core';\n\nimport '@iziui/styles/components/Input.scss';\n\nexport type InputType = 'text' | 'password' | 'number' | 'date' | 'month' | 'tel';\n\nexport interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {\n error?: boolean;\n label?: string;\n helperText?: string;\n type?: InputType;\n width?: CSSProperties['width'];\n endIcon?: React.JSX.Element | boolean;\n startIcon?: React.JSX.Element | boolean;\n}\n\nfunction Input({\n error,\n label,\n helperText,\n endIcon,\n startIcon,\n type = 'text',\n disabled,\n width = '100%',\n ...props\n}: InputProps) {\n const containerClss = joinClass(\n `${prefix}-input-container`,\n );\n\n const labelClss = joinClass(\n `${prefix}-input-label`,\n error && `${prefix}-input-label--error`,\n );\n\n const classes = joinClass(\n `${prefix}-input-container`,\n `${prefix}-input`,\n disabled && `${prefix}-input--disabled`,\n error && `${prefix}-input--error`,\n props.className\n );\n\n const helperTextClss = joinClass(\n `${prefix}-input__helper-text`,\n helperText && `${prefix}-input__helper-text--visible`,\n error && `${prefix}-input__helper-text--error`\n );\n\n const renderIcon = (icon: ReactElement<ButtonIconProps>, direction: 'left' | 'right') => {\n return cloneElement(icon, {\n disabled,\n size: 30,\n type: 'button',\n color: 'grey',\n style: {\n ...icon.props.style,\n },\n className: joinClass(\n icon.props.className,\n `${prefix}-input__icon`,\n `${prefix}-input__icon--margin-${direction}`\n ),\n onClick: (e: MouseEvent<any, globalThis.MouseEvent>) => {\n e.stopPropagation();\n if (icon.props.onClick) { icon.props.onClick(e); };\n }\n });\n };\n\n return (\n <div className={containerClss} style={{ width }}>\n {label && <label className={labelClss}>{label} {props.required && '*'}</label>}\n <div className={classes}>\n {startIcon && renderIcon(startIcon as React.JSX.Element, 'right')}\n <input {...props} type={type} disabled={disabled} />\n {endIcon && renderIcon(endIcon as React.JSX.Element, 'left')}\n </div>\n <p className={helperTextClss}>{helperText}</p>\n </div>\n );\n}\n\nexport default createComponent(Input);"],"names":["Input","error","label","helperText","endIcon","startIcon","type","disabled","width","props","containerClss","joinClass","prefix","labelClss","classes","helperTextClss","renderIcon","icon","direction","cloneElement","e","jsxs","jsx","Input_default","createComponent"],"mappings":"kaAuBA,SAASA,EAAM,CACb,MAAAC,EACA,MAAAC,EACA,WAAAC,EACA,QAAAC,EACA,UAAAC,EACA,KAAAC,EAAO,OACP,SAAAC,EACA,MAAAC,EAAQ,OACR,GAAGC,CACL,EAAe,CACb,MAAMC,EAAgBC,EAAAA,UACpB,GAAGC,EAAAA,MAAM,kBAAA,EAGLC,EAAYF,EAAAA,UAChB,GAAGC,EAAAA,MAAM,eACTX,GAAS,GAAGW,EAAAA,MAAM,qBAAA,EAGdE,EAAUH,EAAAA,UACd,GAAGC,EAAAA,MAAM,mBACT,GAAGA,EAAAA,MAAM,SACTL,GAAY,GAAGK,EAAAA,MAAM,mBACrBX,GAAS,GAAGW,EAAAA,MAAM,gBAClBH,EAAM,SAAA,EAGFM,EAAiBJ,EAAAA,UACrB,GAAGC,EAAAA,MAAM,sBACTT,GAAc,GAAGS,EAAAA,MAAM,+BACvBX,GAAS,GAAGW,EAAAA,MAAM,4BAAA,EAGdI,EAAa,CAACC,EAAqCC,IAChDC,EAAAA,aAAaF,EAAM,CACxB,SAAAV,EACA,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/fields/Input/Input.tsx"],"sourcesContent":["import { type InputHTMLAttributes, type ReactElement, type MouseEvent, cloneElement, CSSProperties } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport type { ButtonIconProps } from '@/actions/ButtonIcon';\nimport createComponent from '@/core';\n\nimport '@iziui/styles/components/Input.scss';\n\nexport type InputType = 'text' | 'password' | 'number' | 'date' | 'month' | 'tel';\n\nexport interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {\n error?: boolean;\n label?: string;\n helperText?: string;\n type?: InputType;\n width?: CSSProperties['width'];\n endIcon?: React.JSX.Element | boolean;\n startIcon?: React.JSX.Element | boolean;\n}\n\nfunction Input({\n error,\n label,\n helperText,\n endIcon,\n startIcon,\n type = 'text',\n disabled,\n width = '100%',\n ...props\n}: InputProps) {\n const containerClss = joinClass(\n `${prefix}-input-container`,\n );\n\n const labelClss = joinClass(\n `${prefix}-input-label`,\n error && `${prefix}-input-label--error`,\n );\n\n const classes = joinClass(\n `${prefix}-input-container`,\n `${prefix}-input`,\n disabled && `${prefix}-input--disabled`,\n error && `${prefix}-input--error`,\n props.className\n );\n\n const helperTextClss = joinClass(\n `${prefix}-input__helper-text`,\n helperText && `${prefix}-input__helper-text--visible`,\n error && `${prefix}-input__helper-text--error`\n );\n\n const renderIcon = (icon: ReactElement<ButtonIconProps>, direction: 'left' | 'right') => {\n return cloneElement(icon, {\n disabled,\n size: icon.props.size || 30,\n type: 'button',\n color: 'grey',\n style: {\n ...icon.props.style,\n },\n className: joinClass(\n icon.props.className,\n `${prefix}-input__icon`,\n `${prefix}-input__icon--margin-${direction}`\n ),\n onClick: (e: MouseEvent<any, globalThis.MouseEvent>) => {\n e.stopPropagation();\n if (icon.props.onClick) { icon.props.onClick(e); };\n }\n });\n };\n\n return (\n <div className={containerClss} style={{ width }}>\n {label && <label className={labelClss}>{label} {props.required && '*'}</label>}\n <div className={classes}>\n {startIcon && renderIcon(startIcon as React.JSX.Element, 'right')}\n <input {...props} type={type} disabled={disabled} />\n {endIcon && renderIcon(endIcon as React.JSX.Element, 'left')}\n </div>\n <p className={helperTextClss}>{helperText}</p>\n </div>\n );\n}\n\nexport default createComponent(Input);"],"names":["Input","error","label","helperText","endIcon","startIcon","type","disabled","width","props","containerClss","joinClass","prefix","labelClss","classes","helperTextClss","renderIcon","icon","direction","cloneElement","e","jsxs","jsx","Input_default","createComponent"],"mappings":"kaAuBA,SAASA,EAAM,CACb,MAAAC,EACA,MAAAC,EACA,WAAAC,EACA,QAAAC,EACA,UAAAC,EACA,KAAAC,EAAO,OACP,SAAAC,EACA,MAAAC,EAAQ,OACR,GAAGC,CACL,EAAe,CACb,MAAMC,EAAgBC,EAAAA,UACpB,GAAGC,EAAAA,MAAM,kBAAA,EAGLC,EAAYF,EAAAA,UAChB,GAAGC,EAAAA,MAAM,eACTX,GAAS,GAAGW,EAAAA,MAAM,qBAAA,EAGdE,EAAUH,EAAAA,UACd,GAAGC,EAAAA,MAAM,mBACT,GAAGA,EAAAA,MAAM,SACTL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}from"../../chunks/index-CZ41y9Hn.js";import{j as s}from"../../chunks/joinClass-anSpaauN.js";import{c as b}from"../../chunks/createComponent-DVEGAquv.js";import"../../chunks/useTheme-0mDIfCdt.js";import"../../chunks/generateSupportColors-BN5t8dA-.js";function g({error:r,label:l,helperText:o,endIcon:a,startIcon:c,type:f="text",disabled:n,width:_="100%",...i}){const h=s(`${t}-input-container`),x=s(`${t}-input-label`,r&&`${t}-input-label--error`),C=s(`${t}-input-container`,`${t}-input`,n&&`${t}-input--disabled`,r&&`${t}-input--error`,i.className),d=s(`${t}-input__helper-text`,o&&`${t}-input__helper-text--visible`,r&&`${t}-input__helper-text--error`),m=(e,N)=>y(e,{disabled:n,size:e.props.size||30,type:"button",color:"grey",style:{...e.props.style},className:s(e.props.className,`${t}-input__icon`,`${t}-input__icon--margin-${N}`),onClick:u=>{u.stopPropagation(),e.props.onClick&&e.props.onClick(u)}});return p("div",{className:h,style:{width:_},children:[l&&p("label",{className:x,children:[l," ",i.required&&"*"]}),p("div",{className:C,children:[c&&m(c,"right"),$("input",{...i,type:f,disabled:n}),a&&m(a,"left")]}),$("p",{className:d,children:o})]})}const P=b(g);export{P as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/fields/Input/Input.tsx"],"sourcesContent":["import { type InputHTMLAttributes, type ReactElement, type MouseEvent, cloneElement, CSSProperties } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport type { ButtonIconProps } from '@/actions/ButtonIcon';\nimport createComponent from '@/core';\n\nimport '@iziui/styles/components/Input.scss';\n\nexport type InputType = 'text' | 'password' | 'number' | 'date' | 'month' | 'tel';\n\nexport interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {\n error?: boolean;\n label?: string;\n helperText?: string;\n type?: InputType;\n width?: CSSProperties['width'];\n endIcon?: React.JSX.Element | boolean;\n startIcon?: React.JSX.Element | boolean;\n}\n\nfunction Input({\n error,\n label,\n helperText,\n endIcon,\n startIcon,\n type = 'text',\n disabled,\n width = '100%',\n ...props\n}: InputProps) {\n const containerClss = joinClass(\n `${prefix}-input-container`,\n );\n\n const labelClss = joinClass(\n `${prefix}-input-label`,\n error && `${prefix}-input-label--error`,\n );\n\n const classes = joinClass(\n `${prefix}-input-container`,\n `${prefix}-input`,\n disabled && `${prefix}-input--disabled`,\n error && `${prefix}-input--error`,\n props.className\n );\n\n const helperTextClss = joinClass(\n `${prefix}-input__helper-text`,\n helperText && `${prefix}-input__helper-text--visible`,\n error && `${prefix}-input__helper-text--error`\n );\n\n const renderIcon = (icon: ReactElement<ButtonIconProps>, direction: 'left' | 'right') => {\n return cloneElement(icon, {\n disabled,\n size: 30,\n type: 'button',\n color: 'grey',\n style: {\n ...icon.props.style,\n },\n className: joinClass(\n icon.props.className,\n `${prefix}-input__icon`,\n `${prefix}-input__icon--margin-${direction}`\n ),\n onClick: (e: MouseEvent<any, globalThis.MouseEvent>) => {\n e.stopPropagation();\n if (icon.props.onClick) { icon.props.onClick(e); };\n }\n });\n };\n\n return (\n <div className={containerClss} style={{ width }}>\n {label && <label className={labelClss}>{label} {props.required && '*'}</label>}\n <div className={classes}>\n {startIcon && renderIcon(startIcon as React.JSX.Element, 'right')}\n <input {...props} type={type} disabled={disabled} />\n {endIcon && renderIcon(endIcon as React.JSX.Element, 'left')}\n </div>\n <p className={helperTextClss}>{helperText}</p>\n </div>\n );\n}\n\nexport default createComponent(Input);"],"names":["Input","error","label","helperText","endIcon","startIcon","type","disabled","width","props","containerClss","joinClass","prefix","labelClss","classes","helperTextClss","renderIcon","icon","direction","cloneElement","e","jsxs","jsx","Input_default","createComponent"],"mappings":"+VAuBA,SAASA,EAAM,CACb,MAAAC,EACA,MAAAC,EACA,WAAAC,EACA,QAAAC,EACA,UAAAC,EACA,KAAAC,EAAO,OACP,SAAAC,EACA,MAAAC,EAAQ,OACR,GAAGC,CACL,EAAe,CACb,MAAMC,EAAgBC,EACpB,GAAGC,CAAM,kBAAA,EAGLC,EAAYF,EAChB,GAAGC,CAAM,eACTX,GAAS,GAAGW,CAAM,qBAAA,EAGdE,EAAUH,EACd,GAAGC,CAAM,mBACT,GAAGA,CAAM,SACTL,GAAY,GAAGK,CAAM,mBACrBX,GAAS,GAAGW,CAAM,gBAClBH,EAAM,SAAA,EAGFM,EAAiBJ,EACrB,GAAGC,CAAM,sBACTT,GAAc,GAAGS,CAAM,+BACvBX,GAAS,GAAGW,CAAM,4BAAA,EAGdI,EAAa,CAACC,EAAqCC,IAChDC,EAAaF,EAAM,CACxB,SAAAV,EACA,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/fields/Input/Input.tsx"],"sourcesContent":["import { type InputHTMLAttributes, type ReactElement, type MouseEvent, cloneElement, CSSProperties } from 'react';\n\nimport { prefix } from '@iziui/tokens/web/js';\n\nimport { joinClass } from '@iziui/core/utils/joinClass';\n\nimport type { ButtonIconProps } from '@/actions/ButtonIcon';\nimport createComponent from '@/core';\n\nimport '@iziui/styles/components/Input.scss';\n\nexport type InputType = 'text' | 'password' | 'number' | 'date' | 'month' | 'tel';\n\nexport interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {\n error?: boolean;\n label?: string;\n helperText?: string;\n type?: InputType;\n width?: CSSProperties['width'];\n endIcon?: React.JSX.Element | boolean;\n startIcon?: React.JSX.Element | boolean;\n}\n\nfunction Input({\n error,\n label,\n helperText,\n endIcon,\n startIcon,\n type = 'text',\n disabled,\n width = '100%',\n ...props\n}: InputProps) {\n const containerClss = joinClass(\n `${prefix}-input-container`,\n );\n\n const labelClss = joinClass(\n `${prefix}-input-label`,\n error && `${prefix}-input-label--error`,\n );\n\n const classes = joinClass(\n `${prefix}-input-container`,\n `${prefix}-input`,\n disabled && `${prefix}-input--disabled`,\n error && `${prefix}-input--error`,\n props.className\n );\n\n const helperTextClss = joinClass(\n `${prefix}-input__helper-text`,\n helperText && `${prefix}-input__helper-text--visible`,\n error && `${prefix}-input__helper-text--error`\n );\n\n const renderIcon = (icon: ReactElement<ButtonIconProps>, direction: 'left' | 'right') => {\n return cloneElement(icon, {\n disabled,\n size: icon.props.size || 30,\n type: 'button',\n color: 'grey',\n style: {\n ...icon.props.style,\n },\n className: joinClass(\n icon.props.className,\n `${prefix}-input__icon`,\n `${prefix}-input__icon--margin-${direction}`\n ),\n onClick: (e: MouseEvent<any, globalThis.MouseEvent>) => {\n e.stopPropagation();\n if (icon.props.onClick) { icon.props.onClick(e); };\n }\n });\n };\n\n return (\n <div className={containerClss} style={{ width }}>\n {label && <label className={labelClss}>{label} {props.required && '*'}</label>}\n <div className={classes}>\n {startIcon && renderIcon(startIcon as React.JSX.Element, 'right')}\n <input {...props} type={type} disabled={disabled} />\n {endIcon && renderIcon(endIcon as React.JSX.Element, 'left')}\n </div>\n <p className={helperTextClss}>{helperText}</p>\n </div>\n );\n}\n\nexport default createComponent(Input);"],"names":["Input","error","label","helperText","endIcon","startIcon","type","disabled","width","props","containerClss","joinClass","prefix","labelClss","classes","helperTextClss","renderIcon","icon","direction","cloneElement","e","jsxs","jsx","Input_default","createComponent"],"mappings":"+VAuBA,SAASA,EAAM,CACb,MAAAC,EACA,MAAAC,EACA,WAAAC,EACA,QAAAC,EACA,UAAAC,EACA,KAAAC,EAAO,OACP,SAAAC,EACA,MAAAC,EAAQ,OACR,GAAGC,CACL,EAAe,CACb,MAAMC,EAAgBC,EACpB,GAAGC,CAAM,kBAAA,EAGLC,EAAYF,EAChB,GAAGC,CAAM,eACTX,GAAS,GAAGW,CAAM,qBAAA,EAGdE,EAAUH,EACd,GAAGC,CAAM,mBACT,GAAGA,CAAM,SACTL,GAAY,GAAGK,CAAM,mBACrBX,GAAS,GAAGW,CAAM,gBAClBH,EAAM,SAAA,EAGFM,EAAiBJ,EACrB,GAAGC,CAAM,sBACTT,GAAc,GAAGS,CAAM,+BACvBX,GAAS,GAAGW,CAAM,4BA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