@e-llm-studio/instant-learning 1.0.12 → 1.0.14

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.
Files changed (28) hide show
  1. package/dist/cjs/features/IL-OTJ/_components/MarkdownRenderer.module.css.js +1 -1
  2. package/dist/cjs/features/LearningManagement/AuditLog/AuditLog.js +1 -1
  3. package/dist/cjs/features/LearningManagement/RBAC/AccessManagementPanel.js +1 -1
  4. package/dist/cjs/features/LearningManagement/RuleContent/AddScopeModal.js +1 -1
  5. package/dist/cjs/features/LearningManagement/components/InstantLearningModal.js +1 -1
  6. package/dist/cjs/features/LearningManagement/components/StationOnboarding/StationOnboardModal.js +1 -1
  7. package/dist/features/IL-OTJ/_components/MarkdownRenderer.module.css.js +1 -1
  8. package/dist/features/LearningManagement/AuditLog/AuditLog.js +1 -1
  9. package/dist/features/LearningManagement/RBAC/AccessManagementPanel.js +1 -1
  10. package/dist/features/LearningManagement/RuleContent/AddScopeModal.js +1 -1
  11. package/dist/features/LearningManagement/components/InstantLearningModal.js +1 -1
  12. package/dist/features/LearningManagement/components/StationOnboarding/StationOnboardModal.js +1 -1
  13. package/dist/types/src/features/LearningManagement/AuditLog/AuditLog.d.ts.map +1 -1
  14. package/dist/types/src/features/LearningManagement/RBAC/AccessManagementPanel.d.ts +1 -0
  15. package/dist/types/src/features/LearningManagement/RBAC/AccessManagementPanel.d.ts.map +1 -1
  16. package/dist/types/src/features/LearningManagement/RuleContent/AddScopeModal.d.ts.map +1 -1
  17. package/dist/types/src/features/LearningManagement/components/InstantLearningModal.d.ts.map +1 -1
  18. package/package.json +1 -1
  19. package/dist/cjs/features/LearningManagement/assets/Search-result(add new).svg.js +0 -2
  20. package/dist/cjs/features/LearningManagement/assets/Search-result(add new).svg.js.map +0 -1
  21. package/dist/cjs/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js +0 -2
  22. package/dist/cjs/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js.map +0 -1
  23. package/dist/features/LearningManagement/assets/Search-result(add new).svg.js +0 -2
  24. package/dist/features/LearningManagement/assets/Search-result(add new).svg.js.map +0 -1
  25. package/dist/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js +0 -2
  26. package/dist/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.js.map +0 -1
  27. package/dist/types/src/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.d.ts +0 -12
  28. package/dist/types/src/features/LearningManagement/components/StationOnboarding/BackwardStationOnboardModal.d.ts.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),r=require("react"),o=require("@mui/material"),t=require("lucide-react"),i=require("primereact/toast"),s=require("uuid"),a=require("../../apis/scopeApis.js"),l=require("./StationAutocomplete.js"),u=require("../CardSkeleton.js"),c=require("./OnboardingLoader.js"),d=require("./TemplateCard.js"),p=require("../../styles/StationOnboardModal.module.css.js"),x=require("./InputField.js"),g=require("../../store/useAuthStore.js"),f=require("../../store/useConfigStore.js"),h=require("../../store/useLearningTemplateStore.js"),_=require("../../config.js"),m=[{label:"6am to 7pm",value:"06:00 AM - 7:00 PM"},{label:"5am to 7pm",value:"05:00 AM - 7:00 PM"}],S=[{label:"Low Sellout",value:"Low Sellout"},{label:"High Sellout",value:"High Sellout"},{label:"None",value:""}],v=[{label:"None",value:"None"},{label:"Distribute spots evenly across all breaks in the hour",value:"Distribute spots evenly across all breaks in the hour"}];exports.default=function(y){var b,j=y.isOpen,w=y.onClose,C=y.onBoardStation,T=y.app_integration_id,B=y.token,F=r.useState(null),E=F[0],O=F[1],k=r.useState([]),M=k[0],A=k[1],N=r.useState(0),D=N[0],z=N[1],R=r.useState(!0),q=R[0],I=R[1],L=r.useState(!1),P=L[0],W=L[1],G=r.useState([]),Y=G[0],U=G[1],H=r.useState(""),K=H[0],X=H[1],J=r.useState(""),Q=J[0],V=J[1],Z=r.useState(!1),$=Z[0],ee=Z[1],ne=r.useState(!1),re=ne[0],oe=ne[1],te=r.useState(null),ie=te[0],se=te[1],ae=r.useState(null);ae[0],ae[1];var le=r.useState(!1),ue=le[0],ce=le[1],de=r.useState(0),pe=de[0],xe=de[1],ge=r.useState(""),fe=ge[0],he=ge[1],_e=g.default().user,me=r.useRef(null),Se=r.useRef(null),ve=r.useRef(null),ye=r.useRef(null);f.useConfigStore().configuration;var be=h.useLearningTemplateStore(function(e){return e.stationNameParam}),je=r.useState({region:"",primeTime:["06:00 AM - 7:00 PM"],genre:"Music",type:"",lowSelloutConfig:""}),we=je[0],Ce=je[1],Te=function(e,n){return e.find(function(e){return e.value===n})||null},Be=r.useMemo(function(){return M.map(function(e){return{label:e.scope_name,value:e.scope_name}})},[M]),Fe=r.useMemo(function(){var e,n,r;if(!we.genre)return null;var o=M.find(function(e){return e.scope_name===we.genre});return o?{id:o.id,title:o.scope_name||"Unnamed Template",description:(null===(e=o.description)||void 0===e?void 0:e.trim())||"No description available.",inheritedText:(null===(n=o.inheritance)||void 0===n?void 0:n[0])||void 0,rulesCount:o.rules_count||0,tiersCount:o.tier_count||0,isCopy:null!==(r=o.is_copy)&&void 0!==r&&r}:null},[we.genre,M]);r.useEffect(function(){return function(){ve.current&&clearTimeout(ve.current)}},[]);var Ee=function(n){return e.__awaiter(void 0,void 0,void 0,function(){var r,o,t;return e.__generator(this,function(i){switch(i.label){case 0:if(P)return[2];W(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.retrieveGenreScopes({limit:"20",offset:String(n)})];case 2:return"success"===(null==(r=i.sent())?void 0:r.status)&&Array.isArray(null==r?void 0:r.data)?(o=r.data,A(function(r){if(0===n)return o;var t=new Set(r.map(function(e){return e.id})),i=o.filter(function(e){return!t.has(e.id)});return e.__spreadArray(e.__spreadArray([],r,!0),i,!0)}),o.length<20?I(!1):I(!0),z(n+20)):I(!1),[3,5];case 3:return t=i.sent(),console.error("[StationOnboard] Failed to fetch genre scopes:",t),I(!1),[3,5];case 4:return W(!1),[7];case 5:return[2]}})})};r.useEffect(function(){if(j&&(A([]),z(0),I(!0),Ee(0),be)){he(be);e.__awaiter(void 0,void 0,void 0,function(){var n,r,o;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,a.fetchStationsByKeyword(be,!0)];case 1:return!0===(null==(n=e.sent())?void 0:n.success)&&Array.isArray(null==n?void 0:n.data)&&(r=n.data.find(function(e){var n;return(null===(n=e.station_name)||void 0===n?void 0:n.toLowerCase())===be.toLowerCase()&&!e.ruleset_id}),r&&O(r)),[3,3];case 2:return o=e.sent(),console.error("[StationOnboard] Error auto-selecting station:",o),[3,3];case 3:return[2]}})})}},[j,be]);r.useEffect(function(){Ce(E?function(n){var r;return e.__assign(e.__assign({},n),{region:null!==(r=E.market)&&void 0!==r?r:""})}:{region:"",primeTime:["06:00 AM - 7:00 PM"],genre:"Music",type:"",lowSelloutConfig:""})},[E]),r.useEffect(function(){var e=setTimeout(function(){V(K)},500);return function(){return clearTimeout(e)}},[K]),r.useEffect(function(){e.__awaiter(void 0,void 0,void 0,function(){var n,r,o,t;return e.__generator(this,function(e){switch(e.label){case 0:if(!Q.trim())return U([]),[2];ee(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,a.searchScopes({search_string:Q.trim()})];case 2:return"success"===(null==(n=e.sent())?void 0:n.status)&&Array.isArray(null==n?void 0:n.data)?(r=n.data.filter(function(e){var n,r=null!==(n=e.inheritance)&&void 0!==n?n:[],o=r.indexOf(e.scope_name);return!(o<=0)&&r[o-1]===we.genre}),o=r.map(function(e){var n,r,o;return{id:e.id,title:e.scope_name||"Unnamed Template",description:(null===(n=e.description)||void 0===n?void 0:n.trim())||"No description available.",inheritedText:(null===(r=e.inheritance)||void 0===r?void 0:r[0])||void 0,rulesCount:e.rules_count||0,tiersCount:e.tier_count||0,isCopy:null!==(o=e.is_copy)&&void 0!==o&&o}}),U(o)):U([]),[3,5];case 3:return t=e.sent(),console.error("[StationOnboard] Error searching scopes:",t),U([]),[3,5];case 4:return ee(!1),[7];case 5:return[2]}})})},[Q,we.genre]),r.useEffect(function(){!Q.trim()&&Fe&&se(Fe.id)},[Q,Fe]);var Oe=function(){setTimeout(function(){ye.current&&ye.current.scrollTo({top:ye.current.scrollHeight,behavior:"smooth"})},100)},ke=function(){he(""),O(null),Ce({region:"",primeTime:["06:00 AM - 7:00 PM"],genre:"Music",type:"",lowSelloutConfig:""}),U([]),X(""),se(null),w()},Me=function(n,r){var o;if("primeTime"!==n){var t=null!==(o=null==r?void 0:r.value)&&void 0!==o?o:"";Ce(function(r){var o;return e.__assign(e.__assign({},r),((o={})[n]=String(t),o))}),"genre"===n&&(oe(!0),ve.current&&clearTimeout(ve.current),ve.current=setTimeout(function(){var e=M.find(function(e){return e.scope_name===t});se(e?e.id:null),oe(!1)},800))}else{var i=(null==r?void 0:r.value)?String(r.value):"";Ce(function(n){return e.__assign(e.__assign({},n),{primeTime:i?[i]:[]})})}},Ae=Boolean(E&&we.region&&we.primeTime.length>0&&we.genre);return n.jsxs(o.Dialog,e.__assign({open:j,onClose:ke,maxWidth:!1,disableEscapeKeyDown:!0,PaperProps:{sx:{width:"90vw",height:"90vh",borderRadius:"12px",display:"flex",flexDirection:"column",overflow:"hidden",fontFamily:"sans-serif"}}},{children:[n.jsx(i.Toast,{ref:me}),n.jsxs(o.Box,e.__assign({sx:{p:"20px 20px 20px 27px",borderBottom:"1px solid #F0F2F5",display:"flex",justifyContent:"space-between",alignItems:"center",bgcolor:"#fff"}},{children:[n.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[n.jsx(o.Typography,e.__assign({sx:{fontSize:"18px",fontWeight:600,color:"#19213D"}},{children:"Onboard a Station"})),n.jsx(o.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:400,color:"#666F8D"}},{children:"Onboard a station to start configuring learnings."}))]})),n.jsx(o.IconButton,e.__assign({onClick:ke,disabled:ue,sx:{color:"#19213D"}},{children:n.jsx(t.X,{size:24})}))]})),n.jsxs(o.DialogContent,e.__assign({sx:{p:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"row",overflow:"hidden",position:"relative"}},{children:[n.jsx(c.default,{isLoading:ue,currentStep:pe,onComplete:function(){ce(!1);var e=Se.current;ke(),C(e||void 0),Se.current=null}}),n.jsxs(o.Box,e.__assign({sx:{display:"flex",flex:1,paddingY:"14px",paddingX:"20px",gap:3,overflowY:"hidden"}},{children:[n.jsxs(o.Box,e.__assign({ref:ye,sx:{flex:1,bgcolor:"#fff",p:3,borderRadius:"16px",border:"1px solid #F0F2F5",height:"100%",overflowY:"auto"}},{children:[n.jsx(o.Typography,e.__assign({sx:{fontSize:"1rem",fontWeight:600,mb:.5,color:"#19213D"}},{children:"Basic Details"})),n.jsx(o.Typography,e.__assign({sx:{fontSize:"0.75rem",color:"#00000080",mb:"20px"}},{children:"Set up basic station details to unlock AI recommended scopes."})),n.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:"16px"}},{children:[n.jsxs(o.Box,e.__assign({className:p.default.formGroup},{children:[n.jsxs("label",e.__assign({className:p.default.label},{children:[n.jsx("span",e.__assign({className:p.default.asterisk},{children:"*"})),"Station Name/Call Letters"]})),n.jsx(l.default,{value:fe,onChange:he,onStationSelect:function(e){return O(e)}})]})),n.jsx(x.default,{required:!0,disabled:!0,label:"Region",placeholder:"Select Region",value:we.region||void 0,isSearchable:!1}),n.jsx(x.default,{required:!0,label:"Prime Time Window",placeholder:"Select Prime Time",options:m,value:Te(m,(null===(b=we.primeTime)||void 0===b?void 0:b[0])||""),onOptionChange:function(e){return Me("primeTime",e)},isSearchable:!1}),n.jsx(o.Box,e.__assign({onClick:Oe,sx:{width:"100%"}},{children:n.jsx(x.default,{label:"Station Sellout Type",placeholder:"None",options:S,value:Te(S,we.type),onOptionChange:function(n){Me("type",n),"Low Sellout"!==(null==n?void 0:n.value)&&Ce(function(n){return e.__assign(e.__assign({},n),{lowSelloutConfig:""})})},isSearchable:!1})})),"Low Sellout"===we.type&&n.jsx(o.Box,e.__assign({onClick:Oe,sx:{width:"100%"}},{children:n.jsx(x.default,{label:"Low Sell Out Configurations",placeholder:"Select Configuration",options:v,value:Te(v,we.lowSelloutConfig),onOptionChange:function(e){return Me("lowSelloutConfig",e)},isSearchable:!1})}))]}))]})),n.jsxs(o.Box,e.__assign({sx:{flex:1,bgcolor:"#fff",p:3,borderRadius:"12px",border:"1px solid #F0F2F5",display:"flex",flexDirection:"column",height:"100%",overflowY:"auto"}},{children:[n.jsxs(o.Typography,e.__assign({sx:{fontSize:"1rem",fontWeight:600,mb:.5,color:"#19213D"}},{children:[n.jsx("span",e.__assign({style:{color:"#E53E3E",marginRight:"2px"}},{children:"*"})),"Select a scope for your station"]})),n.jsx(o.Typography,e.__assign({sx:{fontSize:"0.75rem",color:"#64748B",mb:"16px"}},{children:"Your station will inherit the rules from the selected scope."})),n.jsx(o.Box,e.__assign({sx:{mb:2}},{children:n.jsx(x.default,{required:!0,label:"",placeholder:"Select Genre",options:Be,value:Te(Be,we.genre),onOptionChange:function(e){return Me("genre",e)},isSearchable:!1,onMenuScrollToBottom:function(){!P&&q&&Ee(D)},isLoadingOptions:P,hasMoreOptions:q})})),n.jsx(o.Box,e.__assign({sx:{mb:3}},{children:re?n.jsx(u.default,{}):Fe?n.jsxs(o.Box,e.__assign({sx:{border:"1.5px solid #2563EB",borderRadius:"10px",p:"14px 16px",bgcolor:"#EFF6FF",display:"flex",alignItems:"flex-start",gap:"12px"}},{children:[n.jsx(o.Box,e.__assign({sx:{width:36,height:36,borderRadius:"8px",bgcolor:"#DBEAFE",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:n.jsxs("svg",e.__assign({width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#2563EB",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n.jsx("circle",{cx:"12",cy:"12",r:"2"}),n.jsx("path",{d:"M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14"})]}))})),n.jsxs(o.Box,e.__assign({sx:{flex:1,minWidth:0}},{children:[n.jsx(o.Typography,e.__assign({sx:{fontSize:"0.875rem",fontWeight:600,color:"#1E3A5F",mb:"2px"}},{children:Fe.title})),n.jsx(o.Typography,e.__assign({sx:{fontSize:"0.75rem",color:"#2563EB",mb:"8px"}},{children:Fe.description})),n.jsxs(o.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"}},{children:[Fe.inheritedText&&n.jsxs(o.Box,e.__assign({component:"span",sx:{fontSize:"0.7rem",color:"#475569",bgcolor:"#F1F5F9",border:"1px solid #E2E8F0",borderRadius:"4px",px:"6px",py:"2px",display:"inline-flex",alignItems:"center",gap:"4px"}},{children:[n.jsxs("svg",e.__assign({width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n.jsx("polyline",{points:"15 3 21 3 21 9"}),n.jsx("path",{d:"M21 3L9 15"}),n.jsx("path",{d:"M3 21l6-6"})]})),Fe.inheritedText]})),n.jsxs(o.Box,e.__assign({component:"span",sx:{fontSize:"0.7rem",color:"#475569",bgcolor:"#F1F5F9",border:"1px solid #E2E8F0",borderRadius:"4px",px:"6px",py:"2px"}},{children:[Fe.rulesCount," rules"]})),n.jsxs(o.Box,e.__assign({component:"span",sx:{fontSize:"0.7rem",color:"#475569",bgcolor:"#F1F5F9",border:"1px solid #E2E8F0",borderRadius:"4px",px:"6px",py:"2px"}},{children:[Fe.tiersCount," Tiers"]}))]}))]}))]})):we.genre?null:n.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",opacity:.4,py:6,gap:1}},{children:[n.jsx(t.Brush,{size:28}),n.jsx(o.Typography,e.__assign({sx:{fontSize:"0.75rem",color:"#94A3B8"}},{children:"Select a genre to load the matching scope"}))]}))})),we.genre&&n.jsxs(n.Fragment,{children:[n.jsxs(o.Typography,e.__assign({sx:{fontSize:"1rem",fontWeight:600,mb:.5,color:"#19213D"}},{children:["Select an Existing Station from the “",we.genre,"” Scope"," ",n.jsx(o.Typography,e.__assign({component:"span",sx:{fontSize:"1rem",fontWeight:400,color:"#64748B"}},{children:"(Optional)"}))]})),n.jsxs(o.Typography,e.__assign({sx:{fontSize:"0.75rem",color:"#64748B",mb:"12px"}},{children:["Please select an existing station under the “",we.genre,"” category to copy its learnings."]})),n.jsxs("div",e.__assign({className:p.default.searchWrapper,style:{marginBottom:"12px"}},{children:[n.jsx("input",{type:"text",value:K,onChange:function(e){return X(e.target.value)},placeholder:"Search for station...",className:p.default.searchInput}),n.jsx(t.Search,{className:p.default.searchIcon,size:16})]})),n.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:2}},{children:[$&&n.jsx(u.default,{}),!$&&0===Y.length&&Q.trim()&&n.jsxs(o.Typography,e.__assign({sx:{fontSize:"0.875rem",color:"#64748B",textAlign:"center",py:4}},{children:['No scopes found matching "',Q,'".']})),!$&&Y.map(function(r){return n.jsx(d.default,e.__assign({},r,{isSelected:ie===r.id,onSelect:function(e){var n;se(ie===e?null!==(n=null==Fe?void 0:Fe.id)&&void 0!==n?n:null:e)}}),r.id)})]}))]})]}))]}))]})),n.jsxs(o.Box,e.__assign({sx:{p:"12px 20px",borderTop:"1px solid #F0F2F5",display:"flex",justifyContent:"flex-end",gap:2,bgcolor:"#fff"}},{children:[n.jsx("button",e.__assign({onClick:ke,disabled:ue,style:{padding:"7px 10px",borderRadius:"6px",color:"#64748B",border:"1px solid #E2E8F0",backgroundColor:"#fff",cursor:"pointer",fontSize:"14px",fontWeight:500}},{children:"Cancel"})),n.jsx("button",e.__assign({onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,r,o,t,i,l,u,c,d,p,x,g,f,m;return e.__generator(this,function(S){switch(S.label){case 0:if(!E||!ie)return console.error("[StationOnboard] Missing required data for onboarding"),[2];n=Fe?e.__spreadArray([Fe],Y,!0):Y,r=n.find(function(e){return e.id===ie}),null==r?void 0:r.isCopy,ce(!0),xe(0),o=null,S.label=1;case 1:return S.trys.push([1,3,,4]),t=h.useLearningTemplateStore.getState().backwardCompatibility,i=t?{topic:"customRuleSet",customScopeGroupName:_.IL_CONFIG_CONSTANTS.CUSTOM_SCOPE_GROUP_NAME,scopeDescription:E.station_name||"New Station",parentScopeId:null,customScopeName:E.station_name||"New Station",customScopeId:s.v4(),createByName:(null==_e?void 0:_e.firstname)||"System",createdBy:(null==_e?void 0:_e.email)||"system@audacy.com",scopeType:"Station",audacyStationMetadata:{genre:we.genre,low_sellout_configurations:"Low Sellout"===we.type?we.lowSelloutConfig:null,market:E.market,primetime_windows:we.primeTime,region:E.region,station_guid:E.station_guid,station_type:""===we.type?null:we.type}}:{topic:"customRuleSet",scope_reference_id:null,scopeDescription:"demo",parentScopeId:null,scopeName:E.station_name||"New Station",scopeReferenceMetadata:{},applicationMappingId:T},console.log("[StationOnboard] Step 1: Creating rule set with payload:",i),[4,a.createRuleSet(i,B)];case 2:if(l=S.sent(),!(o=null===(x=null==l?void 0:l.data)||void 0===x?void 0:x.scopeId))throw new Error("Failed to create scope - no scopeId returned");return console.log("[StationOnboard] Step 1 Complete: Created scope with ID:",o),xe(1),[3,4];case 3:return u=S.sent(),console.error("[StationOnboard] Error creating rule set:",u),null===(g=me.current)||void 0===g||g.show({severity:"error",life:3e3,summary:"Error",detail:"Failed to create rule set. Please try again."}),ce(!1),xe(0),[2];case 4:return S.trys.push([4,6,,7]),c=null!==ie&&ie!==(null==Fe?void 0:Fe.id),d={source_scope_id:c?ie:null!==(f=null==Fe?void 0:Fe.id)&&void 0!==f?f:ie,target_scope_id:o,is_copy_parent_variant_id:c},console.log("[StationOnboard] Step 3: Inheriting scope with payload:",d),[4,a.inheritScopeBackwardCompatible(d)];case 5:return S.sent(),console.log("[StationOnboard] Step 3 Complete: Scope inherited"),xe(3),[3,7];case 6:return p=S.sent(),console.error("[StationOnboard] Error inheriting scope (no rollback):",p),null===(m=me.current)||void 0===m||m.show({severity:"error",life:3e3,summary:"Error",detail:"Failed to apply rule template. Please try again."}),ce(!1),xe(0),[2];case 7:return Se.current=o,console.log("[StationOnboard] Onboarding completed successfully!"),[2]}})})},disabled:!Ae||ue,style:{padding:"7px 10px",borderRadius:"6px",border:"none",backgroundColor:Ae?"#2563EB":"#BFDBFE",color:"#fff",cursor:Ae&&!ue?"pointer":"not-allowed",fontSize:"14px",fontWeight:500,display:"flex",alignItems:"center",gap:"7px"}},{children:ue?n.jsxs(n.Fragment,{children:[n.jsx(o.CircularProgress,{size:16,color:"inherit"}),n.jsx("span",{children:"Onboarding..."})]}):n.jsxs(n.Fragment,{children:[n.jsx("span",{children:"Onboard Station"}),n.jsx(t.ArrowRight,{size:16})]})}))]}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),r=require("react"),o=require("@mui/material"),t=require("lucide-react"),i=require("primereact/toast"),s=require("uuid"),a=require("../../apis/scopeApis.js"),l=require("./StationAutocomplete.js"),u=require("../CardSkeleton.js"),c=require("./OnboardingLoader.js"),d=require("./TemplateCard.js"),p=require("../../styles/StationOnboardModal.module.css.js"),x=require("./InputField.js"),g=require("../../store/useAuthStore.js"),f=require("../../store/useConfigStore.js"),h=require("../../store/useLearningTemplateStore.js"),_=require("../../config.js"),m=[{label:"6am to 7pm",value:"06:00 AM - 7:00 PM"},{label:"5am to 7pm",value:"05:00 AM - 7:00 PM"}],S=[{label:"Low Sellout",value:"Low Sellout"},{label:"High Sellout",value:"High Sellout"},{label:"None",value:""}],v=[{label:"None",value:"None"},{label:"Distribute spots evenly across all breaks in the hour",value:"Distribute spots evenly across all breaks in the hour"}];exports.default=function(y){var b,j=y.isOpen,w=y.onClose,C=y.onBoardStation,T=y.app_integration_id,B=y.token,F=r.useState(null),E=F[0],O=F[1],k=r.useState([]),M=k[0],A=k[1],N=r.useState(0),D=N[0],z=N[1],q=r.useState(!0),I=q[0],L=q[1],R=r.useState(!1),P=R[0],W=R[1],G=r.useState([]),Y=G[0],U=G[1],H=r.useState(""),K=H[0],X=H[1],J=r.useState(""),Q=J[0],V=J[1],Z=r.useState(!1),$=Z[0],ee=Z[1],ne=r.useState(!1),re=ne[0],oe=ne[1],te=r.useState(null),ie=te[0],se=te[1],ae=r.useState(null);ae[0],ae[1];var le=r.useState(!1),ue=le[0],ce=le[1],de=r.useState(0),pe=de[0],xe=de[1],ge=r.useState(""),fe=ge[0],he=ge[1],_e=g.default().user,me=r.useRef(null),Se=r.useRef(null),ve=r.useRef(null),ye=r.useRef(null);f.useConfigStore().configuration;var be=h.useLearningTemplateStore(function(e){return e.stationNameParam}),je=r.useState({region:"",primeTime:["06:00 AM - 7:00 PM"],genre:"Music",type:"",lowSelloutConfig:""}),we=je[0],Ce=je[1],Te=function(e,n){return e.find(function(e){return e.value===n})||null},Be=r.useMemo(function(){return M.map(function(e){return{label:e.scope_name,value:e.scope_name}})},[M]),Fe=r.useMemo(function(){var e,n,r;if(!we.genre)return null;var o=M.find(function(e){return e.scope_name===we.genre});return o?{id:o.id,title:o.scope_name||"Unnamed Template",description:(null===(e=o.description)||void 0===e?void 0:e.trim())||"No description available.",inheritedText:(null===(n=o.inheritance)||void 0===n?void 0:n[0])||void 0,rulesCount:o.rules_count||0,tiersCount:o.tier_count||0,isCopy:null!==(r=o.is_copy)&&void 0!==r&&r}:null},[we.genre,M]);r.useEffect(function(){return function(){ve.current&&clearTimeout(ve.current)}},[]);var Ee=function(n){return e.__awaiter(void 0,void 0,void 0,function(){var r,o,t;return e.__generator(this,function(i){switch(i.label){case 0:if(P)return[2];W(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,a.retrieveGenreScopes({limit:"20",offset:String(n)})];case 2:return"success"===(null==(r=i.sent())?void 0:r.status)&&Array.isArray(null==r?void 0:r.data)?(o=r.data,A(function(r){if(0===n)return o;var t=new Set(r.map(function(e){return e.id})),i=o.filter(function(e){return!t.has(e.id)});return e.__spreadArray(e.__spreadArray([],r,!0),i,!0)}),o.length<20?L(!1):L(!0),z(n+20)):L(!1),[3,5];case 3:return t=i.sent(),console.error("[StationOnboard] Failed to fetch genre scopes:",t),L(!1),[3,5];case 4:return W(!1),[7];case 5:return[2]}})})};r.useEffect(function(){if(j&&(A([]),z(0),L(!0),Ee(0),be)){he(be);e.__awaiter(void 0,void 0,void 0,function(){var n,r,o;return e.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,a.fetchStationsByKeyword(be,!0)];case 1:return!0===(null==(n=e.sent())?void 0:n.success)&&Array.isArray(null==n?void 0:n.data)&&(r=n.data.find(function(e){var n;return(null===(n=e.station_name)||void 0===n?void 0:n.toLowerCase())===be.toLowerCase()&&!e.ruleset_id}),r&&O(r)),[3,3];case 2:return o=e.sent(),console.error("[StationOnboard] Error auto-selecting station:",o),[3,3];case 3:return[2]}})})}},[j,be]);r.useEffect(function(){Ce(E?function(n){var r;return e.__assign(e.__assign({},n),{region:null!==(r=E.market)&&void 0!==r?r:""})}:{region:"",primeTime:["06:00 AM - 7:00 PM"],genre:"Music",type:"",lowSelloutConfig:""})},[E]),r.useEffect(function(){var e=setTimeout(function(){V(K)},500);return function(){return clearTimeout(e)}},[K]),r.useEffect(function(){e.__awaiter(void 0,void 0,void 0,function(){var n,r,o,t;return e.__generator(this,function(e){switch(e.label){case 0:if(!Q.trim())return U([]),[2];ee(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,a.searchScopes({search_string:Q.trim()})];case 2:return"success"===(null==(n=e.sent())?void 0:n.status)&&Array.isArray(null==n?void 0:n.data)?(r=n.data.filter(function(e){var n,r=null!==(n=e.inheritance)&&void 0!==n?n:[],o=r.indexOf(e.scope_name);return!(o<=0)&&r[o-1]===we.genre}),o=r.map(function(e){var n,r,o;return{id:e.id,title:e.scope_name||"Unnamed Template",description:(null===(n=e.description)||void 0===n?void 0:n.trim())||"No description available.",inheritedText:(null===(r=e.inheritance)||void 0===r?void 0:r[0])||void 0,rulesCount:e.rules_count||0,tiersCount:e.tier_count||0,isCopy:null!==(o=e.is_copy)&&void 0!==o&&o}}),U(o)):U([]),[3,5];case 3:return t=e.sent(),console.error("[StationOnboard] Error searching scopes:",t),U([]),[3,5];case 4:return ee(!1),[7];case 5:return[2]}})})},[Q,we.genre]),r.useEffect(function(){!Q.trim()&&Fe&&se(Fe.id)},[Q,Fe]);var Oe=function(){setTimeout(function(){ye.current&&ye.current.scrollTo({top:ye.current.scrollHeight,behavior:"smooth"})},100)},ke=function(){he(""),O(null),Ce({region:"",primeTime:["06:00 AM - 7:00 PM"],genre:"Music",type:"",lowSelloutConfig:""}),U([]),X(""),se(null),w()},Me=function(n,r){var o;if("primeTime"!==n){var t=null!==(o=null==r?void 0:r.value)&&void 0!==o?o:"";Ce(function(r){var o;return e.__assign(e.__assign({},r),((o={})[n]=String(t),o))}),"genre"===n&&(oe(!0),ve.current&&clearTimeout(ve.current),ve.current=setTimeout(function(){var e=M.find(function(e){return e.scope_name===t});se(e?e.id:null),oe(!1)},800))}else{var i=(null==r?void 0:r.value)?String(r.value):"";Ce(function(n){return e.__assign(e.__assign({},n),{primeTime:i?[i]:[]})})}},Ae=Boolean(E&&we.region&&we.primeTime.length>0&&we.genre);return n.jsxs(o.Dialog,e.__assign({open:j,onClose:ke,maxWidth:!1,disableEscapeKeyDown:!0,PaperProps:{sx:{width:"90vw",height:"90vh",borderRadius:"12px",display:"flex",flexDirection:"column",overflow:"hidden",fontFamily:"sans-serif"}}},{children:[n.jsx(i.Toast,{ref:me}),n.jsxs(o.Box,e.__assign({sx:{p:"20px 20px 20px 27px",borderBottom:"1px solid #F0F2F5",display:"flex",justifyContent:"space-between",alignItems:"center",bgcolor:"#fff"}},{children:[n.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[n.jsx(o.Typography,e.__assign({sx:{fontSize:"18px",fontWeight:600,color:"#19213D"}},{children:"Onboard a Station"})),n.jsx(o.Typography,e.__assign({sx:{fontSize:"16px",fontWeight:400,color:"#666F8D"}},{children:"Onboard a station to start configuring learnings."}))]})),n.jsx(o.IconButton,e.__assign({onClick:ke,disabled:ue,sx:{color:"#19213D"}},{children:n.jsx(t.X,{size:24})}))]})),n.jsxs(o.DialogContent,e.__assign({sx:{p:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"row",overflow:"hidden",position:"relative"}},{children:[n.jsx(c.default,{isLoading:ue,currentStep:pe,onComplete:function(){ce(!1);var e=Se.current;ke(),C(e||void 0),Se.current=null}}),n.jsxs(o.Box,e.__assign({sx:{display:"flex",flex:1,paddingY:"14px",paddingX:"20px",gap:3,overflowY:"hidden"}},{children:[n.jsxs(o.Box,e.__assign({ref:ye,sx:{flex:1,bgcolor:"#fff",p:3,borderRadius:"16px",border:"1px solid #F0F2F5",height:"100%",overflowY:"auto"}},{children:[n.jsx(o.Typography,e.__assign({sx:{fontSize:"1rem",fontWeight:600,mb:.5,color:"#19213D"}},{children:"Basic Details"})),n.jsx(o.Typography,e.__assign({sx:{fontSize:"0.75rem",color:"#00000080",mb:"20px"}},{children:"Set up basic station details to unlock AI recommended scopes."})),n.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:"16px"}},{children:[n.jsxs(o.Box,e.__assign({className:p.default.formGroup},{children:[n.jsxs("label",e.__assign({className:p.default.label},{children:[n.jsx("span",e.__assign({className:p.default.asterisk},{children:"*"})),"Station Name/Call Letters"]})),n.jsx(l.default,{value:fe,onChange:he,onStationSelect:function(e){return O(e)}})]})),n.jsx(x.default,{required:!0,disabled:!0,label:"Market",placeholder:"Select Market",value:we.region||void 0,isSearchable:!1}),n.jsx(x.default,{required:!0,label:"Prime Time Window",placeholder:"Select Prime Time",options:m,value:Te(m,(null===(b=we.primeTime)||void 0===b?void 0:b[0])||""),onOptionChange:function(e){return Me("primeTime",e)},isSearchable:!1}),n.jsx(o.Box,e.__assign({onClick:Oe,sx:{width:"100%"}},{children:n.jsx(x.default,{label:"Station Sellout Type",placeholder:"None",options:S,value:Te(S,we.type),onOptionChange:function(n){Me("type",n),"Low Sellout"!==(null==n?void 0:n.value)&&Ce(function(n){return e.__assign(e.__assign({},n),{lowSelloutConfig:""})})},isSearchable:!1})})),"Low Sellout"===we.type&&n.jsx(o.Box,e.__assign({onClick:Oe,sx:{width:"100%"}},{children:n.jsx(x.default,{label:"Low Sell Out Configurations",placeholder:"Select Configuration",options:v,value:Te(v,we.lowSelloutConfig),onOptionChange:function(e){return Me("lowSelloutConfig",e)},isSearchable:!1})}))]}))]})),n.jsxs(o.Box,e.__assign({sx:{flex:1,bgcolor:"#fff",p:3,borderRadius:"12px",border:"1px solid #F0F2F5",display:"flex",flexDirection:"column",height:"100%",overflowY:"auto"}},{children:[n.jsxs(o.Typography,e.__assign({sx:{fontSize:"1rem",fontWeight:600,mb:.5,color:"#19213D"}},{children:[n.jsx("span",e.__assign({style:{color:"#E53E3E",marginRight:"2px"}},{children:"*"})),"Select a scope for your station"]})),n.jsx(o.Typography,e.__assign({sx:{fontSize:"0.75rem",color:"#64748B",mb:"16px"}},{children:"Your station will inherit the rules from the selected scope."})),n.jsx(o.Box,e.__assign({sx:{mb:2}},{children:n.jsx(x.default,{required:!0,label:"",placeholder:"Select Genre",options:Be,value:Te(Be,we.genre),onOptionChange:function(e){return Me("genre",e)},isSearchable:!1,onMenuScrollToBottom:function(){!P&&I&&Ee(D)},isLoadingOptions:P,hasMoreOptions:I})})),n.jsx(o.Box,e.__assign({sx:{mb:3}},{children:re?n.jsx(u.default,{}):Fe?n.jsxs(o.Box,e.__assign({sx:{border:"1.5px solid #2563EB",borderRadius:"10px",p:"14px 16px",bgcolor:"#EFF6FF",display:"flex",alignItems:"flex-start",gap:"12px"}},{children:[n.jsx(o.Box,e.__assign({sx:{width:36,height:36,borderRadius:"8px",bgcolor:"#DBEAFE",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:n.jsxs("svg",e.__assign({width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#2563EB",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n.jsx("circle",{cx:"12",cy:"12",r:"2"}),n.jsx("path",{d:"M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14"})]}))})),n.jsxs(o.Box,e.__assign({sx:{flex:1,minWidth:0}},{children:[n.jsx(o.Typography,e.__assign({sx:{fontSize:"0.875rem",fontWeight:600,color:"#1E3A5F",mb:"2px"}},{children:Fe.title})),n.jsx(o.Typography,e.__assign({sx:{fontSize:"0.75rem",color:"#2563EB",mb:"8px"}},{children:Fe.description})),n.jsxs(o.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"}},{children:[Fe.inheritedText&&n.jsxs(o.Box,e.__assign({component:"span",sx:{fontSize:"0.7rem",color:"#475569",bgcolor:"#F1F5F9",border:"1px solid #E2E8F0",borderRadius:"4px",px:"6px",py:"2px",display:"inline-flex",alignItems:"center",gap:"4px"}},{children:[n.jsxs("svg",e.__assign({width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[n.jsx("polyline",{points:"15 3 21 3 21 9"}),n.jsx("path",{d:"M21 3L9 15"}),n.jsx("path",{d:"M3 21l6-6"})]})),Fe.inheritedText]})),n.jsxs(o.Box,e.__assign({component:"span",sx:{fontSize:"0.7rem",color:"#475569",bgcolor:"#F1F5F9",border:"1px solid #E2E8F0",borderRadius:"4px",px:"6px",py:"2px"}},{children:[Fe.rulesCount," rules"]})),n.jsxs(o.Box,e.__assign({component:"span",sx:{fontSize:"0.7rem",color:"#475569",bgcolor:"#F1F5F9",border:"1px solid #E2E8F0",borderRadius:"4px",px:"6px",py:"2px"}},{children:[Fe.tiersCount," Tiers"]}))]}))]}))]})):we.genre?null:n.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",opacity:.4,py:6,gap:1}},{children:[n.jsx(t.Brush,{size:28}),n.jsx(o.Typography,e.__assign({sx:{fontSize:"0.75rem",color:"#94A3B8"}},{children:"Select a genre to load the matching scope"}))]}))})),we.genre&&n.jsxs(n.Fragment,{children:[n.jsxs(o.Typography,e.__assign({sx:{fontSize:"1rem",fontWeight:600,mb:.5,color:"#19213D"}},{children:["Select an Existing Station from the “",we.genre,"” Scope"," ",n.jsx(o.Typography,e.__assign({component:"span",sx:{fontSize:"1rem",fontWeight:400,color:"#64748B"}},{children:"(Optional)"}))]})),n.jsxs(o.Typography,e.__assign({sx:{fontSize:"0.75rem",color:"#64748B",mb:"12px"}},{children:["Please select an existing station under the “",we.genre,"” category to copy its learnings."]})),n.jsxs("div",e.__assign({className:p.default.searchWrapper,style:{marginBottom:"12px"}},{children:[n.jsx("input",{type:"text",value:K,onChange:function(e){return X(e.target.value)},placeholder:"Search for station...",className:p.default.searchInput}),n.jsx(t.Search,{className:p.default.searchIcon,size:16})]})),n.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:2}},{children:[$&&n.jsx(u.default,{}),!$&&0===Y.length&&Q.trim()&&n.jsxs(o.Typography,e.__assign({sx:{fontSize:"0.875rem",color:"#64748B",textAlign:"center",py:4}},{children:['No scopes found matching "',Q,'".']})),!$&&Y.map(function(r){return n.jsx(d.default,e.__assign({},r,{isSelected:ie===r.id,onSelect:function(e){var n;se(ie===e?null!==(n=null==Fe?void 0:Fe.id)&&void 0!==n?n:null:e)}}),r.id)})]}))]})]}))]}))]})),n.jsxs(o.Box,e.__assign({sx:{p:"12px 20px",borderTop:"1px solid #F0F2F5",display:"flex",justifyContent:"flex-end",gap:2,bgcolor:"#fff"}},{children:[n.jsx("button",e.__assign({onClick:ke,disabled:ue,style:{padding:"7px 10px",borderRadius:"6px",color:"#64748B",border:"1px solid #E2E8F0",backgroundColor:"#fff",cursor:"pointer",fontSize:"14px",fontWeight:500}},{children:"Cancel"})),n.jsx("button",e.__assign({onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,r,o,t,i,l,u,c,d,p,x,g,f,m;return e.__generator(this,function(S){switch(S.label){case 0:if(!E||!ie)return console.error("[StationOnboard] Missing required data for onboarding"),[2];n=Fe?e.__spreadArray([Fe],Y,!0):Y,r=n.find(function(e){return e.id===ie}),null==r?void 0:r.isCopy,ce(!0),xe(0),o=null,S.label=1;case 1:return S.trys.push([1,3,,4]),t=h.useLearningTemplateStore.getState().backwardCompatibility,i=t?{topic:"customRuleSet",customScopeGroupName:_.IL_CONFIG_CONSTANTS.CUSTOM_SCOPE_GROUP_NAME,scopeDescription:E.station_name||"New Station",parentScopeId:null,customScopeName:E.station_name||"New Station",customScopeId:s.v4(),createByName:(null==_e?void 0:_e.firstname)||"System",createdBy:(null==_e?void 0:_e.email)||"system@audacy.com",scopeType:"Station",audacyStationMetadata:{genre:we.genre,low_sellout_configurations:"Low Sellout"===we.type?we.lowSelloutConfig:null,market:E.market,primetime_windows:we.primeTime,region:E.region,station_guid:E.station_guid,station_type:""===we.type?null:we.type}}:{topic:"customRuleSet",scope_reference_id:null,scopeDescription:"demo",parentScopeId:null,scopeName:E.station_name||"New Station",scopeReferenceMetadata:{},applicationMappingId:T},console.log("[StationOnboard] Step 1: Creating rule set with payload:",i),[4,a.createRuleSet(i,B)];case 2:if(l=S.sent(),!(o=null===(x=null==l?void 0:l.data)||void 0===x?void 0:x.scopeId))throw new Error("Failed to create scope - no scopeId returned");return console.log("[StationOnboard] Step 1 Complete: Created scope with ID:",o),xe(1),[3,4];case 3:return u=S.sent(),console.error("[StationOnboard] Error creating rule set:",u),null===(g=me.current)||void 0===g||g.show({severity:"error",life:3e3,summary:"Error",detail:"Failed to create rule set. Please try again."}),ce(!1),xe(0),[2];case 4:return S.trys.push([4,6,,7]),c=null!==ie&&ie!==(null==Fe?void 0:Fe.id),d={source_scope_id:c?ie:null!==(f=null==Fe?void 0:Fe.id)&&void 0!==f?f:ie,target_scope_id:o,is_copy_parent_variant_id:c},console.log("[StationOnboard] Step 3: Inheriting scope with payload:",d),[4,a.inheritScopeBackwardCompatible(d)];case 5:return S.sent(),console.log("[StationOnboard] Step 3 Complete: Scope inherited"),xe(3),[3,7];case 6:return p=S.sent(),console.error("[StationOnboard] Error inheriting scope (no rollback):",p),null===(m=me.current)||void 0===m||m.show({severity:"error",life:3e3,summary:"Error",detail:"Failed to apply rule template. Please try again."}),ce(!1),xe(0),[2];case 7:return Se.current=o,console.log("[StationOnboard] Onboarding completed successfully!"),[2]}})})},disabled:!Ae||ue,style:{padding:"7px 10px",borderRadius:"6px",border:"none",backgroundColor:Ae?"#2563EB":"#BFDBFE",color:"#fff",cursor:Ae&&!ue?"pointer":"not-allowed",fontSize:"14px",fontWeight:500,display:"flex",alignItems:"center",gap:"7px"}},{children:ue?n.jsxs(n.Fragment,{children:[n.jsx(o.CircularProgress,{size:16,color:"inherit"}),n.jsx("span",{children:"Onboarding..."})]}):n.jsxs(n.Fragment,{children:[n.jsx("span",{children:"Onboard Station"}),n.jsx(t.ArrowRight,{size:16})]})}))]}))]}))};
2
2
  //# sourceMappingURL=StationOnboardModal.js.map
@@ -1,2 +1,2 @@
1
- import e from"../../../node_modules/style-inject/dist/style-inject.es.js";var r={containerWrapper:"MarkdownRenderer-module_containerWrapper__XUtML",mainCard:"MarkdownRenderer-module_mainCard__BcSV-",scrollArea:"MarkdownRenderer-module_scrollArea__oTyxO",checkGreen:"MarkdownRenderer-module_checkGreen__fc8ex",list:"MarkdownRenderer-module_list__UqrN9",customHighlight:"MarkdownRenderer-module_customHighlight__KSBCr",detailsInline:"MarkdownRenderer-module_detailsInline__Lqlyi",detailsTarget:"MarkdownRenderer-module_detailsTarget__MQk1n",detailsBlock:"MarkdownRenderer-module_detailsBlock__iHvXn",summary:"MarkdownRenderer-module_summary__2-IHg",targetDummySummary:"MarkdownRenderer-module_targetDummySummary__1L590",popup:"MarkdownRenderer-module_popup__QuC1y"};e(".MarkdownRenderer-module_containerWrapper__XUtML{display:flex;gap:16px;height:42vh!important}.MarkdownRenderer-module_mainCard__BcSV-{background-color:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 1px 2px 0 #0000000d;flex:1;height:42vh;padding:20px}.MarkdownRenderer-module_scrollArea__oTyxO{height:100%;overflow-y:auto;padding-right:8px}.MarkdownRenderer-module_checkGreen__fc8ex{color:#16a34a!important;display:inline-block;font-weight:500;margin-right:4px;vertical-align:middle}.MarkdownRenderer-module_list__UqrN9{list-style-type:decimal;margin:4px 0;padding-left:20px}.MarkdownRenderer-module_customHighlight__KSBCr{background-color:#fef08a;border-radius:4px;color:#374151;padding:2px 4px}.MarkdownRenderer-module_detailsInline__Lqlyi{border-radius:8px;display:inline-block;margin:4px 0;position:relative;vertical-align:middle}.MarkdownRenderer-module_detailsInline__Lqlyi>:not(summary){display:none!important}.MarkdownRenderer-module_detailsTarget__MQk1n{display:block;margin:8px 0}.MarkdownRenderer-module_detailsBlock__iHvXn{border-radius:8px;margin:4px 0;position:relative;width:100%}.MarkdownRenderer-module_summary__2-IHg{align-items:center;color:#19213d;cursor:pointer;display:inline-flex;font-weight:500;gap:4px;padding:4px 0;user-select:none}.MarkdownRenderer-module_summary__2-IHg:hover{opacity:.9}.MarkdownRenderer-module_detailsBlock__iHvXn summary::-webkit-details-marker,.MarkdownRenderer-module_detailsInline__Lqlyi summary::-webkit-details-marker,.MarkdownRenderer-module_detailsTarget__MQk1n summary::-webkit-details-marker{display:none}.MarkdownRenderer-module_targetDummySummary__1L590{display:none!important}.MarkdownRenderer-module_popup__QuC1y{background:#6d28d91a;border:1px solid #6d28d9;border-radius:10px;box-shadow:0 8px 24px #0000000f;color:#6d28d9;display:block;font-size:12px;line-height:1.35;margin-top:6px;padding:12px;transition:opacity .2s ease,transform .2s ease}.MarkdownRenderer-module_detailsTarget__MQk1n .MarkdownRenderer-module_popup__QuC1y{opacity:0;transform:translateY(-4px)}.MarkdownRenderer-module_detailsTarget__MQk1n[open] .MarkdownRenderer-module_popup__QuC1y{opacity:1;transform:translateY(0)}.MarkdownRenderer-module_popup__QuC1y .MarkdownRenderer-module_popup__QuC1y{background:#0000!important;border:none!important;box-shadow:none!important;color:inherit!important;padding:0!important}");export{r as default};
1
+ import e from"../../../node_modules/style-inject/dist/style-inject.es.js";var r={containerWrapper:"MarkdownRenderer-module_containerWrapper__XUtML",mainCard:"MarkdownRenderer-module_mainCard__BcSV-",scrollArea:"MarkdownRenderer-module_scrollArea__oTyxO",checkGreen:"MarkdownRenderer-module_checkGreen__fc8ex",list:"MarkdownRenderer-module_list__UqrN9",customHighlight:"MarkdownRenderer-module_customHighlight__KSBCr",detailsInline:"MarkdownRenderer-module_detailsInline__Lqlyi",detailsTarget:"MarkdownRenderer-module_detailsTarget__MQk1n",detailsBlock:"MarkdownRenderer-module_detailsBlock__iHvXn",summary:"MarkdownRenderer-module_summary__2-IHg",targetDummySummary:"MarkdownRenderer-module_targetDummySummary__1L590",popup:"MarkdownRenderer-module_popup__QuC1y"};e(".MarkdownRenderer-module_containerWrapper__XUtML{display:flex;gap:16px;height:42vh!important}.MarkdownRenderer-module_mainCard__BcSV-{background-color:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 1px 2px 0 #0000000d;flex:1;height:42vh;padding:20px}.MarkdownRenderer-module_scrollArea__oTyxO{height:100%;overflow-y:auto;padding-right:8px}.MarkdownRenderer-module_scrollArea__oTyxO h2{font-size:1.5em;font-weight:700}.MarkdownRenderer-module_scrollArea__oTyxO h3{font-size:1.17em;font-weight:700}.MarkdownRenderer-module_checkGreen__fc8ex{color:#16a34a!important;display:inline-block;font-weight:500;margin-right:4px;vertical-align:middle}.MarkdownRenderer-module_list__UqrN9{list-style-type:decimal;margin:4px 0;padding-left:20px}.MarkdownRenderer-module_customHighlight__KSBCr{background-color:#fef08a;border-radius:4px;color:#374151;padding:2px 4px}.MarkdownRenderer-module_detailsInline__Lqlyi{border-radius:8px;display:inline-block;margin:4px 0;position:relative;vertical-align:middle}.MarkdownRenderer-module_detailsInline__Lqlyi>:not(summary){display:none!important}.MarkdownRenderer-module_detailsTarget__MQk1n{display:block;margin:8px 0}.MarkdownRenderer-module_detailsBlock__iHvXn{border-radius:8px;margin:4px 0;position:relative;width:100%}.MarkdownRenderer-module_summary__2-IHg{align-items:center;color:#19213d;cursor:pointer;display:inline-flex;font-weight:500;gap:4px;padding:4px 0;user-select:none}.MarkdownRenderer-module_summary__2-IHg:hover{opacity:.9}.MarkdownRenderer-module_detailsBlock__iHvXn summary::-webkit-details-marker,.MarkdownRenderer-module_detailsInline__Lqlyi summary::-webkit-details-marker,.MarkdownRenderer-module_detailsTarget__MQk1n summary::-webkit-details-marker{display:none}.MarkdownRenderer-module_targetDummySummary__1L590{display:none!important}.MarkdownRenderer-module_popup__QuC1y{background:#6d28d91a;border:1px solid #6d28d9;border-radius:10px;box-shadow:0 8px 24px #0000000f;color:#6d28d9;display:block;font-size:12px;line-height:1.35;margin-top:6px;padding:12px;transition:opacity .2s ease,transform .2s ease}.MarkdownRenderer-module_detailsTarget__MQk1n .MarkdownRenderer-module_popup__QuC1y{opacity:0;transform:translateY(-4px)}.MarkdownRenderer-module_detailsTarget__MQk1n[open] .MarkdownRenderer-module_popup__QuC1y{opacity:1;transform:translateY(0)}.MarkdownRenderer-module_popup__QuC1y .MarkdownRenderer-module_popup__QuC1y{background:#0000!important;border:none!important;box-shadow:none!important;color:inherit!important;padding:0!important}");export{r as default};
2
2
  //# sourceMappingURL=MarkdownRenderer.module.css.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useMemo as i,useEffect as n}from"react";import{AuditLog as r}from"@e-llm-studio/audit-log";import"@e-llm-studio/audit-log/dist/styles.css";import{User as l,ExternalLink as a}from"lucide-react";import d from"./ChangeLogDiff.js";import{dt as c}from"../store/useLMSConfigStore.js";var s=function(s){var h=s.configId,p=s.ruleData,g=s.scopeId,m=s.scopeName,u=(null==m?void 0:m.trim())||"Selected",f=i(function(){var e=[];return g&&e.push(g),e},[p,g]);return n(function(){console.log("Flattened External Resource IDs:",f)},[f]),t("div",e({style:{padding:"24px",fontFamily:"Arial, sans-serif"}},{children:[t("div",e({style:{marginBottom:"16px",paddingBottom:"4px"}},{children:[o("h1",e({style:{margin:0,color:"#334155",fontSize:"20px",fontWeight:700,lineHeight:1.25}},{children:c("history.title","".concat(u," - Audit Log"),{scope_name:u})})),o("p",e({style:{margin:"8px 0 0",color:"#667085",fontSize:"16px",fontWeight:500,lineHeight:1}},{children:c("history.subtitle","Track all learning updates and modifications with the ".concat(u," scope."),{scope_name:u})}))]})),o(r,{configId:h,getData:{baseUrl:"https://dev.appmod.ai",endpoint:"/changelog/audit-log/fetch"},distinctValuesApi:{baseUrl:"https://dev.appmod.ai",endpoint:"/changelog/audit-log/distinct-values"},query:{externalResourceId:f.length>0?f:[""],paginationLimit:10},sidebar:{config:{showAnalystFilter:!0,showDateFilter:!0,showChangeTitleFilter:!0,showImpactPercentage:!1},labels:{title:"Filters",multiSelectLabel:"Modified By",multiSelectHint:"Filter by the user who made the change",changeTitleLabel:"Change Action",changeTitleHint:"Filter by Actions"}},table:{tableProps:{scrollable:!0,scrollHeight:"80vh",showGridlines:!0,size:"small",rowClassName:function(){return"custom-compact-row"},pt:{bodyCell:{style:{paddingTop:"4px",paddingBottom:"4px"}}}},hiddenColumns:["actions","changeSummary","changeDateTime","logId"],extraColumns:[{key:"modifiedBy",header:"Modified By",body:function(i){return t("div",e({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[o(l,{size:16,color:"#64748b",style:{flexShrink:0}}),o("span",e({style:{fontWeight:500}},{children:i.modifiedBy}))]}))},style:{width:"15%",minWidth:"140px"}},{key:"changeAction",header:"Action",body:function(t){var i,n,r=(i=t.changeTitle,(n=(i||"").toUpperCase()).includes("CREATE")?{color:"#2e7d32",backgroundColor:"#edf7ed",borderColor:"#c8e6c9",boxShadow:"0 1px 2px rgba(46, 125, 50, 0.08)"}:n.includes("UPDATE")||n.includes("TOGGLE")?{color:"#1565c0",backgroundColor:"#e3f2fd",borderColor:"#bbdefb",boxShadow:"0 1px 2px rgba(21, 101, 192, 0.08)"}:n.includes("DELETE")?{color:"#c62828",backgroundColor:"#fdeeed",borderColor:"#ffcdd2",boxShadow:"0 1px 2px rgba(198, 40, 40, 0.08)"}:{color:"#475569",backgroundColor:"#f8fafc",borderColor:"#cbd5e1",boxShadow:"0 1px 2px rgba(15, 23, 42, 0.06)"}),l=t.changeTitle?t.changeTitle.replace(/_/g," "):"—";return o("span",e({style:{color:r.color,backgroundColor:r.backgroundColor,border:"1px solid ".concat(r.borderColor),boxShadow:r.boxShadow,padding:"6px 12px",borderRadius:"999px",fontSize:"12px",lineHeight:1,fontWeight:600,display:"inline-block",minWidth:"76px",textAlign:"center",textTransform:"capitalize"}},{children:l}))},style:{width:"15%",textAlign:"center"}},{key:"customChangeSummary",header:"Change Summary",body:function(e){var t;return o(d,{change:null!==(t=e.actionText)&&void 0!==t?t:"-"})},style:{width:"30%",minWidth:"200px"}},{key:"redirectLink",header:"Link",body:function(i){var n,r=(null===(n=i.metadata)||void 0===n?void 0:n.redirect_url)||i.redirect_url;return r?o("div",e({style:{display:"flex",justifyContent:"center",alignItems:"center"}},{children:t("a",e({href:r,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:"6px",color:"#2563eb",textDecoration:"none",fontWeight:500,fontSize:"13px"}},{children:["View ",o(a,{size:14})]}))})):o("span",e({style:{color:"#94a3b8",display:"flex",justifyContent:"center"}},{children:"—"}))},style:{width:"10%",minWidth:"90px",textAlign:"center"}},{key:"customChangeDateTime",header:"Change Time and Date",body:function(i){if(!i.actionDate)return o("span",e({style:{color:"#94a3b8"}},{children:"—"}));var n=new Date(i.actionDate),r=n.toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"}),l=n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});return t("div",e({style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"4px",fontSize:"13px",color:"#475569"}},{children:[o("span",e({style:{fontWeight:500}},{children:r})),o("span",{children:l})]}))},style:{width:"15%",minWidth:"150px",textAlign:"center"}}]},filters:{config:{showFilterButton:!0,showSort:!0,showDate:!0,showSearch:!0,sortOptions:{latest:!0,oldest:!0,impactHighToLow:!1,impactLowToHigh:!1}}}})]}))};export{s as default};
1
+ import{__assign as e}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as i,useMemo as n,useEffect as a}from"react";import{AuditLog as r}from"@e-llm-studio/audit-log";import"@e-llm-studio/audit-log/dist/styles.css";import{User as l,ExternalLink as c}from"lucide-react";import s from"./ChangeLogDiff.js";import{dt as d}from"../store/useLMSConfigStore.js";import p from"../RBAC/AccessPanel.module.css.js";import{usePermissionsStore as h}from"../store/usePermissionsStore.js";import g from"../store/useEnvStore.js";var u=function(u){var m=u.configId,f=u.ruleData,b=u.scopeId,y=u.scopeName,x=(null==y?void 0:y.trim())||"Selected",v=i("scope"),w=v[0],C=v[1],S=h(function(e){return e.hasPermission}),T=g(function(e){var t;return(null===(t=e.rbacConfig)||void 0===t?void 0:t.applicationResourceId)||""}),L=Boolean(b&&S("ilotj.scope.changeLog.view",b)),A=Boolean(T&&S("ilotj.application.changeLog.view",T)),k=n(function(){var e=[];return b&&e.push(b),e},[f,b]);a(function(){console.log("Flattened External Resource IDs:",k)},[k]);var D={configId:m,getData:{baseUrl:"https://dev.appmod.ai",endpoint:"/changelog/audit-log/fetch"},distinctValuesApi:{baseUrl:"https://dev.appmod.ai",endpoint:"/changelog/audit-log/distinct-values"},sidebar:{config:{showAnalystFilter:!0,showDateFilter:!0,showChangeTitleFilter:!0,showImpactPercentage:!1},labels:{title:"Filters",multiSelectLabel:"Modified By",multiSelectHint:"Filter by the user who made the change",changeTitleLabel:"Change Action",changeTitleHint:"Filter by Actions"}},table:{tableProps:{scrollable:!0,scrollHeight:"80vh",showGridlines:!0,size:"small",rowClassName:function(){return"custom-compact-row"},pt:{bodyCell:{style:{paddingTop:"4px",paddingBottom:"4px"}}}},hiddenColumns:["actions","changeSummary","changeDateTime","logId"],extraColumns:[{key:"modifiedBy",header:"Modified By",body:function(i){return t("div",e({style:{display:"flex",alignItems:"center",gap:"8px"}},{children:[o(l,{size:16,color:"#64748b",style:{flexShrink:0}}),o("span",e({style:{fontWeight:500}},{children:i.modifiedBy}))]}))},style:{width:"15%",minWidth:"140px"}},{key:"changeAction",header:"Action",body:function(t){var i,n,a=(i=t.changeTitle,(n=(i||"").toUpperCase()).includes("CREATE")?{color:"#2e7d32",backgroundColor:"#edf7ed",borderColor:"#c8e6c9",boxShadow:"0 1px 2px rgba(46, 125, 50, 0.08)"}:n.includes("UPDATE")||n.includes("TOGGLE")?{color:"#1565c0",backgroundColor:"#e3f2fd",borderColor:"#bbdefb",boxShadow:"0 1px 2px rgba(21, 101, 192, 0.08)"}:n.includes("DELETE")?{color:"#c62828",backgroundColor:"#fdeeed",borderColor:"#ffcdd2",boxShadow:"0 1px 2px rgba(198, 40, 40, 0.08)"}:{color:"#475569",backgroundColor:"#f8fafc",borderColor:"#cbd5e1",boxShadow:"0 1px 2px rgba(15, 23, 42, 0.06)"}),r=t.changeTitle?t.changeTitle.replace(/_/g," "):"—";return o("span",e({style:{color:a.color,backgroundColor:a.backgroundColor,border:"1px solid ".concat(a.borderColor),boxShadow:a.boxShadow,padding:"6px 12px",borderRadius:"999px",fontSize:"12px",lineHeight:1,fontWeight:600,display:"inline-block",minWidth:"76px",textAlign:"center",textTransform:"capitalize"}},{children:r}))},style:{width:"15%",textAlign:"center"}},{key:"customChangeSummary",header:"Change Summary",body:function(e){var t;return o(s,{change:null!==(t=e.actionText)&&void 0!==t?t:"-"})},style:{width:"30%",minWidth:"200px"}},{key:"redirectLink",header:"Link",body:function(i){var n,a=(null===(n=i.metadata)||void 0===n?void 0:n.redirect_url)||i.redirect_url;return a?o("div",e({style:{display:"flex",justifyContent:"center",alignItems:"center"}},{children:t("a",e({href:a,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:"6px",color:"#2563eb",textDecoration:"none",fontWeight:500,fontSize:"13px"}},{children:["View ",o(c,{size:14})]}))})):o("span",e({style:{color:"#94a3b8",display:"flex",justifyContent:"center"}},{children:"—"}))},style:{width:"10%",minWidth:"90px",textAlign:"center"}},{key:"customChangeDateTime",header:"Change Time and Date",body:function(i){if(!i.actionDate)return o("span",e({style:{color:"#94a3b8"}},{children:"—"}));var n=new Date(i.actionDate),a=n.toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"}),r=n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});return t("div",e({style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"4px",fontSize:"13px",color:"#475569"}},{children:[o("span",e({style:{fontWeight:500}},{children:a})),o("span",{children:r})]}))},style:{width:"15%",minWidth:"150px",textAlign:"center"}}]},filters:{config:{showFilterButton:!0,showSort:!0,showDate:!0,showSearch:!0,sortOptions:{latest:!0,oldest:!0,impactHighToLow:!1,impactLowToHigh:!1}}}};return t("div",e({style:{padding:"24px",fontFamily:"Arial, sans-serif"}},{children:[t("div",e({style:{marginBottom:"16px",paddingBottom:"4px"}},{children:[o("h1",e({style:{margin:0,color:"#334155",fontSize:"20px",fontWeight:700,lineHeight:1.25}},{children:d("history.title","".concat(x," - Audit Log"),{scope_name:x})})),o("p",e({style:{margin:"8px 0 0",color:"#667085",fontSize:"16px",fontWeight:500,lineHeight:1}},{children:d("history.subtitle","Track all learning updates and modifications with the ".concat(x," scope."),{scope_name:x})}))]})),t("div",e({className:p.accessTabs,role:"tablist","aria-label":"Audit log level"},{children:[o("button",e({type:"button",role:"tab","aria-selected":"scope"===w,className:"".concat(p.accessTab," ").concat("scope"===w?p.accessTabActive:""),onClick:function(){return C("scope")},disabled:!L,title:L?"":"You do not have permission to view scope level change log"},{children:d("history.scopeLevel","Scope Level")})),o("button",e({type:"button",role:"tab","aria-selected":"application"===w,className:"".concat(p.accessTab," ").concat("application"===w?p.accessTabActive:""),onClick:function(){return C("application")},disabled:!A,title:A?"":"You do not have permission to view application level change log"},{children:d("history.applicationLevel","Application Level")}))]})),"scope"===w?o(r,e({},D,{query:{externalResourceId:k.length>0?k:[""],paginationLimit:10}}),"scope-audit-log"):o(r,e({},D,{query:{externalResourceId:[],paginationLimit:10}}),"application-audit-log")]}))};export{u as default};
2
2
  //# sourceMappingURL=AuditLog.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as c,jsx as s}from"react/jsx-runtime";import{useState as o}from"react";import a from"./AccessPanel.js";import t from"../store/useEnvStore.js";import{usePermissionsStore as i}from"../store/usePermissionsStore.js";import l from"./AccessPanel.module.css.js";import{dt as n}from"../store/useLMSConfigStore.js";var r=function(r){var p=r.selectedRuleSetId,d=r.useApplicationModuleForScopeAccess,u=void 0!==d&&d,m=o("scope"),v=m[0],b=m[1],f=t(function(e){return e.rbacConfig}),A=i(function(e){return e.hasPermission}),I=null==f?void 0:f.applicationResourceId,S=(null==f?void 0:f.applicationModuleId)||(null==f?void 0:f.moduleId),h=u?S:null==f?void 0:f.moduleId,j=Boolean(I&&A("ilotj.scope.access.application.view",I));return c("div",e({className:l.accessManagement},{children:[c("div",e({className:l.accessTabs,role:"tablist","aria-label":"Access level"},{children:[s("button",e({type:"button",role:"tab","aria-selected":"scope"===v,className:"".concat(l.accessTab," ").concat("scope"===v?l.accessTabActive:""),onClick:function(){return b("scope")}},{children:n("access.scopeLevelAccess","Scope Level Access")})),s("button",e({type:"button",role:"tab","aria-selected":"application"===v,className:"".concat(l.accessTab," ").concat("application"===v?l.accessTabActive:""),onClick:function(){return b("application")},disabled:!j,title:j?"":"You don't have permission to view application access"},{children:n("access.appLevelAccess","Application Level Access")}))]})),s("div",e({className:l.accessTabPanel,role:"tabpanel"},{children:s(a,"application"===v?{resourceId:I,moduleId:S,accessLevel:"application"}:{ruleSetId:p,moduleId:h,accessLevel:"scope"})}))]}))};export{r as default};
1
+ import{__assign as e}from"tslib";import{jsxs as c,jsx as s}from"react/jsx-runtime";import{useState as o}from"react";import a from"./AccessPanel.js";import t from"../store/useEnvStore.js";import{usePermissionsStore as i}from"../store/usePermissionsStore.js";import l from"./AccessPanel.module.css.js";import{dt as n}from"../store/useLMSConfigStore.js";var r=function(r){var p=r.selectedRuleSetId,d=r.useApplicationModuleForScopeAccess,m=void 0!==d&&d,u=r.scopeName,v=(null==u?void 0:u.trim())||"Selected",f=o("scope"),b=f[0],h=f[1],g=t(function(e){return e.rbacConfig}),A=i(function(e){return e.hasPermission}),S=null==g?void 0:g.applicationResourceId,x=(null==g?void 0:g.applicationModuleId)||(null==g?void 0:g.moduleId),I=m?x:null==g?void 0:g.moduleId,j=Boolean(S&&A("ilotj.scope.access.application.view",S));return c("div",e({className:l.accessManagement},{children:[s("div",e({style:{padding:"24px 24px 0",fontFamily:"Arial, sans-serif"}},{children:c("div",e({style:{marginBottom:"16px",paddingBottom:"4px"}},{children:[s("h1",e({style:{margin:0,color:"#334155",fontSize:"20px",fontWeight:700,lineHeight:1.25}},{children:n("access.title","".concat(v," - Access Management"),{scope_name:v})})),s("p",e({style:{margin:"8px 0 0",color:"#667085",fontSize:"16px",fontWeight:500,lineHeight:1}},{children:n("access.subtitle","Manage users and groups within the ".concat(v," scope."),{scope_name:v})}))]}))})),c("div",e({className:l.accessTabs,role:"tablist","aria-label":"Access level"},{children:[s("button",e({type:"button",role:"tab","aria-selected":"scope"===b,className:"".concat(l.accessTab," ").concat("scope"===b?l.accessTabActive:""),onClick:function(){return h("scope")}},{children:n("access.scopeLevelAccess","Scope Level Access")})),s("button",e({type:"button",role:"tab","aria-selected":"application"===b,className:"".concat(l.accessTab," ").concat("application"===b?l.accessTabActive:""),onClick:function(){return h("application")},disabled:!j,title:j?"":"You don't have permission to view application access"},{children:n("access.appLevelAccess","Application Level Access")}))]})),s("div",e({className:l.accessTabPanel,role:"tabpanel"},{children:s(a,"application"===b?{resourceId:S,moduleId:x,accessLevel:"application"}:{ruleSetId:p,moduleId:I,accessLevel:"scope"})}))]}))};export{r as default};
2
2
  //# sourceMappingURL=AccessManagementPanel.js.map
@@ -1,2 +1,2 @@
1
- import{__awaiter as e,__generator as o,__assign as r,__spreadArray as t}from"tslib";import{jsx as n,jsxs as i,Fragment as l}from"react/jsx-runtime";import{useState as a,useRef as c,useEffect as s}from"react";import{useMutation as d}from"@tanstack/react-query";import{X as p,Loader2 as u}from"lucide-react";import{Toast as m}from"primereact/toast";import{v4 as f}from"uuid";import h from"../components/StationOnboarding/StationAutocomplete.js";import g from"./AddScopeApprovalSearchComponent.js";import v from"../components/ScopeSkeletonLoader.js";import{Input as y}from"@mui/material";import b from"../store/useAuthStore.js";import{useAppSecRolesStore as S}from"../store/useAppSecRolesStore.js";import C from"../store/useEnvStore.js";import{createRuleSet as x,inheritScope as _}from"../apis/scopeApis.js";import{useLearningTemplateStore as w}from"../store/useLearningTemplateStore.js";import{IL_CONFIG_CONSTANTS as k}from"../config.js";import{dt as A}from"../store/useLMSConfigStore.js";import{MIDDLE_DRAWER_ADD_SCOPE_DT_PATH as R,MIDDLE_DRAWER_APPROVAL_SETTINGS_DT_PATH as D}from"../constants.js";var I=function(I){var q=I.isOpen,j=I.onClose,F=I.onCreate,z=I.hasGlobalRuleSet,E=I.parentId,L=a(""),B=L[0],W=L[1],N=a(""),G=N[0],P=N[1],T=a({}),M=T[0],O=T[1],K=c(null),U=b().user,H=S(function(e){return e.roles}),J=C(function(e){return e.rbacConfig}),Q=a(null),V=Q[0],X=Q[1],Y=a("approval_required"),Z=Y[0],$=Y[1],ee=a([]),oe=ee[0],re=ee[1],te=a([]),ne=te[0],ie=te[1],le=a(""),ae=le[0],ce=le[1],se=d({mutationFn:function(r){return e(void 0,void 0,void 0,function(){var e;return o(this,function(o){switch(o.label){case 0:return[4,x(r,null!==(e=null==U?void 0:U.accessToken)&&void 0!==e?e:"")];case 1:return[2,o.sent()]}})})},onSuccess:function(r){return e(void 0,void 0,void 0,function(){return o(this,function(e){return console.log("Rule Set Created Successfully",r),[2]})})}});se.data;var de=se.isPending,pe=se.mutateAsync;return s(function(){q&&(W(""),P(""),O({}),X(null),$("approval_required"),re([]),ie([]),ce(""))},[q]),q?de?n(v,{isLoading:de}):i("div",r({style:{position:"absolute",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0,0,0,0.3)"}},{children:[n(m,{ref:K}),i("div",r({style:{position:"relative",width:600,borderRadius:12,backgroundColor:"white",padding:24,boxShadow:"0 25px 50px -12px rgba(0,0,0,0.25)"}},{children:[i("div",r({style:{marginBottom:24,display:"flex",alignItems:"flex-start",justifyContent:"space-between"}},{children:[i("div",{children:[n("h2",r({style:{margin:0,fontSize:18,fontWeight:500,color:"#19213D"}},{children:A("".concat(R,".title"),"Add Scope")})),n("p",r({style:{margin:"4px 0 0 0",fontSize:14,fontWeight:400,color:"#666F8D"}},{children:A("".concat(R,".subtitle"),"This scope will be created under Global and will inherit its Learnings by default.",{parent:"Global"})}))]}),n("button",r({onClick:j,style:{background:"none",border:"none",padding:0,cursor:"pointer",color:"#9CA3AF"}},{children:n(p,{size:24})}))]})),i("div",r({style:{display:"flex",flexDirection:"column",gap:20}},{children:[i("div",r({style:{position:"relative",display:"flex",flexDirection:"column",gap:6}},{children:[i("label",r({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:[n("span",r({style:{marginRight:4,fontSize:16,fontWeight:600,color:"#8F2C23"}},{children:"*"})),A("".concat(R,".scopeName"),"Scope Name")]})),"Custom"===B?n(h,{value:G,onChange:function(e){if(e.length>50)return P(e.slice(0,50)),void O(function(e){return r(r({},e),{name:"Scope Name must be 50 characters or fewer"})});P(e),O(function(e){return r(r({},e),{name:void 0})})},onStationSelect:function(e){X(e)},style:{border:M.name?"1px solid #8F2C23":void 0}}):n(y,{value:G,onChange:function(e){var o=e.target.value;if(o.length>50)return P(o.slice(0,50)),void O(function(e){return r(r({},e),{name:"Scope Name must be 50 characters or fewer"})});P(o),O(function(e){return r(r({},e),{name:void 0})})},style:{border:"1px solid ".concat(M.name?"#8F2C23":"#F0F2F5")},placeholder:"e.g. Global Learnings"}),M.name&&n("p",r({style:{margin:"4px 0 0 0",fontSize:12,color:"#8F2C23"}},{children:M.name}))]})),i("div",r({style:{display:"flex",flexDirection:"column",gap:12}},{children:[i("label",r({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:[n("span",r({style:{marginRight:4,fontSize:16,fontWeight:600,color:"#8F2C23"}},{children:"*"})),A("".concat(D,".title"),"Learning Approval Settings")]})),i("div",r({role:"radio","aria-checked":"approval_required"===Z,tabIndex:0,style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:4},onClick:function(){return $("approval_required")},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||$("approval_required")}},{children:[i("div",r({style:{display:"flex",alignItems:"center",gap:8}},{children:[n("div",r({style:{display:"flex",height:16,width:16,flexShrink:0,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid ".concat("approval_required"===Z?"#2563EB":"#CBD5E1")}},{children:"approval_required"===Z&&n("div",{style:{height:8,width:8,borderRadius:"50%",backgroundColor:"#2563EB"}})})),n("span",r({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:A("".concat(D,".approvalRequired.title"),"Approval Required Before Publishing")}))]})),n("p",r({style:{margin:0,marginLeft:24,fontSize:12,color:"#666F8D"}},{children:A("".concat(D,".approvalRequired.subtitle"),"Learnings require approval before publishing.")}))]})),"approval_required"===Z&&n(g,{selectedApprovers:oe,selectedGroupOfApprovers:ne,onApproversChange:re,onGroupsChange:ie}),ae&&n("p",r({style:{margin:0,marginLeft:24,fontSize:12,color:"#8F2C23"}},{children:ae})),i("div",r({role:"radio","aria-checked":"publish_without"===Z,tabIndex:0,style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:4},onClick:function(){$("publish_without"),ce("")},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||($("publish_without"),ce(""))}},{children:[i("div",r({style:{display:"flex",alignItems:"center",gap:8}},{children:[n("div",r({style:{display:"flex",height:16,width:16,flexShrink:0,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid ".concat("publish_without"===Z?"#2563EB":"#CBD5E1")}},{children:"publish_without"===Z&&n("div",{style:{height:8,width:8,borderRadius:"50%",backgroundColor:"#2563EB"}})})),n("span",r({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:A("".concat(D,".publishWithoutApproval.title"),"Publish Without Approval")}))]})),n("p",r({style:{margin:0,marginLeft:24,fontSize:12,color:"#666F8D"}},{children:A("".concat(D,".publishWithoutApproval.subtitle"),"Learnings can be published directly.")}))]}))]})),i("div",r({style:{marginTop:32,display:"flex",justifyContent:"flex-end",gap:12}},{children:[n("button",r({onClick:j,style:{borderRadius:6,border:"1px solid #E2E8F0",padding:"8px 16px",fontSize:14,fontWeight:500,color:"#64748B",backgroundColor:"white",cursor:"pointer",opacity:de?.5:1},disabled:de},{children:A("".concat(R,".cancel"),"Cancel")})),n("button",r({onClick:function(){return e(void 0,void 0,void 0,function(){var e,r,n,i,l,a,c,s,d,p,u,m,h,g,v,y;return o(this,function(o){switch(o.label){case 0:if(e={},G.trim()?G.length>50&&(e.name="Scope Name must be 50 characters or fewer"):e.name="Scope Name is required","approval_required"===Z&&0===oe.length&&0===ne.length&&ce("Please select at least one approver or approver group."),e.name)return O(e),[2];if("approval_required"===Z&&0===oe.length&&0===ne.length)return[2];ce(""),o.label=1;case 1:return o.trys.push([1,7,,8]),r="approval_required"===Z,n=w.getState().backwardCompatibility,i=n?{topic:z?"genreRuleSet":"globalRuleSet",customScopeGroupName:k.CUSTOM_SCOPE_GROUP_NAME,scopeDescription:G,parentScopeId:null,customScopeName:G,customScopeId:f(),createByName:(null==U?void 0:U.firstname)||"System",createdBy:(null==U?void 0:U.email)||"system@audacy.com",approvalRequired:r,appsecData:{application:null==J?void 0:J.applicationId,module:null==J?void 0:J.moduleId,roles:t(t([],r?[{users:oe.map(function(e){return e.email}),groups:ne.map(function(e){return e._id}),role:null!==(p=null===(d=H.find(function(e){return"Learning Manager"===e.name}))||void 0===d?void 0:d._id)&&void 0!==p?p:""}]:[],!0),[{users:[null==U?void 0:U.email],groups:[],role:null!==(m=null===(u=H.find(function(e){return"Instant Learning Admin"===e.name}))||void 0===u?void 0:u._id)&&void 0!==m?m:""}],!1)}}:{topic:z?"genreRuleSet":"globalRuleSet",scope_reference_id:null,scopeDescription:G,parentScopeId:null!=E?E:null,scopeName:G,scopeReferenceMetadata:{},scopeType:"Custom",applicationMappingId:w.getState().app_integration_id},console.log("Add Scope payload:",i),[4,pe(i)];case 2:if(l=o.sent(),a=null===(h=null==l?void 0:l.data)||void 0===h?void 0:h.scopeId,n||!a||!E)return[3,6];o.label=3;case 3:return o.trys.push([3,5,,6]),[4,_({source_scope_id:E,target_scope_id:a,application_mapping_id:w.getState().app_integration_id||"",is_copy_parent_variant_id:!1})];case 4:return o.sent(),[3,6];case 5:return c=o.sent(),console.error("Failed to inherit rules for the new scope:",c),[3,6];case 6:return F(a),j(),[3,8];case 7:return s=o.sent(),console.error("An error occurred during scope creation.",s),null===(g=K.current)||void 0===g||g.show({severity:"error",summary:"Adding Scope Failed",detail:(null===(y=null===(v=null==s?void 0:s.response)||void 0===v?void 0:v.data)||void 0===y?void 0:y.message)||"There was an error creating the scope. Please try again."}),[3,8];case 8:return[2]}})})},style:{display:"flex",alignItems:"center",borderRadius:6,backgroundColor:"#2563EB",padding:"8px 16px",fontSize:14,fontWeight:500,color:"white",border:"none",cursor:"pointer",opacity:de||"Custom"===B&&!V?.5:1},disabled:de||"Custom"===B&&!V},{children:de?i(l,{children:[n(u,{className:"animate-spin",style:{marginRight:8,height:16,width:16,color:"white"}}),"Creating..."]}):A("".concat(R,".submitButton"),"Create Scope")}))]}))]}))]}))]})):null};export{I as default};
1
+ import{__awaiter as e,__generator as o,__assign as r,__spreadArray as n}from"tslib";import{jsx as t,jsxs as i,Fragment as l}from"react/jsx-runtime";import{useState as a,useRef as c,useEffect as s}from"react";import{useMutation as d}from"@tanstack/react-query";import{X as u,Loader2 as p}from"lucide-react";import{Toast as m}from"primereact/toast";import{v4 as f}from"uuid";import h from"../components/StationOnboarding/StationAutocomplete.js";import g from"./AddScopeApprovalSearchComponent.js";import v from"../components/ScopeSkeletonLoader.js";import{Input as y}from"@mui/material";import b from"../store/useAuthStore.js";import{useAppSecRolesStore as S}from"../store/useAppSecRolesStore.js";import C from"../store/useEnvStore.js";import{createRuleSet as x,inheritScope as _}from"../apis/scopeApis.js";import{useLearningTemplateStore as w}from"../store/useLearningTemplateStore.js";import{IL_CONFIG_CONSTANTS as k}from"../config.js";import{dt as A}from"../store/useLMSConfigStore.js";import{MIDDLE_DRAWER_ADD_SCOPE_DT_PATH as R,MIDDLE_DRAWER_APPROVAL_SETTINGS_DT_PATH as I}from"../constants.js";var D=function(D){var q=D.isOpen,j=D.onClose,F=D.onCreate,z=D.hasGlobalRuleSet,L=D.parentId,E=a(""),B=E[0],W=E[1],N=a(""),G=N[0],M=N[1],P=a({}),T=P[0],O=P[1],K=c(null),U=b().user,H=S(function(e){return e.roles}),J=C(function(e){return e.rbacConfig}),Q=a(null),V=Q[0],X=Q[1],Y=a("approval_required"),Z=Y[0],$=Y[1],ee=a([]),oe=ee[0],re=ee[1],ne=a([]),te=ne[0],ie=ne[1],le=a(""),ae=le[0],ce=le[1],se=d({mutationFn:function(r){return e(void 0,void 0,void 0,function(){var e;return o(this,function(o){switch(o.label){case 0:return[4,x(r,null!==(e=null==U?void 0:U.accessToken)&&void 0!==e?e:"")];case 1:return[2,o.sent()]}})})},onSuccess:function(r){return e(void 0,void 0,void 0,function(){return o(this,function(e){return console.log("Rule Set Created Successfully",r),[2]})})}});se.data;var de=se.isPending,ue=se.mutateAsync;return s(function(){q&&(W(""),M(""),O({}),X(null),$("approval_required"),re([]),ie([]),ce(""))},[q]),q?de?t(v,{isLoading:de}):i("div",r({style:{position:"absolute",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0,0,0,0.3)"}},{children:[t(m,{ref:K}),i("div",r({style:{position:"relative",width:600,borderRadius:12,backgroundColor:"white",padding:24,boxShadow:"0 25px 50px -12px rgba(0,0,0,0.25)"}},{children:[i("div",r({style:{marginBottom:24,display:"flex",alignItems:"flex-start",justifyContent:"space-between"}},{children:[i("div",{children:[t("h2",r({style:{margin:0,fontSize:18,fontWeight:500,color:"#19213D"}},{children:A("".concat(R,".title"),"Add Scope")})),t("p",r({style:{margin:"4px 0 0 0",fontSize:14,fontWeight:400,color:"#666F8D"}},{children:A("".concat(R,".subtitle"),"This scope will be created under Global and will inherit its Learnings by default.",{parent:"Global"})}))]}),t("button",r({onClick:j,style:{background:"none",border:"none",padding:0,cursor:"pointer",color:"#9CA3AF"}},{children:t(u,{size:24})}))]})),i("div",r({style:{display:"flex",flexDirection:"column",gap:20}},{children:[i("div",r({style:{position:"relative",display:"flex",flexDirection:"column",gap:6}},{children:[i("label",r({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:[t("span",r({style:{marginRight:4,fontSize:16,fontWeight:600,color:"#8F2C23"}},{children:"*"})),A("".concat(R,".scopeName"),"Scope Name")]})),"Custom"===B?t(h,{value:G,onChange:function(e){if(e.length>50)return M(e.slice(0,50)),void O(function(e){return r(r({},e),{name:"Scope Name must be 50 characters or fewer"})});M(e),O(function(e){return r(r({},e),{name:void 0})})},onStationSelect:function(e){X(e)},style:{border:T.name?"1px solid #8F2C23":void 0}}):t(y,{value:G,onChange:function(e){var o=e.target.value;if(o.length>50)return M(o.slice(0,50)),void O(function(e){return r(r({},e),{name:"Scope Name must be 50 characters or fewer"})});M(o),O(function(e){return r(r({},e),{name:void 0})})},style:{border:"1px solid ".concat(T.name?"#8F2C23":"#F0F2F5")},placeholder:"e.g. Global Learnings"}),T.name&&t("p",r({style:{margin:"4px 0 0 0",fontSize:12,color:"#8F2C23"}},{children:T.name}))]})),i("div",r({style:{display:"flex",flexDirection:"column",gap:12}},{children:[i("label",r({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:[t("span",r({style:{marginRight:4,fontSize:16,fontWeight:600,color:"#8F2C23"}},{children:"*"})),A("".concat(I,".title"),"Learning Approval Settings")]})),i("div",r({role:"radio","aria-checked":"approval_required"===Z,tabIndex:0,style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:4},onClick:function(){return $("approval_required")},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||$("approval_required")}},{children:[i("div",r({style:{display:"flex",alignItems:"center",gap:8}},{children:[t("div",r({style:{display:"flex",height:16,width:16,flexShrink:0,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid ".concat("approval_required"===Z?"#2563EB":"#CBD5E1")}},{children:"approval_required"===Z&&t("div",{style:{height:8,width:8,borderRadius:"50%",backgroundColor:"#2563EB"}})})),t("span",r({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:A("".concat(I,".approvalRequired.title"),"Approval Required Before Publishing")}))]})),t("p",r({style:{margin:0,marginLeft:24,fontSize:12,color:"#666F8D"}},{children:A("".concat(I,".approvalRequired.subtitle"),"Learnings require approval before publishing.")}))]})),"approval_required"===Z&&t(g,{selectedApprovers:oe,selectedGroupOfApprovers:te,onApproversChange:re,onGroupsChange:ie}),ae&&t("p",r({style:{margin:0,marginLeft:24,fontSize:12,color:"#8F2C23"}},{children:ae})),i("div",r({role:"radio","aria-checked":"publish_without"===Z,tabIndex:0,style:{cursor:"pointer",display:"flex",flexDirection:"column",gap:4},onClick:function(){$("publish_without"),ce("")},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||($("publish_without"),ce(""))}},{children:[i("div",r({style:{display:"flex",alignItems:"center",gap:8}},{children:[t("div",r({style:{display:"flex",height:16,width:16,flexShrink:0,alignItems:"center",justifyContent:"center",borderRadius:"50%",border:"2px solid ".concat("publish_without"===Z?"#2563EB":"#CBD5E1")}},{children:"publish_without"===Z&&t("div",{style:{height:8,width:8,borderRadius:"50%",backgroundColor:"#2563EB"}})})),t("span",r({style:{fontSize:14,fontWeight:500,color:"#19213D"}},{children:A("".concat(I,".publishWithoutApproval.title"),"Publish Without Approval")}))]})),t("p",r({style:{margin:0,marginLeft:24,fontSize:12,color:"#666F8D"}},{children:A("".concat(I,".publishWithoutApproval.subtitle"),"Learnings can be published directly.")}))]}))]})),i("div",r({style:{marginTop:32,display:"flex",justifyContent:"flex-end",gap:12}},{children:[t("button",r({onClick:j,style:{borderRadius:6,border:"1px solid #E2E8F0",padding:"8px 16px",fontSize:14,fontWeight:500,color:"#64748B",backgroundColor:"white",cursor:"pointer",opacity:de?.5:1},disabled:de},{children:A("".concat(R,".cancel"),"Cancel")})),t("button",r({onClick:function(){return e(void 0,void 0,void 0,function(){var e,r,t,i,l,a,c,s,d,u,p,m,h,g,v,y,b,S,C,x;return o(this,function(o){switch(o.label){case 0:if(e={},G.trim()?G.length>50&&(e.name="Scope Name must be 50 characters or fewer"):e.name="Scope Name is required","approval_required"===Z&&0===oe.length&&0===te.length&&ce("Please select at least one approver or approver group."),e.name)return O(e),[2];if("approval_required"===Z&&0===oe.length&&0===te.length)return[2];ce(""),o.label=1;case 1:return o.trys.push([1,7,,8]),r="approval_required"===Z,t=w.getState().backwardCompatibility,i=t?{topic:z?"genreRuleSet":"globalRuleSet",customScopeGroupName:k.CUSTOM_SCOPE_GROUP_NAME,scopeDescription:G,parentScopeId:null,customScopeName:G,customScopeId:f(),createByName:(null==U?void 0:U.firstname)||"System",createdBy:(null==U?void 0:U.email)||"system@audacy.com",approvalRequired:r,appsecData:{application:null==J?void 0:J.applicationId,module:null==J?void 0:J.moduleId,roles:n(n([],r?[{users:oe.map(function(e){return e.email}),groups:te.map(function(e){return e._id}),role:null!==(u=null===(d=H.find(function(e){return"Learning Manager"===e.name}))||void 0===d?void 0:d._id)&&void 0!==u?u:""}]:[],!0),[{users:[null==U?void 0:U.email],groups:[],role:null!==(m=null===(p=H.find(function(e){return"Instant Learning Admin"===e.name}))||void 0===p?void 0:p._id)&&void 0!==m?m:""}],!1)}}:{topic:z?"genreRuleSet":"globalRuleSet",scope_reference_id:null,scopeDescription:G,parentScopeId:null!=L?L:null,scopeName:G,scopeReferenceMetadata:{},scopeType:"Custom",applicationMappingId:w.getState().app_integration_id,appsecData:{application:null==J?void 0:J.applicationId,module:null==J?void 0:J.moduleId,roles:n(n([],r?[{users:oe.map(function(e){return e.email}),groups:te.map(function(e){return e._id}),role:null!==(g=null===(h=H.find(function(e){return"Learning Manager"===e.name}))||void 0===h?void 0:h._id)&&void 0!==g?g:""}]:[],!0),[{users:[null==U?void 0:U.email],groups:[],role:null!==(y=null===(v=H.find(function(e){return"Instant Learning Admin"===e.name}))||void 0===v?void 0:v._id)&&void 0!==y?y:""}],!1)}},console.log("Add Scope payload:",i),[4,ue(i)];case 2:if(l=o.sent(),a=null===(b=null==l?void 0:l.data)||void 0===b?void 0:b.scopeId,t||!a||!L)return[3,6];o.label=3;case 3:return o.trys.push([3,5,,6]),[4,_({source_scope_id:L,target_scope_id:a,application_mapping_id:w.getState().app_integration_id||"",is_copy_parent_variant_id:!1})];case 4:return o.sent(),[3,6];case 5:return c=o.sent(),console.error("Failed to inherit rules for the new scope:",c),[3,6];case 6:return F(a),j(),[3,8];case 7:return s=o.sent(),console.error("An error occurred during scope creation.",s),null===(S=K.current)||void 0===S||S.show({severity:"error",summary:"Adding Scope Failed",detail:(null===(x=null===(C=null==s?void 0:s.response)||void 0===C?void 0:C.data)||void 0===x?void 0:x.message)||"There was an error creating the scope. Please try again."}),[3,8];case 8:return[2]}})})},style:{display:"flex",alignItems:"center",borderRadius:6,backgroundColor:"#2563EB",padding:"8px 16px",fontSize:14,fontWeight:500,color:"white",border:"none",cursor:"pointer",opacity:de||"Custom"===B&&!V?.5:1},disabled:de||"Custom"===B&&!V},{children:de?i(l,{children:[t(p,{className:"animate-spin",style:{marginRight:8,height:16,width:16,color:"white"}}),"Creating..."]}):A("".concat(R,".submitButton"),"Create Scope")}))]}))]}))]}))]})):null};export{D as default};
2
2
  //# sourceMappingURL=AddScopeModal.js.map