PageSourceSearch

https://www.nehs.org/wp-content/plugins/personify/pfyClient/pfyClient.js?ver=1780413340

js nehs.org collected 2026-09-28 08:42:19 UTC 4,324 bytes, 244 lines download raw bytes

1// COMPONENTS
2
3Vue.component('pfyLoadingSpinner', {
4
5	props: {
6		size:      { type: String, default: '6rem' },
7	},
8
9	computed: {
10
11		attrStyle: function() {
12			return 'font-size: ' + this.size + ';';
13		}
14
15	},
16
17	/* html */
18	template: `<div class="pfy-loading-spinner" :style="attrStyle"><i class="fas fa-cog fa-spin"></i></div>`
19
20});
21
22Vue.component('pfyApplicationQuestion', {
23
24	props: {
25		question:      { type: Object             },
26		loggedIn:      { type: Boolean            },
27	},
28
29	data: function() { return {
30		input: this.question.DefaultAnswerSubcodeString,
31	}},
32
33	computed: {
34
35		inputState: function() {
36			const { $dirty, $error } = this.$v.input;
37			return $dirty ? !$error : null;
38		},
39
40	},
41
42	/*html*/
43	template:`
44	<b-form-group
45		:label="question.QuestionText"
46		:label-for="'pfy-product-question-'+question.ApplicationQuestionId"
47		v-if="loggedIn"
48		:state="inputState">
49
50		<b-form-input
51			v-if="question.AnswerTypeCodeString == 'TEXT_BOX'"
52			:id="'pfy-product-question-'+question.ApplicationQuestionId"
53			v-model="$v.input.$model"
54			:state="inputState">
55		</b-form-input>
56
57		<!-- DROP_DOWN -->
58		<b-form-select
59		v-if="question.AnswerTypeCodeString == 'DROP_DOWN'"
60		:id="'pfy-product-question-'+question.ApplicationQuestionId"
61		v-model="$v.input.$model"
62		:state="inputState">
63
64			<b-form-select-option
65				v-for="answer in question.answers"
66				:key="answer.Subcode"
67				:value="answer.Subcode">
68				{{ answer.Description }}
69			</b-form-select-option>
70
71		</b-form-select>
72
73		<!-- RADIO_BUTTON -->
74		<b-form-radio-group
75			v-if="question.AnswerTypeCodeString == 'RADIO_BUTTON'"
76			:id="'pfy-product-question-'+question.ApplicationQuestionId"
77			v-model="$v.input.$model"
78			:state="inputState"
79			size="sm">
80
81			<b-form-radio
82				v-for="answer in question.answers"
83				:key="answer.Subcode"
84				:value="answer.Subcode">
85				{{ answer.Description }}
86			</b-form-radio>
87
88		</b-form-radio-group>
89		
90		<b-form-invalid-feedback>
91			<div v-if="question.AnswerRequiredFlag">This field is required.</div> 
92			<div v-if="question.UserDefinedTextMaxLimit">Up to {{question.UserDefinedTextMaxLimit}} characters allowed.</div>
93		</b-form-invalid-feedback>
94
95	</b-form-group>`,
96
97	watch: {
98
99		input: function( value ) {
100			this.$emit( 'setApplicationQuestionAnswer', {
101				id:    this.question.ApplicationQuestionId,
102				value: value
103			});
104		}
105
106	},
107
108	methods: {
109
110		validate() {
111
112			this.$v.input.$touch();
113
114			return !( this.$v.$anyError);
115
116		}
117
118	},
119
120	validations: {
121
122		input: {
123
124			applicationQuestionValidator
125
126		},
127
128	},
129
130});
131
132// FILTERS
133
134Vue.filter( 'toCurrency', function (value) {
135	return parseFloat(value).toFixed(2);
136});
137
138Vue.filter( 'toInteger', function (value) {
139	return parseFloat(value).toFixed(0);
140});
141
142Vue.filter( 'newlineToHTML', function (value) {
143	return value.replace( "\n", '<br>' );
144});
145
146// Personify’s formatted phone numbers have a missing space
147Vue.filter( 'fixPhoneNumberSpacing', function (value) {
148	value = value.replace( ")", ') ' );
149	value = value.replace( "EXT ", 'x' );
150	return value;
151});
152
153// PORTAL DESTINATIONS
154
155jQuery(document).ready(function(){
156
157	if ( jQuery('#pfy-title').length ) {
158
159		new Vue({
160
161			name: 'pfy-title',
162
163			el: '#pfy-title',
164
165			/* html */
166			template: `<PortalTarget name="pfyTitle"></PortalTarget>`
167
168		});
169
170	}
171
172	if ( jQuery('#pfy-subtitle').length ) {
173
174		new Vue({
175
176			name: 'pfy-subtitle',
177
178			el: '#pfy-subtitle',
179
180			/* html */
181			template: `<PortalTarget name="pfySubtitle"></PortalTarget>`
182
183		});
184
185	}
186
187	if ( jQuery('#pfy-meta').length ) {
188
189		new Vue({
190
191			name: 'pfy-meta',
192
193			el: '#pfy-meta',
194
195			/* html */
196			template: `<PortalTarget name="pfyMeta"></PortalTarget>`
197
198		});
199
200	}
201
202	if ( jQuery('#pfy-breadcrumbs').length ) {
203
204		new Vue({
205
206			name: 'pfy-breadcrumbs',
207
208			el: '#pfy-breadcrumbs',
209
210			/* html */
211			template: `<PortalTarget name="pfyBreadcrumbs"></PortalTarget>`
212
213		});
214
215	}
216
217	if ( jQuery('#pfy-sidebar').length ) {
218
219		new Vue({
220
221			name: 'pfy-sidebar',
222
223			el: '#pfy-sidebar',
224
225			/* html */
226			template: `<PortalTarget name="pfySidebar"></PortalTarget>`
227
228		});
229
230	}
231
232});
233
234// MARKET CODES
235
236jQuery(document).ready(function(){
237
238	const queryVars = new URLSearchParams( window.location.search );
239
240	if ( !queryVars.has('market_code') ) return;
241
242	document.cookie = 'wordpress_personify_market_code=' + queryVars.get('market_code') + ';path=/;';
243
244});

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.