@cleartrip/talos-cancellation-window 1.1.0-beta-260514-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.
@@ -0,0 +1,5 @@
1
+ import type { IWidgetProps } from "@cleartrip/talos-widget-types";
2
+ import type { ICancellationWindowProps } from "./type";
3
+ declare const CancellationWindow: ({ data, }: IWidgetProps<ICancellationWindowProps>) => import("react/jsx-runtime").JSX.Element;
4
+ export default CancellationWindow;
5
+ //# sourceMappingURL=CancellationWindow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CancellationWindow.d.ts","sourceRoot":"","sources":["../packages/components/cancellation-window/src/CancellationWindow.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAC;AAGvD,QAAA,MAAM,kBAAkB,cAErB,aAAa,wBAAwB,CAAC,4CAgJxC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as CancellationWindow } from './CancellationWindow';
2
+ export * from './type';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/components/cancellation-window/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,112 @@
1
+ import { Theme } from "@cleartrip/ct-design-components";
2
+ export declare const getCancellationWindowStyle: (theme: Theme) => {
3
+ sectionTitle: {
4
+ marginBottom: "12px";
5
+ };
6
+ card: {
7
+ borderWidth: "1px";
8
+ borderStyle: string;
9
+ borderColor: string;
10
+ borderRadius: "12px";
11
+ overflow: string;
12
+ backgroundColor: string;
13
+ };
14
+ cardHeader: {
15
+ display: string;
16
+ flexDirection: string;
17
+ justifyContent: string;
18
+ paddingLeft: "16px";
19
+ paddingRight: "16px";
20
+ paddingTop: "16px";
21
+ paddingBottom: "16px";
22
+ marginBottom: "16px";
23
+ };
24
+ rowsContainer: {
25
+ paddingLeft: "16px";
26
+ paddingRight: "16px";
27
+ gap: "4px";
28
+ display: string;
29
+ flexDirection: string;
30
+ };
31
+ row: {
32
+ display: string;
33
+ flexDirection: string;
34
+ justifyContent: string;
35
+ alignItems: string;
36
+ };
37
+ timeCell: {
38
+ flexShrink: number;
39
+ flexGrow: number;
40
+ minWidth: number;
41
+ display: string;
42
+ flexDirection: string;
43
+ alignItems: string;
44
+ };
45
+ timeText: {
46
+ flexShrink: number;
47
+ minWidth: number;
48
+ marginTop: string;
49
+ };
50
+ timeArrow: {
51
+ marginLeft: "4px";
52
+ marginTop: string;
53
+ flexShrink: number;
54
+ };
55
+ chargeCell: {
56
+ width: string;
57
+ height: "56px";
58
+ marginLeft: "8px";
59
+ borderTopRightRadius: "8px";
60
+ borderBottomRightRadius: "8px";
61
+ };
62
+ chargeInner: {
63
+ display: string;
64
+ flexDirection: string;
65
+ alignItems: string;
66
+ height: string;
67
+ };
68
+ chargeBar: {
69
+ width: "4px";
70
+ height: string;
71
+ alignSelf: string;
72
+ borderTopLeftRadius: "4px";
73
+ borderBottomLeftRadius: "4px";
74
+ };
75
+ chargeContent: {
76
+ flexGrow: number;
77
+ height: string;
78
+ paddingLeft: "12px";
79
+ paddingRight: "12px";
80
+ paddingTop: number;
81
+ paddingBottom: number;
82
+ display: string;
83
+ justifyContent: string;
84
+ };
85
+ chargeContentRight: {
86
+ width: string;
87
+ height: string;
88
+ display: string;
89
+ flexDirection: string;
90
+ justifyContent: string;
91
+ alignItems: string;
92
+ };
93
+ chargeTextRight: {
94
+ textAlign: string;
95
+ };
96
+ description: {
97
+ marginTop: string;
98
+ };
99
+ boundaryRow: {
100
+ marginTop: string;
101
+ marginBottom: "16px";
102
+ };
103
+ boundaryChargeCell: {
104
+ width: string;
105
+ marginLeft: "8px";
106
+ };
107
+ };
108
+ export declare const getCancellationToneColors: (theme: Theme, tone: string) => {
109
+ backgroundColor: string;
110
+ barColor: string;
111
+ };
112
+ //# sourceMappingURL=style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../packages/components/cancellation-window/src/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAGxD,eAAO,MAAM,0BAA0B,UAAW,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GtD,CAAC;AAEF,eAAO,MAAM,yBAAyB,UAC7B,KAAK,QACN,MAAM,KACX;IAAE,eAAe,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAuB7C,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";var r,n=require("tslib"),e=require("react/jsx-runtime"),i=require("react"),o=require("@cleartrip/ct-design-components"),a=require("@cleartrip/talos-assets-icons");exports.CancellationPolicyTone=void 0,(r=exports.CancellationPolicyTone||(exports.CancellationPolicyTone={})).SUCCESS="success",r.WARNING="warning",r.DANGER="danger";exports.CancellationWindow=function(r){var s,t,c=r.data||{},g=c.primaryText,l=void 0===g?"":g,d=c.secondaryText,h=void 0===d?"":d,p=c.sections,C=void 0===p?[]:p,x=o.useTheme(),y=i.useMemo(function(){return function(r){return{sectionTitle:{marginBottom:r.spacing[3]},card:{borderWidth:r.border.width.sm,borderStyle:"solid",borderColor:r.color.border.disabledDark,borderRadius:r.border.radius[12],overflow:"hidden",backgroundColor:r.color.background.neutral},cardHeader:{display:"flex",flexDirection:"row",justifyContent:"space-between",paddingLeft:r.spacing[4],paddingRight:r.spacing[4],paddingTop:r.spacing[4],paddingBottom:r.spacing[4],marginBottom:r.spacing[4]},rowsContainer:{paddingLeft:r.spacing[4],paddingRight:r.spacing[4],gap:r.spacing[1],display:"flex",flexDirection:"column"},row:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"flex-start"},timeCell:{flexShrink:1,flexGrow:0,minWidth:0,display:"flex",flexDirection:"row",alignItems:"center"},timeText:{flexShrink:1,minWidth:0,marginTop:"-".concat(r.spacing[2])},timeArrow:{marginLeft:r.spacing[1],marginTop:"-".concat(r.spacing[2]),flexShrink:0},chargeCell:{width:"156px",height:r.size[14],marginLeft:r.spacing[2],borderTopRightRadius:r.border.radius[8],borderBottomRightRadius:r.border.radius[8]},chargeInner:{display:"flex",flexDirection:"row",alignItems:"stretch",height:"100%"},chargeBar:{width:r.spacing[1],height:"100%",alignSelf:"stretch",borderTopLeftRadius:r.border.radius[4],borderBottomLeftRadius:r.border.radius[4]},chargeContent:{flexGrow:1,height:"100%",paddingLeft:r.spacing[3],paddingRight:r.spacing[3],paddingTop:0,paddingBottom:0,display:"flex",justifyContent:"center"},chargeContentRight:{width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"},chargeTextRight:{textAlign:"right"},description:{marginTop:"-".concat(r.spacing[1])},boundaryRow:{marginTop:"-".concat(r.spacing[1]),marginBottom:r.spacing[4]},boundaryChargeCell:{width:"156px",marginLeft:r.spacing[2]}}}(x)},[x]),u=C.length>0,_=u&&"string"==typeof(null===(s=C[C.length-1])||void 0===s?void 0:s.end)?null===(t=C[C.length-1])||void 0===t?void 0:t.end:null;return e.jsx(e.Fragment,{children:u?e.jsx(o.Container,{children:e.jsxs(o.Container,n.__assign({css:y.card},{children:[e.jsxs(o.Container,n.__assign({css:y.cardHeader},{children:[e.jsx(o.Typography,n.__assign({variant:o.TypographyVariant.B3CAPS,color:o.TypographyColor.SUBHEADING},{children:l})),e.jsx(o.Typography,n.__assign({variant:o.TypographyVariant.B3CAPS,color:o.TypographyColor.SUBHEADING},{children:h}))]})),e.jsxs(o.Container,n.__assign({css:y.rowsContainer},{children:[C.map(function(r,i){var s=function(r,n){switch(n){case exports.CancellationPolicyTone.SUCCESS:return{backgroundColor:r.color.background.successLightBg,barColor:r.color.text.success};case exports.CancellationPolicyTone.WARNING:return{backgroundColor:r.color.background.alertLightBg,barColor:r.color.text.alert};case exports.CancellationPolicyTone.DANGER:return{backgroundColor:r.color.background.warningLightBg,barColor:r.color.text.warning};default:return{backgroundColor:r.color.background.successLightBg,barColor:r.color.text.success}}}(x,r.tone),t={backgroundColor:s.backgroundColor},c={backgroundColor:s.barColor};return e.jsxs(o.Container,n.__assign({css:y.row},{children:[e.jsxs(o.Container,n.__assign({css:y.timeCell},{children:[e.jsx(o.Container,n.__assign({css:y.timeText},{children:e.jsx(o.Typography,n.__assign({variant:o.TypographyVariant.B2,color:o.TypographyColor.PRIMARY},{children:r.start}))})),e.jsx(o.Container,n.__assign({css:y.timeArrow},{children:e.jsx(a.RightChevron,{width:4,height:8})}))]})),e.jsx(o.Container,n.__assign({css:n.__assign(n.__assign({},y.chargeCell),t)},{children:e.jsxs(o.Container,n.__assign({css:y.chargeInner},{children:[e.jsx(o.Container,{css:n.__assign(n.__assign({},y.chargeBar),c)}),e.jsx(o.Container,n.__assign({css:y.chargeContent},{children:"amount"===r.charge.kind?e.jsx(o.Container,n.__assign({css:y.chargeContentRight},{children:e.jsx(o.Typography,n.__assign({variant:o.TypographyVariant.B2,color:o.TypographyColor.PRIMARY},{children:r.charge.value}))})):e.jsxs(o.Container,n.__assign({css:y.chargeContentRight},{children:[e.jsx(o.Typography,n.__assign({variant:o.TypographyVariant.B2,color:o.TypographyColor.PRIMARY},{children:r.charge.primaryText})),!!r.charge.secondaryText&&e.jsx(o.Typography,n.__assign({variant:o.TypographyVariant.B4,color:o.TypographyColor.SUBHEADING},{children:r.charge.secondaryText}))]}))}))]}))}))]}),"".concat(r.start,"-").concat(i))}),_&&e.jsxs(o.Container,n.__assign({css:n.__assign(n.__assign({},y.row),y.boundaryRow)},{children:[e.jsxs(o.Container,n.__assign({css:y.timeCell},{children:[e.jsx(o.Container,n.__assign({css:y.timeText},{children:e.jsx(o.Typography,n.__assign({variant:o.TypographyVariant.B2,color:o.TypographyColor.PRIMARY},{children:_}))})),e.jsx(o.Container,n.__assign({css:y.timeArrow},{children:e.jsx(a.RightChevron,{width:4,height:8})}))]})),e.jsx(o.Container,{css:y.boundaryChargeCell})]}))]}))]}))}):null})};
2
+ //# sourceMappingURL=talos-cancellation-window.browser.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"talos-cancellation-window.browser.cjs.js","sources":["../packages/components/cancellation-window/src/type.ts","../packages/components/cancellation-window/src/CancellationWindow.tsx","../packages/components/cancellation-window/src/style.ts"],"sourcesContent":[null,null,null],"names":["CancellationPolicyTone","_a","_d","data","_e","primaryText","_f","secondaryText","_g","sections","policyRows","theme","useTheme","staticStyles","useMemo","sectionTitle","marginBottom","spacing","card","borderWidth","border","width","sm","borderStyle","borderColor","color","disabledDark","borderRadius","radius","overflow","backgroundColor","background","neutral","cardHeader","display","flexDirection","justifyContent","paddingLeft","paddingRight","paddingTop","paddingBottom","rowsContainer","gap","row","alignItems","timeCell","flexShrink","flexGrow","minWidth","timeText","marginTop","timeArrow","marginLeft","chargeCell","height","size","borderTopRightRadius","borderBottomRightRadius","chargeInner","chargeBar","alignSelf","borderTopLeftRadius","borderBottomLeftRadius","chargeContent","chargeContentRight","chargeTextRight","textAlign","description","boundaryRow","boundaryChargeCell","getCancellationWindowStyle","hasCard","length","boundaryText","_b","end","_c","_jsx","_Fragment","children","jsx","Container","_jsxs","__assign","css","jsxs","Typography","variant","TypographyVariant","B3CAPS","TypographyColor","SUBHEADING","map","rowIndex","tone","SUCCESS","successLightBg","barColor","text","success","WARNING","alertLightBg","alert","DANGER","warningLightBg","warning","getCancellationToneColors","chargeCellBackground","chargeBarBackground","B2","PRIMARY","start","RightChevron","charge","kind","value","B4","concat"],"mappings":"iBAAYA,+JAAAA,QAIXA,4BAAA,GAJWA,EAAAA,QAAsBA,yBAAtBA,+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EAAIsE,OAAO5G,iBAEXsC,EAAIsE,OAAO1G,eACZsE,MAACS,EAAAA,WACCH,EAAAA,SAAA,CAAAI,QAASC,oBAAkB4B,GAC3B3F,MAAOiE,EAAeA,gBAACC,YAAU,CAAAZ,SAEhCpC,EAAIsE,OAAO1G,kCArDrB,GAAA8G,OAAG1E,EAAIoE,MAAK,KAAAM,OAAIxB,MAiE1BpB,GACCS,EAAAA,KAACD,EAASA,sBACRG,IAAGD,WAAAA,EAAAA,SAAA,CAAA,EACEtE,EAAa8B,KACb9B,EAAauD,cAGlB,CAAAW,SAAA,CAAAG,EAAAA,KAACD,EAASA,UAAAE,WAAA,CAACC,IAAKvE,EAAagC,qBAC3BgC,EAACG,IAAAC,wBAAUG,IAAKvE,EAAaoC,UAAQ,CAAA8B,SACnCF,MAACS,aAAUH,EAAAA,SAAA,CACTI,QAASC,EAAAA,kBAAkBqB,GAC3BpF,MAAOiE,EAAAA,gBAAgBoB,SAEtB,CAAA/B,SAAAN,QAGLI,MAACI,EAAAA,UAASE,EAAAA,SAAA,CAACC,IAAKvE,EAAasC,WAC3B,CAAA4B,SAAAF,EAAAG,IAACgC,eAAa,CAAA3F,MAAO,EAAGiC,OAAQ,WAGpCuB,MAACI,YAAS,CAACG,IAAKvE,EAAawD,mCAMrC,MAGV"}
@@ -0,0 +1,2 @@
1
+ import{__assign as r}from"tslib";import{jsx as e,Fragment as i,jsxs as n}from"react/jsx-runtime";import{useMemo as o}from"react";import{useTheme as t,Container as c,Typography as a,TypographyVariant as d,TypographyColor as l}from"@cleartrip/ct-design-components";import{RightChevron as s}from"@cleartrip/talos-assets-icons";var g;!function(r){r.SUCCESS="success",r.WARNING="warning",r.DANGER="danger"}(g||(g={}));var h=function(h){var p,u,m=h.data||{},f=m.primaryText,b=void 0===f?"":f,C=m.secondaryText,x=void 0===C?"":C,w=m.sections,R=void 0===w?[]:w,B=t(),y=o(function(){return function(r){return{sectionTitle:{marginBottom:r.spacing[3]},card:{borderWidth:r.border.width.sm,borderStyle:"solid",borderColor:r.color.border.disabledDark,borderRadius:r.border.radius[12],overflow:"hidden",backgroundColor:r.color.background.neutral},cardHeader:{display:"flex",flexDirection:"row",justifyContent:"space-between",paddingLeft:r.spacing[4],paddingRight:r.spacing[4],paddingTop:r.spacing[4],paddingBottom:r.spacing[4],marginBottom:r.spacing[4]},rowsContainer:{paddingLeft:r.spacing[4],paddingRight:r.spacing[4],gap:r.spacing[1],display:"flex",flexDirection:"column"},row:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"flex-start"},timeCell:{flexShrink:1,flexGrow:0,minWidth:0,display:"flex",flexDirection:"row",alignItems:"center"},timeText:{flexShrink:1,minWidth:0,marginTop:"-".concat(r.spacing[2])},timeArrow:{marginLeft:r.spacing[1],marginTop:"-".concat(r.spacing[2]),flexShrink:0},chargeCell:{width:"156px",height:r.size[14],marginLeft:r.spacing[2],borderTopRightRadius:r.border.radius[8],borderBottomRightRadius:r.border.radius[8]},chargeInner:{display:"flex",flexDirection:"row",alignItems:"stretch",height:"100%"},chargeBar:{width:r.spacing[1],height:"100%",alignSelf:"stretch",borderTopLeftRadius:r.border.radius[4],borderBottomLeftRadius:r.border.radius[4]},chargeContent:{flexGrow:1,height:"100%",paddingLeft:r.spacing[3],paddingRight:r.spacing[3],paddingTop:0,paddingBottom:0,display:"flex",justifyContent:"center"},chargeContentRight:{width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"},chargeTextRight:{textAlign:"right"},description:{marginTop:"-".concat(r.spacing[1])},boundaryRow:{marginTop:"-".concat(r.spacing[1]),marginBottom:r.spacing[4]},boundaryChargeCell:{width:"156px",marginLeft:r.spacing[2]}}}(B)},[B]),v=R.length>0,k=v&&"string"==typeof(null===(p=R[R.length-1])||void 0===p?void 0:p.end)?null===(u=R[R.length-1])||void 0===u?void 0:u.end:null;return e(i,{children:v?e(c,{children:n(c,r({css:y.card},{children:[n(c,r({css:y.cardHeader},{children:[e(a,r({variant:d.B3CAPS,color:l.SUBHEADING},{children:b})),e(a,r({variant:d.B3CAPS,color:l.SUBHEADING},{children:x}))]})),n(c,r({css:y.rowsContainer},{children:[R.map(function(i,o){var t=function(r,e){switch(e){case g.SUCCESS:return{backgroundColor:r.color.background.successLightBg,barColor:r.color.text.success};case g.WARNING:return{backgroundColor:r.color.background.alertLightBg,barColor:r.color.text.alert};case g.DANGER:return{backgroundColor:r.color.background.warningLightBg,barColor:r.color.text.warning};default:return{backgroundColor:r.color.background.successLightBg,barColor:r.color.text.success}}}(B,i.tone),h={backgroundColor:t.backgroundColor},p={backgroundColor:t.barColor};return n(c,r({css:y.row},{children:[n(c,r({css:y.timeCell},{children:[e(c,r({css:y.timeText},{children:e(a,r({variant:d.B2,color:l.PRIMARY},{children:i.start}))})),e(c,r({css:y.timeArrow},{children:e(s,{width:4,height:8})}))]})),e(c,r({css:r(r({},y.chargeCell),h)},{children:n(c,r({css:y.chargeInner},{children:[e(c,{css:r(r({},y.chargeBar),p)}),e(c,r({css:y.chargeContent},{children:"amount"===i.charge.kind?e(c,r({css:y.chargeContentRight},{children:e(a,r({variant:d.B2,color:l.PRIMARY},{children:i.charge.value}))})):n(c,r({css:y.chargeContentRight},{children:[e(a,r({variant:d.B2,color:l.PRIMARY},{children:i.charge.primaryText})),!!i.charge.secondaryText&&e(a,r({variant:d.B4,color:l.SUBHEADING},{children:i.charge.secondaryText}))]}))}))]}))}))]}),"".concat(i.start,"-").concat(o))}),k&&n(c,r({css:r(r({},y.row),y.boundaryRow)},{children:[n(c,r({css:y.timeCell},{children:[e(c,r({css:y.timeText},{children:e(a,r({variant:d.B2,color:l.PRIMARY},{children:k}))})),e(c,r({css:y.timeArrow},{children:e(s,{width:4,height:8})}))]})),e(c,{css:y.boundaryChargeCell})]}))]}))]}))}):null})};export{g as CancellationPolicyTone,h as CancellationWindow};
2
+ //# sourceMappingURL=talos-cancellation-window.browser.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"talos-cancellation-window.browser.esm.js","sources":["../packages/components/cancellation-window/src/type.ts","../packages/components/cancellation-window/src/style.ts","../packages/components/cancellation-window/src/CancellationWindow.tsx"],"sourcesContent":[null,null,null],"names":["CancellationPolicyTone","CancellationWindow","_a","_d","data","_e","primaryText","_f","secondaryText","_g","sections","policyRows","theme","useTheme","staticStyles","useMemo","sectionTitle","marginBottom","spacing","card","borderWidth","border","width","sm","borderStyle","borderColor","color","disabledDark","borderRadius","radius","overflow","backgroundColor","background","neutral","cardHeader","display","flexDirection","justifyContent","paddingLeft","paddingRight","paddingTop","paddingBottom","rowsContainer","gap","row","alignItems","timeCell","flexShrink","flexGrow","minWidth","timeText","marginTop","timeArrow","marginLeft","chargeCell","height","size","borderTopRightRadius","borderBottomRightRadius","chargeInner","chargeBar","alignSelf","borderTopLeftRadius","borderBottomLeftRadius","chargeContent","chargeContentRight","chargeTextRight","textAlign","description","boundaryRow","boundaryChargeCell","getCancellationWindowStyle","hasCard","length","boundaryText","_b","end","_c","_jsx","_Fragment","children","Container","_jsxs","__assign","css","Typography","variant","TypographyVariant","B3CAPS","TypographyColor","SUBHEADING","map","rowIndex","tone","SUCCESS","successLightBg","barColor","text","success","WARNING","alertLightBg","alert","DANGER","warningLightBg","warning","getCancellationToneColors","chargeCellBackground","chargeBarBackground","B2","PRIMARY","start","RightChevron","charge","kind","value","B4","concat"],"mappings":"wUAAYA,GAAZ,SAAYA,GACVA,EAAA,QAAA,UACAA,EAAA,QAAA,UACAA,EAAA,OAAA,QACD,CAJD,CAAYA,IAAAA,EAIX,CAAA,ICDM,ICUDC,EAAqB,SAACC,WAGpBC,EAFFD,EAAAE,MAMQ,CAAE,EAHZC,gBAAAC,OAAc,IAAAD,EAAA,GAAEA,EAChBE,kBAAAC,OAAgB,IAAAD,EAAA,GAAEA,EAClBE,EAAyBN,EAAAO,SAAfC,OAAU,IAAAF,EAAG,GAAEA,EAErBG,EAAQC,IACRC,EAAeC,EACnB,WAAM,ODpBgC,SAACH,GACzC,MAAO,CAELI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@
1
+ 'use strict';
2
+
3
+ var tslib = require('tslib');
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+ var react = require('react');
6
+ var ctDesignComponents = require('@cleartrip/ct-design-components');
7
+ var talosAssetsIcons = require('@cleartrip/talos-assets-icons');
8
+
9
+ exports.CancellationPolicyTone = void 0;
10
+ (function (CancellationPolicyTone) {
11
+ CancellationPolicyTone["SUCCESS"] = "success";
12
+ CancellationPolicyTone["WARNING"] = "warning";
13
+ CancellationPolicyTone["DANGER"] = "danger";
14
+ })(exports.CancellationPolicyTone || (exports.CancellationPolicyTone = {}));
15
+
16
+ var getCancellationWindowStyle = function (theme) {
17
+ return {
18
+ sectionTitle: {
19
+ marginBottom: theme.spacing[3],
20
+ },
21
+ card: {
22
+ borderWidth: theme.border.width.sm,
23
+ borderStyle: "solid",
24
+ borderColor: theme.color.border.disabledDark,
25
+ borderRadius: theme.border.radius[12],
26
+ overflow: "hidden",
27
+ backgroundColor: theme.color.background.neutral,
28
+ },
29
+ cardHeader: {
30
+ display: "flex",
31
+ flexDirection: "row",
32
+ justifyContent: "space-between",
33
+ paddingLeft: theme.spacing[4],
34
+ paddingRight: theme.spacing[4],
35
+ paddingTop: theme.spacing[4],
36
+ paddingBottom: theme.spacing[4],
37
+ marginBottom: theme.spacing[4],
38
+ },
39
+ rowsContainer: {
40
+ paddingLeft: theme.spacing[4],
41
+ paddingRight: theme.spacing[4],
42
+ gap: theme.spacing[1],
43
+ display: "flex",
44
+ flexDirection: "column",
45
+ },
46
+ row: {
47
+ display: "flex",
48
+ flexDirection: "row",
49
+ justifyContent: "flex-end",
50
+ alignItems: "flex-start",
51
+ },
52
+ timeCell: {
53
+ flexShrink: 1,
54
+ flexGrow: 0,
55
+ minWidth: 0,
56
+ display: "flex",
57
+ flexDirection: "row",
58
+ alignItems: "center",
59
+ },
60
+ timeText: {
61
+ flexShrink: 1,
62
+ minWidth: 0,
63
+ marginTop: "-".concat(theme.spacing[2]),
64
+ },
65
+ timeArrow: {
66
+ marginLeft: theme.spacing[1],
67
+ marginTop: "-".concat(theme.spacing[2]),
68
+ flexShrink: 0,
69
+ },
70
+ chargeCell: {
71
+ width: "156px",
72
+ height: theme.size[14],
73
+ marginLeft: theme.spacing[2],
74
+ borderTopRightRadius: theme.border.radius[8],
75
+ borderBottomRightRadius: theme.border.radius[8],
76
+ },
77
+ chargeInner: {
78
+ display: "flex",
79
+ flexDirection: "row",
80
+ alignItems: "stretch",
81
+ height: "100%",
82
+ },
83
+ chargeBar: {
84
+ width: theme.spacing[1],
85
+ height: "100%",
86
+ alignSelf: "stretch",
87
+ borderTopLeftRadius: theme.border.radius[4],
88
+ borderBottomLeftRadius: theme.border.radius[4],
89
+ },
90
+ chargeContent: {
91
+ flexGrow: 1,
92
+ height: "100%",
93
+ paddingLeft: theme.spacing[3],
94
+ paddingRight: theme.spacing[3],
95
+ paddingTop: 0,
96
+ paddingBottom: 0,
97
+ display: "flex",
98
+ justifyContent: "center",
99
+ },
100
+ chargeContentRight: {
101
+ width: "100%",
102
+ height: "100%",
103
+ display: "flex",
104
+ flexDirection: "column",
105
+ justifyContent: "center",
106
+ alignItems: "flex-end",
107
+ },
108
+ chargeTextRight: {
109
+ textAlign: "right",
110
+ },
111
+ description: {
112
+ marginTop: "-".concat(theme.spacing[1]),
113
+ },
114
+ boundaryRow: {
115
+ marginTop: "-".concat(theme.spacing[1]),
116
+ marginBottom: theme.spacing[4],
117
+ },
118
+ boundaryChargeCell: {
119
+ width: "156px",
120
+ marginLeft: theme.spacing[2],
121
+ },
122
+ };
123
+ };
124
+ var getCancellationToneColors = function (theme, tone) {
125
+ switch (tone) {
126
+ case exports.CancellationPolicyTone.SUCCESS:
127
+ return {
128
+ backgroundColor: theme.color.background.successLightBg,
129
+ barColor: theme.color.text.success,
130
+ };
131
+ case exports.CancellationPolicyTone.WARNING:
132
+ return {
133
+ backgroundColor: theme.color.background.alertLightBg,
134
+ barColor: theme.color.text.alert,
135
+ };
136
+ case exports.CancellationPolicyTone.DANGER:
137
+ return {
138
+ backgroundColor: theme.color.background.warningLightBg,
139
+ barColor: theme.color.text.warning,
140
+ };
141
+ default:
142
+ return {
143
+ backgroundColor: theme.color.background.successLightBg,
144
+ barColor: theme.color.text.success,
145
+ };
146
+ }
147
+ };
148
+
149
+ var CancellationWindow = function (_a) {
150
+ var _b, _c;
151
+ var data = _a.data;
152
+ var _d = data || {}, _e = _d.primaryText, primaryText = _e === void 0 ? '' : _e, _f = _d.secondaryText, secondaryText = _f === void 0 ? '' : _f, _g = _d.sections, policyRows = _g === void 0 ? [] : _g;
153
+ var theme = ctDesignComponents.useTheme();
154
+ var staticStyles = react.useMemo(function () { return getCancellationWindowStyle(theme); }, [theme]);
155
+ var hasCard = policyRows.length > 0;
156
+ var showBoundaryRow = hasCard && typeof ((_b = policyRows[policyRows.length - 1]) === null || _b === void 0 ? void 0 : _b.end) === "string";
157
+ var boundaryText = showBoundaryRow
158
+ ? (_c = policyRows[policyRows.length - 1]) === null || _c === void 0 ? void 0 : _c.end
159
+ : null;
160
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: hasCard ? (jsxRuntime.jsx(ctDesignComponents.Container, { children: jsxRuntime.jsxs(ctDesignComponents.Container, tslib.__assign({ css: staticStyles.card }, { children: [jsxRuntime.jsxs(ctDesignComponents.Container, tslib.__assign({ css: staticStyles.cardHeader }, { children: [jsxRuntime.jsx(ctDesignComponents.Typography, tslib.__assign({ variant: ctDesignComponents.TypographyVariant.B3CAPS, color: ctDesignComponents.TypographyColor.SUBHEADING }, { children: primaryText })), jsxRuntime.jsx(ctDesignComponents.Typography, tslib.__assign({ variant: ctDesignComponents.TypographyVariant.B3CAPS, color: ctDesignComponents.TypographyColor.SUBHEADING }, { children: secondaryText }))] })), jsxRuntime.jsxs(ctDesignComponents.Container, tslib.__assign({ css: staticStyles.rowsContainer }, { children: [policyRows.map(function (row, rowIndex) {
161
+ var _a = getCancellationToneColors(theme, row.tone), backgroundColor = _a.backgroundColor, barColor = _a.barColor;
162
+ var chargeCellBackground = { backgroundColor: backgroundColor };
163
+ var chargeBarBackground = { backgroundColor: barColor };
164
+ return (jsxRuntime.jsxs(ctDesignComponents.Container, tslib.__assign({ css: staticStyles.row }, { children: [jsxRuntime.jsxs(ctDesignComponents.Container, tslib.__assign({ css: staticStyles.timeCell }, { children: [jsxRuntime.jsx(ctDesignComponents.Container, tslib.__assign({ css: staticStyles.timeText }, { children: jsxRuntime.jsx(ctDesignComponents.Typography, tslib.__assign({ variant: ctDesignComponents.TypographyVariant.B2, color: ctDesignComponents.TypographyColor.PRIMARY }, { children: row.start })) })), jsxRuntime.jsx(ctDesignComponents.Container, tslib.__assign({ css: staticStyles.timeArrow }, { children: jsxRuntime.jsx(talosAssetsIcons.RightChevron, { width: 4, height: 8 }) }))] })), jsxRuntime.jsx(ctDesignComponents.Container, tslib.__assign({ css: tslib.__assign(tslib.__assign({}, staticStyles.chargeCell), chargeCellBackground) }, { children: jsxRuntime.jsxs(ctDesignComponents.Container, tslib.__assign({ css: staticStyles.chargeInner }, { children: [jsxRuntime.jsx(ctDesignComponents.Container, { css: tslib.__assign(tslib.__assign({}, staticStyles.chargeBar), chargeBarBackground) }), jsxRuntime.jsx(ctDesignComponents.Container, tslib.__assign({ css: staticStyles.chargeContent }, { children: row.charge.kind === "amount" ? (jsxRuntime.jsx(ctDesignComponents.Container, tslib.__assign({ css: staticStyles.chargeContentRight }, { children: jsxRuntime.jsx(ctDesignComponents.Typography, tslib.__assign({ variant: ctDesignComponents.TypographyVariant.B2, color: ctDesignComponents.TypographyColor.PRIMARY }, { children: row.charge.value })) }))) : (jsxRuntime.jsxs(ctDesignComponents.Container, tslib.__assign({ css: staticStyles.chargeContentRight }, { children: [jsxRuntime.jsx(ctDesignComponents.Typography, tslib.__assign({ variant: ctDesignComponents.TypographyVariant.B2, color: ctDesignComponents.TypographyColor.PRIMARY }, { children: row.charge.primaryText })), !!row.charge.secondaryText && (jsxRuntime.jsx(ctDesignComponents.Typography, tslib.__assign({ variant: ctDesignComponents.TypographyVariant.B4, color: ctDesignComponents.TypographyColor.SUBHEADING }, { children: row.charge.secondaryText })))] }))) }))] })) }))] }), "".concat(row.start, "-").concat(rowIndex)));
165
+ }), boundaryText && (jsxRuntime.jsxs(ctDesignComponents.Container, tslib.__assign({ css: tslib.__assign(tslib.__assign({}, staticStyles.row), staticStyles.boundaryRow) }, { children: [jsxRuntime.jsxs(ctDesignComponents.Container, tslib.__assign({ css: staticStyles.timeCell }, { children: [jsxRuntime.jsx(ctDesignComponents.Container, tslib.__assign({ css: staticStyles.timeText }, { children: jsxRuntime.jsx(ctDesignComponents.Typography, tslib.__assign({ variant: ctDesignComponents.TypographyVariant.B2, color: ctDesignComponents.TypographyColor.PRIMARY }, { children: boundaryText })) })), jsxRuntime.jsx(ctDesignComponents.Container, tslib.__assign({ css: staticStyles.timeArrow }, { children: jsxRuntime.jsx(talosAssetsIcons.RightChevron, { width: 4, height: 8 }) }))] })), jsxRuntime.jsx(ctDesignComponents.Container, { css: staticStyles.boundaryChargeCell })] })))] }))] })) })) : null }));
166
+ };
167
+
168
+ exports.CancellationWindow = CancellationWindow;
169
+ //# sourceMappingURL=talos-cancellation-window.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"talos-cancellation-window.cjs.js","sources":["../packages/components/cancellation-window/src/type.ts","../packages/components/cancellation-window/src/style.ts","../packages/components/cancellation-window/src/CancellationWindow.tsx"],"sourcesContent":[null,null,null],"names":["CancellationPolicyTone","useTheme","useMemo","_jsx","_Fragment","Container","_jsxs","__assign","Typography","TypographyVariant","TypographyColor","RightChevron"],"mappings":";;;;;;;;AAAYA,wCAIX;AAJD,CAAA,UAAY,sBAAsB,EAAA;AAChC,IAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,sBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACnB,CAAC,EAJWA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eAACE,4BAAS,EAAAE,cAAA,CAAA,EAAC,GAAG,EAAE,YAAY,CAAC,SAAS,EACpC,EAAA,EAAA,QAAA,EAAAJ,cAAA,CAACQ,6BAAY,EAAC,EAAA,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAA,CAAI,IAC3B,CACF,EAAA,CAAA,CAAA,EACZR,eAACE,4BAAS,EAAA,EAAC,GAAG,EAAE,YAAY,CAAC,kBAAkB,EAAI,CAAA,CAAA,EAAA,CAAA,CACzC,CACb,CACS,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CACF,GACF,IACV,IAAI,EACP,CAAA,EACH;AACJ;;;;"}
@@ -0,0 +1,167 @@
1
+ import { __assign } from 'tslib';
2
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
3
+ import { useMemo } from 'react';
4
+ import { useTheme, Container, Typography, TypographyVariant, TypographyColor } from '@cleartrip/ct-design-components';
5
+ import { RightChevron } from '@cleartrip/talos-assets-icons';
6
+
7
+ var CancellationPolicyTone;
8
+ (function (CancellationPolicyTone) {
9
+ CancellationPolicyTone["SUCCESS"] = "success";
10
+ CancellationPolicyTone["WARNING"] = "warning";
11
+ CancellationPolicyTone["DANGER"] = "danger";
12
+ })(CancellationPolicyTone || (CancellationPolicyTone = {}));
13
+
14
+ var getCancellationWindowStyle = function (theme) {
15
+ return {
16
+ sectionTitle: {
17
+ marginBottom: theme.spacing[3],
18
+ },
19
+ card: {
20
+ borderWidth: theme.border.width.sm,
21
+ borderStyle: "solid",
22
+ borderColor: theme.color.border.disabledDark,
23
+ borderRadius: theme.border.radius[12],
24
+ overflow: "hidden",
25
+ backgroundColor: theme.color.background.neutral,
26
+ },
27
+ cardHeader: {
28
+ display: "flex",
29
+ flexDirection: "row",
30
+ justifyContent: "space-between",
31
+ paddingLeft: theme.spacing[4],
32
+ paddingRight: theme.spacing[4],
33
+ paddingTop: theme.spacing[4],
34
+ paddingBottom: theme.spacing[4],
35
+ marginBottom: theme.spacing[4],
36
+ },
37
+ rowsContainer: {
38
+ paddingLeft: theme.spacing[4],
39
+ paddingRight: theme.spacing[4],
40
+ gap: theme.spacing[1],
41
+ display: "flex",
42
+ flexDirection: "column",
43
+ },
44
+ row: {
45
+ display: "flex",
46
+ flexDirection: "row",
47
+ justifyContent: "flex-end",
48
+ alignItems: "flex-start",
49
+ },
50
+ timeCell: {
51
+ flexShrink: 1,
52
+ flexGrow: 0,
53
+ minWidth: 0,
54
+ display: "flex",
55
+ flexDirection: "row",
56
+ alignItems: "center",
57
+ },
58
+ timeText: {
59
+ flexShrink: 1,
60
+ minWidth: 0,
61
+ marginTop: "-".concat(theme.spacing[2]),
62
+ },
63
+ timeArrow: {
64
+ marginLeft: theme.spacing[1],
65
+ marginTop: "-".concat(theme.spacing[2]),
66
+ flexShrink: 0,
67
+ },
68
+ chargeCell: {
69
+ width: "156px",
70
+ height: theme.size[14],
71
+ marginLeft: theme.spacing[2],
72
+ borderTopRightRadius: theme.border.radius[8],
73
+ borderBottomRightRadius: theme.border.radius[8],
74
+ },
75
+ chargeInner: {
76
+ display: "flex",
77
+ flexDirection: "row",
78
+ alignItems: "stretch",
79
+ height: "100%",
80
+ },
81
+ chargeBar: {
82
+ width: theme.spacing[1],
83
+ height: "100%",
84
+ alignSelf: "stretch",
85
+ borderTopLeftRadius: theme.border.radius[4],
86
+ borderBottomLeftRadius: theme.border.radius[4],
87
+ },
88
+ chargeContent: {
89
+ flexGrow: 1,
90
+ height: "100%",
91
+ paddingLeft: theme.spacing[3],
92
+ paddingRight: theme.spacing[3],
93
+ paddingTop: 0,
94
+ paddingBottom: 0,
95
+ display: "flex",
96
+ justifyContent: "center",
97
+ },
98
+ chargeContentRight: {
99
+ width: "100%",
100
+ height: "100%",
101
+ display: "flex",
102
+ flexDirection: "column",
103
+ justifyContent: "center",
104
+ alignItems: "flex-end",
105
+ },
106
+ chargeTextRight: {
107
+ textAlign: "right",
108
+ },
109
+ description: {
110
+ marginTop: "-".concat(theme.spacing[1]),
111
+ },
112
+ boundaryRow: {
113
+ marginTop: "-".concat(theme.spacing[1]),
114
+ marginBottom: theme.spacing[4],
115
+ },
116
+ boundaryChargeCell: {
117
+ width: "156px",
118
+ marginLeft: theme.spacing[2],
119
+ },
120
+ };
121
+ };
122
+ var getCancellationToneColors = function (theme, tone) {
123
+ switch (tone) {
124
+ case CancellationPolicyTone.SUCCESS:
125
+ return {
126
+ backgroundColor: theme.color.background.successLightBg,
127
+ barColor: theme.color.text.success,
128
+ };
129
+ case CancellationPolicyTone.WARNING:
130
+ return {
131
+ backgroundColor: theme.color.background.alertLightBg,
132
+ barColor: theme.color.text.alert,
133
+ };
134
+ case CancellationPolicyTone.DANGER:
135
+ return {
136
+ backgroundColor: theme.color.background.warningLightBg,
137
+ barColor: theme.color.text.warning,
138
+ };
139
+ default:
140
+ return {
141
+ backgroundColor: theme.color.background.successLightBg,
142
+ barColor: theme.color.text.success,
143
+ };
144
+ }
145
+ };
146
+
147
+ var CancellationWindow = function (_a) {
148
+ var _b, _c;
149
+ var data = _a.data;
150
+ var _d = data || {}, _e = _d.primaryText, primaryText = _e === void 0 ? '' : _e, _f = _d.secondaryText, secondaryText = _f === void 0 ? '' : _f, _g = _d.sections, policyRows = _g === void 0 ? [] : _g;
151
+ var theme = useTheme();
152
+ var staticStyles = useMemo(function () { return getCancellationWindowStyle(theme); }, [theme]);
153
+ var hasCard = policyRows.length > 0;
154
+ var showBoundaryRow = hasCard && typeof ((_b = policyRows[policyRows.length - 1]) === null || _b === void 0 ? void 0 : _b.end) === "string";
155
+ var boundaryText = showBoundaryRow
156
+ ? (_c = policyRows[policyRows.length - 1]) === null || _c === void 0 ? void 0 : _c.end
157
+ : null;
158
+ return (jsx(Fragment, { children: hasCard ? (jsx(Container, { children: jsxs(Container, __assign({ css: staticStyles.card }, { children: [jsxs(Container, __assign({ css: staticStyles.cardHeader }, { children: [jsx(Typography, __assign({ variant: TypographyVariant.B3CAPS, color: TypographyColor.SUBHEADING }, { children: primaryText })), jsx(Typography, __assign({ variant: TypographyVariant.B3CAPS, color: TypographyColor.SUBHEADING }, { children: secondaryText }))] })), jsxs(Container, __assign({ css: staticStyles.rowsContainer }, { children: [policyRows.map(function (row, rowIndex) {
159
+ var _a = getCancellationToneColors(theme, row.tone), backgroundColor = _a.backgroundColor, barColor = _a.barColor;
160
+ var chargeCellBackground = { backgroundColor: backgroundColor };
161
+ var chargeBarBackground = { backgroundColor: barColor };
162
+ return (jsxs(Container, __assign({ css: staticStyles.row }, { children: [jsxs(Container, __assign({ css: staticStyles.timeCell }, { children: [jsx(Container, __assign({ css: staticStyles.timeText }, { children: jsx(Typography, __assign({ variant: TypographyVariant.B2, color: TypographyColor.PRIMARY }, { children: row.start })) })), jsx(Container, __assign({ css: staticStyles.timeArrow }, { children: jsx(RightChevron, { width: 4, height: 8 }) }))] })), jsx(Container, __assign({ css: __assign(__assign({}, staticStyles.chargeCell), chargeCellBackground) }, { children: jsxs(Container, __assign({ css: staticStyles.chargeInner }, { children: [jsx(Container, { css: __assign(__assign({}, staticStyles.chargeBar), chargeBarBackground) }), jsx(Container, __assign({ css: staticStyles.chargeContent }, { children: row.charge.kind === "amount" ? (jsx(Container, __assign({ css: staticStyles.chargeContentRight }, { children: jsx(Typography, __assign({ variant: TypographyVariant.B2, color: TypographyColor.PRIMARY }, { children: row.charge.value })) }))) : (jsxs(Container, __assign({ css: staticStyles.chargeContentRight }, { children: [jsx(Typography, __assign({ variant: TypographyVariant.B2, color: TypographyColor.PRIMARY }, { children: row.charge.primaryText })), !!row.charge.secondaryText && (jsx(Typography, __assign({ variant: TypographyVariant.B4, color: TypographyColor.SUBHEADING }, { children: row.charge.secondaryText })))] }))) }))] })) }))] }), "".concat(row.start, "-").concat(rowIndex)));
163
+ }), boundaryText && (jsxs(Container, __assign({ css: __assign(__assign({}, staticStyles.row), staticStyles.boundaryRow) }, { children: [jsxs(Container, __assign({ css: staticStyles.timeCell }, { children: [jsx(Container, __assign({ css: staticStyles.timeText }, { children: jsx(Typography, __assign({ variant: TypographyVariant.B2, color: TypographyColor.PRIMARY }, { children: boundaryText })) })), jsx(Container, __assign({ css: staticStyles.timeArrow }, { children: jsx(RightChevron, { width: 4, height: 8 }) }))] })), jsx(Container, { css: staticStyles.boundaryChargeCell })] })))] }))] })) })) : null }));
164
+ };
165
+
166
+ export { CancellationPolicyTone, CancellationWindow };
167
+ //# sourceMappingURL=talos-cancellation-window.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"talos-cancellation-window.esm.js","sources":["../packages/components/cancellation-window/src/type.ts","../packages/components/cancellation-window/src/style.ts","../packages/components/cancellation-window/src/CancellationWindow.tsx"],"sourcesContent":[null,null,null],"names":["_jsx","_Fragment","_jsxs"],"mappings":";;;;;;IAAY,uBAIX;AAJD,CAAA,UAAY,sBAAsB,EAAA;AAChC,IAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,sBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACnB,CAAC,EAJW,sBAAsB,KAAtB,sBAAsB,GAIjC,EAAA,CAAA,CAAA;;ACDM,IAAM,0BAA0B,GAAG,UAAC,KAAY,EAAA;IACrD,OAAO;AAEL,QAAA,YAAY,EAAE;AACZ,YAAA,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAC/B,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;AAClC,YAAA,WAAW,EAAE,OAAO;AACpB,YAAA,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY;YAC5C,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;AACrC,YAAA,QAAQ,EAAE,QAAQ;AAClB,YAAA,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,UAAU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