{"version":3,"sources":["webpack:///./app/javascript/calendar/filters.js"],"names":["loadCalendarFilters","$","show","ajax","url","window","calendarSettings","filtersLink","method","dataType","success","data","filtersList","filtersListOthers","empty","forEach","filter","admin","isAdmin","listItem","class","filterSpan","text","title","dataId","id","deleteLink","href","style","append","owner","hide","updateQuickButtons","error","xhr","status","console","applyCalendarFilters","baseUrl","location","URL","params","searchParams","therapistAutocomplete","document","querySelector","therapistIds","JSON","parse","value","length","set","join","modeTypeIds","patientIds","search","toString","loadCalendarFilterById","loadFilterLink","replace","val","prop","quick_button","patient_ids","option","setValue","clear","mode_type_ids","therapist_ids","saveCalendarFilter","saveFilterLink","addClass","removeClass","serialize","newCalendarFilter","event","preventDefault","loadCalendarFilter","target","attr","deleteCalendarFilter","dUrl","deleteFilterLink","eId","parent","confirm","registerFilters","off","on","this","closest","modal"],"mappings":"4FAEA,mBAIA,IAAMA,EAAsB,WAC1BC,EAAE,eAAeC,OACjBD,EAAEE,KAAK,CACLC,IAAKC,OAAOC,iBAAiBC,YAC7BC,OAAQ,MACRC,SAAU,OACVC,QAJK,SAIGC,GAAO,IAAD,IACNC,EAAcX,EAAE,gCAChBY,EAAoBZ,EAAE,sCAE5BW,EAAYE,QACZD,EAAkBC,QAElBH,EAAKI,SAAQ,SAACC,GACZ,GAAKA,EAAOC,OAASZ,OAAOC,iBAAiBY,UAAcF,EAAOC,QAAUZ,OAAOC,iBAAiBY,QAAU,CAC5G,IAAMC,EAAWlB,EAAE,OAAQ,CAAEmB,MAAO,oDAC9BC,EAAapB,EAAE,SAAU,CAAEmB,MAAO,oBAAqBE,KAAMN,EAAOO,MAAOC,OAAQR,EAAOS,KAC1FC,EAAazB,EAAE,MAAO,CAC1B0B,KAAM,IACNP,MAAO,eACPQ,MAAO,eACPJ,OAAQR,EAAOS,KACdI,OAAO5B,EAAE,MAAO,CAAEmB,MAAO,iBACxBJ,EAAOc,OACTX,EAASU,OAAOR,GAAYQ,OAAOH,GACnCd,EAAYiB,OAAOV,KA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3D,EAAE,iCAAiC4D,KAAK,WAAW,GACnDjB,SAASC,cAAc,gCAAgCqB,QACvDtB,SAASC,cAAc,kCAAkCqB,QACrDtB,SAASC,cAAc,oCACzBD,SAASC,cAAc,mCAAmCqB,SAQxDW,EAAqB,SAACF,GAC1BA,EAAMC,iBACNF,EAAkBC,GAClB,IAAMlD,EAAKxB,EAAE0E,EAAMG,QAAQC,KAAK,UAC5BtD,GACFgC,EAAuBhC,IAQrBuD,EAAuB,SAACL,GAAW,IAAD,EACtCA,EAAMC,iBACN,IAAMK,EAAI,UAAG5E,OAAOC,wBAAV,aAAG,EAAyB4E,iBAChCC,EAAMlF,EAAE0E,EAAMG,QAAQM,SAASL,KAAK,UACrCE,GAASE,GAAQ9E,OAAOgF,QAAQ,uDAGrCpF,EAAEE,KAAK,CACLC,IAAK6E,EAAKtB,QAAQ,MAAOwB,GACzB3E,OAAQ,OACRC,SAAU,OACVC,QAJK,SAIGC,GACNX,IACA0E,KAEFzC,MARK,SAQCC,EAAIC,EAAQF,GAChBG,QAAQH,MAAM,kBAAmBE,EAAQF,OAQ/C5B,OAAOiF,gBAAkB,WACvBtF,IACAC,EAAE2C,UAAU2C,IAAI,aAChBtF,EAAE2C,UAAU4C,GAAG,iBAAkB,8BAA+BnD,GAChEpC,EAAE2C,UAAU4C,GAAG,iBAAkB,4BAA6BnB,GAC9DpE,EAAE2C,UAAU4C,GAAG,iBAAkB,2BAA4Bd,GAC7DzE,EAAE2C,UAAU4C,GAAG,iBAAkB,kBAAmBX,GACpD5E,EAAE2C,UAAU4C,GAAG,iBAAkB,iBAAkBR,GACnD/E,EAAE2C,UAAU4C,GAAG,iBAAkB,6BAA6B,WAC5DvF,EAAEwF,MAAMC,QAAQ,UAAUC,MAAM,a","file":"js/73-1f48c0bf0dfab1a56ce8.chunk.js","sourcesContent":["import { constructURL } from 'helpers/url';\n\n// Loads calendar filters via an AJAX request and updates the filter lists in the UI.\n// Assigns the method to the `window` object for global access.\n//\n// @return {void}\nconst loadCalendarFilters = () => {\n $('#filterMask').show();\n $.ajax({\n url: window.calendarSettings.filtersLink,\n method: 'GET',\n dataType: 'json',\n success(data) {\n const filtersList = $('#calendarFiltersSavedFilters');\n const filtersListOthers = $('#calendarFiltersSavedFiltersOthers');\n // Clear any existing items\n filtersList.empty();\n filtersListOthers.empty();\n // Loop through the data and create list items\n data.forEach((filter) => {\n if ((filter.admin && window.calendarSettings.isAdmin) || (!filter.admin && !window.calendarSettings.isAdmin)) {\n const listItem = $('