https://www.enspryngpregnancyregistry.com/Assets/Registries/Websit…/xTemplate/app.xtemplate.store.js
1app.xtemplate.store = function () { 2 3 var componentstore = { 4 months: [], 5 fullMonths: [], 6 days: [], 7 daysShort: [], 8 daysShorter: [], 9 holidays: [], 10 11 // translates 12 t: { 13 Morning: '', 14 Afternoon: '', 15 Evening: '', 16 Night: '', 17 ScheduledAppointments: '', 18 with: '', 19 more: '', 20 Patient: '', 21 NoEventsToDisplay: '' 22 }, 23 agendaStep: 6, 24 // start day of the week 0-6 25 startDay: 0, 26 state: { 27 // we use range start for single value ranges like year, month, day, ... 28 rangeStart: null, 29 rangeEnd: null, 30 view: 'AGENDA', 31 viewCreated: null, 32 events: {}, 33 callRange: [], 34 range: [], 35 modalShowDay: null, 36 showModal: false, 37 monthSet: null, 38 switcherRefs: null, 39 counter: 0, 40 loading: false 41 }, 42 setView: function (view) { 43 this.state.view = view; 44 }, 45 setRangeStart: function (start) { 46 this.state.rangeStart = start; 47 }, 48 setRangeEnd: function (end) { 49 this.state.rangeEnd = end; 50 }, 51 setRange: function (range) { 52 this.state.range = range; 53 }, 54 setModalDay: function (date) { 55 this.state.modalShowDay = date; 56 }, 57 openModal: function (date) { 58 if (typeof date !== 'undefined') { 59 this.setModalDay(date); 60 } 61 this.state.showModal = true; 62 document.body.classList.add('modal-open'); 63 }, 64 closeModal: function () { 65 this.state.showModal = false; 66 document.body.classList.remove('modal-open'); 67 68 }, 69 70 counterPlus: function () { 71 this.state.counter++; 72 }, 73 startLoader: function () { 74 this.state.loading = true; 75 }, 76 stopLoader: function () { 77 this.state.loading = false; 78 }, 79 getEvents: function (start, end, fn) { 80 var status = null; 81 setTimeout(function () { 82 // get events 83 this.state.events = app.xtemplate.helpers.getEvents(start, end); 84 // set range what we have 85 this.state.callRange.push(start); 86 this.state.callRange.push(end); 87 // call calback 88 if (typeof fn === 'function') fn(status); 89 90 }.bind(this), 1000); 91 return; 92 93 //if (typeof this.state.callRange[0] === 'undefined') { 94 // status = 'NEW'; 95 96 // setTimeout(function () { 97 // // get events 98 // this.state.events = app.xtemplate.helpers.getEvents(start, end); 99 // // set range what we have 100 // this.state.callRange.push(start); 101 // this.state.callRange.push(end); 102 // // call calback 103 // if (typeof fn === 'function') fn(status); 104 105 // }.bind(this), 1000); 106 107 // return; 108 109 //} 110 //else if (moment(this.state.callRange[0]).isSameOrBefore(start) && moment(this.state.callRange[1]).isSameOrAfter(end)) { 111 // // we have already fetched this range ... 112 113 // status = "HAVE"; 114 // // call calback 115 // if (typeof fn === 'function') fn(status); 116 // return; 117 //} 118 //else { 119 // // here we must fetch new data and merge it 120 // status = "MERGED"; 121 122 // setTimeout(function () { 123 // // get events 124 // events = app.xtemplate.helpers.getEvents(start, end); 125 126 // // since object assign is not supported in IE, we use jquery 127 // this.state.events = $.extend({}, events, this.state.events); 128 129 // // extend ranges 130 // if (moment(start).isBefore(this.state.callRange[0])) { 131 // this.state.callRange[0] = start; 132 // } 133 // if (moment(end).isAfter(this.state.callRange[1])) { 134 // this.state.callRange[1] = end; 135 // } 136 // // call calback 137 // if (typeof fn === 'function') fn(status); 138 139 // }.bind(this), 1000); 140 // return; 141 //} 142 } 143 }; 144 145 function InitilizeComponentStore(storeInitilizer) { 146 componentstore.months = storeInitilizer.ShortMonths.split(','); 147 componentstore.fullMonths = storeInitilizer.FullMonths.split(','); 148 componentstore.days = storeInitilizer.Days.split(','); 149 componentstore.daysShort = storeInitilizer.ShortDays.split(','); 150 componentstore.daysShorter = storeInitilizer.ShorterDays.split(','); 151 componentstore.agendaStep = storeInitilizer.AgendaSteps; 152 componentstore.t.Morning = storeInitilizer.Morning; 153 componentstore.t.Afternoon = storeInitilizer.Afternoon; 154 componentstore.t.Evening = storeInitilizer.Evening; 155 componentstore.t.Night = storeInitilizer.Night; 156 componentstore.t.ScheduledAppointments = storeInitilizer.ScheduledAppointments; 157 componentstore.t.with = storeInitilizer.With; 158 componentstore.t.more = storeInitilizer.More; 159 componentstore.t.Patient = storeInitilizer.Patient; 160 componentstore.t.NoEventsToDisplay = storeInitilizer.NoEventsDisplay; 161 componentstore.holidays = storeInitilizer.HolidayLists.split(','); 162 if (storeInitilizer.InitialViewLoad != null && storeInitilizer.InitialViewLoad != '') { 163 componentstore.state.view = storeInitilizer.InitialViewLoad; 164 } 165 } 166 167 return { 168 componentstore: componentstore, 169 InitilizeComponentStore: InitilizeComponentStore 170 }; 171}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.