HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-172-31-4-197 6.8.0-1036-aws #38~22.04.1-Ubuntu SMP Fri Aug 22 15:44:33 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wordpress/wp-content/plugins/bit-integrations/assets/bi.790.395.js
var I=Object.defineProperty;var j=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var k=(o,s,n)=>s in o?I(o,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[s]=n,v=(o,s)=>{for(var n in s||(s={}))w.call(s,n)&&k(o,n,s[n]);if(j)for(var n of j(s))A.call(s,n)&&k(o,n,s[n]);return o};import{r as u,j as t,u as T,o as z}from"./main-685.js";import{z as M,y as _}from"./bi.451.455.js";import{_ as i,s as E,c as B}from"./bi.878.0.js";import{S as D}from"./bi.674.13.js";import{S as F}from"./bi.347.1012.js";import{I as P,s as H}from"./bi.776.3.js";import{L as U,h as q,c as G}from"./bi.601.915.js";import{B as J}from"./bi.788.791.js";import{T as y,t as K}from"./bi.703.796.js";import"./bi.327.9.js";import"./bi.601.11.js";import"./bi.825.14.js";function O({formID:o,lifterLmsConf:s,setLifterLmsConf:n,step:d,setStep:g,isLoading:b,setIsLoading:f,setSnackbar:x}){const[r,p]=u.useState(!1),[m,h]=u.useState(!1),{lifterLms:a}=K,c=()=>{f("auth"),B({},"lifterLms_authorize").then(e=>{e!=null&&e.success&&(p(!0),x({show:!0,msg:i("Connected with LifterLms Successfully","bit-integrations")})),f(!1),h(!0)})},L=e=>{const l=_(s);l[e.target.name]=e.target.value,n(l)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:d===1&&900,height:d===1&&"auto"},children:[(a==null?void 0:a.youTubeLink)&&t.jsx(y,{title:"LifterLMS",youTubeLink:a==null?void 0:a.youTubeLink}),(a==null?void 0:a.docLink)&&t.jsx(y,{title:"LifterLMS",docLink:a==null?void 0:a.docLink}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:L,name:"name",value:s.name,type:"text",placeholder:i("Integration Name...","bit-integrations")}),b==="auth"&&t.jsxs("div",{className:"flx mt-5",children:[t.jsx(M,{size:25,clr:"#022217",className:"mr-2"}),"Checking if LifterLms is active!!!"]}),m&&!r&&!b&&t.jsxs("div",{className:"flx mt-5",style:{color:"red"},children:[t.jsx("span",{className:"btcd-icn mr-2",style:{fontSize:30,marginTop:-5},children:"×"}),E(i("%s plugin must be activated to integrate with Bit Integrations","bit-integrations"),"LifterLms")]}),!r&&t.jsx("button",{onClick:c,className:"btn btcd-btn-lg purple sh-sm flx mt-5",type:"button",children:i("Connect","bit-integrations")}),r&&t.jsxs("button",{onClick:()=>g(2),className:"btn btcd-btn-lg purple sh-sm flx mt-5",type:"button",disabled:!r,children:[i("Next","bit-integrations"),t.jsx(J,{className:"ml-1 rev-icn"})]})]})}function at({formFields:o,setFlow:s,flow:n,allIntegURL:d,isInfo:g,edit:b}){const f=T(),{formID:x}=z(),[r,p]=u.useState(!1),[m,h]=u.useState(1),[a,c]=u.useState({show:!1}),L=[{key:"1",label:i("Lesson complete for the user","bit-integrations")},{key:"2",label:i("Section complete for the user","bit-integrations")},{key:"3",label:i("Enroll user in a Course","bit-integrations")},{key:"4",label:i("Enroll user in a membership","bit-integrations")},{key:"5",label:i("Course complete for the user","bit-integrations")},{key:"6",label:i("Unenroll user from a course","bit-integrations")},{key:"7",label:i("Unenroll user from a membership","bit-integrations")}],[e,l]=u.useState({name:"LifterLms",type:"LifterLms",mainAction:"",field_map:[{formField:"",lifterLmsFormField:""}],allActions:L,actions:{}}),S=()=>{if(setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e.mainAction==="11"&&!G(e)){c({show:!0,msg:i("Please map fields to continue.","bit-integrations")});return}e.mainAction!==""&&h(3)};function N(){switch(e.mainAction){case"1":return e.lessonId===void 0;case"2":return e.sectionId===void 0;case"3":case"5":case"6":return e.courseId===void 0;case"4":case"7":return e.membershipId===void 0;default:return!1}}return t.jsxs("div",{children:[t.jsx(D,{snack:a,setSnackbar:c}),t.jsx("div",{className:"txt-center mt-2",children:t.jsx(F,{step:3,active:m})}),t.jsx(O,{formID:x,lifterLmsConf:e,setLifterLmsConf:l,step:m,setStep:h,isLoading:r,setIsLoading:p,setSnackbar:c}),t.jsxs("div",{className:"btcd-stp-page",style:v({},m===2&&{width:900,height:"auto",overflow:"visible"}),children:[t.jsx(U,{formFields:o,handleInput:C=>q(C,e,l),lifterLmsConf:e,setLifterLmsConf:l,isLoading:r,setIsLoading:p,setSnackbar:c,allIntegURL:d,isInfo:g,edit:b}),t.jsxs("button",{onClick:()=>S(),disabled:!e.mainAction||r||N(),className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",children:[i("Next","bit-integrations")," ",t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(P,{step:m,saveConfig:()=>H({flow:n,setFlow:s,allIntegURL:d,navigate:f,conf:e,setIsLoading:p,setSnackbar:c}),isLoading:r,dataConf:e,setDataConf:l,formFields:o})]})}export{at as default};