{"ast":null,"code":"import _objectSpread from\"C:/ldt/LDT/Safemate_Management/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _regenerator from\"C:/ldt/LDT/Safemate_Management/node_modules/@babel/runtime/helpers/esm/regenerator.js\";import _asyncToGenerator from\"C:/ldt/LDT/Safemate_Management/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";import _slicedToArray from\"C:/ldt/LDT/Safemate_Management/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{Button,Drawer,DrawerBody,DrawerCloseButton,DrawerContent,DrawerHeader,DrawerOverlay,Flex,Text,Menu,MenuButton,MenuList,MenuItem,useColorModeValue,Stack,useRadioGroup,Spinner}from\"@chakra-ui/react\";import{ToastContainer,toast,Bounce}from'react-toastify';import React from\"react\";import{getSiteList,updateUserInfo}from\"services/userApi\";import{ArrowDownIcon}from\"components/Icons/Icons\";import RoleRadioCard from\"components/RadioBox/RadioBox\";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";export default function UserInfoUpdatePopUp(props){var isOpen=props.isOpen,onClose=props.onClose;var _React$useState=React.useState(3),_React$useState2=_slicedToArray(_React$useState,2),role=_React$useState2[0],setRole=_React$useState2[1];var _React$useState3=React.useState([]),_React$useState4=_slicedToArray(_React$useState3,2),sites=_React$useState4[0],setSites=_React$useState4[1];var _React$useState5=React.useState(false),_React$useState6=_slicedToArray(_React$useState5,2),siteLoading=_React$useState6[0],setSiteLoading=_React$useState6[1];var _React$useState7=React.useState(false),_React$useState8=_slicedToArray(_React$useState7,2),approveLoading=_React$useState8[0],setApproveLoading=_React$useState8[1];var _React$useState9=React.useState(null),_React$useState0=_slicedToArray(_React$useState9,2),selectedSite=_React$useState0[0],setSelectedSite=_React$useState0[1];var roleItems=[{value:\"3\",title:\"사용자\"},{value:\"2\",title:\"사이트 관리자\"},{value:\"1\",title:\"전체 관리자\"},{value:\"100\",title:\"SUPERVISOR\"}];var titleTextColor=useColorModeValue(\"text.900\",\"white\");var textColor=useColorModeValue(\"text.700\",\"white\");var backgroundColor=useColorModeValue(\"white\",\"gray.800\");var settingsRef=React.useRef();var _useRadioGroup=useRadioGroup({name:\"role\",value:role,onChange:setRole}),getRootProps=_useRadioGroup.getRootProps,getRadioProps=_useRadioGroup.getRadioProps;var group=getRootProps();React.useEffect(function(){if(!isOpen)return;if(props.selectedUserLevel){setRole(String(props.selectedUserLevel));}if(props.selectedSiteId!==undefined){setSelectedSite({site_id:props.selectedSiteId,name:props.selectedSiteName});}var fetchSites=/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(){var res,_res$data,success,data,_t;return _regenerator().w(function(_context){while(1)switch(_context.p=_context.n){case 0:_context.p=0;setSiteLoading(true);_context.n=1;return getSiteList();case 1:res=_context.v;_res$data=res.data,success=_res$data.success,data=_res$data.data;setSites(Array.isArray(data)?data:[]);_context.n=3;break;case 2:_context.p=2;_t=_context.v;console.error(_t);toast.error(\"사이트 정보 조회 중 오류가 발생했습니다\");case 3:_context.p=3;setSiteLoading(false);return _context.f(3);case 4:return _context.a(2);}},_callee,null,[[0,2,3,4]]);}));return function fetchSites(){return _ref.apply(this,arguments);};}();fetchSites();},[isOpen,props.selectedUserId,props.selectedUserLevel,props.selectedSiteId]);var handleUpdate=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(){var _props$onClose,_props$onApproved,_t2;return _regenerator().w(function(_context2){while(1)switch(_context2.p=_context2.n){case 0:if(props.selectedUserId){_context2.n=1;break;}toast.warn(\"사용자 ID가 없습니다.\");return _context2.a(2);case 1:if(selectedSite){_context2.n=2;break;}toast.warn(\"사이트를 선택해주세요.\");return _context2.a(2);case 2:_context2.p=2;setApproveLoading(true);_context2.n=3;return updateUserInfo(props.selectedUserId,{site_id:Number(selectedSite.site_id),// 전체인 경우 : 0\nuser_level:Number(role)// 3 = \"USER\" | 2 = \"MANAGER\" | 1 = \"ADMIN\" | 100 = \"SUPERVISOR\"\n});case 3:toast.success('사용자 정보 변경 완료!');(_props$onClose=props.onClose)===null||_props$onClose===void 0?void 0:_props$onClose.call(props);(_props$onApproved=props.onApproved)===null||_props$onApproved===void 0?void 0:_props$onApproved.call(props);_context2.n=5;break;case 4:_context2.p=4;_t2=_context2.v;console.error(_t2);toast.error(\"정보 변경 중 오류가 발생했습니다\");case 5:_context2.p=5;setApproveLoading(false);return _context2.f(5);case 6:return _context2.a(2);}},_callee2,null,[[2,4,5,6]]);}));return function handleUpdate(){return _ref2.apply(this,arguments);};}();return/*#__PURE__*/_jsxs(Drawer,{isOpen:isOpen,onClose:onClose,finalFocusRef:settingsRef,blockScrollOnMount:false,children:[/*#__PURE__*/_jsx(DrawerOverlay,{}),/*#__PURE__*/_jsxs(DrawerContent,{bg:backgroundColor,borderRadius:\"16px\",me:{sm:\"16px\"},my:{sm:\"16px\"},children:[/*#__PURE__*/_jsxs(DrawerHeader,{px:\"24px\",children:[/*#__PURE__*/_jsx(DrawerCloseButton,{color:\"text.300\",sx:{_focus:{boxShadow:\"none\",outline:\"none\",bg:\"transparent\"}}}),/*#__PURE__*/_jsx(Text,{fontSize:\"md\",fontWeight:400,color:titleTextColor,mt:\"80px\",children:\"\\uC120\\uD0DD\\uD55C \\uC0AC\\uC6A9\\uC790\"}),/*#__PURE__*/_jsx(Text,{display:\"inline-block\",fontSize:\"md\",fontWeight:500,color:textColor,mb:\"16px\",mt:\"8px\",bg:\"textbox\",px:\"12px\",py:\"8px\",borderRadius:\"10px\",children:props.selectedUserName})]}),/*#__PURE__*/_jsxs(DrawerBody,{px:\"24px\",display:\"flex\",flexDirection:\"column\",children:[/*#__PURE__*/_jsxs(Flex,{flexDirection:\"column\",children:[/*#__PURE__*/_jsx(Text,{fontSize:\"md\",fontWeight:400,color:titleTextColor,mb:\"4px\",children:\"\\uC0AC\\uC774\\uD2B8\"}),/*#__PURE__*/_jsxs(Menu,{matchWidth:true,children:[/*#__PURE__*/_jsx(MenuButton,{as:Button,rightIcon:/*#__PURE__*/_jsx(ArrowDownIcon,{w:\"25px\",h:\"30px\"}),color:selectedSite?\"text.700\":\"text.300\",fontWeight:selectedSite?\"700\":\"400\",fontSize:\"sm\",bg:selectedSite?\"white\":\"white\",borderColor:selectedSite?\"stroke\":\"stroke\",borderWidth:\"0.5px\",borderRadius:\"10px\",mt:\"8px\",textAlign:\"start\",_hover:{bg:\"stroke\"},_expanded:{bg:\"main.50\",color:\"main.900\",borderColor:\"main.900\",borderWidth:\"0.1px\"},children:selectedSite?selectedSite.name:\"사이트 선택\"}),/*#__PURE__*/_jsx(MenuList,{textColor:\"text.700\",borderWidth:\"0px\",borderRadius:\"10px\",boxShadow:\"lg\",children:siteLoading?/*#__PURE__*/_jsxs(MenuItem,{isDisabled:true,children:[/*#__PURE__*/_jsx(Spinner,{size:\"sm\",mr:\"8px\"}),\" \\uBD88\\uB7EC\\uC624\\uB294 \\uC911...\"]}):/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(MenuItem,{_hover:{bg:\"main.50\"},_focus:{bg:\"main.50\",textColor:\"main.900\",fontWeight:\"600\"},onClick:function onClick(){return setSelectedSite({site_id:0,name:\"모든 사이트\"});},children:\"\\uBAA8\\uB4E0 \\uC0AC\\uC774\\uD2B8\"}),sites.map(function(s){var _s$site_id,_ref4,_s$name2,_s$site_id4;return/*#__PURE__*/_jsx(MenuItem,{_hover:{bg:\"main.50\"},_focus:{bg:\"main.50\",textColor:\"main.900\",fontWeight:\"600\"},onClick:function onClick(){var _s$site_id2,_ref3,_s$name,_s$site_id3;return setSelectedSite({site_id:(_s$site_id2=s.site_id)!==null&&_s$site_id2!==void 0?_s$site_id2:s.id,name:(_ref3=(_s$name=s.name)!==null&&_s$name!==void 0?_s$name:s.site_name)!==null&&_ref3!==void 0?_ref3:\"\\uC0AC\\uC774\\uD2B8 \".concat((_s$site_id3=s.site_id)!==null&&_s$site_id3!==void 0?_s$site_id3:s.id)});},children:(_ref4=(_s$name2=s.name)!==null&&_s$name2!==void 0?_s$name2:s.site_name)!==null&&_ref4!==void 0?_ref4:\"\\uC0AC\\uC774\\uD2B8 \".concat((_s$site_id4=s.site_id)!==null&&_s$site_id4!==void 0?_s$site_id4:s.id)},(_s$site_id=s.site_id)!==null&&_s$site_id!==void 0?_s$site_id:s.id);})]})})]})]}),/*#__PURE__*/_jsxs(Flex,{flexDirection:\"column\",children:[/*#__PURE__*/_jsx(Text,{fontSize:\"md\",fontWeight:400,color:titleTextColor,mb:\"4px\",mt:\"24px\",children:\"\\uAD8C\\uD55C \\uC124\\uC815\"}),/*#__PURE__*/_jsx(Stack,_objectSpread(_objectSpread({spacing:\"8px\",mt:\"8px\"},group),{},{children:roleItems.map(function(item){var radio=getRadioProps({value:item.value});return/*#__PURE__*/_jsx(RoleRadioCard,_objectSpread(_objectSpread({},radio),{},{children:item.title}),item.value);})}))]}),/*#__PURE__*/_jsx(Button,{mt:\"auto\",fontSize:\"md\",type:\"submit\",bg:\"main.900\",w:\"100%\",h:\"45px\",mb:\"20px\",color:\"white\",_hover:{bg:\"sub.900\"},_active:{bg:\"sub.900\"},isDisabled:!selectedSite||approveLoading,isLoading:approveLoading,loadingText:\"\\uBCC0\\uACBD \\uC911...\",onClick:handleUpdate,children:\"\\uC0AC\\uC6A9\\uC790 \\uC815\\uBCF4 \\uBCC0\\uACBD\"})]})]})]});}","map":{"version":3,"names":["Button","Drawer","DrawerBody","DrawerCloseButton","DrawerContent","DrawerHeader","DrawerOverlay","Flex","Text","Menu","MenuButton","MenuList","MenuItem","useColorModeValue","Stack","useRadioGroup","Spinner","ToastContainer","toast","Bounce","React","getSiteList","updateUserInfo","ArrowDownIcon","RoleRadioCard","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","UserInfoUpdatePopUp","props","isOpen","onClose","_React$useState","useState","_React$useState2","_slicedToArray","role","setRole","_React$useState3","_React$useState4","sites","setSites","_React$useState5","_React$useState6","siteLoading","setSiteLoading","_React$useState7","_React$useState8","approveLoading","setApproveLoading","_React$useState9","_React$useState0","selectedSite","setSelectedSite","roleItems","value","title","titleTextColor","textColor","backgroundColor","settingsRef","useRef","_useRadioGroup","name","onChange","getRootProps","getRadioProps","group","useEffect","selectedUserLevel","String","selectedSiteId","undefined","site_id","selectedSiteName","fetchSites","_ref","_asyncToGenerator","_regenerator","m","_callee","res","_res$data","success","data","_t","w","_context","p","n","v","Array","isArray","console","error","f","a","apply","arguments","selectedUserId","handleUpdate","_ref2","_callee2","_props$onClose","_props$onApproved","_t2","_context2","warn","Number","user_level","call","onApproved","finalFocusRef","blockScrollOnMount","children","bg","borderRadius","me","sm","my","px","color","sx","_focus","boxShadow","outline","fontSize","fontWeight","mt","display","mb","py","selectedUserName","flexDirection","matchWidth","as","rightIcon","h","borderColor","borderWidth","textAlign","_hover","_expanded","isDisabled","size","mr","onClick","map","s","_s$site_id","_ref4","_s$name2","_s$site_id4","_s$site_id2","_ref3","_s$name","_s$site_id3","id","site_name","concat","_objectSpread","spacing","item","radio","type","_active","isLoading","loadingText"],"sources":["C:/ldt/LDT/Safemate_Management/src/components/PopUp/UserInfoUpdatePopUp.js"],"sourcesContent":["import {\n  Button,\n  Drawer,\n  DrawerBody,\n  DrawerCloseButton,\n  DrawerContent,\n  DrawerHeader,\n  DrawerOverlay,\n  Flex,\n  Text,\n  Menu,\n  MenuButton,\n  MenuList,\n  MenuItem,\n  useColorModeValue,\n  Stack,\n  useRadioGroup,\n  Spinner,\n} from \"@chakra-ui/react\";\n\nimport { ToastContainer, toast, Bounce  } from 'react-toastify';\n\nimport PropTypes from \"prop-types\";\nimport React from \"react\";\nimport { getSiteList, updateUserInfo } from \"services/userApi\";\nimport { ArrowDownIcon } from \"components/Icons/Icons\";\nimport RoleRadioCard from \"components/RadioBox/RadioBox\";\n\n\nexport default function UserInfoUpdatePopUp(props) {\n  const { isOpen, onClose } = props;\n\n  const [role, setRole] = React.useState(3);\n\n  const [sites, setSites] = React.useState([]);\n  \n  const [siteLoading, setSiteLoading] = React.useState(false);\n  const [approveLoading, setApproveLoading] = React.useState(false);\n\n  const [selectedSite, setSelectedSite] = React.useState(null);\n\n  const roleItems = [\n    { value: \"3\", title: \"사용자\" },\n    { value: \"2\", title: \"사이트 관리자\" },\n    { value: \"1\", title: \"전체 관리자\" },\n    { value: \"100\", title: \"SUPERVISOR\" },\n  ];\n\n  const titleTextColor = useColorModeValue(\"text.900\", \"white\");\n  const textColor = useColorModeValue(\"text.700\", \"white\");\n  const backgroundColor = useColorModeValue(\"white\", \"gray.800\");\n  const settingsRef = React.useRef();\n\n  const { getRootProps, getRadioProps } = useRadioGroup({\n    name: \"role\",\n    value: role,\n    onChange: setRole,\n  });\n  const group = getRootProps();\n\n  React.useEffect(() => {\n    if (!isOpen) return;\n\n    if (props.selectedUserLevel) {\n      setRole(String(props.selectedUserLevel));\n    }\n\n    if (props.selectedSiteId !== undefined) {\n      setSelectedSite({\n        site_id: props.selectedSiteId,\n        name: props.selectedSiteName,\n      });\n    }\n\n    const fetchSites = async () => {\n      try {\n        setSiteLoading(true);\n\n        const res = await getSiteList();\n    \n        const { success, data } = res.data;\n\n        setSites(Array.isArray(data) ? data : []);\n      } catch (e) {\n        console.error(e);\n        toast.error(\"사이트 정보 조회 중 오류가 발생했습니다\");\n      } finally {\n        setSiteLoading(false);\n      }\n    };\n\n    fetchSites();\n  }, [isOpen, props.selectedUserId, props.selectedUserLevel, props.selectedSiteId]);\n\n  const handleUpdate = async () => {\n    if (!props.selectedUserId) {\n      toast.warn(\"사용자 ID가 없습니다.\");\n      return;\n    }\n    if (!selectedSite) {\n      toast.warn(\"사이트를 선택해주세요.\");\n      return;\n    }\n\n    try {\n      setApproveLoading(true);\n\n      await updateUserInfo(props.selectedUserId, {\n        site_id: Number(selectedSite.site_id),             // 전체인 경우 : 0\n        user_level: Number(role),                          // 3 = \"USER\" | 2 = \"MANAGER\" | 1 = \"ADMIN\" | 100 = \"SUPERVISOR\"\n      });\n\n      toast.success('사용자 정보 변경 완료!');\n      props.onClose?.();\n\n      props.onApproved?.();\n    } catch (e) {\n      console.error(e);\n      toast.error(\"정보 변경 중 오류가 발생했습니다\");\n    } finally {\n      setApproveLoading(false);\n    }\n  };\n\n\n  return (\n    <Drawer\n      isOpen={isOpen}\n      onClose={onClose}\n      finalFocusRef={settingsRef}\n      blockScrollOnMount={false}\n    >\n      <DrawerOverlay />\n      <DrawerContent\n        bg={backgroundColor}\n        borderRadius=\"16px\"\n        me={{ sm: \"16px\" }}\n        my={{ sm: \"16px\" }}\n      >\n        <DrawerHeader px=\"24px\">\n          <DrawerCloseButton\n            color=\"text.300\"\n            sx={{\n              _focus: { boxShadow: \"none\", outline: \"none\", bg: \"transparent\" },\n            }}\n          />\n          <Text fontSize=\"md\" fontWeight={400} color={titleTextColor} mt=\"80px\">\n            선택한 사용자\n          </Text>\n          <Text\n            display=\"inline-block\"\n            fontSize=\"md\"\n            fontWeight={500}\n            color={textColor}\n            mb=\"16px\"\n            mt=\"8px\"\n            bg=\"textbox\"\n            px=\"12px\"\n            py=\"8px\"\n            borderRadius=\"10px\"\n          >\n            {props.selectedUserName}\n          </Text>\n        </DrawerHeader>\n\n        <DrawerBody px=\"24px\" display=\"flex\" flexDirection=\"column\">\n          <Flex flexDirection=\"column\">\n            <Text fontSize=\"md\" fontWeight={400} color={titleTextColor} mb=\"4px\">\n              사이트\n            </Text>\n\n            <Menu matchWidth>\n              <MenuButton  as={Button} rightIcon={<ArrowDownIcon w=\"25px\" h=\"30px\"/>} \n                color={selectedSite ? \"text.700\" : \"text.300\"}\n                fontWeight={selectedSite ? \"700\" : \"400\"}\n                fontSize=\"sm\"\n                bg={selectedSite ? \"white\" : \"white\"}\n                borderColor={selectedSite ? \"stroke\" : \"stroke\"}\n                borderWidth=\"0.5px\"\n                borderRadius=\"10px\"\n                mt=\"8px\"\n                textAlign=\"start\"\n                _hover={{ bg: \"stroke\" }}\n                _expanded={{\n                  bg: \"main.50\",\n                  color: \"main.900\",\n                  borderColor: \"main.900\",\n                  borderWidth: \"0.1px\",\n                }}\n              >\n                {selectedSite ? selectedSite.name : \"사이트 선택\"}\n              </MenuButton>\n\n              <MenuList\n                textColor=\"text.700\"\n                borderWidth=\"0px\"\n                borderRadius=\"10px\"\n                boxShadow=\"lg\"\n              >\n                {siteLoading ? (\n                  <MenuItem isDisabled>\n                    <Spinner size=\"sm\" mr=\"8px\" /> 불러오는 중...\n                  </MenuItem>\n                ) : (\n                  <>\n                    <MenuItem\n                      _hover={{ bg: \"main.50\" }}\n                      _focus={{ bg: \"main.50\", textColor: \"main.900\", fontWeight: \"600\" }}\n                      onClick={() => setSelectedSite({ site_id: 0, name: \"모든 사이트\" })}\n                    >\n                      모든 사이트\n                    </MenuItem>\n\n                    {sites.map((s) => (\n                      <MenuItem\n                        key={s.site_id ?? s.id}\n                        _hover={{ bg: \"main.50\" }}\n                        _focus={{ bg: \"main.50\", textColor: \"main.900\", fontWeight: \"600\" }}\n                        onClick={() =>\n                          setSelectedSite({\n                            site_id: s.site_id ?? s.id,\n                            name: s.name ?? s.site_name ?? `사이트 ${s.site_id ?? s.id}`,\n                          })\n                        }\n                      >\n                        {s.name ?? s.site_name ?? `사이트 ${s.site_id ?? s.id}`}\n                      </MenuItem>\n                    ))}\n                  </>\n                )}\n              </MenuList>\n            </Menu>\n          </Flex>\n\n          <Flex flexDirection=\"column\">\n            <Text fontSize=\"md\" fontWeight={400} color={titleTextColor} mb=\"4px\" mt=\"24px\">\n              권한 설정\n            </Text>\n\n            <Stack spacing=\"8px\" mt=\"8px\" {...group}>\n              {roleItems.map((item) => {\n                const radio = getRadioProps({ value: item.value });\n                return (\n                  <RoleRadioCard key={item.value} {...radio}>\n                    {item.title}\n                  </RoleRadioCard>\n                );\n              })}\n            </Stack>\n          </Flex>\n\n          <Button\n            mt=\"auto\"\n            fontSize=\"md\"\n            type=\"submit\"\n            bg=\"main.900\"\n            w=\"100%\"\n            h=\"45px\"\n            mb=\"20px\"\n            color=\"white\"\n            _hover={{ bg: \"sub.900\" }}\n            _active={{ bg: \"sub.900\" }}\n            isDisabled={!selectedSite || approveLoading}\n            isLoading={approveLoading}\n            loadingText=\"변경 중...\"\n            onClick={handleUpdate}\n          >\n            사용자 정보 변경\n          </Button>\n        </DrawerBody>\n      </DrawerContent>\n    </Drawer>\n  );\n}\n\nUserInfoUpdatePopUp.propTypes = {\n  secondary: PropTypes.bool,\n  isOpen: PropTypes.bool,\n  onClose: PropTypes.func,\n  fixed: PropTypes.bool,\n  selectedUserId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n  selectedUserName: PropTypes.string,\n  onApproved: PropTypes.func,\n};\n"],"mappings":"idAAA,OACEA,MAAM,CACNC,MAAM,CACNC,UAAU,CACVC,iBAAiB,CACjBC,aAAa,CACbC,YAAY,CACZC,aAAa,CACbC,IAAI,CACJC,IAAI,CACJC,IAAI,CACJC,UAAU,CACVC,QAAQ,CACRC,QAAQ,CACRC,iBAAiB,CACjBC,KAAK,CACLC,aAAa,CACbC,OAAO,KACF,kBAAkB,CAEzB,OAASC,cAAc,CAAEC,KAAK,CAAEC,MAAM,KAAS,gBAAgB,CAG/D,MAAO,CAAAC,KAAK,KAAM,OAAO,CACzB,OAASC,WAAW,CAAEC,cAAc,KAAQ,kBAAkB,CAC9D,OAASC,aAAa,KAAQ,wBAAwB,CACtD,MAAO,CAAAC,aAAa,KAAM,8BAA8B,CAAC,OAAAC,GAAA,IAAAC,IAAA,CAAAC,IAAA,IAAAC,KAAA,CAAAC,QAAA,IAAAC,SAAA,yBAGzD,cAAe,SAAS,CAAAC,mBAAmBA,CAACC,KAAK,CAAE,CACjD,GAAQ,CAAAC,MAAM,CAAcD,KAAK,CAAzBC,MAAM,CAAEC,OAAO,CAAKF,KAAK,CAAjBE,OAAO,CAEvB,IAAAC,eAAA,CAAwBf,KAAK,CAACgB,QAAQ,CAAC,CAAC,CAAC,CAAAC,gBAAA,CAAAC,cAAA,CAAAH,eAAA,IAAlCI,IAAI,CAAAF,gBAAA,IAAEG,OAAO,CAAAH,gBAA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