PluginProbe
DecaLog / 4.4.0
DecaLog v4.4.0
3.0.2 3.1.0 3.10.0 3.2.0 3.3.0 3.4.0 3.4.1 3.5.0 3.5.1 3.6.0 3.6.1 3.6.2 3.6.3 3.7.0 3.7.1 3.8.0 3.9.0 3.9.1 4.0.0 4.1.0 4.2.0 4.3.0 4.3.1 4.4.0 4.5.0 All 75 releases
decalog / includes / features / class-handlertypes.php

class-handlertypes.php in DecaLog 4.4.0, at includes/features/class-handlertypes.php

4,136 lines 271.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Logger types handling
4 *
5 * Handles all available logger types.
6 *
7 * @package Features
8 * @author Pierre Lannoy <https://pierre.lannoy.fr/>.
9 * @since 1.0.0
10 */
11
12 namespace Decalog\Plugin\Feature;
13
14 use Decalog\System\Option;
15 use DLMonolog\Logger;
16 use Decalog\System\Cache;
17
18 /**
19 * Define the logger types functionality.
20 *
21 * Handles all available logger types.
22 *
23 * @package Features
24 * @author Pierre Lannoy <https://pierre.lannoy.fr/>.
25 * @since 1.0.0
26 */
27 class HandlerTypes {
28
29 /**
30 * The array of available types.
31 *
32 * @since 1.0.0
33 * @var array $handlers The available types.
34 */
35 private $handlers = [];
36
37 /**
38 * The array of available class names.
39 *
40 * @since 3.0.0
41 * @var array $handlers_class The available class names.
42 */
43 private $handlers_class = [];
44
45 /**
46 * Initialize the class and set its properties.
47 *
48 * @since 1.0.0
49 */
50 public function __construct() {
51 $this->handlers_class = [
52 'alerting' => decalog_esc_html__( 'Crash Analytics', 'decalog' ),
53 'analytics' => decalog_esc_html__( 'Alerting', 'decalog' ),
54 'debugging' => decalog_esc_html__( 'Debugging', 'decalog' ),
55 'logging' => decalog_esc_html__( 'Logging', 'decalog' ),
56 'metrics' => decalog_esc_html__( 'Monitoring', 'decalog' ),
57 'tracing' => decalog_esc_html__( 'Tracing', 'decalog' ),
58 ];
59
60 // TRACING
61 $this->handlers[] = [
62 'version' => DECALOG_VERSION,
63 'id' => 'DatadogTracingHandler',
64 'namespace' => 'Decalog\\Handler',
65 'class' => 'tracing',
66 'minimal' => Logger::EMERGENCY,
67 'name' => 'Datadog Traces',
68 'help' => decalog_esc_html__( 'Traces sent to Datadog via Datadog local agent.', 'decalog' ),
69 'icon' => $this->get_base64_datadog_icon(),
70 'needs' => [],
71 'params' => [ 'processors', 'privacy' ],
72 'processors' => [],
73 'configuration' => [
74 'sampling' => [
75 'type' => 'integer',
76 'show' => true,
77 'name' => decalog_esc_html__( 'Sampling', 'decalog' ),
78 'help' => decalog_esc_html__( 'Sampling rate to be chosen according to the site traffic.', 'decalog' ),
79 'default' => 100,
80 'control' => [
81 'type' => 'field_select',
82 'cast' => 'integer',
83 'enabled' => true,
84 'list' => [ [ 1000, '100%' ], [ 500, '50%' ], [ 250, '25%' ], [ 100, '10%' ], [ 50, '5%' ], [ 20, '2%' ], [ 10, '1%' ], [ 5, '5‰' ], [ 2, '2‰' ], [ 1, '1‰' ] ],
85 ],
86 ],
87 'format' => [
88 'type' => 'integer',
89 'show' => true,
90 'name' => decalog_esc_html__( 'Format', 'decalog' ),
91 'help' => decalog_esc_html__( 'The format in which to push data.', 'decalog' ),
92 'default' => 300,
93 'control' => [
94 'type' => 'field_select',
95 'cast' => 'integer',
96 'enabled' => false,
97 'list' => [ [ 300, 'DD/0.3' ] ],
98 ],
99 ],
100 'url' => [
101 'type' => 'string',
102 'show' => true,
103 'name' => decalog_esc_html__( 'Service URL', 'decalog' ),
104 'help' => sprintf( decalog_esc_html__( 'URL where to send spans. Format: %s.', 'decalog' ), '<code>' . htmlentities( '<proto>://<host>[:<port>]' ) . '</code>' ) . $this->get_substitution_note(),
105 'default' => 'http://localhost:8126',
106 'control' => [
107 'type' => 'field_input_text',
108 'cast' => 'string',
109 'enabled' => true,
110 ],
111 ],
112 'ftags' => [
113 'type' => 'string',
114 'show' => true,
115 'name' => decalog_esc_html__( 'Custom tags', 'decalog' ),
116 'help' => sprintf( decalog_esc_html__( 'Custom tags to add to each span. Format: %s.', 'decalog' ), '<code>' . htmlentities( 'key=value, key=value …' ) . '</code>' ) . $this->get_substitution_note(),
117 'default' => '',
118 'control' => [
119 'type' => 'field_input_text',
120 'cast' => 'string',
121 'enabled' => true,
122 ],
123 ],
124 ],
125 'init' => [
126 [
127 'type' => 'uuid',
128 ],
129 [
130 'type' => 'configuration',
131 'value' => 'format',
132 ],
133 [
134 'type' => 'configuration',
135 'value' => 'sampling',
136 ],
137 [
138 'type' => 'configuration',
139 'value' => 'url',
140 ],
141 [
142 'type' => 'configuration',
143 'value' => 'ftags',
144 ],
145 ],
146 ];
147 $this->handlers[] = [
148 'version' => DECALOG_VERSION,
149 'id' => 'JaegerTracingHandler',
150 'namespace' => 'Decalog\\Handler',
151 'class' => 'tracing',
152 'minimal' => Logger::EMERGENCY,
153 'name' => 'Jaeger',
154 'help' => decalog_esc_html__( 'Traces sent to a Jaeger collector.', 'decalog' ),
155 'icon' => $this->get_base64_jaeger_icon(),
156 'needs' => [],
157 'params' => [ 'processors', 'privacy' ],
158 'processors' => [],
159 'configuration' => [
160 'sampling' => [
161 'type' => 'integer',
162 'show' => true,
163 'name' => decalog_esc_html__( 'Sampling', 'decalog' ),
164 'help' => decalog_esc_html__( 'Sampling rate to be chosen according to the site traffic.', 'decalog' ),
165 'default' => 100,
166 'control' => [
167 'type' => 'field_select',
168 'cast' => 'integer',
169 'enabled' => true,
170 'list' => [ [ 1000, '100%' ], [ 500, '50%' ], [ 250, '25%' ], [ 100, '10%' ], [ 50, '5%' ], [ 20, '2%' ], [ 10, '1%' ], [ 5, '5‰' ], [ 2, '2‰' ], [ 1, '1‰' ] ],
171 ],
172 ],
173 'format' => [
174 'type' => 'integer',
175 'show' => true,
176 'name' => decalog_esc_html__( 'Format', 'decalog' ),
177 'help' => decalog_esc_html__( 'The format in which to push data.', 'decalog' ),
178 'default' => 200,
179 'control' => [
180 'type' => 'field_select',
181 'cast' => 'integer',
182 'enabled' => true,
183 'list' => [ [ 100, 'Zipkin V2' ], [ 200, 'Jaeger thrift over HTTP' ] ],
184 ],
185 ],
186 'url' => [
187 'type' => 'string',
188 'show' => true,
189 'name' => decalog_esc_html__( 'Service URL', 'decalog' ),
190 'help' => sprintf( decalog_esc_html__( 'URL where to send spans. Format: %s.', 'decalog' ), '<code>' . htmlentities( '<proto>://<host>[:<port>]' ) . '</code>' ) . $this->get_substitution_note(),
191 'default' => 'http://localhost:14268',
192 'control' => [
193 'type' => 'field_input_text',
194 'cast' => 'string',
195 'enabled' => true,
196 ],
197 ],
198 'service' => [
199 'type' => 'string',
200 'show' => true,
201 'name' => decalog_esc_html__( 'Service name', 'decalog' ),
202 /* translators: "Jaeger thrift over HTTP" must not be translated because it is a "product name". */
203 'help' => decalog_esc_html__( 'Name of the service to use when "Jaeger thrift over HTTP" is the selected format.', 'decalog' ) . $this->get_substitution_note(),
204 'default' => 'WordPress',
205 'control' => [
206 'type' => 'field_input_text',
207 'cast' => 'string',
208 'enabled' => true,
209 ],
210 ],
211 'ftags' => [
212 'type' => 'string',
213 'show' => true,
214 'name' => decalog_esc_html__( 'Custom tags', 'decalog' ),
215 'help' => sprintf( decalog_esc_html__( 'Custom tags to add to each span. Format: %s.', 'decalog' ), '<code>' . htmlentities( 'key=value, key=value …' ) . '</code>' ) . $this->get_substitution_note(),
216 'default' => '',
217 'control' => [
218 'type' => 'field_input_text',
219 'cast' => 'string',
220 'enabled' => true,
221 ],
222 ],
223 ],
224 'init' => [
225 [
226 'type' => 'uuid',
227 ],
228 [
229 'type' => 'configuration',
230 'value' => 'format',
231 ],
232 [
233 'type' => 'configuration',
234 'value' => 'sampling',
235 ],
236 [
237 'type' => 'configuration',
238 'value' => 'url',
239 ],
240 [
241 'type' => 'configuration',
242 'value' => 'ftags',
243 ],
244 [
245 'type' => 'configuration',
246 'value' => 'service',
247 ],
248 ],
249 ];
250 $this->handlers[] = [
251 'version' => DECALOG_VERSION,
252 'id' => 'TempoTracingHandler',
253 'namespace' => 'Decalog\\Handler',
254 'class' => 'tracing',
255 'minimal' => Logger::EMERGENCY,
256 'name' => 'Tempo',
257 'help' => decalog_esc_html__( 'Traces sent to a Tempo instance.', 'decalog' ),
258 'icon' => $this->get_base64_tempo_icon(),
259 'needs' => [],
260 'params' => [ 'processors', 'privacy' ],
261 'processors' => [],
262 'configuration' => [
263 'sampling' => [
264 'type' => 'integer',
265 'show' => true,
266 'name' => decalog_esc_html__( 'Sampling', 'decalog' ),
267 'help' => decalog_esc_html__( 'Sampling rate to be chosen according to the site traffic.', 'decalog' ),
268 'default' => 100,
269 'control' => [
270 'type' => 'field_select',
271 'cast' => 'integer',
272 'enabled' => true,
273 'list' => [ [ 1000, '100%' ], [ 500, '50%' ], [ 250, '25%' ], [ 100, '10%' ], [ 50, '5%' ], [ 20, '2%' ], [ 10, '1%' ], [ 5, '5‰' ], [ 2, '2‰' ], [ 1, '1‰' ] ],
274 ],
275 ],
276 'format' => [
277 'type' => 'integer',
278 'show' => true,
279 'name' => decalog_esc_html__( 'Format', 'decalog' ),
280 'help' => decalog_esc_html__( 'The format in which to push data.', 'decalog' ),
281 'default' => 100,
282 'control' => [
283 'type' => 'field_select',
284 'cast' => 'integer',
285 'enabled' => true,
286 'list' => [ [ 100, 'Zipkin V2' ], [ 200, 'Jaeger thrift over HTTP' ] ],
287 ],
288 ],
289 'url' => [
290 'type' => 'string',
291 'show' => true,
292 'name' => decalog_esc_html__( 'Service URL', 'decalog' ),
293 'help' => sprintf( decalog_esc_html__( 'URL where to send spans. Format: %s.', 'decalog' ), '<code>' . htmlentities( '<proto>://<host>[:<port>]' ) . '</code>' ) . $this->get_substitution_note(),
294 'default' => 'http://localhost:9411',
295 'control' => [
296 'type' => 'field_input_text',
297 'cast' => 'string',
298 'enabled' => true,
299 ],
300 ],
301 'service' => [
302 'type' => 'string',
303 'show' => true,
304 'name' => decalog_esc_html__( 'Service name', 'decalog' ),
305 /* translators: "Jaeger thrift over HTTP" must not be translated because it is a "product name". */
306 'help' => decalog_esc_html__( 'Name of the service to use when "Jaeger thrift over HTTP" is the selected format.', 'decalog' ) . $this->get_substitution_note(),
307 'default' => 'WordPress',
308 'control' => [
309 'type' => 'field_input_text',
310 'cast' => 'string',
311 'enabled' => true,
312 ],
313 ],
314 'ftags' => [
315 'type' => 'string',
316 'show' => true,
317 'name' => decalog_esc_html__( 'Custom tags', 'decalog' ),
318 'help' => sprintf( decalog_esc_html__( 'Custom tags to add to each span. Format: %s.', 'decalog' ), '<code>' . htmlentities( 'key=value, key=value …' ) . '</code>' ) . $this->get_substitution_note(),
319 'default' => '',
320 'control' => [
321 'type' => 'field_input_text',
322 'cast' => 'string',
323 'enabled' => true,
324 ],
325 ],
326 ],
327 'init' => [
328 [
329 'type' => 'uuid',
330 ],
331 [
332 'type' => 'configuration',
333 'value' => 'format',
334 ],
335 [
336 'type' => 'configuration',
337 'value' => 'sampling',
338 ],
339 [
340 'type' => 'configuration',
341 'value' => 'url',
342 ],
343 [
344 'type' => 'configuration',
345 'value' => 'ftags',
346 ],
347 [
348 'type' => 'configuration',
349 'value' => 'service',
350 ],
351 ],
352 ];
353 $this->handlers[] = [
354 'version' => DECALOG_VERSION,
355 'id' => 'GrafanaTracingHandler',
356 'namespace' => 'Decalog\\Handler',
357 'class' => 'tracing',
358 'minimal' => Logger::EMERGENCY,
359 'name' => 'Grafana Cloud Traces',
360 'help' => decalog_esc_html__( 'Traces sent to Grafana Cloud via Grafana agent.', 'decalog' ),
361 'icon' => $this->get_base64_grafana_icon(),
362 'needs' => [],
363 'params' => [ 'processors', 'privacy' ],
364 'configuration' => [
365 'sampling' => [
366 'type' => 'integer',
367 'show' => true,
368 'name' => decalog_esc_html__( 'Sampling', 'decalog' ),
369 'help' => decalog_esc_html__( 'Sampling rate to be chosen according to the site traffic.', 'decalog' ),
370 'default' => 100,
371 'control' => [
372 'type' => 'field_select',
373 'cast' => 'integer',
374 'enabled' => true,
375 'list' => [ [ 1000, '100%' ], [ 500, '50%' ], [ 250, '25%' ], [ 100, '10%' ], [ 50, '5%' ], [ 20, '2%' ], [ 10, '1%' ], [ 5, '5‰' ], [ 2, '2‰' ], [ 1, '1‰' ] ],
376 ],
377 ],
378 'format' => [
379 'type' => 'integer',
380 'show' => true,
381 'name' => decalog_esc_html__( 'Format', 'decalog' ),
382 'help' => decalog_esc_html__( 'The format in which to push data.', 'decalog' ),
383 'default' => 100,
384 'control' => [
385 'type' => 'field_select',
386 'cast' => 'integer',
387 'enabled' => true,
388 'list' => [ [ 100, 'Zipkin V2' ], [ 200, 'Jaeger thrift over HTTP' ] ],
389 ],
390 ],
391 'url' => [
392 'type' => 'string',
393 'show' => true,
394 'name' => decalog_esc_html__( 'Service URL', 'decalog' ),
395 'help' => sprintf( decalog_esc_html__( 'URL where to send spans. Format: %s.', 'decalog' ), '<code>' . htmlentities( '<proto>://<host>[:<port>]' ) . '</code>' ) . $this->get_substitution_note(),
396 'default' => 'http://localhost:9411',
397 'control' => [
398 'type' => 'field_input_text',
399 'cast' => 'string',
400 'enabled' => true,
401 ],
402 ],
403 'service' => [
404 'type' => 'string',
405 'show' => true,
406 'name' => decalog_esc_html__( 'Service name', 'decalog' ),
407 /* translators: "Jaeger thrift over HTTP" must not be translated because it is a "product name". */
408 'help' => decalog_esc_html__( 'Name of the service to use when "Jaeger thrift over HTTP" is the selected format.', 'decalog' ) . $this->get_substitution_note(),
409 'default' => 'WordPress',
410 'control' => [
411 'type' => 'field_input_text',
412 'cast' => 'string',
413 'enabled' => true,
414 ],
415 ],
416 'ftags' => [
417 'type' => 'string',
418 'show' => true,
419 'name' => decalog_esc_html__( 'Custom tags', 'decalog' ),
420 'help' => sprintf( decalog_esc_html__( 'Custom tags to add to each span. Format: %s.', 'decalog' ), '<code>' . htmlentities( 'key=value, key=value …' ) . '</code>' ) . $this->get_substitution_note(),
421 'default' => '',
422 'control' => [
423 'type' => 'field_input_text',
424 'cast' => 'string',
425 'enabled' => true,
426 ],
427 ],
428 ],
429 'init' => [
430 [
431 'type' => 'uuid',
432 ],
433 [
434 'type' => 'configuration',
435 'value' => 'url',
436 ],
437 [
438 'type' => 'configuration',
439 'value' => 'format',
440 ],
441 [
442 'type' => 'configuration',
443 'value' => 'sampling',
444 ],
445 [
446 'type' => 'configuration',
447 'value' => 'ftags',
448 ],
449 [
450 'type' => 'configuration',
451 'value' => 'service',
452 ],
453 ],
454 ];
455 $this->handlers[] = [
456 'version' => DECALOG_VERSION,
457 'id' => 'ZipkinTracingHandler',
458 'namespace' => 'Decalog\\Handler',
459 'class' => 'tracing',
460 'minimal' => Logger::EMERGENCY,
461 'name' => 'Zipkin',
462 'help' => decalog_esc_html__( 'Traces sent to a Zipkin instance.', 'decalog' ),
463 'icon' => $this->get_base64_zipkin_icon(),
464 'needs' => [],
465 'params' => [ 'processors', 'privacy' ],
466 'processors' => [],
467 'configuration' => [
468 'sampling' => [
469 'type' => 'integer',
470 'show' => true,
471 'name' => decalog_esc_html__( 'Sampling', 'decalog' ),
472 'help' => decalog_esc_html__( 'Sampling rate to be chosen according to the site traffic.', 'decalog' ),
473 'default' => 100,
474 'control' => [
475 'type' => 'field_select',
476 'cast' => 'integer',
477 'enabled' => true,
478 'list' => [ [ 1000, '100%' ], [ 500, '50%' ], [ 250, '25%' ], [ 100, '10%' ], [ 50, '5%' ], [ 20, '2%' ], [ 10, '1%' ], [ 5, '5‰' ], [ 2, '2‰' ], [ 1, '1‰' ] ],
479 ],
480 ],
481 'format' => [
482 'type' => 'integer',
483 'show' => true,
484 'name' => decalog_esc_html__( 'Format', 'decalog' ),
485 'help' => decalog_esc_html__( 'The format in which to push data.', 'decalog' ),
486 'default' => 100,
487 'control' => [
488 'type' => 'field_select',
489 'cast' => 'integer',
490 'enabled' => false,
491 'list' => [ [ 100, 'Zipkin V2' ] ],
492 ],
493 ],
494 'url' => [
495 'type' => 'string',
496 'show' => true,
497 'name' => decalog_esc_html__( 'Service URL', 'decalog' ),
498 'help' => sprintf( decalog_esc_html__( 'URL where to send spans. Format: %s.', 'decalog' ), '<code>' . htmlentities( '<proto>://<host>[:<port>]' ) . '</code>' ) . $this->get_substitution_note(),
499 'default' => 'http://localhost:9411',
500 'control' => [
501 'type' => 'field_input_text',
502 'cast' => 'string',
503 'enabled' => true,
504 ],
505 ],
506 'ftags' => [
507 'type' => 'string',
508 'show' => true,
509 'name' => decalog_esc_html__( 'Custom tags', 'decalog' ),
510 'help' => sprintf( decalog_esc_html__( 'Custom tags to add to each span. Format: %s.', 'decalog' ), '<code>' . htmlentities( 'key=value, key=value …' ) . '</code>' ) . $this->get_substitution_note(),
511 'default' => '',
512 'control' => [
513 'type' => 'field_input_text',
514 'cast' => 'string',
515 'enabled' => true,
516 ],
517 ],
518 ],
519 'init' => [
520 [
521 'type' => 'uuid',
522 ],
523 [
524 'type' => 'configuration',
525 'value' => 'sampling',
526 ],
527 [
528 'type' => 'configuration',
529 'value' => 'url',
530 ],
531 [
532 'type' => 'configuration',
533 'value' => 'ftags',
534 ],
535 ],
536 ];
537 $this->handlers[] = [
538 'version' => DECALOG_VERSION,
539 'id' => 'WordpressTracingHandler',
540 'namespace' => 'Decalog\Handler',
541 'class' => 'tracing',
542 'minimal' => Logger::EMERGENCY,
543 'name' => decalog_esc_html__( 'WordPress traces', 'decalog' ),
544 'help' => decalog_esc_html__( 'Traces stored in WordPress and available right in your admin dashboard.', 'decalog' ),
545 'icon' => $this->get_base64_wordpress_icon(),
546 'needs' => [],
547 'params' => [ 'processors', 'privacy' ],
548 'processors' => [
549 'included' => [ 'WordpressProcessor', 'WWWProcessor', 'IntrospectionProcessor' ],
550 ],
551 'configuration' => [
552 'sampling' => [
553 'type' => 'integer',
554 'show' => true,
555 'name' => decalog_esc_html__( 'Sampling', 'decalog' ),
556 'help' => decalog_esc_html__( 'Sampling rate to be chosen according to the site traffic.', 'decalog' ),
557 'default' => 100,
558 'control' => [
559 'type' => 'field_select',
560 'cast' => 'integer',
561 'enabled' => true,
562 'list' => [ [ 1000, '100%' ], [ 500, '50%' ], [ 250, '25%' ], [ 100, '10%' ], [ 50, '5%' ], [ 20, '2%' ], [ 10, '1%' ], [ 5, '5‰' ], [ 2, '2‰' ], [ 1, '1‰' ] ],
563 ],
564 ],
565 'constant-storage' => [
566 'type' => 'string',
567 'show' => true,
568 'name' => decalog_esc_html__( 'Storage', 'decalog' ),
569 'help' => decalog_esc_html__( 'Place where to store traces.', 'decalog' ) . '<br/>' . decalog_esc_html__( 'Note: it\'s not possible to change storage type after logger creation.', 'decalog' ),
570 'default' => 'db',
571 'control' => [
572 'type' => 'field_select',
573 'cast' => 'string',
574 'enabled' => Cache::$apcu_available,
575 'list' => [ [ 'db', decalog_esc_html__( 'Database: persistent after a server restart', 'decalog' ) ], [ 'apcu', decalog_esc_html__( 'APCu: high performance but reset after each server reboot', 'decalog' ), Cache::$apcu_available ] ],
576 ],
577 ],
578 'rotate' => [
579 'type' => 'integer',
580 'show' => true,
581 'name' => decalog_esc_html__( 'Traces', 'decalog' ),
582 'help' => decalog_esc_html__( 'Maximum number of traces stored in this traces log (0 for no limit).', 'decalog' ),
583 'default' => 10000,
584 'control' => [
585 'type' => 'field_input_integer',
586 'cast' => 'integer',
587 'min' => 0,
588 'max' => 10000000,
589 'step' => 1000,
590 'enabled' => true,
591 ],
592 ],
593 'purge' => [
594 'type' => 'integer',
595 'show' => true,
596 'name' => decalog_esc_html__( 'Days', 'decalog' ),
597 'help' => decalog_esc_html__( 'Maximum age of traces stored in this traces log (0 for no limit).', 'decalog' ),
598 'default' => 5,
599 'control' => [
600 'type' => 'field_input_integer',
601 'cast' => 'integer',
602 'min' => 0,
603 'max' => 730,
604 'step' => 1,
605 'enabled' => true,
606 ],
607 ],
608 'local' => [
609 'type' => 'boolean',
610 'show' => is_multisite(),
611 'name' => decalog_esc_html__( 'Multisite partitioning', 'decalog' ),
612 'help' => decalog_esc_html__( 'Local administrators can view traces that relate to their site.', 'decalog' ),
613 'default' => false,
614 'control' => [
615 'type' => 'field_checkbox',
616 'cast' => 'boolean',
617 'enabled' => true,
618 ],
619 ],
620 ],
621 'init' => [
622 [
623 'type' => 'uuid',
624 ],
625 [
626 'type' => 'configuration',
627 'value' => 'sampling',
628 ],
629 [
630 'type' => 'compute',
631 'value' => 'tablename',
632 ],
633 [
634 'type' => 'configuration',
635 'value' => 'constant-storage',
636 ],
637 ],
638 ];
639 $this->handlers[] = [
640 'version' => DECALOG_VERSION,
641 'id' => 'NewrelicTracingHandler',
642 'namespace' => 'Decalog\\Handler',
643 'class' => 'tracing',
644 'minimal' => Logger::EMERGENCY,
645 'name' => 'New Relic Traces',
646 'help' => decalog_esc_html__( 'Traces sent to New Relic (NR-Traces).', 'decalog' ),
647 'icon' => $this->get_base64_newrelic_icon(),
648 'needs' => [],
649 'params' => [ 'processors', 'privacy' ],
650 'processors' => [],
651 'configuration' => [
652 'sampling' => [
653 'type' => 'integer',
654 'show' => true,
655 'name' => decalog_esc_html__( 'Sampling', 'decalog' ),
656 'help' => decalog_esc_html__( 'Sampling rate to be chosen according to the site traffic.', 'decalog' ),
657 'default' => 100,
658 'control' => [
659 'type' => 'field_select',
660 'cast' => 'integer',
661 'enabled' => true,
662 'list' => [ [ 1000, '100%' ], [ 500, '50%' ], [ 250, '25%' ], [ 100, '10%' ], [ 50, '5%' ], [ 20, '2%' ], [ 10, '1%' ], [ 5, '5‰' ], [ 2, '2‰' ], [ 1, '1‰' ] ],
663 ],
664 ],
665 'format' => [
666 'type' => 'integer',
667 'show' => true,
668 'name' => decalog_esc_html__( 'Format', 'decalog' ),
669 'help' => decalog_esc_html__( 'The format in which to push data.', 'decalog' ),
670 'default' => 100,
671 'control' => [
672 'type' => 'field_select',
673 'cast' => 'integer',
674 'enabled' => false,
675 'list' => [ [ 100, 'Zipkin V2' ] ],
676 ],
677 ],
678 'host' => [
679 'type' => 'string',
680 'show' => true,
681 'name' => decalog_esc_html__( 'Location', 'decalog' ),
682 'help' => decalog_esc_html__( 'The New Relic endpoint location.', 'decalog' ),
683 'default' => 'https://trace-api.newrelic.com/trace/v1',
684 'control' => [
685 'type' => 'field_select',
686 'cast' => 'string',
687 'enabled' => true,
688 'list' => [ [ 'https://trace-api.eu.newrelic.com/trace/v1', decalog_esc_html__( 'Europe', 'decalog' ) ], [ 'https://trace-api.newrelic.com/trace/v1', decalog_esc_html__( 'United States', 'decalog' ) ] ],
689 ],
690 ],
691 'token' => [
692 'type' => 'string',
693 'show' => true,
694 'name' => decalog_esc_html__( 'II key', 'decalog' ),
695 'help' => decalog_esc_html__( 'An account\'s "Insights insert key".', 'decalog' ) . $this->get_substitution_note(),
696 'default' => '',
697 'control' => [
698 'type' => 'field_input_text',
699 'cast' => 'string',
700 'enabled' => true,
701 ],
702 ],
703 'ftags' => [
704 'type' => 'string',
705 'show' => true,
706 'name' => decalog_esc_html__( 'Custom tags', 'decalog' ),
707 'help' => sprintf( decalog_esc_html__( 'Custom tags to add to each span. Format: %s.', 'decalog' ), '<code>' . htmlentities( 'key=value, key=value …' ) . '</code>' ) . $this->get_substitution_note(),
708 'default' => '',
709 'control' => [
710 'type' => 'field_input_text',
711 'cast' => 'string',
712 'enabled' => true,
713 ],
714 ],
715 ],
716 'init' => [
717 [
718 'type' => 'uuid',
719 ],
720 [
721 'type' => 'configuration',
722 'value' => 'sampling',
723 ],
724 [
725 'type' => 'configuration',
726 'value' => 'host',
727 ],
728 [
729 'type' => 'configuration',
730 'value' => 'token',
731 ],
732 [
733 'type' => 'configuration',
734 'value' => 'ftags',
735 ],
736 ],
737 ];
738
739 // MONITORING
740 $this->handlers[] = [
741 'version' => DECALOG_VERSION,
742 'id' => 'NewRelicMonitoringHandler',
743 'namespace' => 'Decalog\\Handler',
744 'class' => 'metrics',
745 'minimal' => Logger::EMERGENCY,
746 'name' => 'New Relic Metrics',
747 'help' => decalog_esc_html__( 'Metrics sent to New Relic (NR-Metrics).', 'decalog' ),
748 'icon' => $this->get_base64_newrelic_icon(),
749 'needs' => [],
750 'params' => [],
751 'processors' => [],
752 'configuration' => [
753 'profile' => [
754 'type' => 'integer',
755 'show' => true,
756 'name' => decalog_esc_html__( 'Profile', 'decalog' ),
757 'help' => sprintf(decalog__( 'The type of metrics to collect (%s). Choosing "Automatic" sets the profile to the current WordPress environment type.', 'decalog' ), sprintf( '<a href="https://github.com/Pierre-Lannoy/wp-decalog/blob/master/MONITORING.md" target="_blank">%s</a>', decalog_esc_html__( 'details', 'decalog' ) ) ),
758 'default' => 500,
759 'control' => [
760 'type' => 'field_select',
761 'cast' => 'integer',
762 'enabled' => true,
763 'list' => [ [ 500, decalog_esc_html__( 'Automatic', 'decalog' ) ], [ 600, decalog_esc_html__( 'Production', 'decalog' ) ], [ 550, decalog_esc_html__( 'Development', 'decalog' ) ] ],
764 ],
765 ],
766 'sampling' => [
767 'type' => 'integer',
768 'show' => true,
769 'name' => decalog_esc_html__( 'Sampling', 'decalog' ),
770 'help' => decalog_esc_html__( 'Sampling rate to be chosen according to the site traffic.', 'decalog' ),
771 'default' => 100,
772 'control' => [
773 'type' => 'field_select',
774 'cast' => 'integer',
775 'enabled' => true,
776 'list' => [ [ 1000, '100%' ], [ 500, '50%' ], [ 250, '25%' ], [ 100, '10%' ], [ 50, '5%' ], [ 20, '2%' ], [ 10, '1%' ], [ 5, '5‰' ], [ 2, '2‰' ], [ 1, '1‰' ] ],
777 ],
778 ],
779 'filter' => [
780 'type' => 'string',
781 'show' => true,
782 'name' => decalog_esc_html__( 'Metrics filter', 'decalog' ),
783 'help' => decalog_esc_html__( 'Exclude metrics to be collated by specifying them with regular expressions (one expression per line).', 'decalog' ) . '<br/>' . decalog_esc_html__( 'Example:', 'decalog' ) . ' <code>core_wordpress_content_status_(?:draft|pending|inherit)</code>',
784 'default' => '',
785 'control' => [
786 'type' => 'field_input_textarea',
787 'cast' => 'string',
788 'enabled' => true,
789 'columns' => 50,
790 'lines' => 5,
791 ],
792 ],
793 'host' => [
794 'type' => 'string',
795 'show' => true,
796 'name' => decalog_esc_html__( 'Location', 'decalog' ),
797 'help' => decalog_esc_html__( 'The New Relic endpoint location.', 'decalog' ),
798 'default' => 'https://metric-api.newrelic.com/metric/v1',
799 'control' => [
800 'type' => 'field_select',
801 'cast' => 'string',
802 'enabled' => true,
803 'list' => [ [ 'https://metric-api.eu.newrelic.com/metric/v1', decalog_esc_html__( 'Europe', 'decalog' ) ], [ 'https://metric-api.newrelic.com/metric/v1', decalog_esc_html__( 'United States', 'decalog' ) ] ],
804 ],
805 ],
806 'token' => [
807 'type' => 'string',
808 'show' => true,
809 'name' => decalog_esc_html__( 'II key', 'decalog' ),
810 'help' => decalog_esc_html__( 'An account\'s "Insights insert key".', 'decalog' ) . $this->get_substitution_note(),
811 'default' => '',
812 'control' => [
813 'type' => 'field_input_text',
814 'cast' => 'string',
815 'enabled' => true,
816 ],
817 ],
818 ],
819 'init' => [
820 [
821 'type' => 'uuid',
822 ],
823 [
824 'type' => 'configuration',
825 'value' => 'host',
826 ],
827 [
828 'type' => 'configuration',
829 'value' => 'token',
830 ],
831 [
832 'type' => 'configuration',
833 'value' => 'profile',
834 ],
835 [
836 'type' => 'configuration',
837 'value' => 'sampling',
838 ],
839 [
840 'type' => 'configuration',
841 'value' => 'filter',
842 ],
843 ],
844 ];
845 $this->handlers[] = [
846 'version' => DECALOG_VERSION,
847 'id' => 'DatadogMonitoringHandler',
848 'namespace' => 'Decalog\\Handler',
849 'class' => 'metrics',
850 'minimal' => Logger::EMERGENCY,
851 'name' => 'Datadog Metrics',
852 'help' => decalog_esc_html__( 'Metrics sent to Datadog.', 'decalog' ),
853 'icon' => $this->get_base64_datadog_icon(),
854 'needs' => [],
855 'params' => [],
856 'processors' => [],
857 'configuration' => [
858 'profile' => [
859 'type' => 'integer',
860 'show' => true,
861 'name' => decalog_esc_html__( 'Profile', 'decalog' ),
862 'help' => sprintf(decalog__( 'The type of metrics to collect (%s). Choosing "Automatic" sets the profile to the current WordPress environment type.', 'decalog' ), sprintf( '<a href="https://github.com/Pierre-Lannoy/wp-decalog/blob/master/MONITORING.md" target="_blank">%s</a>', decalog_esc_html__( 'details', 'decalog' ) ) ),
863 'default' => 500,
864 'control' => [
865 'type' => 'field_select',
866 'cast' => 'integer',
867 'enabled' => true,
868 'list' => [ [ 500, decalog_esc_html__( 'Automatic', 'decalog' ) ], [ 600, decalog_esc_html__( 'Production', 'decalog' ) ], [ 550, decalog_esc_html__( 'Development', 'decalog' ) ] ],
869 ],
870 ],
871 'sampling' => [
872 'type' => 'integer',
873 'show' => true,
874 'name' => decalog_esc_html__( 'Sampling', 'decalog' ),
875 'help' => decalog_esc_html__( 'Sampling rate to be chosen according to the site traffic.', 'decalog' ),
876 'default' => 100,
877 'control' => [
878 'type' => 'field_select',
879 'cast' => 'integer',
880 'enabled' => true,
881 'list' => [ [ 1000, '100%' ], [ 500, '50%' ], [ 250, '25%' ], [ 100, '10%' ], [ 50, '5%' ], [ 20, '2%' ], [ 10, '1%' ], [ 5, '5‰' ], [ 2, '2‰' ], [ 1, '1‰' ] ],
882 ],
883 ],
884 'filter' => [
885 'type' => 'string',
886 'show' => true,
887 'name' => decalog_esc_html__( 'Metrics filter', 'decalog' ),
888 'help' => decalog_esc_html__( 'Exclude metrics to be collated by specifying them with regular expressions (one expression per line).', 'decalog' ) . '<br/>' . decalog_esc_html__( 'Example:', 'decalog' ) . ' <code>core_wordpress_content_status_(?:draft|pending|inherit)</code>',
889 'default' => '',
890 'control' => [
891 'type' => 'field_input_textarea',
892 'cast' => 'string',
893 'enabled' => true,
894 'columns' => 50,
895 'lines' => 5,
896 ],
897 ],
898 'host' => [
899 'type' => 'string',
900 'show' => true,
901 'name' => decalog_esc_html__( 'Location', 'decalog' ),
902 'help' => decalog_esc_html__( 'The Datadog cloud location.', 'decalog' ),
903 'default' => 'https://http-intake.logs.datadoghq.com/v1/input',
904 'control' => [
905 'type' => 'field_select',
906 'cast' => 'string',
907 'enabled' => true,
908 'list' => [ [ 'https://api.datadoghq.eu/api/v1/series', decalog_esc_html__( 'Europe', 'decalog' ) ], [ 'https://api.datadoghq.com/api/v1/series', decalog_esc_html__( 'United States', 'decalog' ) ] ],
909 ],
910 ],
911 'token' => [
912 'type' => 'string',
913 'show' => true,
914 'name' => decalog_esc_html__( 'API key', 'decalog' ),
915 'help' => decalog_esc_html__( 'The API key of the service.', 'decalog' ) . $this->get_substitution_note(),
916 'default' => '',
917 'control' => [
918 'type' => 'field_input_text',
919 'cast' => 'string',
920 'enabled' => true,
921 ],
922 ],
923 ],
924 'init' => [
925 [
926 'type' => 'uuid',
927 ],
928 [
929 'type' => 'configuration',
930 'value' => 'host',
931 ],
932 [
933 'type' => 'configuration',
934 'value' => 'token',
935 ],
936 [
937 'type' => 'configuration',
938 'value' => 'profile',
939 ],
940 [
941 'type' => 'configuration',
942 'value' => 'sampling',
943 ],
944 [
945 'type' => 'configuration',
946 'value' => 'filter',
947 ],
948 ],
949 ];
950 $this->handlers[] = [
951 'version' => DECALOG_VERSION,
952 'id' => 'InfluxMonitoringHandler',
953 'namespace' => 'Decalog\\Handler',
954 'class' => 'metrics',
955 'minimal' => Logger::EMERGENCY,
956 'name' => 'InfluxDB 2',
957 'help' => decalog_esc_html__( 'Metrics sent to InfluxDB Cloud or on-premise InfluxDB 2 instance or cluster.', 'decalog' ),
958 'icon' => $this->get_base64_infuxdb_icon(),
959 'needs' => [],
960 'params' => [],
961 'processors' => [],
962 'configuration' => [
963 'profile' => [
964 'type' => 'integer',
965 'show' => true,
966 'name' => decalog_esc_html__( 'Profile', 'decalog' ),
967 'help' => sprintf(decalog__( 'The type of metrics to collect (%s). Choosing "Automatic" sets the profile to the current WordPress environment type.', 'decalog' ), sprintf( '<a href="https://github.com/Pierre-Lannoy/wp-decalog/blob/master/MONITORING.md" target="_blank">%s</a>', decalog_esc_html__( 'details', 'decalog' ) ) ),
968 'default' => 500,
969 'control' => [
970 'type' => 'field_select',
971 'cast' => 'integer',
972 'enabled' => true,
973 'list' => [ [ 500, decalog_esc_html__( 'Automatic', 'decalog' ) ], [ 600, decalog_esc_html__( 'Production', 'decalog' ) ], [ 550, decalog_esc_html__( 'Development', 'decalog' ) ] ],
974 ],
975 ],
976 'sampling' => [
977 'type' => 'integer',
978 'show' => true,
979 'name' => decalog_esc_html__( 'Sampling', 'decalog' ),
980 'help' => decalog_esc_html__( 'Sampling rate to be chosen according to the site traffic.', 'decalog' ),
981 'default' => 100,
982 'control' => [
983 'type' => 'field_select',
984 'cast' => 'integer',
985 'enabled' => true,
986 'list' => [ [ 1000, '100%' ], [ 500, '50%' ], [ 250, '25%' ], [ 100, '10%' ], [ 50, '5%' ], [ 20, '2%' ], [ 10, '1%' ], [ 5, '5‰' ], [ 2, '2‰' ], [ 1, '1‰' ] ],
987 ],
988 ],
989 'filter' => [
990 'type' => 'string',
991 'show' => true,
992 'name' => decalog_esc_html__( 'Metrics filter', 'decalog' ),
993 'help' => decalog_esc_html__( 'Exclude metrics to be collated by specifying them with regular expressions (one expression per line).', 'decalog' ) . '<br/>' . decalog_esc_html__( 'Example:', 'decalog' ) . ' <code>core_wordpress_content_status_(?:draft|pending|inherit)</code>',
994 'default' => '',
995 'control' => [
996 'type' => 'field_input_textarea',
997 'cast' => 'string',
998 'enabled' => true,
999 'columns' => 50,
1000 'lines' => 5,
1001 ],
1002 ],
1003 'url' => [
1004 'type' => 'string',
1005 'show' => true,
1006 'name' => decalog_esc_html__( 'Service URL', 'decalog' ),
1007 'help' => sprintf( decalog_esc_html__( 'URL where to send metrics. Format: %s.', 'decalog' ), '<code>' . htmlentities( '<proto>://<host>[:<port>]' ) . '</code>' ) . $this->get_substitution_note(),
1008 'default' => 'http://localhost:8086',
1009 'control' => [
1010 'type' => 'field_input_text',
1011 'cast' => 'string',
1012 'enabled' => true,
1013 ],
1014 ],
1015 'org' => [
1016 'type' => 'string',
1017 'show' => true,
1018 'name' => decalog_esc_html__( 'Organization', 'decalog' ),
1019 'help' => decalog_esc_html__( 'Organization name to use (must exist).', 'decalog' ) . $this->get_substitution_note(),
1020 'default' => 'my-org',
1021 'control' => [
1022 'type' => 'field_input_text',
1023 'cast' => 'string',
1024 'enabled' => true,
1025 ],
1026 ],
1027 'bucket' => [
1028 'type' => 'string',
1029 'show' => true,
1030 'name' => decalog_esc_html__( 'Bucket', 'decalog' ),
1031 'help' => decalog_esc_html__( 'Bucket name to use (must exist).', 'decalog' ) . $this->get_substitution_note(),
1032 'default' => 'my-bucket',
1033 'control' => [
1034 'type' => 'field_input_text',
1035 'cast' => 'string',
1036 'enabled' => true,
1037 ],
1038 ],
1039 'token' => [
1040 'type' => 'string',
1041 'show' => true,
1042 'name' => decalog_esc_html__( 'Token', 'decalog' ),
1043 'help' => decalog_esc_html__( 'Token value to write in bucket.', 'decalog' ) . $this->get_substitution_note(),
1044 'default' => 'my-token',
1045 'control' => [
1046 'type' => 'field_input_text',
1047 'cast' => 'string',
1048 'enabled' => true,
1049 ],
1050 ],
1051 ],
1052 'init' => [
1053 [
1054 'type' => 'uuid',
1055 ],
1056 [
1057 'type' => 'configuration',
1058 'value' => 'profile',
1059 ],
1060 [
1061 'type' => 'configuration',
1062 'value' => 'sampling',
1063 ],
1064 [
1065 'type' => 'configuration',
1066 'value' => 'url',
1067 ],
1068 [
1069 'type' => 'configuration',
1070 'value' => 'org',
1071 ],
1072 [
1073 'type' => 'configuration',
1074 'value' => 'bucket',
1075 ],
1076 [
1077 'type' => 'configuration',
1078 'value' => 'token',
1079 ],
1080 [
1081 'type' => 'configuration',
1082 'value' => 'filter',
1083 ],
1084 ],
1085 ];
1086 $this->handlers[] = [
1087 'version' => DECALOG_VERSION,
1088 'id' => 'PrometheusMetricsEPHandler',
1089 'namespace' => 'Decalog\\Handler',
1090 'class' => 'metrics',
1091 'minimal' => Logger::EMERGENCY,
1092 'name' => 'Prometheus Endpoint',
1093 'help' => decalog_esc_html__( 'Metrics published on this site as polling endpoint.', 'decalog' ),
1094 'icon' => $this->get_base64_prometheus_icon(),
1095 'needs' => [],
1096 'params' => [],
1097 'processors' => [],
1098 'configuration' => [
1099 'profile' => [
1100 'type' => 'integer',
1101 'show' => true,
1102 'name' => decalog_esc_html__( 'Profile', 'decalog' ),
1103 'help' => sprintf(decalog__( 'The type of metrics to collect (%s). Choosing "Automatic" sets the profile to the current WordPress environment type.', 'decalog' ), sprintf( '<a href="https://github.com/Pierre-Lannoy/wp-decalog/blob/master/MONITORING.md" target="_blank">%s</a>', decalog_esc_html__( 'details', 'decalog' ) ) ),
1104 'default' => 500,
1105 'control' => [
1106 'type' => 'field_select',
1107 'cast' => 'integer',
1108 'enabled' => true,
1109 'list' => [ [ 500, decalog_esc_html__( 'Automatic', 'decalog' ) ], [ 600, decalog_esc_html__( 'Production', 'decalog' ) ], [ 550, decalog_esc_html__( 'Development', 'decalog' ) ] ],
1110 ],
1111 ],
1112 'sampling' => [
1113 'type' => 'integer',
1114 'show' => true,
1115 'name' => decalog_esc_html__( 'Sampling', 'decalog' ),
1116 'help' => decalog_esc_html__( 'Sampling rate to be chosen according to the site traffic.', 'decalog' ),
1117 'default' => 100,
1118 'control' => [
1119 'type' => 'field_select',
1120 'cast' => 'integer',
1121 'enabled' => true,
1122 'list' => [ [ 1000, '100%' ], [ 500, '50%' ], [ 250, '25%' ], [ 100, '10%' ], [ 50, '5%' ], [ 20, '2%' ], [ 10, '1%' ], [ 5, '5‰' ], [ 2, '2‰' ], [ 1, '1‰' ] ],
1123 ],
1124 ],
1125 'filter' => [
1126 'type' => 'string',
1127 'show' => true,
1128 'name' => decalog_esc_html__( 'Metrics filter', 'decalog' ),
1129 'help' => decalog_esc_html__( 'Exclude metrics to be collated by specifying them with regular expressions (one expression per line).', 'decalog' ) . '<br/>' . decalog_esc_html__( 'Example:', 'decalog' ) . ' <code>core_wordpress_content_status_(?:draft|pending|inherit)</code>',
1130 'default' => '',
1131 'control' => [
1132 'type' => 'field_input_textarea',
1133 'cast' => 'string',
1134 'enabled' => true,
1135 'columns' => 50,
1136 'lines' => 5,
1137 ],
1138 ],
1139 ],
1140 'init' => [
1141 [
1142 'type' => 'uuid',
1143 ],
1144 [
1145 'type' => 'configuration',
1146 'value' => 'profile',
1147 ],
1148 [
1149 'type' => 'configuration',
1150 'value' => 'sampling',
1151 ],
1152 [
1153 'type' => 'configuration',
1154 'value' => 'filter',
1155 ],
1156 ],
1157 ];
1158 $this->handlers[] = [
1159 'version' => DECALOG_VERSION,
1160 'id' => 'PrometheusMonitoringHandler',
1161 'namespace' => 'Decalog\\Handler',
1162 'class' => 'metrics',
1163 'minimal' => Logger::EMERGENCY,
1164 'name' => 'Prometheus Pushgateway',
1165 'help' => decalog_esc_html__( 'Metrics sent to a Prometheus Pushgateway instance.', 'decalog' ),
1166 'icon' => $this->get_base64_prometheus_icon(),
1167 'needs' => [],
1168 'params' => [],
1169 'processors' => [],
1170 'configuration' => [
1171 'profile' => [
1172 'type' => 'integer',
1173 'show' => true,
1174 'name' => decalog_esc_html__( 'Profile', 'decalog' ),
1175 'help' => sprintf(decalog__( 'The type of metrics to collect (%s). Choosing "Automatic" sets the profile to the current WordPress environment type.', 'decalog' ), sprintf( '<a href="https://github.com/Pierre-Lannoy/wp-decalog/blob/master/MONITORING.md" target="_blank">%s</a>', decalog_esc_html__( 'details', 'decalog' ) ) ),
1176 'default' => 500,
1177 'control' => [
1178 'type' => 'field_select',
1179 'cast' => 'integer',
1180 'enabled' => true,
1181 'list' => [ [ 500, decalog_esc_html__( 'Automatic', 'decalog' ) ], [ 600, decalog_esc_html__( 'Production', 'decalog' ) ], [ 550, decalog_esc_html__( 'Development', 'decalog' ) ] ],
1182 ],
1183 ],
1184 'sampling' => [
1185 'type' => 'integer',
1186 'show' => true,
1187 'name' => decalog_esc_html__( 'Sampling', 'decalog' ),
1188 'help' => decalog_esc_html__( 'Sampling rate to be chosen according to the site traffic.', 'decalog' ),
1189 'default' => 100,
1190 'control' => [
1191 'type' => 'field_select',
1192 'cast' => 'integer',
1193 'enabled' => true,
1194 'list' => [ [ 1000, '100%' ], [ 500, '50%' ], [ 250, '25%' ], [ 100, '10%' ], [ 50, '5%' ], [ 20, '2%' ], [ 10, '1%' ], [ 5, '5‰' ], [ 2, '2‰' ], [ 1, '1‰' ] ],
1195 ],
1196 ],
1197 'filter' => [
1198 'type' => 'string',
1199 'show' => true,
1200 'name' => decalog_esc_html__( 'Metrics filter', 'decalog' ),
1201 'help' => decalog_esc_html__( 'Exclude metrics to be collated by specifying them with regular expressions (one expression per line).', 'decalog' ) . '<br/>' . decalog_esc_html__( 'Example:', 'decalog' ) . ' <code>core_wordpress_content_status_(?:draft|pending|inherit)</code>',
1202 'default' => '',
1203 'control' => [
1204 'type' => 'field_input_textarea',
1205 'cast' => 'string',
1206 'enabled' => true,
1207 'columns' => 50,
1208 'lines' => 5,
1209 ],
1210 ],
1211 'url' => [
1212 'type' => 'string',
1213 'show' => true,
1214 'name' => decalog_esc_html__( 'Service URL', 'decalog' ),
1215 'help' => sprintf( decalog_esc_html__( 'URL where to send metrics. Format: %s.', 'decalog' ), '<code>' . htmlentities( '<proto>://<host>[:<port>]' ) . '</code>' ) . $this->get_substitution_note(),
1216 'default' => 'http://localhost:9091',
1217 'control' => [
1218 'type' => 'field_input_text',
1219 'cast' => 'string',
1220 'enabled' => true,
1221 ],
1222 ],
1223 'model' => [
1224 'type' => 'integer',
1225 'show' => true,
1226 'name' => decalog_esc_html__( 'Labels', 'decalog' ),
1227 'help' => decalog_esc_html__( 'Template for labels. If you are unsure of the implications on cardinality, choose the first one.', 'decalog' ),
1228 'default' => 0,
1229 'control' => [
1230 'type' => 'field_select',
1231 'cast' => 'string',
1232 'enabled' => true,
1233 'list' => [ [ 0, '{job="x", instance="y"} - ' . decalog_esc_html__( 'Recommended in most cases', 'decalog' ) ], [ 1, '{job="x", instance="y", env="z"} - ' . decalog_esc_html__( 'Classical environment segmentation', 'decalog' ) ], [ 2, '{job="x", instance="y", version="z"} - ' . decalog_esc_html__( 'Classical version segmentation', 'decalog' ) ], [ 3, '{job="x", site="y"} - ' . decalog_esc_html__( 'WordPress Multisite segmentation', 'decalog' ) ] ],
1234 ],
1235 ],
1236 'id' => [
1237 'type' => 'string',
1238 'show' => true,
1239 'name' => decalog_esc_html__( 'Job', 'decalog' ),
1240 'help' => decalog_esc_html__( 'The fixed job name for some templates.', 'decalog' ) . $this->get_substitution_note(),
1241 'default' => 'wp_decalog',
1242 'control' => [
1243 'type' => 'field_input_text',
1244 'cast' => 'string',
1245 'enabled' => true,
1246 ],
1247 ],
1248 ],
1249 'init' => [
1250 [
1251 'type' => 'uuid',
1252 ],
1253 [
1254 'type' => 'configuration',
1255 'value' => 'profile',
1256 ],
1257 [
1258 'type' => 'configuration',
1259 'value' => 'sampling',
1260 ],
1261 [
1262 'type' => 'configuration',
1263 'value' => 'url',
1264 ],
1265 [
1266 'type' => 'configuration',
1267 'value' => 'model',
1268 ],
1269 [
1270 'type' => 'configuration',
1271 'value' => 'id',
1272 ],
1273 [
1274 'type' => 'configuration',
1275 'value' => 'filter',
1276 ],
1277 ],
1278 ];
1279 /*$this->handlers[] = [
1280 'version' => DECALOG_VERSION,
1281 'id' => 'GrafanaMonitoringHandler',
1282 'namespace' => 'Decalog\\Handler',
1283 'class' => 'metrics',
1284 'minimal' => Logger::EMERGENCY,
1285 'name' => 'Grafana Cloud Metrics',
1286 'help' => decalog_esc_html__( 'Metrics sent to Grafana Cloud via Grafana agent.', 'decalog' ),
1287 'icon' => $this->get_base64_grafana_icon(),
1288 'needs' => [],
1289 'params' => [],
1290 'processors' => [],
1291 'configuration' => [
1292 'profile' => [
1293 'type' => 'integer',
1294 'show' => true,
1295 'name' => decalog_esc_html__( 'Profile', 'decalog' ),
1296 'help' => sprintf(decalog__( 'The type of metrics to collect (%s). Choosing "Automatic" sets the profile to the current WordPress environment type.', 'decalog' ), sprintf( '<a href="https://github.com/Pierre-Lannoy/wp-decalog/blob/master/MONITORING.md" target="_blank">%s</a>', decalog_esc_html__( 'details', 'decalog' ) ) ),
1297 'default' => 500,
1298 'control' => [
1299 'type' => 'field_select',
1300 'cast' => 'integer',
1301 'enabled' => true,
1302 'list' => [ [ 500, decalog_esc_html__( 'Automatic', 'decalog' ) ], [ 600, decalog_esc_html__( 'Production', 'decalog' ) ], [ 550, decalog_esc_html__( 'Development', 'decalog' ) ] ],
1303 ],
1304 ],
1305 'sampling' => [
1306 'type' => 'integer',
1307 'show' => true,
1308 'name' => decalog_esc_html__( 'Sampling', 'decalog' ),
1309 'help' => decalog_esc_html__( 'Sampling rate to be chosen according to the site traffic.', 'decalog' ),
1310 'default' => 100,
1311 'control' => [
1312 'type' => 'field_select',
1313 'cast' => 'integer',
1314 'enabled' => true,
1315 'list' => [ [ 1000, '100%' ], [ 500, '50%' ], [ 250, '25%' ], [ 100, '10%' ], [ 50, '5%' ], [ 20, '2%' ], [ 10, '1%' ], [ 5, '5‰' ], [ 2, '2‰' ], [ 1, '1‰' ] ],
1316 ],
1317 ],
1318 'host' => [
1319 'type' => 'string',
1320 'show' => true,
1321 'name' => decalog_esc_html__( 'Prometheus host', 'decalog' ),
1322 'help' => sprintf( decalog_esc_html__( 'The host name portion of the Prometheus instance url. Something like %s.', 'decalog' ), '<code>prometheus-us-central1</code>' ),
1323 'default' => '',
1324 'control' => [
1325 'type' => 'field_input_text',
1326 'cast' => 'string',
1327 'enabled' => true,
1328 ],
1329 ],
1330 'user' => [
1331 'type' => 'string',
1332 'show' => true,
1333 'name' => decalog_esc_html__( 'Username', 'decalog' ),
1334 'help' => sprintf( decalog_esc_html__( 'The user name for Basic Auth authentication. Something like %s.', 'decalog' ), '<code>21087</code>' ),
1335 'default' => '',
1336 'control' => [
1337 'type' => 'field_input_text',
1338 'cast' => 'string',
1339 'enabled' => true,
1340 ],
1341 ],
1342 'key' => [
1343 'type' => 'string',
1344 'show' => true,
1345 'name' => decalog_esc_html__( 'API key', 'decalog' ),
1346 'help' => decalog_esc_html__( 'The Grafana.com API Key.', 'decalog' ),
1347 'default' => '',
1348 'control' => [
1349 'type' => 'field_input_text',
1350 'cast' => 'string',
1351 'enabled' => true,
1352 ],
1353 ],
1354 'model' => [
1355 'type' => 'integer',
1356 'show' => true,
1357 'name' => decalog_esc_html__( 'Labels', 'decalog' ),
1358 'help' => decalog_esc_html__( 'Template for labels. If you are unsure of the implications on cardinality, choose the first one.', 'decalog' ),
1359 'default' => 0,
1360 'control' => [
1361 'type' => 'field_select',
1362 'cast' => 'string',
1363 'enabled' => true,
1364 'list' => [ [ 0, '{job="x", instance="y"} - ' . decalog_esc_html__( 'Recommended in most cases', 'decalog' ) ], [ 1, '{job="x", instance="y", env="z"} - ' . decalog_esc_html__( 'Classical environment segmentation', 'decalog' ) ], [ 2, '{job="x", instance="y", version="z"} - ' . decalog_esc_html__( 'Classical version segmentation', 'decalog' ) ], [ 3, '{job="x", site="y"} - ' . decalog_esc_html__( 'WordPress Multisite segmentation', 'decalog' ) ] ],
1365 ],
1366 ],
1367 'id' => [
1368 'type' => 'string',
1369 'show' => true,
1370 'name' => decalog_esc_html__( 'Job', 'decalog' ),
1371 'help' => decalog_esc_html__( 'The fixed job name for some templates.', 'decalog' ),
1372 'default' => 'wp_decalog',
1373 'control' => [
1374 'type' => 'field_input_text',
1375 'cast' => 'string',
1376 'enabled' => true,
1377 ],
1378 ],
1379 ],
1380 'init' => [
1381 [
1382 'type' => 'uuid',
1383 ],
1384 [
1385 'type' => 'configuration',
1386 'value' => 'host',
1387 ],
1388 [
1389 'type' => 'configuration',
1390 'value' => 'user',
1391 ],
1392 [
1393 'type' => 'configuration',
1394 'value' => 'key',
1395 ],
1396 [
1397 'type' => 'configuration',
1398 'value' => 'profile',
1399 ],
1400 [
1401 'type' => 'configuration',
1402 'value' => 'sampling',
1403 ],
1404 [
1405 'type' => 'configuration',
1406 'value' => 'model',
1407 ],
1408 [
1409 'type' => 'configuration',
1410 'value' => 'id',
1411 ],
1412 ],
1413 ];*/
1414
1415 // LOGGING
1416 $this->handlers[] = [
1417 'version' => DECALOG_VERSION,
1418 'id' => 'NewRelicHandler',
1419 'namespace' => 'Decalog\\Handler',
1420 'class' => 'logging',
1421 'minimal' => Logger::INFO,
1422 'name' => 'New Relic Logs',
1423 'help' => decalog_esc_html__( 'Events sent to New Relic (NR-Logs).', 'decalog' ),
1424 'icon' => $this->get_base64_newrelic_icon(),
1425 'needs' => [],
1426 'params' => [ 'processors', 'privacy' ],
1427 'processors' => [
1428 'excluded' => [ 'BacktraceProcessor' ],
1429 ],
1430 'configuration' => [
1431 'host' => [
1432 'type' => 'string',
1433 'show' => true,
1434 'name' => decalog_esc_html__( 'Location', 'decalog' ),
1435 'help' => decalog_esc_html__( 'The New Relic endpoint location.', 'decalog' ),
1436 'default' => 'https://log-api.newrelic.com/log/v1',
1437 'control' => [
1438 'type' => 'field_select',
1439 'cast' => 'string',
1440 'enabled' => true,
1441 'list' => [ [ 'https://log-api.eu.newrelic.com/log/v1', decalog_esc_html__( 'Europe', 'decalog' ) ], [ 'https://log-api.newrelic.com/log/v1', decalog_esc_html__( 'United States', 'decalog' ) ] ],
1442 ],
1443 ],
1444 'token' => [
1445 'type' => 'string',
1446 'show' => true,
1447 'name' => decalog_esc_html__( 'License key', 'decalog' ),
1448 'help' => decalog_esc_html__( 'The account\'s license key.', 'decalog' ) . $this->get_substitution_note(),
1449 'default' => '',
1450 'control' => [
1451 'type' => 'field_input_text',
1452 'cast' => 'string',
1453 'enabled' => true,
1454 ],
1455 ],
1456 'buffer' => [
1457 'type' => 'boolean',
1458 'show' => true,
1459 'name' => decalog_esc_html__( 'Deferred forwarding', 'decalog' ),
1460 'help' => decalog_esc_html__( 'Wait for the full page is rendered before sending reports (recommended).', 'decalog' ),
1461 'default' => true,
1462 'control' => [
1463 'type' => 'field_checkbox',
1464 'cast' => 'boolean',
1465 'enabled' => true,
1466 ],
1467 ],
1468 ],
1469 'init' => [
1470 [
1471 'type' => 'configuration',
1472 'value' => 'host',
1473 ],
1474 [
1475 'type' => 'configuration',
1476 'value' => 'token',
1477 ],
1478 [
1479 'type' => 'literal',
1480 'value' => true,
1481 ],
1482 [ 'type' => 'level' ],
1483 ],
1484 ];
1485 $this->handlers[] = [
1486 'version' => DECALOG_VERSION,
1487 'id' => 'DatadogHandler',
1488 'namespace' => 'Decalog\\Handler',
1489 'class' => 'logging',
1490 'minimal' => Logger::INFO,
1491 'name' => 'Datadog Events',
1492 'help' => decalog_esc_html__( 'Events sent to Datadog.', 'decalog' ),
1493 'icon' => $this->get_base64_datadog_icon(),
1494 'needs' => [],
1495 'params' => [ 'processors', 'privacy' ],
1496 'configuration' => [
1497 'host' => [
1498 'type' => 'string',
1499 'show' => true,
1500 'name' => decalog_esc_html__( 'Location', 'decalog' ),
1501 'help' => decalog_esc_html__( 'The Datadog cloud location.', 'decalog' ),
1502 'default' => 'https://http-intake.logs.datadoghq.com/v1/input',
1503 'control' => [
1504 'type' => 'field_select',
1505 'cast' => 'string',
1506 'enabled' => true,
1507 'list' => [ [ 'https://http-intake.logs.datadoghq.eu/v1/input', decalog_esc_html__( 'Europe', 'decalog' ) ], [ 'https://http-intake.logs.datadoghq.com/v1/input', decalog_esc_html__( 'United States', 'decalog' ) ] ],
1508 ],
1509 ],
1510 'token' => [
1511 'type' => 'string',
1512 'show' => true,
1513 'name' => decalog_esc_html__( 'API key', 'decalog' ),
1514 'help' => decalog_esc_html__( 'The API key of the service.', 'decalog' ) . $this->get_substitution_note(),
1515 'default' => '',
1516 'control' => [
1517 'type' => 'field_input_text',
1518 'cast' => 'string',
1519 'enabled' => true,
1520 ],
1521 ],
1522 'extended' => [
1523 'type' => 'string',
1524 'show' => true,
1525 'name' => decalog_esc_html__( 'Extended fields', 'decalog' ),
1526 'help' => decalog_esc_html__( 'Fields to add to each logged event (one pair of key=value per line).', 'decalog' ) . '<br/>' . decalog_esc_html__( 'Example:', 'decalog' ) . ' <code>hostname={HOSTNAME}</code> ' . decalog_esc_html__( 'or', 'decalog' ) . ' <code>foo=bar</code> ' . decalog_esc_html__( 'or', 'decalog' ) . ' <code>foobar=42</code>.' . $this->get_substitution_note(),
1527 'default' => '',
1528 'control' => [
1529 'type' => 'field_input_textarea',
1530 'cast' => 'string',
1531 'enabled' => true,
1532 'columns' => 50,
1533 'lines' => 5,
1534 ],
1535 ],
1536 'buffer' => [
1537 'type' => 'boolean',
1538 'show' => true,
1539 'name' => decalog_esc_html__( 'Deferred forwarding', 'decalog' ),
1540 'help' => decalog_esc_html__( 'Wait for the full page is rendered before sending reports (recommended).', 'decalog' ),
1541 'default' => true,
1542 'control' => [
1543 'type' => 'field_checkbox',
1544 'cast' => 'boolean',
1545 'enabled' => true,
1546 ],
1547 ],
1548 ],
1549 'init' => [
1550 [
1551 'type' => 'configuration',
1552 'value' => 'host',
1553 ],
1554 [
1555 'type' => 'configuration',
1556 'value' => 'token',
1557 ],
1558 [
1559 'type' => 'configuration',
1560 'value' => 'extended',
1561 ],
1562 [
1563 'type' => 'literal',
1564 'value' => true,
1565 ],
1566 [ 'type' => 'level' ],
1567 ],
1568 ];
1569 $this->handlers[] = [
1570 'version' => DECALOG_VERSION,
1571 'id' => 'ElasticCloudHandler',
1572 'namespace' => 'Decalog\\Handler',
1573 'class' => 'logging',
1574 'minimal' => Logger::DEBUG,
1575 'name' => 'Elastic Cloud - Events',
1576 'help' => decalog_esc_html__( 'Events sent to Elastic Cloud.', 'decalog' ),
1577 'icon' => $this->get_base64_elasticcloud_icon(),
1578 'needs' => [],
1579 'params' => [ 'processors', 'privacy' ],
1580 'configuration' => [
1581 'cloudid' => [
1582 'type' => 'string',
1583 'show' => true,
1584 'name' => decalog_esc_html__( 'Cloud ID', 'decalog' ),
1585 'help' => decalog_esc_html__( 'The generated cloud ID.', 'decalog' ) . $this->get_substitution_note(),
1586 'default' => '',
1587 'control' => [
1588 'type' => 'field_input_text',
1589 'cast' => 'string',
1590 'enabled' => true,
1591 ],
1592 ],
1593 'user' => [
1594 'type' => 'string',
1595 'show' => true,
1596 'name' => decalog_esc_html__( 'Username', 'decalog' ),
1597 'help' => decalog_esc_html__( 'The username of the instance.', 'decalog' ) . $this->get_substitution_note(),
1598 'default' => '',
1599 'control' => [
1600 'type' => 'field_input_text',
1601 'cast' => 'string',
1602 'enabled' => true,
1603 ],
1604 ],
1605 'pass' => [
1606 'type' => 'string',
1607 'show' => true,
1608 'name' => decalog_esc_html__( 'Password', 'decalog' ),
1609 'help' => decalog_esc_html__( 'The password of the instance.', 'decalog' ) . $this->get_substitution_note(),
1610 'default' => '',
1611 'control' => [
1612 'type' => 'field_input_text',
1613 'cast' => 'string',
1614 'enabled' => true,
1615 ],
1616 ],
1617 'index' => [
1618 'type' => 'string',
1619 'show' => true,
1620 'name' => decalog_esc_html__( 'Index', 'decalog' ),
1621 'help' => decalog_esc_html__( 'The index name.', 'decalog' ) . $this->get_substitution_note(),
1622 'default' => 'decalog',
1623 'control' => [
1624 'type' => 'field_input_text',
1625 'cast' => 'string',
1626 'enabled' => true,
1627 ],
1628 ],
1629 'extended' => [
1630 'type' => 'string',
1631 'show' => true,
1632 'name' => decalog_esc_html__( 'Extended fields', 'decalog' ),
1633 'help' => decalog_esc_html__( 'Fields to add to each logged event (one pair of key=value per line).', 'decalog' ) . '<br/>' . decalog_esc_html__( 'Example:', 'decalog' ) . ' <code>hostname={HOSTNAME}</code> ' . decalog_esc_html__( 'or', 'decalog' ) . ' <code>foo=bar</code> ' . decalog_esc_html__( 'or', 'decalog' ) . ' <code>foobar=42</code>.' . $this->get_substitution_note(),
1634 'default' => '',
1635 'control' => [
1636 'type' => 'field_input_textarea',
1637 'cast' => 'string',
1638 'enabled' => true,
1639 'columns' => 50,
1640 'lines' => 5,
1641 ],
1642 ],
1643 ],
1644 'init' => [
1645 [
1646 'type' => 'configuration',
1647 'value' => 'cloudid',
1648 ],
1649 [
1650 'type' => 'configuration',
1651 'value' => 'user',
1652 ],
1653 [
1654 'type' => 'configuration',
1655 'value' => 'pass',
1656 ],
1657 [
1658 'type' => 'configuration',
1659 'value' => 'index',
1660 ],
1661 [
1662 'type' => 'configuration',
1663 'value' => 'extended',
1664 ],
1665 [ 'type' => 'level' ],
1666 [
1667 'type' => 'literal',
1668 'value' => true,
1669 ],
1670 ],
1671 ];
1672 $this->handlers[] = [
1673 'version' => DECALOG_VERSION,
1674 'id' => 'ElasticHandler',
1675 'namespace' => 'Decalog\\Handler',
1676 'class' => 'logging',
1677 'minimal' => Logger::DEBUG,
1678 'name' => 'Elasticsearch - Events',
1679 'help' => decalog_esc_html__( 'Events sent to Elasticsearch.', 'decalog' ),
1680 'icon' => $this->get_base64_elasticsearch_icon(),
1681 'needs' => [],
1682 'params' => [ 'processors', 'privacy' ],
1683 'configuration' => [
1684 'url' => [
1685 'type' => 'string',
1686 'show' => true,
1687 'name' => decalog_esc_html__( 'Service URL', 'decalog' ),
1688 'help' => sprintf( decalog_esc_html__( 'URL where to send logs. Format: %s.', 'decalog' ), '<code>' . htmlentities( '<proto>://<host>:<port>' ) . '</code>' ) . $this->get_substitution_note(),
1689 'default' => 'http://localhost:9200',
1690 'control' => [
1691 'type' => 'field_input_text',
1692 'cast' => 'string',
1693 'enabled' => true,
1694 ],
1695 ],
1696 'user' => [
1697 'type' => 'string',
1698 'show' => true,
1699 'name' => decalog_esc_html__( 'Username', 'decalog' ),
1700 'help' => decalog_esc_html__( 'The username of the instance.', 'decalog' ) . $this->get_substitution_note(),
1701 'default' => '',
1702 'control' => [
1703 'type' => 'field_input_text',
1704 'cast' => 'string',
1705 'enabled' => true,
1706 ],
1707 ],
1708 'pass' => [
1709 'type' => 'string',
1710 'show' => true,
1711 'name' => decalog_esc_html__( 'Password', 'decalog' ),
1712 'help' => decalog_esc_html__( 'The password of the instance.', 'decalog' ) . $this->get_substitution_note(),
1713 'default' => '',
1714 'control' => [
1715 'type' => 'field_input_text',
1716 'cast' => 'string',
1717 'enabled' => true,
1718 ],
1719 ],
1720 'index' => [
1721 'type' => 'string',
1722 'show' => true,
1723 'name' => decalog_esc_html__( 'Index', 'decalog' ),
1724 'help' => decalog_esc_html__( 'The index name.', 'decalog' ) . $this->get_substitution_note(),
1725 'default' => 'decalog',
1726 'control' => [
1727 'type' => 'field_input_text',
1728 'cast' => 'string',
1729 'enabled' => true,
1730 ],
1731 ],
1732 'extended' => [
1733 'type' => 'string',
1734 'show' => true,
1735 'name' => decalog_esc_html__( 'Extended fields', 'decalog' ),
1736 'help' => decalog_esc_html__( 'Fields to add to each logged event (one pair of key=value per line).', 'decalog' ) . '<br/>' . decalog_esc_html__( 'Example:', 'decalog' ) . ' <code>hostname={HOSTNAME}</code> ' . decalog_esc_html__( 'or', 'decalog' ) . ' <code>foo=bar</code> ' . decalog_esc_html__( 'or', 'decalog' ) . ' <code>foobar=42</code>.' . $this->get_substitution_note(),
1737 'default' => '',
1738 'control' => [
1739 'type' => 'field_input_textarea',
1740 'cast' => 'string',
1741 'enabled' => true,
1742 'columns' => 50,
1743 'lines' => 5,
1744 ],
1745 ],
1746 ],
1747 'init' => [
1748 [
1749 'type' => 'configuration',
1750 'value' => 'url',
1751 ],
1752 [
1753 'type' => 'configuration',
1754 'value' => 'user',
1755 ],
1756 [
1757 'type' => 'configuration',
1758 'value' => 'pass',
1759 ],
1760 [
1761 'type' => 'configuration',
1762 'value' => 'index',
1763 ],
1764 [
1765 'type' => 'configuration',
1766 'value' => 'extended',
1767 ],
1768 [ 'type' => 'level' ],
1769 [
1770 'type' => 'literal',
1771 'value' => true,
1772 ],
1773 ],
1774 ];
1775 $this->handlers[] = [
1776 'version' => DECALOG_VERSION,
1777 'id' => 'FluentHandler',
1778 'namespace' => 'Decalog\\Handler',
1779 'class' => 'logging',
1780 'minimal' => Logger::DEBUG,
1781 'name' => 'Fluentd',
1782 'help' => decalog_esc_html__( 'Events sent to a Fluentd collector.', 'decalog' ),
1783 'icon' => $this->get_base64_fluentd_icon(),
1784 'needs' => [],
1785 'params' => [ 'processors', 'privacy' ],
1786 'configuration' => [
1787 'host' => [
1788 'type' => 'string',
1789 'show' => true,
1790 'name' => decalog_esc_html__( 'Connection string', 'decalog' ),
1791 'help' => decalog_esc_html__( 'Connection string to Fluentd. Can be something like "tcp://127.0.0.1:24224" or something like "unix:///var/run/td-agent/td-agent.sock".', 'decalog' ) . $this->get_substitution_note(),
1792 'default' => 'tcp://localhost:24224',
1793 'control' => [
1794 'type' => 'field_input_text',
1795 'cast' => 'string',
1796 'enabled' => true,
1797 ],
1798 ],
1799 'timeout' => [
1800 'type' => 'integer',
1801 'show' => true,
1802 'name' => decalog_esc_html__( 'Socket timeout', 'decalog' ),
1803 'help' => decalog_esc_html__( 'Max number of milliseconds to wait for the socket.', 'decalog' ),
1804 'default' => 800,
1805 'control' => [
1806 'type' => 'field_input_integer',
1807 'cast' => 'integer',
1808 'min' => 100,
1809 'max' => 10000,
1810 'step' => 100,
1811 'enabled' => true,
1812 ],
1813 ],
1814 ],
1815 'init' => [
1816 [
1817 'type' => 'configuration',
1818 'value' => 'host',
1819 ],
1820 [
1821 'type' => 'configuration',
1822 'value' => 'timeout',
1823 ],
1824 [ 'type' => 'level' ],
1825 [
1826 'type' => 'literal',
1827 'value' => true,
1828 ],
1829 ],
1830 ];
1831 $this->handlers[] = [
1832 'version' => DECALOG_VERSION,
1833 'id' => 'GrafanaHandler',
1834 'namespace' => 'Decalog\\Handler',
1835 'class' => 'logging',
1836 'minimal' => Logger::INFO,
1837 'name' => 'Grafana Cloud Events',
1838 'help' => decalog_esc_html__( 'Events sent to Grafana Cloud (Loki).', 'decalog' ),
1839 'icon' => $this->get_base64_grafana_icon(),
1840 'needs' => [],
1841 'params' => [ 'processors', 'privacy' ],
1842 'configuration' => [
1843 'host' => [
1844 'type' => 'string',
1845 'show' => true,
1846 'name' => decalog_esc_html__( 'Loki host', 'decalog' ),
1847 'help' => sprintf( decalog_esc_html__( 'The host name portion of the Loki instance url. Something like %s.', 'decalog' ), '<code>logs-prod-us-central1</code>' ) . $this->get_substitution_note(),
1848 'default' => '',
1849 'control' => [
1850 'type' => 'field_input_text',
1851 'cast' => 'string',
1852 'enabled' => true,
1853 ],
1854 ],
1855 'user' => [
1856 'type' => 'string',
1857 'show' => true,
1858 'name' => decalog_esc_html__( 'Username', 'decalog' ),
1859 'help' => sprintf( decalog_esc_html__( 'The user name for Basic Auth authentication. Something like %s.', 'decalog' ), '<code>21087</code>' ) . $this->get_substitution_note(),
1860 'default' => '',
1861 'control' => [
1862 'type' => 'field_input_text',
1863 'cast' => 'string',
1864 'enabled' => true,
1865 ],
1866 ],
1867 'key' => [
1868 'type' => 'string',
1869 'show' => true,
1870 'name' => decalog_esc_html__( 'API key', 'decalog' ),
1871 'help' => decalog_esc_html__( 'The Grafana.com API Key.', 'decalog' ) . $this->get_substitution_note(),
1872 'default' => '',
1873 'control' => [
1874 'type' => 'field_input_text',
1875 'cast' => 'string',
1876 'enabled' => true,
1877 ],
1878 ],
1879 'model' => [
1880 'type' => 'integer',
1881 'show' => true,
1882 'name' => decalog_esc_html__( 'Labels', 'decalog' ),
1883 'help' => decalog_esc_html__( 'Template for labels. If you are unsure of the implications on cardinality, choose the first one.', 'decalog' ),
1884 'default' => 0,
1885 'control' => [
1886 'type' => 'field_select',
1887 'cast' => 'string',
1888 'enabled' => true,
1889 'list' => [ [ 0, '{job="x", instance="y"} - ' . decalog_esc_html__( 'Recommended in most cases', 'decalog' ) ], [ 1, '{job="x", instance="y", level="z"} - ' . decalog_esc_html__( 'Classical level segmentation', 'decalog' ) ], [ 2, '{job="x", instance="y", env="z"} - ' . decalog_esc_html__( 'Classical environment segmentation', 'decalog' ) ], [ 3, '{job="x", instance="y", version="z"} - ' . decalog_esc_html__( 'Classical version segmentation', 'decalog' ) ], [ 4, '{job="x", level="y", env="z"} - ' . decalog_esc_html__( 'Double level / environment segmentation', 'decalog' ) ], [ 5, '{job="x", site="y"} - ' . decalog_esc_html__( 'WordPress Multisite segmentation', 'decalog' ) ] ],
1890 ],
1891 ],
1892 'id' => [
1893 'type' => 'string',
1894 'show' => true,
1895 'name' => decalog_esc_html__( 'Job', 'decalog' ),
1896 'help' => decalog_esc_html__( 'The fixed job name for some templates.', 'decalog' ) . $this->get_substitution_note(),
1897 'default' => 'wp_decalog',
1898 'control' => [
1899 'type' => 'field_input_text',
1900 'cast' => 'string',
1901 'enabled' => true,
1902 ],
1903 ],
1904 'extended' => [
1905 'type' => 'string',
1906 'show' => true,
1907 'name' => decalog_esc_html__( 'Extended fields', 'decalog' ),
1908 'help' => decalog_esc_html__( 'Fields to add to each logged event (one pair of key=value per line).', 'decalog' ) . '<br/>' . decalog_esc_html__( 'Example:', 'decalog' ) . ' <code>hostname={HOSTNAME}</code> ' . decalog_esc_html__( 'or', 'decalog' ) . ' <code>foo=bar</code> ' . decalog_esc_html__( 'or', 'decalog' ) . ' <code>foobar=42</code>.' . $this->get_substitution_note(),
1909 'default' => '',
1910 'control' => [
1911 'type' => 'field_input_textarea',
1912 'cast' => 'string',
1913 'enabled' => true,
1914 'columns' => 50,
1915 'lines' => 5,
1916 ],
1917 ],
1918 ],
1919 'init' => [
1920 [
1921 'type' => 'configuration',
1922 'value' => 'host',
1923 ],
1924 [
1925 'type' => 'configuration',
1926 'value' => 'user',
1927 ],
1928 [
1929 'type' => 'configuration',
1930 'value' => 'key',
1931 ],
1932 [
1933 'type' => 'configuration',
1934 'value' => 'model',
1935 ],
1936 [
1937 'type' => 'configuration',
1938 'value' => 'id',
1939 ],
1940 [
1941 'type' => 'configuration',
1942 'value' => 'extended',
1943 ],
1944 [ 'type' => 'level' ],
1945 ],
1946 ];
1947 $this->handlers[] = [
1948 'version' => DECALOG_VERSION,
1949 'id' => 'LogentriesHandler',
1950 'namespace' => 'Decalog\\Handler',
1951 'class' => 'logging',
1952 'minimal' => Logger::DEBUG,
1953 'name' => 'Logentries & insightOps',
1954 'help' => decalog_esc_html__( 'Events sent to Logentries & insightOps service.', 'decalog' ),
1955 'icon' => $this->get_base64_logentries_icon(),
1956 'needs' => [],
1957 'params' => [ 'processors', 'privacy' ],
1958 'configuration' => [
1959 'host' => [
1960 'type' => 'string',
1961 'show' => true,
1962 'name' => decalog_esc_html__( 'Log endpoint region', 'decalog' ),
1963 'help' => decalog_esc_html__( 'The region of remote host receiving messages.', 'decalog' ),
1964 'default' => 'eu',
1965 'control' => [
1966 'type' => 'field_select',
1967 'cast' => 'string',
1968 'enabled' => true,
1969 'list' => [ [ 'eu', decalog_esc_html__( 'Europe', 'decalog' ) ], [ 'us', decalog_esc_html__( 'USA', 'decalog' ) ] ],
1970 ],
1971 ],
1972 'token' => [
1973 'type' => 'string',
1974 'show' => true,
1975 'name' => decalog_esc_html__( 'Log token', 'decalog' ),
1976 'help' => decalog_esc_html__( 'The token of the Logentries/insightOps log.', 'decalog' ) . $this->get_substitution_note(),
1977 'default' => '',
1978 'control' => [
1979 'type' => 'field_input_text',
1980 'cast' => 'string',
1981 'enabled' => true,
1982 ],
1983 ],
1984 'timeout' => [
1985 'type' => 'integer',
1986 'show' => true,
1987 'name' => decalog_esc_html__( 'Socket timeout', 'decalog' ),
1988 'help' => decalog_esc_html__( 'Max number of milliseconds to wait for the socket.', 'decalog' ),
1989 'default' => 800,
1990 'control' => [
1991 'type' => 'field_input_integer',
1992 'cast' => 'integer',
1993 'min' => 100,
1994 'max' => 10000,
1995 'step' => 100,
1996 'enabled' => true,
1997 ],
1998 ],
1999 ],
2000 'init' => [
2001 [
2002 'type' => 'configuration',
2003 'value' => 'host',
2004 ],
2005 [
2006 'type' => 'configuration',
2007 'value' => 'token',
2008 ],
2009 [
2010 'type' => 'configuration',
2011 'value' => 'timeout',
2012 ],
2013 [ 'type' => 'level' ],
2014 ],
2015 ];
2016 $this->handlers[] = [
2017 'version' => DECALOG_MONOLOG_VERSION,
2018 'id' => 'LogglyHandler',
2019 'namespace' => 'DLMonolog\\Handler',
2020 'class' => 'logging',
2021 'minimal' => Logger::WARNING,
2022 'name' => 'Loggly',
2023 'help' => decalog_esc_html__( 'Events sent to Solawinds Loggly service.', 'decalog' ),
2024 'icon' => $this->get_base64_loggly_icon(),
2025 'needs' => [],
2026 'params' => [ 'processors', 'privacy' ],
2027 'configuration' => [
2028 'token' => [
2029 'type' => 'string',
2030 'show' => true,
2031 'name' => decalog_esc_html__( 'Application token', 'decalog' ),
2032 'help' => decalog_esc_html__( 'The token of the Solawinds Loggly application.', 'decalog' ) . $this->get_substitution_note(),
2033 'default' => '',
2034 'control' => [
2035 'type' => 'field_input_text',
2036 'cast' => 'string',
2037 'enabled' => true,
2038 ],
2039 ],
2040 ],
2041 'init' => [
2042 [
2043 'type' => 'configuration',
2044 'value' => 'token',
2045 ],
2046 [ 'type' => 'level' ],
2047 ],
2048 ];
2049 $this->handlers[] = [
2050 'version' => DECALOG_VERSION,
2051 'id' => 'LokiHandler',
2052 'namespace' => 'Decalog\\Handler',
2053 'class' => 'logging',
2054 'minimal' => Logger::INFO,
2055 'name' => 'Loki',
2056 'help' => decalog_esc_html__( 'Events sent to a Loki instance.', 'decalog' ),
2057 'icon' => $this->get_base64_loki_icon(),
2058 'needs' => [],
2059 'params' => [ 'processors', 'privacy' ],
2060 'configuration' => [
2061 'url' => [
2062 'type' => 'string',
2063 'show' => true,
2064 'name' => decalog_esc_html__( 'Service URL', 'decalog' ),
2065 'help' => sprintf( decalog_esc_html__( 'URL where to send logs. Format: %s.', 'decalog' ), '<code>' . htmlentities( '<proto>://<host>:<port>' ) . '</code>' ) . $this->get_substitution_note(),
2066 'default' => 'http://localhost:3100',
2067 'control' => [
2068 'type' => 'field_input_text',
2069 'cast' => 'string',
2070 'enabled' => true,
2071 ],
2072 ],
2073 'model' => [
2074 'type' => 'integer',
2075 'show' => true,
2076 'name' => decalog_esc_html__( 'Labels', 'decalog' ),
2077 'help' => decalog_esc_html__( 'Template for labels. If you are unsure of the implications on cardinality, choose the first one.', 'decalog' ),
2078 'default' => 0,
2079 'control' => [
2080 'type' => 'field_select',
2081 'cast' => 'string',
2082 'enabled' => true,
2083 'list' => [ [ 0, '{job="x", instance="y"} - ' . decalog_esc_html__( 'Recommended in most cases', 'decalog' ) ], [ 1, '{job="x", instance="y", level="z"} - ' . decalog_esc_html__( 'Classical level segmentation', 'decalog' ) ], [ 2, '{job="x", instance="y", env="z"} - ' . decalog_esc_html__( 'Classical environment segmentation', 'decalog' ) ], [ 3, '{job="x", instance="y", version="z"} - ' . decalog_esc_html__( 'Classical version segmentation', 'decalog' ) ], [ 4, '{job="x", level="y", env="z"} - ' . decalog_esc_html__( 'Double level / environment segmentation', 'decalog' ) ], [ 5, '{job="x", site="y"} - ' . decalog_esc_html__( 'WordPress Multisite segmentation', 'decalog' ) ] ],
2084 ],
2085 ],
2086 'id' => [
2087 'type' => 'string',
2088 'show' => true,
2089 'name' => decalog_esc_html__( 'Job', 'decalog' ),
2090 'help' => decalog_esc_html__( 'The fixed job name for some templates.', 'decalog' ) . $this->get_substitution_note(),
2091 'default' => 'wp_decalog',
2092 'control' => [
2093 'type' => 'field_input_text',
2094 'cast' => 'string',
2095 'enabled' => true,
2096 ],
2097 ],
2098 'extended' => [
2099 'type' => 'string',
2100 'show' => true,
2101 'name' => decalog_esc_html__( 'Extended fields', 'decalog' ),
2102 'help' => decalog_esc_html__( 'Fields to add to each logged event (one pair of key=value per line).', 'decalog' ) . '<br/>' . decalog_esc_html__( 'Example:', 'decalog' ) . ' <code>hostname={HOSTNAME}</code> ' . decalog_esc_html__( 'or', 'decalog' ) . ' <code>foo=bar</code> ' . decalog_esc_html__( 'or', 'decalog' ) . ' <code>foobar=42</code>.' . $this->get_substitution_note(),
2103 'default' => '',
2104 'control' => [
2105 'type' => 'field_input_textarea',
2106 'cast' => 'string',
2107 'enabled' => true,
2108 'columns' => 50,
2109 'lines' => 5,
2110 ],
2111 ],
2112 ],
2113 'init' => [
2114 [
2115 'type' => 'configuration',
2116 'value' => 'url',
2117 ],
2118 [
2119 'type' => 'configuration',
2120 'value' => 'model',
2121 ],
2122 [
2123 'type' => 'configuration',
2124 'value' => 'id',
2125 ],
2126 [
2127 'type' => 'configuration',
2128 'value' => 'extended',
2129 ],
2130 [ 'type' => 'level' ],
2131 ],
2132 ];
2133 $this->handlers[] = [
2134 'version' => DECALOG_MONOLOG_VERSION,
2135 'id' => 'ErrorLogHandler',
2136 'namespace' => 'DLMonolog\\Handler',
2137 'class' => 'logging',
2138 'minimal' => Logger::DEBUG,
2139 'name' => decalog_esc_html__( 'PHP error log', 'decalog' ),
2140 'help' => decalog_esc_html__( 'Events stored in the standard PHP error log, as with the error_log() function, but more detailed.', 'decalog' ),
2141 'icon' => $this->get_base64_php_icon(),
2142 'needs' => [],
2143 'params' => [ 'processors', 'privacy' ],
2144 'configuration' => [],
2145 'init' => [
2146 [
2147 'type' => 'literal',
2148 'value' => 0,
2149 ],
2150 [ 'type' => 'level' ],
2151 [
2152 'type' => 'literal',
2153 'value' => true,
2154 ],
2155 ],
2156 ];
2157 $this->handlers[] = [
2158 'version' => DECALOG_MONOLOG_VERSION,
2159 'id' => 'RotatingFileHandler',
2160 'namespace' => 'DLMonolog\Handler',
2161 'class' => 'logging',
2162 'minimal' => Logger::DEBUG,
2163 'name' => decalog_esc_html__( 'Rotating files', 'decalog' ),
2164 'help' => decalog_esc_html__( 'Events sent to files that are rotated every day and a limited number of files are kept.', 'decalog' ),
2165 'icon' => $this->get_base64_rotatingfiles_icon(),
2166 'needs' => [],
2167 'params' => [ 'processors', 'privacy' ],
2168 'configuration' => [
2169 'filename' => [
2170 'type' => 'string',
2171 'show' => true,
2172 'name' => decalog_esc_html__( 'File', 'decalog' ),
2173 'help' => decalog_esc_html__( 'The full absolute path and filename, like "/path/to/file".', 'decalog' ) . $this->get_substitution_note(),
2174 'default' => '',
2175 'control' => [
2176 'type' => 'field_input_text',
2177 'cast' => 'string',
2178 'enabled' => true,
2179 ],
2180 ],
2181 'maxfiles' => [
2182 'type' => 'integer',
2183 'show' => true,
2184 'name' => decalog_esc_html__( 'Maximum', 'decalog' ),
2185 'help' => decalog_esc_html__( 'The maximal number of files to keep (0 means unlimited).', 'decalog' ),
2186 'default' => 60,
2187 'control' => [
2188 'type' => 'field_input_integer',
2189 'cast' => 'integer',
2190 'min' => 0,
2191 'max' => 730,
2192 'step' => 1,
2193 'enabled' => true,
2194 ],
2195 ],
2196 ],
2197 'init' => [
2198 [
2199 'type' => 'configuration',
2200 'value' => 'filename',
2201 ],
2202 [
2203 'type' => 'configuration',
2204 'value' => 'maxfiles',
2205 ],
2206 [ 'type' => 'level' ],
2207 [
2208 'type' => 'literal',
2209 'value' => true,
2210 ],
2211 [
2212 'type' => 'literal',
2213 'value' => 0666,
2214 ],
2215 ],
2216 ];
2217 $this->handlers[] = [
2218 'version' => DECALOG_VERSION,
2219 'id' => 'SematextHandler',
2220 'namespace' => 'Decalog\\Handler',
2221 'class' => 'logging',
2222 'minimal' => Logger::DEBUG,
2223 'name' => 'Sematext',
2224 'help' => decalog_esc_html__( 'Events sent to Sematext using Elasticsearch APIs.', 'decalog' ),
2225 'icon' => $this->get_base64_sematext_icon(),
2226 'needs' => [],
2227 'params' => [ 'processors', 'privacy' ],
2228 'configuration' => [
2229 'host' => [
2230 'type' => 'string',
2231 'show' => true,
2232 'name' => decalog_esc_html__( 'Location', 'decalog' ),
2233 'help' => decalog_esc_html__( 'The Sematext cloud location.', 'decalog' ),
2234 'default' => 'logsene-receiver.sematext.com',
2235 'control' => [
2236 'type' => 'field_select',
2237 'cast' => 'string',
2238 'enabled' => true,
2239 'list' => [ [ 'logsene-receiver.sematext.com', decalog_esc_html__( 'North America', 'decalog' ) ], [ 'logsene-receiver.eu.sematext.com', decalog_esc_html__( 'Europe', 'decalog' ) ] ],
2240 ],
2241 ],
2242 'token' => [
2243 'type' => 'string',
2244 'show' => true,
2245 'name' => decalog_esc_html__( 'Application Token', 'decalog' ),
2246 'help' => decalog_esc_html__( 'The "Logs App Token" set in Sematext.', 'decalog' ) . $this->get_substitution_note(),
2247 'default' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
2248 'control' => [
2249 'type' => 'field_input_text',
2250 'cast' => 'string',
2251 'enabled' => true,
2252 ],
2253 ],
2254 'extended' => [
2255 'type' => 'string',
2256 'show' => true,
2257 'name' => decalog_esc_html__( 'Extended fields', 'decalog' ),
2258 'help' => decalog_esc_html__( 'Fields to add to each logged event (one pair of key=value per line).', 'decalog' ) . '<br/>' . decalog_esc_html__( 'Example:', 'decalog' ) . ' <code>hostname={HOSTNAME}</code> ' . decalog_esc_html__( 'or', 'decalog' ) . ' <code>foo=bar</code> ' . decalog_esc_html__( 'or', 'decalog' ) . ' <code>foobar=42</code>.' . $this->get_substitution_note(),
2259 'default' => '',
2260 'control' => [
2261 'type' => 'field_input_textarea',
2262 'cast' => 'string',
2263 'enabled' => true,
2264 'columns' => 50,
2265 'lines' => 5,
2266 ],
2267 ],
2268 ],
2269 'init' => [
2270 [
2271 'type' => 'configuration',
2272 'value' => 'host',
2273 ],
2274 [
2275 'type' => 'configuration',
2276 'value' => 'token',
2277 ],
2278 [
2279 'type' => 'configuration',
2280 'value' => 'extendee',
2281 ],
2282 [ 'type' => 'level' ],
2283 [
2284 'type' => 'literal',
2285 'value' => true,
2286 ],
2287 ],
2288 ];
2289 $this->handlers[] = [
2290 'version' => DECALOG_VERSION,
2291 'id' => 'StackdriverHandler',
2292 'namespace' => 'Decalog\\Handler',
2293 'class' => 'logging',
2294 'minimal' => Logger::DEBUG,
2295 'name' => 'Google Cloud Logging',
2296 'help' => decalog_esc_html__( 'Events sent to Google Cloud Logging via a Google-Fluentd collector.', 'decalog' ),
2297 'icon' => $this->get_base64_stackdriver_icon(),
2298 'needs' => [],
2299 'params' => [ 'processors', 'privacy' ],
2300 'configuration' => [
2301 'host' => [
2302 'type' => 'string',
2303 'show' => true,
2304 'name' => decalog_esc_html__( 'Connection string', 'decalog' ),
2305 'help' => decalog_esc_html__( 'Connection string to Fluentd. Can be something like "tcp://127.0.0.1:24224" or something like "unix:///var/run/td-agent/td-agent.sock".', 'decalog' ) . $this->get_substitution_note(),
2306 'default' => 'tcp://localhost:24224',
2307 'control' => [
2308 'type' => 'field_input_text',
2309 'cast' => 'string',
2310 'enabled' => true,
2311 ],
2312 ],
2313 'timeout' => [
2314 'type' => 'integer',
2315 'show' => true,
2316 'name' => decalog_esc_html__( 'Socket timeout', 'decalog' ),
2317 'help' => decalog_esc_html__( 'Max number of milliseconds to wait for the socket.', 'decalog' ),
2318 'default' => 800,
2319 'control' => [
2320 'type' => 'field_input_integer',
2321 'cast' => 'integer',
2322 'min' => 100,
2323 'max' => 10000,
2324 'step' => 100,
2325 'enabled' => true,
2326 ],
2327 ],
2328 ],
2329 'init' => [
2330 [
2331 'type' => 'configuration',
2332 'value' => 'host',
2333 ],
2334 [
2335 'type' => 'configuration',
2336 'value' => 'timeout',
2337 ],
2338 [ 'type' => 'level' ],
2339 [
2340 'type' => 'literal',
2341 'value' => true,
2342 ],
2343 ],
2344 ];
2345 $this->handlers[] = [
2346 'version' => DECALOG_VERSION,
2347 'id' => 'SumoSysHandler',
2348 'namespace' => 'Decalog\\Handler',
2349 'class' => 'logging',
2350 'minimal' => Logger::DEBUG,
2351 'name' => 'Sumo Logic cloud-syslog',
2352 'help' => decalog_esc_html__( 'Events sent to a Sumo Logic cloud-syslog source.', 'decalog' ),
2353 'icon' => $this->get_base64_sumosys_icon(),
2354 'needs' => [],
2355 'params' => [ 'processors', 'privacy' ],
2356 'configuration' => [
2357 'host' => [
2358 'type' => 'string',
2359 'show' => true,
2360 'name' => decalog_esc_html__( 'Region', 'decalog' ),
2361 'help' => decalog_esc_html__( 'The deployment region of the cloud-syslog endpoint.', 'decalog' ),
2362 'default' => 'syslog.collection.eu.sumologic.com',
2363 'control' => [
2364 'type' => 'field_select',
2365 'cast' => 'string',
2366 'enabled' => true,
2367 'list' => [ [ 'syslog.collection.au.sumologic.com', decalog_esc_html__( 'Australia', 'decalog' ) ], [ 'syslog.collection.ca.sumologic.com', decalog_esc_html__( 'Canada', 'decalog' ) ], [ 'syslog.collection.de.sumologic.com', decalog_esc_html__( 'Germany', 'decalog' ) ], [ 'syslog.collection.eu.sumologic.com', decalog_esc_html__( 'Europe', 'decalog' ) ], [ 'syslog.collection.jp.sumologic.com', decalog_esc_html__( 'Japan', 'decalog' ) ], [ 'syslog.collection.us1.sumologic.com', decalog_esc_html__( 'United States 1', 'decalog' ) ], [ 'syslog.collection.us2.sumologic.com', decalog_esc_html__( 'United States 2', 'decalog' ) ] ],
2368 ],
2369 ],
2370 'token' => [
2371 'type' => 'string',
2372 'show' => true,
2373 'name' => decalog_esc_html__( 'Source token', 'decalog' ),
2374 'help' => decalog_esc_html__( 'The token of cloud-syslog source.', 'decalog' ) . $this->get_substitution_note(),
2375 'default' => '',
2376 'control' => [
2377 'type' => 'field_input_text',
2378 'cast' => 'string',
2379 'enabled' => true,
2380 ],
2381 ],
2382 'proto' => [
2383 'type' => 'string',
2384 'show' => true,
2385 'name' => decalog_esc_html__( 'Protocol', 'decalog' ),
2386 'help' => decalog_esc_html__( 'The used cloud-syslog protocol.', 'decalog' ),
2387 'default' => 'TCP',
2388 'control' => [
2389 'type' => 'field_input_text',
2390 'cast' => 'string',
2391 'enabled' => false,
2392 ],
2393 ],
2394 'port' => [
2395 'type' => 'integer',
2396 'show' => true,
2397 'name' => decalog_esc_html__( 'Port', 'decalog' ),
2398 'help' => decalog_esc_html__( 'The opened port on remote host to receive cloud-syslog messages.', 'decalog' ),
2399 'default' => 6514,
2400 'control' => [
2401 'type' => 'field_input_integer',
2402 'cast' => 'integer',
2403 'min' => 1,
2404 'max' => 64738,
2405 'step' => 1,
2406 'enabled' => false,
2407 ],
2408 ],
2409 'timeout' => [
2410 'type' => 'integer',
2411 'show' => true,
2412 'name' => decalog_esc_html__( 'Socket timeout', 'decalog' ),
2413 'help' => decalog_esc_html__( 'Max number of milliseconds to wait for the socket.', 'decalog' ),
2414 'default' => 800,
2415 'control' => [
2416 'type' => 'field_input_integer',
2417 'cast' => 'integer',
2418 'min' => 100,
2419 'max' => 10000,
2420 'step' => 100,
2421 'enabled' => true,
2422 ],
2423 ],
2424 'facility' => [
2425 'type' => 'string',
2426 'show' => true,
2427 'name' => decalog_esc_html__( 'Facility', 'decalog' ),
2428 'help' => decalog_esc_html__( 'The cloud-syslog facility for messages sent by DecaLog.', 'decalog' ),
2429 'default' => 'LOG_USER',
2430 'control' => [
2431 'type' => 'field_input_text',
2432 'cast' => 'string',
2433 'enabled' => false,
2434 ],
2435 ],
2436 'ident' => [
2437 'type' => 'string',
2438 'show' => true,
2439 'name' => decalog_esc_html__( 'Identifier', 'decalog' ),
2440 'help' => decalog_esc_html__( 'The program identifier for messages sent by DecaLog.', 'decalog' ) . $this->get_substitution_note(),
2441 'default' => 'DecaLog',
2442 'control' => [
2443 'type' => 'field_input_text',
2444 'cast' => 'string',
2445 'enabled' => true,
2446 ],
2447 ],
2448 'format' => [
2449 'type' => 'integer',
2450 'show' => true,
2451 'name' => decalog_esc_html__( 'Message format', 'decalog' ),
2452 'help' => decalog_esc_html__( 'The syslog format standard to use.', 'decalog' ),
2453 'default' => 1,
2454 'control' => [
2455 'type' => 'field_select',
2456 'cast' => 'integer',
2457 'enabled' => true,
2458 'list' => [ [ 0, 'BSD (RFC 3164)' ], [ 1, 'IETF (RFC 5424)' ], [ 2, 'IETF extended (RFC 5424)' ] ],
2459 ],
2460 ],
2461 ],
2462 'init' => [
2463 [
2464 'type' => 'configuration',
2465 'value' => 'host',
2466 ],
2467 [
2468 'type' => 'configuration',
2469 'value' => 'port',
2470 ],
2471 [
2472 'type' => 'configuration',
2473 'value' => 'timeout',
2474 ],
2475 [
2476 'type' => 'configuration',
2477 'value' => 'token',
2478 ],
2479 [
2480 'type' => 'literal',
2481 'value' => 8,
2482 ],
2483 [ 'type' => 'level' ],
2484 [
2485 'type' => 'literal',
2486 'value' => true,
2487 ],
2488 [
2489 'type' => 'configuration',
2490 'value' => 'ident',
2491 ],
2492 [
2493 'type' => 'configuration',
2494 'value' => 'format',
2495 ],
2496
2497 ],
2498 ];
2499 $this->handlers[] = [
2500 'version' => DECALOG_MONOLOG_VERSION,
2501 'id' => 'SyslogUdpHandler',
2502 'namespace' => 'DLMonolog\Handler',
2503 'class' => 'logging',
2504 'minimal' => Logger::DEBUG,
2505 'name' => 'Syslog',
2506 'help' => decalog_esc_html__( 'Events sent to a remote syslogd server.', 'decalog' ),
2507 'icon' => $this->get_base64_syslog_icon(),
2508 'needs' => [],
2509 'params' => [ 'processors', 'privacy' ],
2510 'configuration' => [
2511 'host' => [
2512 'type' => 'string',
2513 'show' => true,
2514 'name' => decalog_esc_html__( 'Host', 'decalog' ),
2515 'help' => decalog_esc_html__( 'The remote host receiving syslog messages.', 'decalog' ) . $this->get_substitution_note(),
2516 'default' => '127.0.0.1',
2517 'control' => [
2518 'type' => 'field_input_text',
2519 'cast' => 'string',
2520 'enabled' => true,
2521 ],
2522 ],
2523 'proto' => [
2524 'type' => 'string',
2525 'show' => true,
2526 'name' => decalog_esc_html__( 'Protocol', 'decalog' ),
2527 'help' => decalog_esc_html__( 'The used syslog protocol.', 'decalog' ),
2528 'default' => 'UDP',
2529 'control' => [
2530 'type' => 'field_input_text',
2531 'cast' => 'string',
2532 'enabled' => false,
2533 ],
2534 ],
2535 'port' => [
2536 'type' => 'integer',
2537 'show' => true,
2538 'name' => decalog_esc_html__( 'Port', 'decalog' ),
2539 'help' => decalog_esc_html__( 'The opened port on remote host to receive syslog messages.', 'decalog' ),
2540 'default' => 514,
2541 'control' => [
2542 'type' => 'field_input_integer',
2543 'cast' => 'integer',
2544 'min' => 1,
2545 'max' => 64738,
2546 'step' => 1,
2547 'enabled' => true,
2548 ],
2549 ],
2550 'facility' => [
2551 'type' => 'string',
2552 'show' => true,
2553 'name' => decalog_esc_html__( 'Facility', 'decalog' ),
2554 'help' => decalog_esc_html__( 'The syslog facility for messages sent by DecaLog.', 'decalog' ),
2555 'default' => 'LOG_USER',
2556 'control' => [
2557 'type' => 'field_input_text',
2558 'cast' => 'string',
2559 'enabled' => false,
2560 ],
2561 ],
2562 'ident' => [
2563 'type' => 'string',
2564 'show' => true,
2565 'name' => decalog_esc_html__( 'Identifier', 'decalog' ),
2566 'help' => decalog_esc_html__( 'The program identifier for messages sent by DecaLog.', 'decalog' ) . $this->get_substitution_note(),
2567 'default' => 'DecaLog',
2568 'control' => [
2569 'type' => 'field_input_text',
2570 'cast' => 'string',
2571 'enabled' => true,
2572 ],
2573 ],
2574 'format' => [
2575 'type' => 'integer',
2576 'show' => true,
2577 'name' => decalog_esc_html__( 'Message format', 'decalog' ),
2578 'help' => decalog_esc_html__( 'The syslog format standard to use.', 'decalog' ),
2579 'default' => 1,
2580 'control' => [
2581 'type' => 'field_select',
2582 'cast' => 'integer',
2583 'enabled' => true,
2584 'list' => [ [ 0, 'BSD (RFC 3164)' ], [ 1, 'IETF (RFC 5424)' ], [ 2, 'IETF extended (RFC 5424)' ] ],
2585 ],
2586 ],
2587 ],
2588 'init' => [
2589 [
2590 'type' => 'configuration',
2591 'value' => 'host',
2592 ],
2593 [
2594 'type' => 'configuration',
2595 'value' => 'port',
2596 ],
2597 [
2598 'type' => 'literal',
2599 'value' => 8,
2600 ],
2601 [ 'type' => 'level' ],
2602 [
2603 'type' => 'literal',
2604 'value' => true,
2605 ],
2606 [
2607 'type' => 'configuration',
2608 'value' => 'ident',
2609 ],
2610 [
2611 'type' => 'configuration',
2612 'value' => 'format',
2613 ],
2614
2615 ],
2616 ];
2617 $this->handlers[] = [
2618 'version' => DECALOG_VERSION,
2619 'id' => 'WordpressHandler',
2620 'namespace' => 'Decalog\Handler',
2621 'class' => 'logging',
2622 'minimal' => Logger::DEBUG,
2623 'name' => decalog_esc_html__( 'WordPress events log', 'decalog' ),
2624 'help' => decalog_esc_html__( 'Events stored in WordPress and available right in your admin dashboard.', 'decalog' ),
2625 'icon' => $this->get_base64_wordpress_icon(),
2626 'needs' => [],
2627 'params' => [ 'processors', 'privacy' ],
2628 'processors' => [
2629 'included' => [ 'WordpressProcessor', 'WWWProcessor', 'IntrospectionProcessor' ],
2630 ],
2631 'configuration' => [
2632 'constant-storage' => [
2633 'type' => 'string',
2634 'show' => true,
2635 'name' => decalog_esc_html__( 'Storage', 'decalog' ),
2636 'help' => decalog_esc_html__( 'Place where to store events.', 'decalog' ) . '<br/>' . decalog_esc_html__( 'Note: it\'s not possible to change storage type after logger creation.', 'decalog' ),
2637 'default' => 'db',
2638 'control' => [
2639 'type' => 'field_select',
2640 'cast' => 'string',
2641 'enabled' => Cache::$apcu_available,
2642 'list' => [ [ 'db', decalog_esc_html__( 'Database: persistent after a server restart', 'decalog' ) ], [ 'apcu', decalog_esc_html__( 'APCu: high performance but reset after each server reboot', 'decalog' ), Cache::$apcu_available ] ],
2643 ],
2644 ],
2645 'rotate' => [
2646 'type' => 'integer',
2647 'show' => true,
2648 'name' => decalog_esc_html__( 'Events', 'decalog' ),
2649 'help' => decalog_esc_html__( 'Maximum number of events stored in this events log (0 for no limit).', 'decalog' ),
2650 'default' => 10000,
2651 'control' => [
2652 'type' => 'field_input_integer',
2653 'cast' => 'integer',
2654 'min' => 0,
2655 'max' => 10000000,
2656 'step' => 1000,
2657 'enabled' => true,
2658 ],
2659 ],
2660 'purge' => [
2661 'type' => 'integer',
2662 'show' => true,
2663 'name' => decalog_esc_html__( 'Days', 'decalog' ),
2664 'help' => decalog_esc_html__( 'Maximum age of events stored in this events log (0 for no limit).', 'decalog' ),
2665 'default' => 15,
2666 'control' => [
2667 'type' => 'field_input_integer',
2668 'cast' => 'integer',
2669 'min' => 0,
2670 'max' => 730,
2671 'step' => 1,
2672 'enabled' => true,
2673 ],
2674 ],
2675 'local' => [
2676 'type' => 'boolean',
2677 'show' => is_multisite(),
2678 'name' => decalog_esc_html__( 'Multisite partitioning', 'decalog' ),
2679 'help' => decalog_esc_html__( 'Local administrators can view events that relate to their site.', 'decalog' ),
2680 'default' => false,
2681 'control' => [
2682 'type' => 'field_checkbox',
2683 'cast' => 'boolean',
2684 'enabled' => true,
2685 ],
2686 ],
2687 ],
2688 'init' => [
2689 [
2690 'type' => 'compute',
2691 'value' => 'tablename',
2692 ],
2693 [
2694 'type' => 'configuration',
2695 'value' => 'constant-storage',
2696 ],
2697 [ 'type' => 'level' ],
2698 [
2699 'type' => 'literal',
2700 'value' => true,
2701 ],
2702
2703 ],
2704 ];
2705
2706 // DEBUGGING
2707 $this->handlers[] = [
2708 'version' => DECALOG_VERSION,
2709 'id' => 'SpatierayHandler',
2710 'namespace' => 'Decalog\\Handler',
2711 'class' => 'debugging',
2712 'minimal' => Logger::DEBUG,
2713 'name' => 'Spatie Ray',
2714 'help' => decalog_esc_html__( 'Events sent to Ray application.', 'decalog' ),
2715 'icon' => $this->get_base64_spatieray_icon(),
2716 'needs' => [],
2717 'params' => [ 'processors', 'privacy' ],
2718 'processors' => [],
2719 'configuration' => [
2720 'host' => [
2721 'type' => 'string',
2722 'show' => true,
2723 'name' => decalog_esc_html__( 'Host', 'decalog' ),
2724 'help' => decalog_esc_html__( 'The host receiving messages.', 'decalog' ) . $this->get_substitution_note(),
2725 'default' => 'localhost',
2726 'control' => [
2727 'type' => 'field_input_text',
2728 'cast' => 'string',
2729 'enabled' => true,
2730 ],
2731 ],
2732 'port' => [
2733 'type' => 'integer',
2734 'show' => true,
2735 'name' => decalog_esc_html__( 'Port', 'decalog' ),
2736 'help' => decalog_esc_html__( 'The opened port to receive messages.', 'decalog' ),
2737 'default' => 23517,
2738 'control' => [
2739 'type' => 'field_input_integer',
2740 'cast' => 'integer',
2741 'min' => 1,
2742 'max' => 64738,
2743 'step' => 1,
2744 'enabled' => true,
2745 ],
2746 ],
2747 'format' => [
2748 'type' => 'integer',
2749 'show' => true,
2750 'name' => decalog_esc_html__( 'Format', 'decalog' ),
2751 'help' => decalog_esc_html__( 'The entry format to use.', 'decalog' ),
2752 'default' => 0,
2753 'control' => [
2754 'type' => 'field_select',
2755 'cast' => 'integer',
2756 'enabled' => true,
2757 'list' => [ [ 0, decalog_esc_html__( 'Summary', 'decalog' ) ], [ 1, decalog_esc_html__( 'Full', 'decalog' ) ] ],
2758 ],
2759 ],
2760 ],
2761 'init' => [
2762 [
2763 'type' => 'configuration',
2764 'value' => 'host',
2765 ],
2766 [
2767 'type' => 'configuration',
2768 'value' => 'port',
2769 ],
2770 [
2771 'type' => 'configuration',
2772 'value' => 'format',
2773 ],
2774 [ 'type' => 'level' ],
2775 [
2776 'type' => 'literal',
2777 'value' => true,
2778 ],
2779 ],
2780 ];
2781 $this->handlers[] = [
2782 'version' => DECALOG_VERSION,
2783 'id' => 'TracyHandler',
2784 'namespace' => 'Decalog\\Handler',
2785 'class' => 'debugging',
2786 'minimal' => Logger::DEBUG,
2787 'name' => 'Tracy',
2788 'help' => decalog_esc_html__( 'Events sent to the Tracy bar, right in the browser.', 'decalog' ),
2789 'icon' => $this->get_base64_tracy_icon(),
2790 'needs' => [],
2791 'params' => [ 'processors', 'privacy' ],
2792 'processors' => [],
2793 'configuration' => [],
2794 'init' => [
2795 [ 'type' => 'level' ],
2796 [
2797 'type' => 'literal',
2798 'value' => true,
2799 ],
2800 ],
2801 ];
2802 $this->handlers[] = [
2803 'version' => DECALOG_MONOLOG_VERSION,
2804 'id' => 'BrowserConsoleHandler',
2805 'namespace' => 'Decalog\\Handler',
2806 'class' => 'debugging',
2807 'minimal' => Logger::DEBUG,
2808 'name' => decalog_esc_html__( 'Browser console', 'decalog' ),
2809 'help' => decalog_esc_html__( 'Events sent to browser\'s javascript console with no browser extension required.', 'decalog' ),
2810 'icon' => $this->get_base64_browserconsole_icon(),
2811 'needs' => [],
2812 'params' => [ 'processors', 'privacy' ],
2813 'configuration' => [],
2814 'init' => [
2815 [ 'type' => 'level' ],
2816 [
2817 'type' => 'literal',
2818 'value' => true,
2819 ],
2820 ],
2821 ];
2822 $this->handlers[] = [
2823 'version' => DECALOG_MONOLOG_VERSION,
2824 'id' => 'ChromePHPHandler',
2825 'namespace' => 'DLMonolog\\Handler',
2826 'class' => 'debugging',
2827 'minimal' => Logger::DEBUG,
2828 'name' => 'ChromePHP',
2829 'help' => decalog_esc_html__( 'Events sent to the ChromePHP extension (http://www.chromephp.com/).', 'decalog' ),
2830 'icon' => $this->get_base64_chrome_icon(),
2831 'needs' => [],
2832 'params' => [ 'processors', 'privacy' ],
2833 'configuration' => [],
2834 'init' => [
2835 [ 'type' => 'level' ],
2836 [
2837 'type' => 'literal',
2838 'value' => true,
2839 ],
2840 ],
2841 ];
2842
2843 // ALERTING
2844 $this->handlers[] = [
2845 'version' => DECALOG_MONOLOG_VERSION,
2846 'id' => 'SlackWebhookHandler',
2847 'namespace' => 'DLMonolog\Handler',
2848 'class' => 'alerting',
2849 'minimal' => Logger::WARNING,
2850 'name' => 'Slack',
2851 'help' => decalog_esc_html__( 'Event alerts sent through Slack Webhooks.', 'decalog' ),
2852 'icon' => $this->get_base64_slack_icon(),
2853 'needs' => [],
2854 'params' => [ 'processors', 'privacy' ],
2855 'processors' => [
2856 'excluded' => [ 'BacktraceProcessor' ],
2857 ],
2858 'configuration' => [
2859 'webhook' => [
2860 'type' => 'string',
2861 'show' => true,
2862 'name' => decalog_esc_html__( 'Webhook URL', 'decalog' ),
2863 'help' => decalog_esc_html__( 'The Webhook URL set in the Slack application.', 'decalog' ),
2864 'default' => 'https://hooks.slack.com/services/...',
2865 'control' => [
2866 'type' => 'field_input_text',
2867 'cast' => 'string',
2868 'enabled' => true,
2869 ],
2870 ],
2871 'short' => [
2872 'type' => 'boolean',
2873 'show' => true,
2874 'name' => decalog_esc_html__( 'Short attachment', 'decalog' ),
2875 'help' => decalog_esc_html__( 'Use a shortened version for attachments sent in channel.', 'decalog' ),
2876 'default' => false,
2877 'control' => [
2878 'type' => 'field_checkbox',
2879 'cast' => 'boolean',
2880 'enabled' => true,
2881 ],
2882 ],
2883 'data' => [
2884 'type' => 'boolean',
2885 'show' => true,
2886 'name' => decalog_esc_html__( 'Full data', 'decalog' ),
2887 'help' => decalog_esc_html__( 'Whether the attachments should include context and extra data.', 'decalog' ),
2888 'default' => true,
2889 'control' => [
2890 'type' => 'field_checkbox',
2891 'cast' => 'boolean',
2892 'enabled' => true,
2893 ],
2894 ],
2895 ],
2896 'init' => [
2897 [
2898 'type' => 'configuration',
2899 'value' => 'webhook',
2900 ],
2901 [
2902 'type' => 'literal',
2903 'value' => null,
2904 ],
2905 [
2906 'type' => 'literal',
2907 'value' => null,
2908 ],
2909 [
2910 'type' => 'literal',
2911 'value' => true,
2912 ],
2913 [
2914 'type' => 'literal',
2915 'value' => null,
2916 ],
2917 [
2918 'type' => 'configuration',
2919 'value' => 'short',
2920 ],
2921 [
2922 'type' => 'configuration',
2923 'value' => 'data',
2924 ],
2925 [ 'type' => 'level' ],
2926 [
2927 'type' => 'literal',
2928 'value' => true,
2929 ],
2930 ],
2931 ];
2932 $this->handlers[] = [
2933 'version' => DECALOG_VERSION,
2934 'id' => 'MailHandler',
2935 'namespace' => 'Decalog\\Handler',
2936 'class' => 'alerting',
2937 'minimal' => Logger::WARNING,
2938 'name' => decalog_esc_html__( 'Mail', 'decalog' ),
2939 'help' => decalog_esc_html__( 'Event alerts sent by WordPress via mail.', 'decalog' ),
2940 'icon' => $this->get_base64_mail_icon(),
2941 'needs' => [],
2942 'params' => [ 'processors', 'privacy' ],
2943 'configuration' => [
2944 'recipients' => [
2945 'type' => 'string',
2946 'show' => true,
2947 'name' => decalog_esc_html__( 'Recipients', 'decalog' ),
2948 'help' => decalog_esc_html__( 'The recipients mail address, in coma separated list.', 'decalog' ) . $this->get_substitution_note(),
2949 'default' => '',
2950 'control' => [
2951 'type' => 'field_input_text',
2952 'cast' => 'string',
2953 'enabled' => true,
2954 ],
2955 ],
2956 ],
2957 'init' => [
2958 [
2959 'type' => 'configuration',
2960 'value' => 'recipients',
2961 ],
2962 [ 'type' => 'level' ],
2963 [
2964 'type' => 'literal',
2965 'value' => true,
2966 ],
2967 ],
2968 ];
2969 /*$this->handlers[] = [
2970 'version' => DECALOG_VERSION,
2971 'id' => 'PagerDuty',
2972 'namespace' => 'Decalog\\Handler',
2973 'class' => 'alerting',
2974 'minimal' => Logger::ERROR,
2975 'name' => decalog_esc_html__( 'PagerDuty', 'decalog' ),
2976 'help' => decalog_esc_html__( 'Event alerts triggered in PagerDuty.', 'decalog' ),
2977 'icon' => $this->get_base64_pagerduty_icon(),
2978 'needs' => [],
2979 'params' => [ 'processors', 'privacy' ],
2980 'configuration' => [
2981 'recipients' => [
2982 'type' => 'string',
2983 'show' => true,
2984 'name' => decalog_esc_html__( 'Recipients', 'decalog' ),
2985 'help' => decalog_esc_html__( 'The recipients mail address, in coma separated list.', 'decalog' ),
2986 'default' => '',
2987 'control' => [
2988 'type' => 'field_input_text',
2989 'cast' => 'string',
2990 'enabled' => true,
2991 ],
2992 ],
2993 ],
2994 'init' => [
2995 [
2996 'type' => 'configuration',
2997 'value' => 'recipients',
2998 ],
2999 [ 'type' => 'level' ],
3000 [
3001 'type' => 'literal',
3002 'value' => true,
3003 ],
3004 ],
3005 ];*/
3006 $this->handlers[] = [
3007 'version' => DECALOG_VERSION,
3008 'id' => 'PshHandler',
3009 'namespace' => 'Decalog\\Handler',
3010 'class' => 'alerting',
3011 'minimal' => Logger::WARNING,
3012 'name' => 'Pushover',
3013 'help' => decalog_esc_html__( 'Event alerts sent via Pushover service.', 'decalog' ),
3014 'icon' => $this->get_base64_pushover_icon(),
3015 'needs' => [],
3016 'params' => [ 'processors', 'privacy' ],
3017 'configuration' => [
3018 'token' => [
3019 'type' => 'string',
3020 'show' => true,
3021 'name' => decalog_esc_html__( 'Application token', 'decalog' ),
3022 'help' => decalog_esc_html__( 'The token of the Pushover application.', 'decalog' ) . $this->get_substitution_note(),
3023 'default' => '',
3024 'control' => [
3025 'type' => 'field_input_text',
3026 'cast' => 'string',
3027 'enabled' => true,
3028 ],
3029 ],
3030 'users' => [
3031 'type' => 'string',
3032 'show' => true,
3033 'name' => decalog_esc_html__( 'Recipient', 'decalog' ),
3034 'help' => decalog_esc_html__( 'The recipient key. It can be a "user key" or a "group key".', 'decalog' ) . $this->get_substitution_note(),
3035 'default' => '',
3036 'control' => [
3037 'type' => 'field_input_text',
3038 'cast' => 'string',
3039 'enabled' => true,
3040 ],
3041 ],
3042 'title' => [
3043 'type' => 'string',
3044 'show' => true,
3045 'name' => decalog_esc_html__( 'Message title', 'decalog' ),
3046 'help' => decalog_esc_html__( 'The title of the message which will be sent.', 'decalog' ) . $this->get_substitution_note(),
3047 'default' => '',
3048 'control' => [
3049 'type' => 'field_input_text',
3050 'cast' => 'string',
3051 'enabled' => true,
3052 ],
3053 ],
3054 'timeout' => [
3055 'type' => 'integer',
3056 'show' => true,
3057 'name' => decalog_esc_html__( 'Socket timeout', 'decalog' ),
3058 'help' => decalog_esc_html__( 'Max number of milliseconds to wait for the socket.', 'decalog' ),
3059 'default' => 800,
3060 'control' => [
3061 'type' => 'field_input_integer',
3062 'cast' => 'integer',
3063 'min' => 100,
3064 'max' => 10000,
3065 'step' => 100,
3066 'enabled' => true,
3067 ],
3068 ],
3069 ],
3070 'init' => [
3071 [
3072 'type' => 'configuration',
3073 'value' => 'token',
3074 ],
3075 [
3076 'type' => 'configuration',
3077 'value' => 'users',
3078 ],
3079 [
3080 'type' => 'configuration',
3081 'value' => 'title',
3082 ],
3083 [
3084 'type' => 'configuration',
3085 'value' => 'timeout',
3086 ],
3087 [ 'type' => 'level' ],
3088 ],
3089 ];
3090
3091 // ANALYTICS
3092 $this->handlers[] = [
3093 'version' => DECALOG_VERSION,
3094 'id' => 'BugsnagHandler',
3095 'namespace' => 'Decalog\\Handler',
3096 'class' => 'analytics',
3097 'minimal' => Logger::WARNING,
3098 'name' => 'Bugsnag',
3099 'help' => decalog_esc_html__( 'Crash reports sent to Bugsnag service.', 'decalog' ),
3100 'icon' => $this->get_base64_bugsnag_icon(),
3101 'needs' => [],
3102 'params' => [ 'processors', 'privacy' ],
3103 'processors' => [
3104 'included' => [ 'WordpressProcessor', 'WWWProcessor', 'IntrospectionProcessor' ],
3105 'excluded' => [ 'BacktraceProcessor' ],
3106 ],
3107 'configuration' => [
3108 'token' => [
3109 'type' => 'string',
3110 'show' => true,
3111 'name' => decalog_esc_html__( 'API key', 'decalog' ),
3112 'help' => decalog_esc_html__( 'The API key of the service.', 'decalog' ) . $this->get_substitution_note(),
3113 'default' => '',
3114 'control' => [
3115 'type' => 'field_input_text',
3116 'cast' => 'string',
3117 'enabled' => true,
3118 ],
3119 ],
3120 'buffer' => [
3121 'type' => 'boolean',
3122 'show' => true,
3123 'name' => decalog_esc_html__( 'Deferred forwarding', 'decalog' ),
3124 'help' => decalog_esc_html__( 'Wait for the full page is rendered before sending reports (recommended).', 'decalog' ),
3125 'default' => true,
3126 'control' => [
3127 'type' => 'field_checkbox',
3128 'cast' => 'boolean',
3129 'enabled' => true,
3130 ],
3131 ],
3132 ],
3133 'init' => [
3134 [
3135 'type' => 'configuration',
3136 'value' => 'token',
3137 ],
3138 [
3139 'type' => 'literal',
3140 'value' => true,
3141 ],
3142 [ 'type' => 'level' ],
3143 ],
3144 ];
3145 $this->handlers[] = [
3146 'version' => DECALOG_VERSION,
3147 'id' => 'GAnalyticsHandler',
3148 'namespace' => 'Decalog\\Handler',
3149 'class' => 'analytics',
3150 'minimal' => Logger::WARNING,
3151 'name' => 'Google Universal Analytics',
3152 'help' => decalog_esc_html__( 'Exceptions sent to Google Universal Analytics service.', 'decalog' ),
3153 'icon' => $this->get_base64_ganalytics_icon(),
3154 'needs' => [],
3155 'params' => [ 'processors', 'privacy' ],
3156 'processors' => [
3157 'included' => [ 'WordpressProcessor', 'WWWProcessor' ],
3158 'excluded' => [ 'BacktraceProcessor', 'IntrospectionProcessor' ],
3159 ],
3160 'configuration' => [
3161 'token' => [
3162 'type' => 'string',
3163 'show' => true,
3164 'name' => decalog_esc_html__( 'Tracking ID', 'decalog' ),
3165 'help' => decalog_esc_html__( 'The tracking ID / web property ID for Google Universal Analytics service. The format must be UA-XXXX-Y.', 'decalog' ) . $this->get_substitution_note(),
3166 'default' => '',
3167 'control' => [
3168 'type' => 'field_input_text',
3169 'cast' => 'string',
3170 'enabled' => true,
3171 ],
3172 ],
3173 'buffer' => [
3174 'type' => 'boolean',
3175 'show' => true,
3176 'name' => decalog_esc_html__( 'Deferred forwarding', 'decalog' ),
3177 'help' => decalog_esc_html__( 'Wait for the full page is rendered before sending exceptions (recommended).', 'decalog' ),
3178 'default' => true,
3179 'control' => [
3180 'type' => 'field_checkbox',
3181 'cast' => 'boolean',
3182 'enabled' => true,
3183 ],
3184 ],
3185 ],
3186 'init' => [
3187 [
3188 'type' => 'configuration',
3189 'value' => 'token',
3190 ],
3191 [
3192 'type' => 'literal',
3193 'value' => true,
3194 ],
3195 [ 'type' => 'level' ],
3196 ],
3197 ];
3198 $this->handlers[] = [
3199 'version' => DECALOG_VERSION,
3200 'id' => 'RaygunHandler',
3201 'namespace' => 'Decalog\\Handler',
3202 'class' => 'analytics',
3203 'minimal' => Logger::WARNING,
3204 'name' => 'Raygun',
3205 'help' => decalog_esc_html__( 'Crash reports sent to Raygun service.', 'decalog' ),
3206 'icon' => $this->get_base64_raygun_icon(),
3207 'needs' => [],
3208 'params' => [ 'processors', 'privacy' ],
3209 'processors' => [
3210 'included' => [ 'WordpressProcessor', 'WWWProcessor', 'IntrospectionProcessor' ],
3211 'excluded' => [ 'BacktraceProcessor' ],
3212 ],
3213 'configuration' => [
3214 'token' => [
3215 'type' => 'string',
3216 'show' => true,
3217 'name' => decalog_esc_html__( 'API key', 'decalog' ),
3218 'help' => decalog_esc_html__( 'The API key of the service.', 'decalog' ) . $this->get_substitution_note(),
3219 'default' => '',
3220 'control' => [
3221 'type' => 'field_input_text',
3222 'cast' => 'string',
3223 'enabled' => true,
3224 ],
3225 ],
3226 'buffer' => [
3227 'type' => 'boolean',
3228 'show' => true,
3229 'name' => decalog_esc_html__( 'Deferred forwarding', 'decalog' ),
3230 'help' => decalog_esc_html__( 'Wait for the full page is rendered before sending reports (recommended).', 'decalog' ),
3231 'default' => true,
3232 'control' => [
3233 'type' => 'field_checkbox',
3234 'cast' => 'boolean',
3235 'enabled' => true,
3236 ],
3237 ],
3238 ],
3239 'init' => [
3240 [
3241 'type' => 'configuration',
3242 'value' => 'token',
3243 ],
3244 [
3245 'type' => 'literal',
3246 'value' => true,
3247 ],
3248 [ 'type' => 'level' ],
3249 ],
3250 ];
3251
3252 // SYSTEM
3253 $this->handlers[] = [
3254 'version' => DECALOG_VERSION,
3255 'id' => 'NullHandler',
3256 'namespace' => 'DLMonolog\Handler',
3257 'class' => 'system',
3258 'minimal' => Logger::DEBUG,
3259 'name' => decalog_esc_html__( 'Blackhole', 'decalog' ),
3260 'help' => decalog_esc_html__( 'Any event it can handle will be thrown away.', 'decalog' ),
3261 'icon' => $this->get_base64_php_icon(),
3262 'needs' => [],
3263 'params' => [],
3264 'configuration' => [],
3265 'init' => [],
3266 ];
3267 $this->handlers[] = [
3268 'version' => DECALOG_VERSION,
3269 'id' => 'SharedMemoryHandler',
3270 'namespace' => 'Decalog\\Handler',
3271 'class' => 'system',
3272 'minimal' => Logger::INFO,
3273 'name' => decalog_esc_html__( 'Shared memory', 'decalog' ),
3274 'help' => decalog_esc_html__( 'Automatic events log, stored in server shared memory.', 'decalog' ),
3275 'icon' => $this->get_base64_ram_icon(),
3276 'needs' => [
3277 'option' => [ 'livelog' ],
3278 'function_exists' => [ 'shmop_open', 'shmop_read', 'shmop_write', 'shmop_delete' ],
3279 ],
3280 'params' => [],
3281 'configuration' => [],
3282 'init' => [],
3283 ];
3284
3285 uasort(
3286 $this->handlers,
3287 function ( $a, $b ) {
3288 return strcmp( strtolower( $a['name'] ), strtolower( $b['name'] ) );
3289 }
3290 );
3291 }
3292
3293 /**
3294 * Get the string for substitution note.
3295 *
3296 * @return string The string to add.
3297 * @since 3.9.0
3298 */
3299 private function get_substitution_note() {
3300 if ( ! Option::network_get( 'env_substitution' ) ) {
3301 return '';
3302 }
3303 return '<br/><small>ⓘ&nbsp;' . decalog_esc_html__( 'This field is eligible to environment variable and PHP-defined constant substitution.', 'decalog' ) . '</small>';
3304 }
3305
3306 /**
3307 * Get the types definition.
3308 *
3309 * @return array A list of all available types definitions.
3310 * @since 1.0.0
3311 */
3312 public function get_all() {
3313 return $this->handlers;
3314 }
3315
3316 /**
3317 * Get the name for a specific class.
3318 *
3319 * @param string $class The class of loggers ( 'alerting', 'debugging', 'logging').
3320 * @return string The name of the class.
3321 * @since 3.0.0
3322 */
3323 public function get_class_name( $class ) {
3324 $result = '-';
3325 if ( array_key_exists( $class, $this->handlers_class ) ) {
3326 $result = $this->handlers_class[ $class ];
3327 }
3328 return $result;
3329 }
3330
3331 /**
3332 * Get the types definition for a specific class.
3333 *
3334 * @param string $class The class of loggers ( 'alerting', 'debugging', 'logging').
3335 * @return array A list of all available types definitions.
3336 * @since 1.2.0
3337 */
3338 public function get_for_class( $class ) {
3339 $result = [];
3340 foreach ( $this->handlers as $handler ) {
3341 if ( $handler['class'] === $class ) {
3342 $result[] = $handler;
3343 }
3344 }
3345 usort(
3346 $result,
3347 function( $a, $b ) {
3348 return strcmp( strtolower( $a['name'] ), strtolower( $b['name'] ) );
3349 }
3350 );
3351 return $result;
3352 }
3353
3354 /**
3355 * Get the types list.
3356 *
3357 * @return array A list of all available types.
3358 * @since 1.0.0
3359 */
3360 public function get_list() {
3361 $result = [];
3362 foreach ( $this->handlers as $handler ) {
3363 $result[] = $handler['id'];
3364 }
3365 return $result;
3366 }
3367
3368 /**
3369 * Get a specific handler.
3370 *
3371 * @param string $id The handler id.
3372 * @return null|array The detail of the handler, null if not found.
3373 * @since 1.0.0
3374 */
3375 public function get( $id ) {
3376 foreach ( $this->handlers as $handler ) {
3377 if ( $handler['id'] === $id ) {
3378 return $handler;
3379 }
3380 }
3381 return null;
3382 }
3383
3384 /**
3385 * Returns a base64 svg resource for the mail icon.
3386 *
3387 * @param string $color Optional. Color of the icon.
3388 * @return string The svg resource as a base64.
3389 * @since 1.0.0
3390 */
3391 private function get_base64_mail_icon( $color = '#0073AA' ) {
3392 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" fill="none" width="100%" height="100%" viewBox="0 0 2000 2000">';
3393 $source .= '<g transform="translate(280, 340) scale(0.8, 0.7)">';
3394 $source .= '<path style="fill:' . $color . '" d="M1792 710v794q0 66-47 113t-113 47h-1472q-66 0-113-47t-47-113v-794q44 49 101 87 362 246 497 345 57 42 92.5 65.5t94.5 48 110 24.5h2q51 0 110-24.5t94.5-48 92.5-65.5q170-123 498-345 57-39 100-87zm0-294q0 79-49 151t-122 123q-376 261-468 325-10 7-42.5 30.5t-54 38-52 32.5-57.5 27-50 9h-2q-23 0-50-9t-57.5-27-52-32.5-54-38-42.5-30.5q-91-64-262-182.5t-205-142.5q-62-42-117-115.5t-55-136.5q0-78 41.5-130t118.5-52h1472q65 0 112.5 47t47.5 113z"/>';
3395 $source .= '</g>';
3396 $source .= '</svg>';
3397 // phpcs:ignore
3398 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3399 }
3400
3401 /**
3402 * Returns a base64 svg resource for the PagerDuty icon.
3403 *
3404 * @param string $color Optional. Color of the icon.
3405 * @return string The svg resource as a base64.
3406 * @since 1.0.0
3407 */
3408 private function get_base64_pagerduty_icon( $color = '#06AC38' ) {
3409 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" fill="none" viewBox="0 0 1000 1000">';
3410 $source .= '<g transform="translate(320,200) scale(1.6,1.6)">';
3411 $source .= '<path style="fill:' . $color . '" d="M54.5538972,272.557214 L54.5538972,371.475954 L0,371.475954 L0,272.557214 L54.5538972,272.557214 Z M109.046548,0.000774792703 C155.791517,0.0522613599 176.052007,2.70434494 204.842454,18.2553897 C236.470978,35.2371476 256,68.9883914 256,111.018242 C256,150.076285 240.079602,183.827529 209.512438,203.993367 C181.492537,222.6733 149.651741,225.220564 107.197347,225.220564 L107.197347,225.220564 L0,225.220564 L0,0 Z M117.785558,47.7544491 L116.112769,47.761194 L54.5538972,48.185738 L54.5538972,178.096186 L119.721393,178.096186 C165.359867,178.096186 200.172471,159.840796 200.172471,111.655058 C200.172471,66.8656716 172.15257,47.3366501 116.112769,47.761194 Z"/>';
3412 $source .= '</g>';
3413 $source .= '</svg>';
3414 // phpcs:ignore
3415 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3416 }
3417
3418 /**
3419 * Returns a base64 svg resource for the PHP icon.
3420 *
3421 * @param string $color Optional. Color of the icon.
3422 * @return string The svg resource as a base64.
3423 * @since 1.0.0
3424 */
3425 private function get_base64_php_icon( $color = '#777BB3' ) {
3426 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" fill="none" width="100%" height="100%" viewBox="0 0 100 100">';
3427 $source .= '<g transform="translate(10,30) scale(0.86,0.86)">';
3428 $source .= '<path style="fill:' . $color . '" d="m7.579 10.123 14.204 0c4.169 0.035 7.19 1.237 9.063 3.604 1.873 2.367 2.491 5.6 1.855 9.699-0.247 1.873-0.795 3.71-1.643 5.512-0.813 1.802-1.943 3.427-3.392 4.876-1.767 1.837-3.657 3.003-5.671 3.498-2.014 0.495-4.099 0.742-6.254 0.742l-6.36 0-2.014 10.07-7.367 0 7.579-38.001 0 0m6.201 6.042-3.18 15.9c0.212 0.035 0.424 0.053 0.636 0.053 0.247 0 0.495 0 0.742 0 3.392 0.035 6.219-0.3 8.48-1.007 2.261-0.742 3.781-3.321 4.558-7.738 0.636-3.71 0-5.848-1.908-6.413-1.873-0.565-4.222-0.83-7.049-0.795-0.424 0.035-0.83 0.053-1.219 0.053-0.353 0-0.724 0-1.113 0l0.053-0.053"/>';
3429 $source .= '<path style="fill:' . $color . '" d="m41.093 0 7.314 0-2.067 10.123 6.572 0c3.604 0.071 6.289 0.813 8.056 2.226 1.802 1.413 2.332 4.099 1.59 8.056l-3.551 17.649-7.42 0 3.392-16.854c0.353-1.767 0.247-3.021-0.318-3.763-0.565-0.742-1.784-1.113-3.657-1.113l-5.883-0.053-4.346 21.783-7.314 0 7.632-38.054 0 0"/>';
3430 $source .= '<path style="fill:' . $color . '" d="m70.412 10.123 14.204 0c4.169 0.035 7.19 1.237 9.063 3.604 1.873 2.367 2.491 5.6 1.855 9.699-0.247 1.873-0.795 3.71-1.643 5.512-0.813 1.802-1.943 3.427-3.392 4.876-1.767 1.837-3.657 3.003-5.671 3.498-2.014 0.495-4.099 0.742-6.254 0.742l-6.36 0-2.014 10.07-7.367 0 7.579-38.001 0 0m6.201 6.042-3.18 15.9c0.212 0.035 0.424 0.053 0.636 0.053 0.247 0 0.495 0 0.742 0 3.392 0.035 6.219-0.3 8.48-1.007 2.261-0.742 3.781-3.321 4.558-7.738 0.636-3.71 0-5.848-1.908-6.413-1.873-0.565-4.222-0.83-7.049-0.795-0.424 0.035-0.83 0.053-1.219 0.053-0.353 0-0.724 0-1.113 0l0.053-0.053"/>';
3431 $source .= '</g>';
3432 $source .= '</svg>';
3433 // phpcs:ignore
3434 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3435 }
3436
3437 /**
3438 * Returns a base64 svg resource for the RAM icon.
3439 *
3440 * @param string $color Optional. Color of the icon.
3441 * @return string The svg resource as a base64.
3442 * @since 1.0.0
3443 */
3444 private function get_base64_ram_icon( $color = '#808080' ) {
3445 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" fill="none" width="100%" height="100%" viewBox="0 0 100 100">';
3446 $source .= '<g transform="translate(13,20) scale(0.61,0.61)">';
3447 $source .= '<path style="fill:' . $color . '" d="M13.78,13.25V3.84C13.78,1.72,15.5,0,17.62,0s3.84,1.72,3.84,3.84v9.41h9.73V3.84c0-2.12,1.72-3.84,3.84-3.84 c2.12,0,3.84,1.72,3.84,3.84v9.41h9.73V3.84c0-2.12,1.72-3.84,3.84-3.84c2.12,0,3.84,1.72,3.84,3.84v9.41h9.73V3.84 c0-2.12,1.72-3.84,3.84-3.84c2.12,0,3.84,1.72,3.84,3.84v9.41h9.73V3.84c0-2.12,1.72-3.84,3.84-3.84c2.12,0,3.84,1.72,3.84,3.84 v9.41h9.73V3.84c0-2.12,1.72-3.84,3.84-3.84c2.12,0,3.84,1.72,3.84,3.84v9.41h8.6c1.59,0,3.03,0.65,4.07,1.69 c1.04,1.04,1.69,2.48,1.69,4.07v60.66c0,1.57-0.65,3.01-1.69,4.06l0.01,0.01c-1.04,1.04-2.48,1.69-4.07,1.69h-8.6v8.82 c0,2.12-1.72,3.84-3.84,3.84c-2.12,0-3.84-1.72-3.84-3.84v-8.82h-9.73v8.82c0,2.12-1.72,3.84-3.84,3.84 c-2.12,0-3.84-1.72-3.84-3.84v-8.82H73.7v8.82c0,2.12-1.72,3.84-3.84,3.84c-2.12,0-3.84-1.72-3.84-3.84v-8.82h-9.73v8.82 c0,2.12-1.72,3.84-3.84,3.84c-2.12,0-3.84-1.72-3.84-3.84v-8.82h-9.73v8.82c0,2.12-1.72,3.84-3.84,3.84 c-2.12,0-3.84-1.72-3.84-3.84v-8.82h-9.73v8.82c0,2.12-1.72,3.84-3.84,3.84s-3.84-1.72-3.84-3.84v-8.82H5.75 c-1.59,0-3.03-0.65-4.07-1.69C0.65,82.69,0,81.25,0,79.67V19.01c0-1.59,0.65-3.03,1.69-4.07c0.12-0.12,0.25-0.23,0.38-0.33 c1.01-0.84,2.29-1.35,3.69-1.35H13.78L13.78,13.25z M30.76,62.77l-5.2-9.85v9.85h-8.61V35.31h12.8c2.22,0,4.12,0.39,5.7,1.18 c1.58,0.79,2.76,1.86,3.55,3.22c0.79,1.36,1.18,2.89,1.18,4.6c0,1.84-0.51,3.47-1.53,4.89c-1.02,1.42-2.49,2.44-4.4,3.06 l5.97,10.51H30.76L30.76,62.77z M25.56,47.18h3.41c0.83,0,1.45-0.19,1.86-0.56c0.41-0.38,0.62-0.96,0.62-1.77 c0-0.72-0.21-1.29-0.64-1.71c-0.43-0.41-1.04-0.62-1.84-0.62h-3.41V47.18L25.56,47.18z M60.55,58.62h-9.15l-1.36,4.15H41 l10.05-27.46h9.93l10.01,27.46h-9.08L60.55,58.62L60.55,58.62z M58.45,52.15l-2.48-7.64l-2.48,7.64H58.45L58.45,52.15z M105.93,35.31v27.46h-8.57V49.08l-4.23,13.69h-7.37l-4.23-13.69v13.69h-8.61V35.31h10.55l6.05,16.49l5.9-16.49H105.93 L105.93,35.31z M115.2,20.93H7.68v56.81H115.2V20.93L115.2,20.93z"/>';
3448 $source .= '</g>';
3449 $source .= '</svg>';
3450 // phpcs:ignore
3451 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3452 }
3453
3454 /**
3455 * Returns a base64 svg resource for the WordPress icon.
3456 *
3457 * @param string $color Optional. Color of the icon.
3458 * @return string The svg resource as a base64.
3459 * @since 1.0.0
3460 */
3461 private function get_base64_wordpress_icon( $color = '#0073AA' ) {
3462 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" fill="none" width="100%" height="100%" viewBox="0 0 100 100">';
3463 $source .= '<g transform="translate(-38,-12) scale(15,15)">';
3464 $source .= '<path style="fill:' . $color . '" d="m5.8465 1.9131c0.57932 0 1.1068 0.222 1.5022 0.58547-0.1938-0.0052-0.3872 0.11-0.3952 0.3738-0.0163 0.5333 0.6377 0.6469 0.2853 1.7196l-0.2915 0.8873-0.7939-2.3386c-0.0123-0.0362 0.002-0.0568 0.0465-0.0568h0.22445c0.011665 0 0.021201-0.00996 0.021201-0.022158v-0.13294c0-0.012193-0.00956-0.022657-0.021201-0.022153-0.42505 0.018587-0.8476 0.018713-1.2676 0-0.0117-0.0005-0.0212 0.01-0.0212 0.0222v0.13294c0 0.012185 0.00954 0.022158 0.021201 0.022158h0.22568c0.050201 0 0.064256 0.016728 0.076091 0.049087l0.3262 0.8921-0.4907 1.4817-0.8066-2.3758c-0.01-0.0298 0.0021-0.0471 0.0308-0.0471h0.25715c0.011661 0 0.021197-0.00996 0.021197-0.022158v-0.13294c0-0.012193-0.00957-0.022764-0.021197-0.022153-0.2698 0.014331-0.54063 0.017213-0.79291 0.019803 0.39589-0.60984 1.0828-1.0134 1.8639-1.0134l-0.0000029-0.0000062zm1.9532 1.1633c0.17065 0.31441 0.26755 0.67464 0.26755 1.0574 0 0.84005-0.46675 1.5712-1.1549 1.9486l0.6926-1.9617c0.1073-0.3036 0.2069-0.7139 0.1947-1.0443h-0.000004zm-1.2097 3.1504c-0.2325 0.0827-0.4827 0.1278-0.7435 0.1278-0.2247 0-0.4415-0.0335-0.6459-0.0955l0.68415-1.9606 0.70524 1.9284v-1e-7zm-1.6938-0.0854c-0.75101-0.35617-1.2705-1.1213-1.2705-2.0075 0-0.32852 0.071465-0.64038 0.19955-0.92096l1.071 2.9285 0.000003-0.000003zm0.95023-4.4367c1.3413 0 2.4291 1.0878 2.4291 2.4291s-1.0878 2.4291-2.4291 2.4291-2.4291-1.0878-2.4291-2.4291 1.0878-2.4291 2.4291-2.4291zm0-0.15354c1.4261 0 2.5827 1.1566 2.5827 2.5827s-1.1566 2.5827-2.5827 2.5827-2.5827-1.1566-2.5827-2.5827 1.1566-2.5827 2.5827-2.5827z"/>';
3465 $source .= '</g>';
3466 $source .= '</svg>';
3467 // phpcs:ignore
3468 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3469 }
3470
3471 /**
3472 * Returns a base64 svg resource for the WordPress icon.
3473 *
3474 * @param string $color Optional. Color of the icon.
3475 * @return string The svg resource as a base64.
3476 * @since 1.0.0
3477 */
3478 private function get_base64_browserconsole_icon( $color = '#444466' ) {
3479 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" fill="none" width="100%" height="100%" viewBox="0 0 100 100">';
3480 $source .= '<g transform="translate(12,12) scale(0.075,0.075)">';
3481 $source .= '<path style="fill:' . $color . '" d="M913.2,10.5H86.8C44.5,10.5,10,44.9,10,87.2v825.5c0,42.3,34.5,76.8,76.8,76.8h826.4c42.4,0,76.8-34.5,76.8-76.8V87.2C990,44.9,955.5,10.5,913.2,10.5z M861.1,97.9c18.2,0,32.9,14.7,32.9,32.9c0,18.2-14.7,32.9-32.9,32.9c-18.2,0-32.9-14.7-32.9-32.9C828.2,112.6,843,97.9,861.1,97.9z M743.2,97.9c18.2,0,32.9,14.7,32.9,32.9c0,18.2-14.7,32.9-32.9,32.9c-18.2,0-32.9-14.7-32.9-32.9C710.3,112.6,725,97.9,743.2,97.9z M902.2,901.8H97.8V245.4h804.5L902.2,901.8L902.2,901.8z M478.4,490.9L213.4,612.3v-58.5l204.8-87.8V465l-204.8-87.8v-58.5l264.9,121.4V490.9L478.4,490.9z M786.6,592.3h-276v-27.6h276V592.3z"/>';
3482 $source .= '</g>';
3483 $source .= '</svg>';
3484 // phpcs:ignore
3485 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3486 }
3487
3488 /**
3489 * Returns a base64 svg resource for the Chrome icon.
3490 *
3491 * @param string $color1 Optional. Color 1 of the icon.
3492 * @param string $color2 Optional. Color 2 of the icon.
3493 * @param string $color3 Optional. Color 3 of the icon.
3494 * @param string $color4 Optional. Color 4 of the icon.
3495 * @return string The svg resource as a base64.
3496 * @since 1.0.0
3497 */
3498 private function get_base64_chrome_icon( $color1 = '#EA4335', $color2 = '#4285F4', $color3 = '#34A853', $color4 = '#FBBC05' ) {
3499 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" fill="none" width="100%" height="100%" viewBox="0 0 100 100">';
3500 $source .= '<g transform="translate(10,10) scale(1.66,1.66)">';
3501 $source .= '<path style="fill:' . $color1 . '" d="M5.795 8.361C16.952-4.624 37.64-2.06 45.373 13.107c-5.444.002-13.969-.001-18.586 0-3.349.001-5.51-.075-7.852 1.158-2.753 1.449-4.83 4.135-5.555 7.29L5.795 8.36z"/>';
3502 $source .= '<path style="fill:' . $color2 . '" d="M16.015 24c0 4.4 3.579 7.98 7.977 7.98s7.976-3.58 7.976-7.98c0-4.401-3.578-7.982-7.976-7.982s-7.977 3.58-7.977 7.981z"/>';
3503 $source .= '<path style="fill:' . $color3 . '" d="M27.088 34.446c-4.477 1.33-9.717-.145-12.587-5.1A7917.733 7917.733 0 0 1 3.892 10.898C-5.322 25.02 2.62 44.264 19.346 47.55l7.742-13.103z"/>';
3504 $source .= '<path style="fill:' . $color4 . '" d="M31.401 16.018c3.73 3.468 4.542 9.084 2.016 13.439-1.903 3.28-7.977 13.531-10.92 18.495C39.73 49.015 52.294 32.124 46.62 16.018H31.4z"/>';
3505 $source .= '</g>';
3506 $source .= '</svg>';
3507 // phpcs:ignore
3508 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3509 }
3510
3511 /**
3512 * Returns a base64 svg resource for the SysLog icon.
3513 *
3514 * @param string $color Optional. Color of the icon.
3515 * @return string The svg resource as a base64.
3516 * @since 1.0.0
3517 */
3518 private function get_base64_syslog_icon( $color = '#983256' ) {
3519 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" fill="none" width="100%" height="100%" viewBox="0 0 100 100">';
3520 $source .= '<g transform="translate(12,14) scale(0.075,0.075)">';
3521 $source .= '<path style="fill:' . $color . '" d="M254.1,213.7h491.7l4.8,0.3c12-1.1,22.8-6.7,31.3-14.7c8.8-9.4,14.4-21.7,14.4-35.6v-25.9c0-13.9-5.6-26.8-14.4-35.6l0,0c-9.1-9.4-22-15-36.1-15H254.1c-13.9,0-26.8,5.6-35.9,15c-9.1,8.8-14.5,21.7-14.5,35.6v25.9c0,13.9,5.4,26.2,14.5,35.6c8.5,8,18.7,13.6,31.1,14.7L254.1,213.7L254.1,213.7z M278.2,457L278.2,457c20.9,0,38,17.1,38,37.8c0,20.6-17.1,37.7-38,37.7c-20.9,0-37.5-17.1-37.5-37.7C240.7,474.2,257.4,457,278.2,457L278.2,457z M278.2,284.9L278.2,284.9c20.9,0,38,16.9,38,37.5c0,21.2-17.1,38-38,38c-20.9,0-37.5-16.9-37.5-38C240.7,301.8,257.4,284.9,278.2,284.9L278.2,284.9z M278.2,112.8L278.2,112.8c20.9,0,38,17.1,38,37.8c0,21.1-17.1,37.8-38,37.8c-20.9,0-37.5-16.6-37.5-37.8C240.7,129.9,257.4,112.8,278.2,112.8L278.2,112.8z M537.9,603.7L537.9,603.7v102.8c20.1,5.9,38.5,17.1,53,32.1c14.5,14.2,25.4,31.6,31.6,51.7h329.8c20.9,0,37.7,16.3,37.7,37.7c0,20.6-16.8,37.5-37.7,37.5H623.5c-6.2,21.1-17.1,40.1-32.7,54.9c-23,23.8-55.1,38-91,38c-35.3,0-68-14.2-91-38c-15-14.8-26.2-33.7-32.7-54.9H47.5C26.6,865.5,10,848.7,10,828c0-21.4,16.6-37.7,37.5-37.7h329.8c6.4-20.1,17.6-37.5,31.6-51.7c14.7-15,32.9-26.2,53.2-32.1V603.7h-208c-26.2,0-50.3-11-67.7-28.4v-0.6c-17.4-16.6-28.1-40.9-28.1-67.2v-26c0-26.2,10.7-50.3,28.1-67.7c1.9-1.9,3.5-3.5,5.9-5.6c-2.4-1.3-4-3.2-5.9-4.8c-17.4-17.6-28.1-41.5-28.1-67.7v-26.2c0-26.2,10.7-50.3,28.1-67.2c1.9-2.4,3.5-4,5.9-5.4c-2.4-2.1-4-4-5.9-5.6c-17.4-17.4-28.1-41.5-28.1-67.7v-25.9c0-26.2,10.7-50.6,28.1-67.7c17.4-17.4,41-28.4,67.7-28.4h491.7c26.5,0,50.3,11,67.7,28.4l0,0c17.1,17.1,28.1,41.5,28.1,67.7v25.9c0,26.2-11,50.3-28.1,67.7c-1.6,1.6-4,3.5-5.9,5.6c1.9,1.4,3.7,2.9,5.9,5.4l0,0c17.1,17.1,28.1,40.9,28.1,67.2v26.2c0,26.3-11,50.3-28.1,67.7c-1.6,1.6-4,3.5-5.9,4.8c1.9,2.1,3.7,3.8,5.9,5.6l0,0c17.1,17.4,28.1,41.5,28.1,67.7v26c0,26.2-11,50.6-28.1,67.2c-17.4,17.9-41.2,28.9-67.7,28.9H537.9L537.9,603.7z M750.7,259.2L750.7,259.2l-4.8,0.2H254.1l-4.8-0.2c-12.4,0.8-22.5,6.4-31.1,14.7c-9.1,9.1-14.5,21.7-14.5,35.6v26.2c0,13.7,5.4,26.5,14.5,35.6v0.5c8.5,7.8,18.7,13.4,31.1,14.2l4.8-0.2h491.7l4.8,0.2c12-0.8,22.8-6.4,31.3-14.7c8.8-9.1,14.4-21.9,14.4-35.6v-26.2c0-13.9-5.6-26.5-14.4-35.6v-0.5C773.5,265.7,762.7,260,750.7,259.2L750.7,259.2z M750.7,431.3L750.7,431.3l-4.8,0.3H254.1l-4.8-0.3c-12.4,1.1-22.5,6.4-31.1,14.7c-9.1,9.4-14.5,21.7-14.5,35.6v26c0,13.9,5.4,26.5,14.5,35.6c9.1,9.4,21.9,15,35.9,15h491.7c14.2,0,26.5-5.6,36.1-15c8.8-9.1,14.4-21.7,14.4-35.6v-26c0-13.9-5.6-26.2-14.4-35.6l0,0C773.5,437.8,762.7,432.4,750.7,431.3L750.7,431.3z M558.8,770.2L558.8,770.2c-15-15-35.3-24.4-58.9-24.4c-23,0-43.9,9.4-58.9,24.4c-15,15.3-24.6,35.9-24.6,59.2c0,23.3,9.6,44.2,24.6,59.1c15,15,35.9,24.4,58.9,24.4c23.6,0,43.9-9.4,58.9-24.4c15.5-15,24.6-35.8,24.6-59.1C583.4,806.1,574.3,785.5,558.8,770.2L558.8,770.2z"/>';
3522 $source .= '</g>';
3523 $source .= '</svg>';
3524 // phpcs:ignore
3525 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3526 }
3527
3528 /**
3529 * Returns a base64 svg resource for the files icon.
3530 *
3531 * @param string $color Optional. Color of the icon.
3532 * @return string The svg resource as a base64.
3533 * @since 1.0.0
3534 */
3535 private function get_base64_rotatingfiles_icon( $color = '#FF9920' ) {
3536 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" fill="none" width="100%" height="100%" viewBox="0 0 1085 1024">';
3537 $source .= '<g transform="translate(140,0) scale(0.9,0.9)">';
3538 $source .= '<path style="fill:' . $color . '" d="M818.695498 905.89199c-7.809239 32.224332-25.761513 57.447276-57.447276 57.447276l-718.090955 0 100.532734-473.94003c7.539955-33.750275 25.58199-57.447276 57.357515-57.447276l660.823202 0c31.685763 0 57.357515 25.761513 57.357515 57.447276L818.695498 905.89199 818.695498 905.89199 818.695498 905.89199zM157.962058 388.866502l646.371621 0L804.333679 332.406601c0-31.775525-25.761513-57.447276-57.447276-57.447276l-344.683658 0 0-52.061594c0-31.685763-25.761513-57.447276-57.447276-57.447276L57.429324 165.450454c-31.685763 0-57.447276 25.761513-57.447276 57.447276l0 682.99426 100.442972-459.578211C107.875214 415.076822 126.276294 388.866502 157.962058 388.866502L157.962058 388.866502 157.962058 388.866502zM392.020214 845.683654c0.919156 4.136204 3.217047 7.81283 6.893673 10.570299l70.775045 54.689807c3.217047 2.297891 6.893673 3.676626 10.570299 3.676626 2.757469 0 5.514939-0.459578 7.81283-1.838313 5.974517-2.757469 9.651142-9.191564 9.651142-16.085237l0-17.92355 0-15.166081c47.336556-6.434095 92.37522-31.251318 123.166961-73.072936 56.52812-76.749561 44.119508-185.669597-28.493849-247.253078-79.966609-68.477153-199.916522-55.608964-263.338315 26.655536-37.685413 48.255712-46.876978 109.379614-31.251318 164.069421 4.595782 15.166081 21.600176 22.519332 35.387522 15.166081l0 0c11.489455-5.974517 17.463972-19.302285 13.787346-31.251318-11.029877-39.983304-3.217047-84.562391 25.73638-119.030757 43.65993-51.47276 120.409491-61.123902 175.558877-22.059754 60.664324 43.200352 72.153779 127.762743 26.655536 185.669597-20.221441 25.73638-47.796134 42.281195-77.668718 47.796134l0-0.459578 0-4.595782 0-18.383128c0-6.893673-3.676626-13.327768-9.651142-16.085237-2.757469-1.378735-5.514939-1.838313-7.81283-1.838313-3.676626 0-7.353251 1.378735-10.570299 3.676626l-70.775045 55.149385c-4.595782 3.217047-6.893673 9.191564-7.353251 14.706503 0 0.919156 0 1.838313 0 2.757469 0 0-0.459578 0.459578-0.919156 0.919156C391.101058 845.683654 391.560636 845.683654 392.020214 845.683654z"/>';
3539 $source .= '</g>';
3540 $source .= '</svg>';
3541 // phpcs:ignore
3542 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3543 }
3544
3545 /**
3546 * Returns a base64 svg resource for the Bugsnag icon.
3547 *
3548 * @param string $color Optional. Color of the icon.
3549 * @return string The svg resource as a base64.
3550 * @since 1.0.0
3551 */
3552 private function get_base64_bugsnag_icon( $color = '#000D47' ) {
3553 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" fill="none" width="100%" height="100%" viewBox="0 0 256 256">';
3554 $source .= '<g transform="translate(70,44) scale(0.47,0.47)">';
3555 $source .= '<path style="fill:' . $color . '" d="M65.0423885,2.17395258 C70.4545453,5.19866092 73.8066154,10.9148738 73.8039753,17.1148976 L73.9684716,167.519284 L128,167.519284 C157.528128,167.514849 184.151192,185.29875 195.45419,212.57791 C206.757189,239.857069 200.514033,271.258943 179.636062,292.140051 C158.758091,313.021159 127.357155,319.269032 100.076298,307.970132 C72.7954405,296.671231 55.0075397,270.050839 55.0075394,240.522711 L54.9417409,186.567948 L19.0376971,186.567948 L19.0376971,240.522711 C19.0376971,300.700929 67.8217818,349.485014 128,349.485014 C188.178218,349.485014 236.962303,300.700929 236.962303,240.522711 C236.962303,180.344493 188.178218,131.560408 128,131.560408 L111.484578,131.560408 C106.227464,131.560408 101.96573,127.298675 101.96573,122.04156 C101.96573,116.784445 106.227464,112.522711 111.484578,112.522711 L128,112.522711 C198.692448,112.522711 256,169.830263 256,240.522711 C256,311.215159 198.692448,368.522711 128,368.522711 C57.3401216,368.444143 0.0785681282,311.18259 0,240.522711 L0,177.049099 C0,171.790207 4.25996023,167.525336 9.51884853,167.519284 L54.9198081,167.519284 L54.7662783,20.5693185 L19.0376971,42.5569813 L19.0376971,126.23073 C19.0376971,131.487845 14.7759634,135.749579 9.51884853,135.749579 C4.26173365,135.749579 0,131.487845 0,126.23073 L0,41.4713061 C0.0146388647,35.5314746 3.0957178,30.0203657 8.14804661,26.8969401 L47.7258396,2.54053164 C53.0051433,-0.710507348 59.6302316,-0.85075577 65.0423885,2.17395258 Z M127.945168,186.567948 L73.9904033,186.567948 L73.9904033,240.511745 C73.9859687,262.335407 87.1288121,282.012637 107.289974,290.367265 C127.451136,298.721892 150.65984,294.108459 166.093068,278.678368 C181.526296,263.248276 186.144447,240.040511 177.793918,219.877651 C169.443389,199.714791 149.768831,186.567948 127.945168,186.567948 Z M128,225.257461 C136.430765,225.257461 143.26525,232.091946 143.26525,240.522711 C143.26525,248.953476 136.430765,255.787961 128,255.787961 C119.569235,255.787961 112.73475,248.953476 112.73475,240.522711 C112.73475,232.091946 119.569235,225.257461 128,225.257461 Z"/>';
3556 $source .= '</g>';
3557 $source .= '</svg>';
3558 // phpcs:ignore
3559 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3560 }
3561
3562 /**
3563 * Returns a base64 svg resource for the Sentry icon.
3564 *
3565 * @param string $color Optional. Color of the icon.
3566 * @return string The svg resource as a base64.
3567 * @since 1.0.0
3568 */
3569 private function get_base64_sentry_icon( $color = '#362d59' ) {
3570 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" fill="none" width="100%" height="100%" viewBox="0 0 256 256">';
3571 $source .= '<g transform="translate(-8,0) scale(3.8,3.8)">';
3572 $source .= '<path d="M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z" transform="translate(11, 11)" fill="' . $color . '"></path>';
3573 $source .= '</g>';
3574 $source .= '</svg>';
3575 // phpcs:ignore
3576 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3577 }
3578
3579 /**
3580 * Returns a base64 svg resource for the Raygun icon.
3581 *
3582 * @param string $color1 Optional. Color 1 of the icon.
3583 * @param string $color2 Optional. Color 2 of the icon.
3584 * @param string $color3 Optional. Color 3 of the icon.
3585 * @param string $color4 Optional. Color 4 of the icon.
3586 * @param string $color5 Optional. Color 5 of the icon.
3587 * @return string The svg resource as a base64.
3588 * @since 1.0.0
3589 */
3590 private function get_base64_raygun_icon( $color1 = '#F4DB12', $color2 = '#DF282B', $color3 = '#D3D2D3', $color4 = '#C02123', $color5 = '#FFFFFF' ) {
3591 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" fill="none" width="100%" height="100%" viewBox="0 0 100 100">';
3592 $source .= '<g transform="translate(6,3) scale(2.2,2.2)">';
3593 $source .= '<path style="fill:' . $color1 . '" d="M23.0848 8.81499C23.0848 8.81499 15.7216 4.938 6.06982 8.51676L8.55739 11.2008L6.16933 12.4932L9.2539 16.0719L23.0848 8.81499Z"/>';
3594 $source .= '<path style="fill:' . $color1 . '" d="M29.9502 16.0719V18.6566V20.4459V23.0306C29.9502 23.0306 31.9402 20.4459 35.9203 20.4459V18.6566C31.9402 18.6566 29.9502 16.0719 29.9502 16.0719Z"/>';
3595 $source .= '<path style="fill:' . $color2 . '" d="M14.0298 28.7964C14.0298 28.7964 18.9054 30.7846 16.5173 36.5504C16.1193 37.5445 18.9054 38.638 21.2935 37.5445C21.393 37.4451 20.0994 36.7493 20.0994 35.7552C20.0994 35.1587 21.2935 30.8841 21.2935 30.8841L14.0298 28.7964Z"/>';
3596 $source .= '<path style="fill:' . $color3 . '" d="M21.1941 37.4451C21.1941 37.4451 17.214 35.5563 19.9006 30.3869C22.4876 25.5159 23.9802 31.381 23.9802 31.381C23.9802 31.381 19.9006 34.4628 21.1941 37.4451Z"/>';
3597 $source .= '<path style="fill:' . $color4 . '" d="M37.5125 21.9371C38.8863 21.9371 40 20.8244 40 19.4519C40 18.0793 38.8863 16.9666 37.5125 16.9666C36.1386 16.9666 35.0249 18.0793 35.0249 19.4519C35.0249 20.8244 36.1386 21.9371 37.5125 21.9371Z"/>';
3598 $source .= '<path style="fill:' . $color2 . '" d="M28.2586 8.11912C27.6616 8.11912 27.0646 8.01971 26.4676 8.01971C16.0198 8.01971 8.55713 12.1949 8.55713 19.9489C8.55713 27.7029 16.0198 31.8781 26.4676 31.8781C27.0646 31.8781 27.6616 31.8781 28.2586 31.7787V8.11912Z" fill="#DF282B"/>';
3599 $source .= '<path style="fill:' . $color4 . '" d="M8.55713 19.9489C8.55713 27.7029 16.0198 31.8781 26.3681 31.8781C26.9651 31.8781 27.5621 31.8781 28.1591 31.7787V20.0483"/>';
3600 $source .= '<path style="fill:' . $color2 . '" d="M19.0102 26.0129C22.3074 26.0129 24.9803 23.3424 24.9803 20.0483C24.9803 16.7541 22.3074 14.0837 19.0102 14.0837C15.713 14.0837 13.04 16.7541 13.04 20.0483C13.04 23.3424 15.713 26.0129 19.0102 26.0129Z"/>';
3601 $source .= '<path style="fill:' . $color1 . '" d="M19.5076 14.2826C22.4927 14.2826 24.9802 16.8672 24.9802 19.9489C24.9802 23.0307 22.4927 25.6153 19.5076 25.6153C16.5225 25.6153 14.035 23.1301 14.035 19.9489C14.035 16.7678 16.5225 14.2826 19.5076 14.2826ZM19.5076 12.2944C15.428 12.2944 12.0449 15.7737 12.0449 19.9489C12.0449 24.2236 15.428 27.6035 19.5076 27.6035C23.5872 27.6035 26.9703 24.2236 26.9703 19.9489C26.9703 15.7737 23.5872 12.2944 19.5076 12.2944Z"/>';
3602 $source .= '<path style="fill:' . $color5 . '" d="M22.6466 19.4929L20.1579 19.0849L21.1317 13.9843L17.02 20.5131L19.5087 20.9211L18.4267 26.3277L22.6466 19.4929Z"/>';
3603 $source .= '<path style="fill:' . $color1 . '" d="M13.9353 16.0719C13.9353 16.0719 7.46766 17.1654 4.28358 20.5454L7.46766 21.6389C7.46766 21.6389 3.18906 22.7324 1 25.0188C1 25.0188 8.46269 21.6389 14.9303 25.0188L12.5423 21.8377L12.9403 21.0424L12.3433 20.0483L13.9353 16.0719Z"/>';
3604 $source .= '<path style="fill:' . $color3 . '" d="M28.2588 31.7787C29.3533 31.6793 30.3483 31.5799 31.3434 31.4805V8.51674C30.3483 8.31792 29.2538 8.21851 28.2588 8.21851V31.7787Z"/>';
3605 $source .= '<path style="fill:' . $color2 . '" d="M39.9005 18.756C39.602 17.7619 38.607 16.9666 37.5125 16.9666C36.1194 16.9666 35.0249 18.0601 35.0249 19.4519C35.0249 19.7501 35.1244 20.0483 35.2239 20.3466C35.7214 20.7442 36.4179 21.0424 37.1145 21.0424C38.408 21.0424 39.5025 20.0483 39.9005 18.756Z"/>';
3606 $source .= '</g>';
3607 $source .= '</svg>';
3608 // phpcs:ignore
3609 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3610 }
3611
3612 /**
3613 * Returns a base64 svg resource for the Raygun icon.
3614 *
3615 * @param string $color1 Optional. Color 1 of the icon.
3616 * @param string $color2 Optional. Color 2 of the icon.
3617 * @return string The svg resource as a base64.
3618 * @since 1.0.0
3619 */
3620 private function get_base64_ganalytics_icon( $color1 = '#F9AB00', $color2 = '#E37400' ) {
3621 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" fill="none" width="100%" height="100%" viewBox="0 0 100 100">';
3622 $source .= '<g transform="translate(15,15) scale(1.4,1.4)">';
3623 $source .= '<path style="fill:' . $color1 . '" d="M45.3,41.6c0,3.2-2.6,5.9-5.8,5.9c-0.2,0-0.5,0-0.7,0c-3-0.4-5.2-3.1-5.1-6.1V6.6c-0.1-3,2.1-5.6,5.1-6.1c3.2-0.4,6.1,1.9,6.5,5.1c0,0.2,0,0.5,0,0.7V41.6z"/>';
3624 $source .= '<path style="fill:' . $color2 . '" d="M8.6,35.9c3.2,0,5.8,2.6,5.8,5.8c0,3.2-2.6,5.8-5.8,5.8s-5.8-2.6-5.8-5.8c0,0,0,0,0,0C2.7,38.5,5.4,35.9,8.6,35.9z M23.9,18.2c-3.2,0.2-5.7,2.9-5.7,6.1V40c0,4.2,1.9,6.8,4.6,7.4c3.2,0.6,6.2-1.4,6.9-4.6c0.1-0.4,0.1-0.8,0.1-1.2V24.1c0-3.2-2.6-5.9-5.8-5.9C24,18.2,23.9,18.2,23.9,18.2z"/>';
3625 $source .= '</g>';
3626 $source .= '</svg>';
3627 // phpcs:ignore
3628 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3629 }
3630
3631 /**
3632 * Returns a base64 svg resource for the Chrome icon.
3633 *
3634 * @param string $color1 Optional. Color 1 of the icon.
3635 * @param string $color2 Optional. Color 2 of the icon.
3636 * @param string $color3 Optional. Color 3 of the icon.
3637 * @param string $color4 Optional. Color 4 of the icon.
3638 * @return string The svg resource as a base64.
3639 * @since 1.0.0
3640 */
3641 private function get_base64_slack_icon( $color1 = '#36c5f0', $color2 = '#2eb67d', $color3 = '#ecb22e', $color4 = '#e01e5a' ) {
3642 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" fill="none" width="100%" height="100%" viewBox="0 0 100 100">';
3643 $source .= '<g transform="translate(16,16) scale(1.16,1.16)">';
3644 $source .= '<path style="fill:' . $color1 . '" d="m 21.902,0.148 c -3.299,0 -5.973,2.68 -5.973,5.985 a 5.979,5.979 0 0 0 5.973,5.985 h 5.974 V 6.133 A 5.98,5.98 0 0 0 21.902,0.148 m 0,15.96 H 5.973 C 2.674,16.108 0,18.788 0,22.094 c 0,3.305 2.674,5.985 5.973,5.985 h 15.93 c 3.298,0 5.973,-2.68 5.973,-5.985 0,-3.306 -2.675,-5.986 -5.974,-5.986"/>';
3645 $source .= '<path style="fill:' . $color2 . '" d="m 59.734,22.094 c 0,-3.306 -2.675,-5.986 -5.974,-5.986 -3.299,0 -5.973,2.68 -5.973,5.986 v 5.985 h 5.973 a 5.98,5.98 0 0 0 5.974,-5.985 m -15.929,0 V 6.133 A 5.98,5.98 0 0 0 37.831,0.148 c -3.299,0 -5.973,2.68 -5.973,5.985 v 15.96 c 0,3.307 2.674,5.987 5.973,5.987 a 5.98,5.98 0 0 0 5.974,-5.985"/>';
3646 $source .= '<path style="fill:' . $color3 . '" d="m 37.831,60 a 5.98,5.98 0 0 0 5.974,-5.985 5.98,5.98 0 0 0 -5.974,-5.985 h -5.973 v 5.985 c 0,3.305 2.674,5.985 5.973,5.985 m 0,-15.96 h 15.93 c 3.298,0 5.973,-2.68 5.973,-5.986 A 5.98,5.98 0 0 0 53.76,32.069 H 37.831 c -3.299,0 -5.973,2.68 -5.973,5.985 a 5.979,5.979 0 0 0 5.973,5.985"/>';
3647 $source .= '<path style="fill:' . $color4 . '" d="m 0,38.054 a 5.979,5.979 0 0 0 5.973,5.985 5.98,5.98 0 0 0 5.974,-5.985 V 32.069 H 5.973 C 2.674,32.069 0,34.749 0,38.054 m 15.929,0 v 15.96 c 0,3.306 2.674,5.986 5.973,5.986 a 5.98,5.98 0 0 0 5.974,-5.985 V 38.054 a 5.979,5.979 0 0 0 -5.974,-5.985 c -3.299,0 -5.973,2.68 -5.973,5.985"/>';
3648 $source .= '</g>';
3649 $source .= '</svg>';
3650 // phpcs:ignore
3651 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3652 }
3653
3654 /**
3655 * Returns a base64 svg resource for the Chrome icon.
3656 *
3657 * @param string $color1 Optional. Color 1 of the icon.
3658 * @param string $color2 Optional. Color 2 of the icon.
3659 * @return string The svg resource as a base64.
3660 * @since 1.0.0
3661 */
3662 private function get_base64_stackdriver_icon( $color1 = '#FFFFFF', $color2 = '#4386FA' ) {
3663 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" fill="none" width="100%" height="100%" viewBox="0 0 190 190">';
3664 $source .= '<g transform="translate(20,26) scale(1.2,1.2)">';
3665 $source .= '<path d="M2.52031008,63.4098189 C0.482133333,59.8145684 0.482133333,55.3850274 2.52031008,51.7897768 L28.5674171,5.84397474 C30.6055938,2.24872421 34.3723659,0.0339536842 38.4487194,0.0339536842 L90.5429333,0.0339536842 C94.6192868,0.0339536842 98.3860589,2.24872421 100.424236,5.84397474 L126.471343,51.7897768 C128.509519,55.3850274 128.509519,59.8145684 126.471343,63.4098189 L100.424236,109.355621 C98.3860589,112.950872 94.6192868,115.165642 90.5429333,115.165642 L38.4487194,115.165642 C34.3723659,115.165743 30.605693,112.950973 28.5674171,109.355722 L2.52031008,63.4098189 Z" id="Shape" fill="' . $color2 . '"></path>';
3666 $source .= '<path d="M94.2635659,31.3263158 L76.8,39.4105263 L60.5271318,39.4105263 L49.6124031,28.2947368 L42.8956775,39.4105263 L42.6666667,39.4105263 L34.7286822,43.4526316 L42.3193798,51.1831579 L40.6821705,82.8631579 L72.4004713,115.165743 L90.5429333,115.165743 C94.6192868,115.165743 98.3860589,112.950973 100.424236,109.355722 L126.213457,63.8648589 L94.2635659,31.3263158 L94.2635659,31.3263158 L94.2635659,31.3263158 Z" id="Shape" fill="#000000" opacity="0.0800000057"></path>';
3667 $source .= '<rect id="Rectangle-path" fill="' . $color1 . '" x="57.5503876" y="31.3263158" width="36.7131783" height="11.1157895"></rect>';
3668 $source .= '<rect id="Rectangle-path" fill="' . $color1 . '" x="42.6666667" y="57.6" width="15.875969" height="3.03157895"></rect>';
3669 $source .= '<rect id="Rectangle-path" fill="' . $color1 . '" x="57.5503876" y="53.5578947" width="36.7131783" height="11.1157895"></rect>';
3670 $source .= '<rect id="Rectangle-path" fill="' . $color1 . '" x="42.6666667" y="79.8315789" width="15.875969" height="3.03157895"></rect>';
3671 $source .= '<rect id="Rectangle-path" fill="' . $color1 . '" x="40.6821705" y="43.4526316" width="2.97674419" height="39.4105263"></rect>';
3672 $source .= '<g id="Group" transform="translate(34.728682, 28.294737)" fill="' . $color1 . '"><rect id="Rectangle-path" x="0" y="0" width="14.8837209" height="15.1578947"></rect><rect id="Rectangle-path" x="22.8217054" y="47.4947368" width="36.7131783" height="11.1157895"></rect></g>';
3673 $source .= '</g>';
3674 $source .= '</svg>';
3675 // phpcs:ignore
3676 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3677 }
3678
3679 /**
3680 * Returns a base64 svg resource for the Pushover icon.
3681 *
3682 * @param string $color Optional. Color of the icon.
3683 * @return string The svg resource as a base64.
3684 * @since 1.0.0
3685 */
3686 private function get_base64_pushover_icon( $color = '#249DF1' ) {
3687 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.91" width="602px" height="602px" viewBox="57 57 602 602">';
3688 $source .= '<g transform="translate(116, 116) scale(0.82,0.82)">';
3689 $source .= '<ellipse style="fill:' . $color . '; fill-rule: evenodd; stroke:#FFFFFF; stroke-width: 0;" transform="matrix(-0.674571, 0.73821, -0.73821, -0.674571, 556.833239, 241.613465)" cx="216.308" cy="152.076" rx="296.855" ry="296.855"/>';
3690 $source .= '<path style="fill:#FFFFFF; fill-rule: nonzero; white-space: pre;" transform="matrix(1, 0, 0, 1, 0, 0)" d="M 280.949 172.514 L 355.429 162.714 L 282.909 326.374 L 282.909 326.374 C 295.649 325.394 308.142 321.067 320.389 313.394 L 320.389 313.394 L 320.389 313.394 C 332.642 305.714 343.916 296.077 354.209 284.484 L 354.209 284.484 L 354.209 284.484 C 364.496 272.884 373.396 259.981 380.909 245.774 L 380.909 245.774 L 380.909 245.774 C 388.422 231.561 393.812 217.594 397.079 203.874 L 397.079 203.874 L 397.079 203.874 C 399.039 195.381 399.939 187.214 399.779 179.374 L 399.779 179.374 L 399.779 179.374 C 399.612 171.534 397.569 164.674 393.649 158.794 L 393.649 158.794 L 393.649 158.794 C 389.729 152.914 383.766 148.177 375.759 144.584 L 375.759 144.584 L 375.759 144.584 C 367.759 140.991 356.899 139.194 343.179 139.194 L 343.179 139.194 L 343.179 139.194 C 327.172 139.194 311.409 141.807 295.889 147.034 L 295.889 147.034 L 295.889 147.034 C 280.376 152.261 266.002 159.857 252.769 169.824 L 252.769 169.824 L 252.769 169.824 C 239.542 179.784 228.029 192.197 218.229 207.064 L 218.229 207.064 L 218.229 207.064 C 208.429 221.924 201.406 238.827 197.159 257.774 L 197.159 257.774 L 197.159 257.774 C 195.526 263.981 194.546 268.961 194.219 272.714 L 194.219 272.714 L 194.219 272.714 C 193.892 276.474 193.812 279.577 193.979 282.024 L 193.979 282.024 L 193.979 282.024 C 194.139 284.477 194.462 286.357 194.949 287.664 L 194.949 287.664 L 194.949 287.664 C 195.442 288.971 195.852 290.277 196.179 291.584 L 196.179 291.584 L 196.179 291.584 C 179.519 291.584 167.349 288.234 159.669 281.534 L 159.669 281.534 L 159.669 281.534 C 151.996 274.841 150.119 263.164 154.039 246.504 L 154.039 246.504 L 154.039 246.504 C 157.959 229.191 166.862 212.694 180.749 197.014 L 180.749 197.014 L 180.749 197.014 C 194.629 181.334 211.122 167.531 230.229 155.604 L 230.229 155.604 L 230.229 155.604 C 249.342 143.684 270.249 134.214 292.949 127.194 L 292.949 127.194 L 292.949 127.194 C 315.656 120.167 337.789 116.654 359.349 116.654 L 359.349 116.654 L 359.349 116.654 C 378.296 116.654 394.219 119.347 407.119 124.734 L 407.119 124.734 L 407.119 124.734 C 420.026 130.127 430.072 137.234 437.259 146.054 L 437.259 146.054 L 437.259 146.054 C 444.446 154.874 448.936 165.164 450.729 176.924 L 450.729 176.924 L 450.729 176.924 C 452.529 188.684 451.959 200.934 449.019 213.674 L 449.019 213.674 L 449.019 213.674 C 445.426 229.027 438.646 244.464 428.679 259.984 L 428.679 259.984 L 428.679 259.984 C 418.719 275.497 406.226 289.544 391.199 302.124 L 391.199 302.124 L 391.199 302.124 C 376.172 314.697 358.939 324.904 339.499 332.744 L 339.499 332.744 L 339.499 332.744 C 320.066 340.584 299.406 344.504 277.519 344.504 L 277.519 344.504 L 275.069 344.504 L 212.839 484.154 L 142.279 484.154 L 280.949 172.514 Z"/>';
3691 $source .= '</g>';
3692 $source .= '</svg>';
3693 // phpcs:ignore
3694 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3695 }
3696
3697 /**
3698 * Returns a base64 svg resource for the Fluentd icon.
3699 *
3700 * @return string The svg resource as a base64.
3701 * @since 1.0.0
3702 */
3703 private function get_base64_fluentd_icon() {
3704 $source = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.91" width="602px" height="602px" viewBox="0 0 1274 1047">';
3705 $source .= '<g transform="translate(120, 100) scale(0.84,0.84)">';
3706 $source .= '<style type="text/css"> .st0{fill:url(#SVGID_1_);} .st1{fill:url(#SVGID_2_);} .st2{fill:url(#SVGID_3_);} .st3{fill:url(#SVGID_4_);} .st4{fill:url(#SVGID_5_);} .st5{fill:url(#SVGID_6_);} .st6{fill:url(#SVGID_7_);} .st7{fill:url(#SVGID_8_);} .st8{fill:#FFFFFF;}</style>';
3707 $source .= '<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="21.0001" y1="1105.2095" x2="1258.6993" y2="1105.2095" gradientTransform="matrix(1 0 0 -1 0 1630)"><stop offset="0" style="stop-color:#2A59A2"/><stop offset="1" style="stop-color:#2A59A2"/></linearGradient>';
3708 $source .= '<path class="st0" d="M1252.1,450.3c-6.5,0-16.5,0-22.1,0c-40.2-0.5-117.3,3.8-187.2,64.2c-166.9,144.5-205,357.2-490.6,472 C314.3,1082.1,21,991.6,21,991.6s261.7-18.2,296.4-217.9c27.1-156.2-115-267.1-204.2-408C22.5,222.2-0.8,103,42.9,51.5 C166.8-94.8,508,300.7,677.4,354c165.8,52.1,277.7-68.9,415-51.1c43.8,5.6,65.2,24.5,79.4,48.6c4.8,8.1,16.6,35.7,27.1,45.9 c10.3,10,24,17.4,36.8,24.9C1252,431.9,1268.1,450.3,1252.1,450.3z"/>';
3709 $source .= '<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-28.9755" y1="1316.5281" x2="1280.1417" y2="1316.5281" gradientTransform="matrix(1 0 0 -1 0 1630)"><stop offset="0" style="stop-color:#91D3F2"/><stop offset="0.2664" style="stop-color:#6FB2DE"/><stop offset="0.5214" style="stop-color:#5598CE"/><stop offset="0.6729" style="stop-color:#4B8FC8"/></linearGradient>';
3710 $source .= '<path class="st1" d="M468,221.5c-41-31.2-83.3-63.9-124.9-93.7l0,0c-9.4-6.7-18.8-13.3-28.1-19.7l0,0 C203.5,31.8,100.1-16,42.9,51.5C-0.8,103,22.5,222.2,113.3,365.7c0.9,1.5,1.9,2.9,2.8,4.4c47.3,73.2,184.5,244.7,509.7,237.4 c21.4-22.7,53.9-65.6,95.9-112.3C653.6,385.1,551,289.1,468,221.5z"/>';
3711 $source .= '<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="21.1001" y1="817.0737" x2="1267.8341" y2="817.0737" gradientTransform="matrix(1 0 0 -1 0 1630)"><stop offset="0" style="stop-color:#2C9EC7"/><stop offset="0.4037" style="stop-color:#2C63A5"/><stop offset="1" style="stop-color:#395DA1"/></linearGradient>';
3712 $source .= '<path class="st2" d="M795.8,738.9c1.3-48.8-7.6-96.9-24.5-143.4c-42.7,6.4-90.8,10.8-145.5,12C586,649.8,495.1,762.8,344.5,864.6 c-200.5,135.6-323.4,127-323.4,127s293.4,90.5,531.2-5.1c85.3-34.3,148.6-77.3,199.8-124.7C760.5,853.8,794,812,795.8,738.9z"/>';
3713 $source .= '<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="21.0793" y1="1078.65" x2="1267.8134" y2="1078.65" gradientTransform="matrix(1 0 0 -1 0 1630)"><stop offset="0" style="stop-color:#4FAAC4"/><stop offset="1.554530e-03" style="stop-color:#2F75B1"/><stop offset="1" style="stop-color:#356EAC"/></linearGradient>';
3714 $source .= '<path class="st3" d="M721.8,495.2c-42,46.6-74.6,89.6-95.9,112.3c54.8-1.2,102.9-5.6,145.5-12c-5-13.9-10.8-27.6-17.2-41.1 C744.6,534.3,733.7,514.5,721.8,495.2z"/>';
3715 $source .= '<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="467.9999" y1="1271.65" x2="1274.9838" y2="1271.65" gradientTransform="matrix(1 0 0 -1 0 1630)"><stop offset="0" style="stop-color:#4FAAC4"/><stop offset="1.554530e-03" style="stop-color:#2F81B6"/><stop offset="1" style="stop-color:#3B5EA9"/></linearGradient>';
3716 $source .= '<path class="st4" d="M965.6,318.3c-87.8,26.6-175.5,71.1-288.2,35.7c-55.8-17.5-130.3-72.2-209.4-132.5 c83,67.6,185.6,163.5,253.8,273.7C784,426.3,867,349.3,965.6,318.3z"/>';
3717 $source .= '<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="467.9684" y1="962.7" x2="1274.9521" y2="962.7" gradientTransform="matrix(1 0 0 -1 0 1630)"><stop offset="0" style="stop-color:#4FAAC4"/><stop offset="1.554530e-03" style="stop-color:#1E3773"/><stop offset="1" style="stop-color:#203370"/></linearGradient>';
3718 $source .= '<path class="st5" d="M771.4,595.5c16.9,46.5,25.8,94.6,24.5,143.4c-1.9,73-35.4,114.8-43.8,122.9 c120.1-111.1,173.8-246,290.8-347.3c21.8-18.8,44.2-32.2,66.1-41.7h-0.1C1032.2,505,949,568.7,771.4,595.5z"/>';
3719 $source .= '<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="990.2508" y1="895.2981" x2="990.2508" y2="1337.8136" gradientTransform="matrix(1 0 0 -1 0 1630)"><stop offset="0" style="stop-color:#4FAAC4"/><stop offset="1.554530e-03" style="stop-color:#2C5A9A"/><stop offset="1" style="stop-color:#374580"/></linearGradient>';
3720 $source .= '<path class="st6" d="M1252.1,450.3c16,0-0.1-18.4-16.3-27.9c-12.8-7.6-26.5-15-36.8-24.9c-10.6-10.2-22.4-37.9-27.1-45.9 c-14.3-24.2-35.6-43-79.4-48.6c-44-5.7-85.4,2.9-126.8,15.4c-98.6,31-181.7,108-243.9,176.9c11.9,19.3,22.9,39,32.4,59.1 c6.4,13.6,12.2,27.3,17.2,41.1c177.7-26.8,260.8-90.5,337.5-122.7h0.1c48.3-21,93.5-22.9,121.1-22.5 C1235.7,450.3,1245.7,450.3,1252.1,450.3z"/>';
3721 $source .= '<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="-113.5052" y1="949.0955" x2="804.8284" y2="949.0955" gradientTransform="matrix(1 0 0 -1 0 1630)"><stop offset="0.1115" style="stop-color:#38B1DA"/><stop offset="1" style="stop-color:#326FB5"/></linearGradient>';
3722 $source .= '<path class="st7" d="M344.5,864.6C495.1,762.8,586,649.8,625.8,607.5c-325.2,7.3-462.4-164.2-509.7-237.4 C205.4,509,344.3,619.2,317.5,773.7C282.8,973.4,21.1,991.6,21.1,991.6S144,1000.2,344.5,864.6z"/>';
3723 $source .= '<ellipse class="st8" cx="1083.4" cy="377.4" rx="26" ry="25.8"/>';
3724 $source .= '</g>';
3725 $source .= '</svg>';
3726 // phpcs:ignore
3727 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3728 }
3729
3730 /**
3731 * Returns a base64 svg resource for the Logentrie icon.
3732 *
3733 * @return string The svg resource as a base64.
3734 * @since 1.0.0
3735 */
3736 private function get_base64_logentries_icon() {
3737 $source = '<svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve">';
3738 $source .= '<g transform="translate(34, 34) scale(0.74,0.74)">';
3739 $source .= '<path style="fill:#F47721" d="M201.73137,255.654114 L53.5857267,255.654114 C24.0701195,255.654114 0.230590681,231.814585 0.230590681,202.298978 L0.230590681,53.5857267 C0.230590681,24.0701195 24.0701195,0.230590681 53.5857267,0.230590681 L201.73137,0.230590681 C231.246977,0.230590681 255.086506,24.0701195 255.086506,53.5857267 L255.086506,202.298978 C255.086506,231.814585 231.246977,255.654114 201.73137,255.654114Z" />';
3740 $source .= '<path style="fill:#FFFFFF" d="M202.298978,71.7491772 C204.569409,70.0463537 207.407448,68.3435302 209.67788,66.6407067 C208.542664,62.6674519 206.272233,59.261805 204.001801,55.856158 C201.163762,56.9913736 198.893331,58.6941971 196.055292,59.8294128 C194.352468,58.6941971 192.649645,56.9913736 190.379214,55.856158 C190.946821,53.0181188 191.514429,49.6124719 192.082037,46.7744327 C188.108782,45.639217 184.135527,43.9363936 180.162273,43.3687857 C179.027057,46.2068249 178.459449,49.044864 177.324234,51.8829032 C175.053802,51.8829032 172.783371,52.450511 171.080547,53.0181188 C169.377724,50.7476875 167.6749,47.9096484 165.972077,45.639217 C161.998822,46.7744327 158.593175,49.044864 155.187528,51.8829032 C156.322744,54.7209423 157.457959,57.5589815 159.160783,60.3970206 C157.457959,62.0998441 156.322744,63.8026676 155.187528,65.5054911 C152.349489,64.9378832 148.943842,64.3702754 146.105803,63.8026676 C144.970587,67.7759224 143.835372,71.7491772 142.700156,75.722432 C145.538195,76.8576477 148.376234,77.9928633 151.214273,78.5604712 C151.214273,80.8309025 151.781881,83.1013338 151.781881,85.3717651 C149.51145,87.0745886 146.673411,88.7774121 144.402979,90.4802356 C145.538195,94.4534904 147.808626,97.8591374 150.646666,101.264784 C153.484705,100.129569 156.322744,98.4267452 159.160783,97.2915295 C160.863606,98.994353 162.56643,100.129569 164.269253,101.264784 C163.701646,104.102823 163.134038,107.50847 162.56643,110.34651 C166.539685,112.049333 170.51294,112.616941 174.486194,113.184549 C175.053802,110.34651 176.189018,107.50847 177.324234,104.670431 C179.594665,104.670431 181.865096,104.102823 184.135527,104.102823 C185.838351,106.373255 187.541174,109.211294 189.243998,111.481725 C193.217253,109.778902 196.6229,108.076078 199.460939,105.238039 C198.325723,102.4 196.6229,99.5619609 195.487684,96.7239217 C196.6229,95.0210982 198.325723,93.3182747 199.460939,91.6154512 C202.298978,92.1830591 205.704625,92.7506669 208.542664,93.3182747 C209.67788,89.3450199 211.380703,85.3717651 211.948311,81.3985103 C209.110272,80.8309025 206.272233,79.6956868 203.434194,78.5604712 C203.434194,76.2900398 202.866586,74.0196085 202.298978,71.7491772 L202.298978,71.7491772 Z M189.811606,79.6956868 C189.811606,87.0745886 181.865096,92.1830591 175.053802,89.9126277 C168.810116,88.2098043 164.836861,80.8309025 167.107293,74.5872164 C168.242508,70.6139615 171.648155,68.3435302 175.053802,67.2083146 C182.432704,64.9378832 190.379214,71.7491772 189.811606,79.6956868 L189.811606,79.6956868 Z"/>';
3741 $source .= '<circle style="fill:#F36D21" cx="177.324234" cy="78.5604712" r="17.0282349"/>';
3742 $source .= '<path style="fill:#FFFFFF" d="M127.374745,193.217253 C140.997332,192.649645 150.079058,202.298978 160.863606,207.975056 C176.756626,216.489174 192.082037,214.78635 204.001801,200.596155 C209.67788,193.784861 212.515919,186.973567 212.515919,179.594665 L212.515919,179.594665 C212.515919,172.783371 209.67788,165.404469 204.569409,159.160783 C192.649645,144.402979 177.324234,144.402979 161.431214,152.349489 C155.755136,155.187528 150.646666,159.728391 144.402979,162.56643 C129.645176,169.377724 115.45498,168.810116 102.4,156.890352 C89.3450199,144.402979 84.8041573,130.212784 92.7506669,113.752157 C95.588706,108.076078 99.5619609,102.4 102.4,96.7239217 C111.481725,80.2632946 113.184549,63.8026676 97.8591374,50.7476875 C91.6154512,45.0716092 84.2365495,42.8011779 77.4252555,42.8011779 L77.4252555,42.8011779 C70.6139615,42.8011779 63.2350598,45.639217 56.4237658,50.7476875 C40.5307466,63.2350598 38.8279231,80.8309025 49.6124719,96.1563139 C65.5054911,118.293019 67.2083146,138.159293 50.1800797,160.295999 C39.3955309,174.486194 39.3955309,190.946821 53.0181188,204.001801 C59.8294128,210.813095 67.2083146,213.651135 74.5872164,213.651135 L74.5872164,213.651135 C81.9661181,213.651135 89.9126277,210.813095 97.2915295,206.272233 C106.940863,200.028547 115.45498,192.082037 127.374745,193.217253 L127.374745,193.217253 Z" />';
3743 $source .= '</g>';
3744 $source .= '</svg>';
3745 // phpcs:ignore
3746 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3747 }
3748
3749 /**
3750 * Returns a base64 svg resource for the Loggly icon.
3751 *
3752 * @return string The svg resource as a base64.
3753 * @since 1.0.0
3754 */
3755 private function get_base64_loggly_icon() {
3756 $source = '<svg width="256px" height="256px" viewBox="240 0 347.7 80" version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve">';
3757 $source .= '<g transform="translate(-590, -70) scale(3.3,3.3)">';
3758 $source .= '<path style="fill:#F99D1C" d="M302.8,32.3c0.3-0.1,0.5-0.1,0.7-0.2c5.5-1.6,10.8-3.7,16.2-5.9c5.2-2.2,10.3-4.8,14.9-8.5 C339.2,13.9,342.9,9,345,3c0.3-0.8,0.9-2.1,0.9-3c-7.2,9.9-35.9,10.9-35.9,10.9l6.8-6.2c-27.2,0.1-46.2,11.6-54.9,17.8 c11.1,1.2,21.2,5.9,29.1,13C294.9,34.3,298.9,33.4,302.8,32.3z"/>';
3759 $source .= '<path style="fill:#F99D1C" d="M347.7,31.3c0,0-26.4-2-53.9,6.8c3.6,3.8,6.7,8.2,9.1,12.9C317.3,43.1,337.4,32.8,347.7,31.3z"/>';
3760 $source .= '<path style="fill:#F99D1C" d="M304.7,55.2c1.7,4.3,2.8,8.9,3.3,13.7L333.2,43L304.7,55.2z"/>';
3761 $source .= '</g>';
3762 $source .= '</svg>';
3763 // phpcs:ignore
3764 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3765 }
3766
3767 /**
3768 * Returns a base64 svg resource for the Sematext icon.
3769 *
3770 * @param string $color Optional. Color of the icon.
3771 * @return string The svg resource as a base64.
3772 * @since 1.0.0
3773 */
3774 private function get_base64_sematext_icon( $color = '#1fa0ed' ) {
3775 $source = '<svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve">';
3776 $source .= '<g transform="translate(16, 44) scale(4.6,4.6)">';
3777 $source .= '<path style="fill:' . $color . '" d="M29.57.15c-1.3 0-2.22.13-2.22.13C18.29.16 17.8 12 17.8 12c-.43 0-.95.05-1.32.31-2.43 1.85-.37 4.12-.37 4.12-.19.15-.35.3-.52.45a3.34 3.34 0 0 1-.34-.73c-2.64-.05-3.7-.74-3.9-1.84-.27-1.32.47-2.8 1.74-2.75 1.84.06.94 1.22.68 1.22a.7.7 0 0 1-.53-.22c-.16-.15-.37-.05-.37.16 0 .53.58 1.27 1.74.69 1.06-.53 1.11-1.37.8-2.06a2.18 2.18 0 0 0-1.7-1.42l-.05-.16c0-.16-.15-.26-.26-.26l-.53-.05c-.15 0-.26.05-.31.2l-.05.27c-.48.05-.95.16-1.32.32l-.27-.21c-.1-.11-.26-.06-.37 0l-.36.31c-.11.1-.16.21-.11.37l.1.21c-.26.27-.57.63-.78 1l-.16-.05c-.16-.05-.27.05-.37.16l-.21.47a.33.33 0 0 0 .05.37l.16.21c-.37 1.43.05 3.17 2.42 4.75.32.2.58.37.85.52l-.1.53a.36.36 0 0 0 .2.42l.58.27a.42.42 0 0 0 .44-.08c-1.01 1.5-1.46 2.8-3.37 4.89a4.63 4.63 0 0 1-3.38 1.68 2.99 2.99 0 0 1-3-3.37 2.82 2.82 0 0 1 2.42-2.59c.16-.05.32-.05.48-.05 1.32 0 1.95 1.11 1.42 2.16 0 0-.42 1.06-1.26 1.11h-.06c-.79 0-.68-.9-.42-1.1.05-.06.16-.06.21-.06.16 0 .27.1.42.1.06 0 .11 0 .16-.05.37-.15.32-.47.32-.47-.05-.42-.37-.58-.8-.58-.26 0-.57.1-.78.21-.8.42-1 1.58-.48 2.32.32.48.85.74 1.48.74 1.1 0 2.48-.8 3-2.37.53-1.53-.63-4.12-3.32-4.12a5.25 5.25 0 0 0-1.9.37c-5.8 2.11-3.1 11.92 2 11.92.27 0 .48 0 .75-.06 1.1-.2 2.1-.73 3.05-1.42l.11.1c.1.11.21.17.32.17.1 0 .2-.06.31-.11l.48-.42c.16-.1.2-.32.15-.53l-.1-.32c.37-.31.68-.68 1-1l.16.1a.47.47 0 0 0 .26.06.48.48 0 0 0 .37-.16l.37-.47c.1-.16.16-.37.05-.53l-.16-.26c.32-.42.64-.8.95-1.16l.11.05c.05.05.16.05.26.05.16 0 .27-.05.37-.2l.37-.48c.1-.16.16-.37.05-.53l-.1-.21c.58-.69 1.05-1.1 1.42-1.1.21 0 .37.15.53.47.1.2.21.47.42.79l-.05.05c-.21.16-.27.42-.1.63l.3.53a.48.48 0 0 0 .43.21h.21c.21.37.42.74.69 1.16-.21.16-.27.42-.1.63l.3.53c.11.16.27.21.43.21h.1l.16-.05c.21.37.48.74.74 1.1l-.05.06a.48.48 0 0 0-.05.63l.36.48c.11.1.22.2.37.2h.16l.1-.05c2.38 3.38 5.28 6.54 7.5 6.54h.1c3.95-.16 3.74-8.33.95-8.33-.16 0-.32 0-.48.05-1.79.53-1.68 2.75-1.68 2.75s.9-1.27 1.42-1.27c.42 0 .68.63.37 2.8-.1.78-.42 1.15-.8 1.15-2 0-6.95-9.64-6.95-11.33 0-.16.1-.21.26-.21.21 0 .48.1.9.26l-.1.37a.53.53 0 0 0 .26.58l.58.21c.05 0 .1.06.15.06a.57.57 0 0 0 .37-.16l.27-.32c.26.16.58.32.9.48l-.11.42a.53.53 0 0 0 .26.58l.58.2c.05 0 .1.06.16.06a.57.57 0 0 0 .37-.16l.26-.26c.37.2.8.42 1.22.68l-.11.37a.53.53 0 0 0 .26.58l.58.21c.06 0 .1.06.16.06a.57.57 0 0 0 .37-.16l.21-.21c.42.2.84.47 1.21.68l-.1.37a.53.53 0 0 0 .26.58l.58.21c.05 0 .1.06.16.06a.57.57 0 0 0 .37-.16l.21-.21c1.58.84 3.22 1.68 4.74 2.37 2 .9 4.06 1.42 5.8 1.42 2.27 0 4.06-.9 4.48-3.21 0-.06 0-.16.06-.21l.2-.06c.22-.05.43-.26.43-.42l.05-.47c.1-.21 0-.32-.16-.37h-.31c0-.58-.1-1.06-.21-1.53l.16-.21c.15-.21.15-.48.05-.58l-.27-.37c-.05-.05-.31-.1-.58-.1h-.05a3.99 3.99 0 0 0-1.1-1L46 21.7c-.05-.21-.21-.42-.42-.48l-.48-.05c-.1 0-.37.21-.52.42a5.82 5.82 0 0 0-1-.1c-1.74 0-3.38.9-3.54 2.58-.05.74-.05 1.63 1.48 2.53.42.26.9.37 1.32.37 1.26 0 2.42-.8 2.1-1.95-.2-.9-.84-1.21-1.47-1.21-.48 0-.9.2-1.1.42-.38.52-.11 1.16.26 1.16s.26-.32.26-.32c-.21-.37.05-.53.42-.53.32 0 .69.16.69.58.05.58-.69.8-.95.85H43c-1.68 0-1.63-1.58-1.31-1.95a2.12 2.12 0 0 1 1.74-.95c1.52 0 2.95 1.63 2 3.58a2 2 0 0 1-2 1.27c-.69 0-1.64-.21-2.9-.8-4.32-1.85-10.38-4.67-11.84-7.25.92.26 2.3.56 2.77.72v.37c0 .16.1.32.26.37l.58.2c.16.06.37 0 .48-.15l.2-.32c.43.11.9.16 1.38.21l.16.48a.4.4 0 0 0 .37.26l.63-.05c.16 0 .32-.16.37-.32l.05-.31a8.2 8.2 0 0 0 1.58-.27l.37.37a.5.5 0 0 0 .48.1l.58-.25a.36.36 0 0 0 .2-.43l-.05-.42c.37-.16.69-.37 1.06-.63 4.37-2.9 2.16-5.33.74-6.49-1.37-1.16.2-2.26 1.9-2.26.47 0 1.31.05 1.84.1.1 0 .16-.15.05-.2a4.6 4.6 0 0 0-3.48-.59l-.1-.1c-.1-.1-.21-.16-.37-.1l-.48.2c-.15.05-.2.21-.2.32v.16c-.27.16-.48.31-.64.52l-.21-.1a.22.22 0 0 0-.18.01c1.02-2.9-.65-6.37-.65-6.37C37.22.83 32.44.17 29.57.15zm9.06 11.99a.3.3 0 0 0 .05.08l.1.1c-.15.37-.2.69-.2 1l-.21.21a.33.33 0 0 0-.06.37l.27.48c.05.1.2.21.37.16l.2-.06c.48.53 1.06.85.9 1.74-.2 1.16-1.47 1.9-4.64 1.85-1.66-.05-3.91-.99-5.07-1.6.63-.24 1.34-.44 2.1-.78.93-.13 2.31-.48 4.48-1.82a4.98 4.98 0 0 0 1.71-1.73zm-13.29 1.24a2 2 0 1 1 0 4 2 2 0 1 1 0-4z"/>';
3778 $source .= '<path style="fill:' . $color . '" d="M24.13 14.75s-.26 1.47 1.16 1.47c1.43 0 1.16-1.47 1.16-1.47-1.21.74-2.32 0-2.32 0"/>';
3779 $source .= '</g>';
3780 $source .= '</svg>';
3781 // phpcs:ignore
3782 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3783 }
3784
3785 /**
3786 * Returns a base64 svg resource for the Elastic Cloud icon.
3787 *
3788 * @param string $color1 Optional. Color of the icon.
3789 * @param string $color2 Optional. Color of the icon.
3790 * @param string $color3 Optional. Color of the icon.
3791 * @return string The svg resource as a base64.
3792 * @since 1.0.0
3793 */
3794 private function get_base64_elasticcloud_icon( $color1 = '#00BFB3', $color2 = '#0077CC', $color3 = '#343741' ) {
3795 $source = '<svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve">';
3796 $source .= '<g transform="translate(182,-74) scale(0.51,0.51)">';
3797 $source .= '<path style="fill:' . $color1 . '" d="M-30.5,460.5c-8.7-2.6-18-1.8-26.1,2.3c-19.9,9.7-43.2,9.7-63.2,0c-8.1-4-17.4-4.8-26.1-2.3 c-35.9,11.1-67.8,32.4-91.8,61.2c68.9,82.6,191.7,93.6,274.2,24.8c9-7.5,17.3-15.8,24.8-24.8C37.3,492.9,5.4,471.6-30.5,460.5z"/>';
3798 $source .= '<path style="fill:' . $color2 . '" d="M-88.2,202.3c-57.8-0.1-112.5,25.6-149.5,70c24,28.8,55.9,50.1,91.8,61.2c8.7,2.6,18,1.8,26.1-2.3 c19.9-9.7,43.2-9.7,63.2,0c8.1,4,17.4,4.8,26.1,2.3c35.9-11.1,67.8-32.4,91.8-61.2C24.3,227.9-30.4,202.2-88.2,202.3z"/>';
3799 $source .= '<path style="fill:' . $color3 . '" d="M-119.5,331.2L-119.5,331.2c-8.1,4-17.4,4.8-26.1,2.3c-36-11-67.9-32.3-92.1-61.1l0,0c-51.2,61.6-59.5,148.3-20.9,218.4c27.6-30.4,62.7-52.8,101.9-65.1h1.2c-15.1-36,0.7-77.4,36-94.2V331.2z"/>';
3800 $source .= '</g>';
3801 $source .= '</svg>';
3802 // phpcs:ignore
3803 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3804 }
3805
3806 /**
3807 * Returns a base64 svg resource for the Elasticsearch icon.
3808 *
3809 * @param string $color1 Optional. Color of the icon.
3810 * @param string $color2 Optional. Color of the icon.
3811 * @param string $color3 Optional. Color of the icon.
3812 * @param string $color4 Optional. Color of the icon.
3813 * @param string $color5 Optional. Color of the icon.
3814 * @param string $color6 Optional. Color of the icon.
3815 * @return string The svg resource as a base64.
3816 * @since 2.4.0
3817 */
3818 private function get_base64_elasticsearch_icon( $color1 = '#f0bf1a', $color2 = '#3ebeb0', $color3 = '#07a5de', $color4 = '#231f20', $color5 = '#d7a229', $color6 = '#019b8f' ) {
3819 $source = '<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-4 -2 82 82" width="2500" height="2500">';
3820 $source .= '<style>.st0{clip-path:url(#SVGID_2_);fill:' . $color1 . '}.st1{clip-path:url(#SVGID_4_);fill:' . $color2 . '}.st2{clip-path:url(#SVGID_6_);fill:' . $color3 . '}.st3{clip-path:url(#SVGID_8_);fill:' . $color4 . '}.st4{fill:' . $color5 . '}.st5{fill:' . $color6 . '}.st6{fill:none}</style>';
3821 $source .= '<defs><circle id="SVGID_1_" cx="40" cy="40" r="32"/></defs><clipPath id="SVGID_2_"><use xlink:href="#SVGID_1_" overflow="visible"/></clipPath><path class="st0" d="M53.7 26H10c-1.1 0-2-.9-2-2V10c0-1.1.9-2 2-2h57c1.1 0 2 .9 2 2v.7C68.9 19.1 62.1 26 53.7 26z"/><defs><circle id="SVGID_3_" cx="40" cy="40" r="32"/></defs><clipPath id="SVGID_4_"><use xlink:href="#SVGID_3_" overflow="visible"/></clipPath><path class="st1" d="M69.1 72H8.2V54h45.7c8.4 0 15.2 6.8 15.2 15.2V72z"/><g><defs><circle id="SVGID_5_" cx="40" cy="40" r="32"/></defs><clipPath id="SVGID_6_"><use xlink:href="#SVGID_5_" overflow="visible"/></clipPath><path class="st2" d="M50.1 49H4.8V31h45.3c5 0 9 4 9 9s-4.1 9-9 9z"/></g><g><defs><circle id="SVGID_7_" cx="40" cy="40" r="32"/></defs><clipPath id="SVGID_8_"><use xlink:href="#SVGID_7_" overflow="visible"/></clipPath><path class="st3" d="M36 31H6.4v18H36c.7-2.7 1.1-5.7 1.1-9s-.4-6.3-1.1-9z"/></g><path class="st4" d="M23.9 12.3c-5.4 3.2-9.9 8-12.7 13.7h23.6c-2.4-5.5-6.2-10.1-10.9-13.7z"/><path class="st5" d="M24.9 68.2c4.6-3.7 8.3-8.6 10.6-14.2H11.2c3 6 7.8 11 13.7 14.2z"/><path class="st6" d="M0 0h80v80H0z"/>';
3822 $source .= '</svg>';
3823 // phpcs:ignore
3824 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3825 }
3826
3827 /**
3828 * Returns a base64 svg resource for the Sumo icon.
3829 *
3830 * @param string $color1 Optional. Color of the icon.
3831 * @param string $color2 Optional. Color of the icon.
3832 * @return string The svg resource as a base64.
3833 * @since 1.0.0
3834 */
3835 private function get_base64_sumosys_icon( $color1 = '#000099', $color2 = '#FEFEFE' ) {
3836 $source = '<svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve">';
3837 $source .= '<g id="v1" transform="translate(26,26) scale(0.068,0.068)">';
3838 $source .= '<g id="modern-app-report-hero-banner-mobile" transform="translate(-20.000000, -19.000000)">';
3839 $source .= '<g id="Nav">';
3840 $source .= '<g id="Group" transform="translate(20.000000, 19.000000)">';
3841 $source .= '<polygon id="Fill-1" fill="' . $color1 . '" points="128.948,2871.053 2871.053,2871.053 2871.053,128.948 128.948,128.948"/>';
3842 $source .= '<g id="Group-10" transform="translate(4.030534, 4.648885)">';
3843 $source .= '<path id="Fill-2" fill="' . $color2 . '" d="M1192.155,817.998l-84.861,103.039c-72.772-56.974-118.837-72.72-185.519-72.72 c-52.213,0-89.433,16.594-100.718,43.685v35.072c7.073,14.949,24.342,24.282,49.841,31.543 c16.961,4.88,47.221,12.141,90.897,21.841c135.197,30.019,204.981,63.019,229.511,129.821c0,22.511,0.12,110.788,0.12,131.466 c-29.591,85.168-121.156,138.793-255.13,138.793c-117.56,0-201.196-30.319-299.415-117.62l90.897-101.821 c44.9,36.355,81.264,60.578,111.583,72.719c30.319,13.357,63.019,19.402,100.599,19.402c51.425,0,90.717-15.31,103.466-43.985 v-42.22c-9.152-19.642-31.482-31.235-57.41-38.676c-16.894-3.597-47.281-10.857-90.897-20.618 c-132.262-28.983-194.125-60.646-216.942-120.856V854.602c29.411-77.352,116.832-133.545,247.261-133.545 C1032.074,721.056,1106.078,746.495,1192.155,817.998"/>';
3844 $source .= '<path id="Fill-4" fill="' . $color2 . '" d="M2332.12,741.614v619.523h-144.342v-65.519c-32.693,53.377-93.338,84.92-181.795,84.92 c-146.656,0-219.504-76.384-219.504-196.444V741.614h157.641v398.864c0,64.243,35.139,103.039,103.098,103.039 c78.705,0,127.262-44.841,127.262-128.478V741.614H2332.12z"/>';
3845 $source .= '<path id="Fill-6" fill="' . $color2 . '" d="M1565.641,1817.343v432.902h-157.641v-385.561c0-73.943-30.327-118.844-98.219-118.844 c-69.063,0-109.083,51.004-109.083,123.725v380.68h-157.64v-385.561c0-78.824-32.699-118.844-98.158-118.844 c-69.123,0-109.143,51.004-109.143,123.725v380.68H678.178v-619.584h146.723v69.182c36.356-59.42,95.718-89.68,176.975-89.68 c78.764,0,138.186,32.699,172.102,90.777c42.46-60.518,104.322-90.777,185.519-90.777 C1490.421,1610.164,1565.641,1690.083,1565.641,1817.343"/>';
3846 $source .= '<path id="Fill-8" fill="' . $color2 . '" d="M1909.108,2032.328c24.643,65.398,77.23,103.953,147.023,103.953 c68.934,0,121.275-38.555,145.926-103.953c0-31.236,0-150.809,0-183.748c-24.521-65.279-76.871-105.18-145.926-105.18 c-69.793,0-122.502,39.9-147.023,105.18C1909.108,1879.566,1909.108,2004.019,1909.108,2032.328z M2354.938,2070.394 c-45.756,122.502-157.273,199.252-298.807,199.252c-142.393,0-254.154-76.75-299.912-199.252v-261.105 c45.758-122.621,157.52-199.125,299.912-199.125c141.533,0,253.051,76.504,298.807,199.125V2070.394z"/>';
3847 $source .= '</g>';
3848 $source .= '</g>';
3849 $source .= '</g>';
3850 $source .= '</g>';
3851 $source .= '</g>';
3852 $source .= '</svg>';
3853 // phpcs:ignore
3854 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3855 }
3856
3857 /**
3858 * Returns a base64 svg resource for the Sematext icon.
3859 *
3860 * @param string $color1 Optional. Color of the icon.
3861 * @param string $color2 Optional. Color of the icon.
3862 * @return string The svg resource as a base64.
3863 * @since 2.4.0
3864 */
3865 private function get_base64_loki_icon( $color1 = '#F9EC1C', $color2 = '#F05A2B' ) {
3866 $style = '';
3867 for ( $i = 1; $i < 16; $i++ ) {
3868 $style .= ' .st' . $i . '{fill:url(#SVGID_' . $i . '_);}';
3869 }
3870 $source = '<svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve">';
3871 $source .= '<style type="text/css">' . $style . '</style>';
3872 $source .= '<g transform="translate(162,70) scale(0.6,0.6)">';
3873 $source .= '<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="342.6804" y1="897.3058" x2="342.6804" y2="547.4434" gradientTransform="matrix(0.9805 -0.1964 0.1964 0.9805 -567.5302 -509.0906)"><stop offset="0" style="stop-color:' . $color1 . '"/><stop offset="1" style="stop-color:' . $color2 . '"/></linearGradient>';
3874 $source .= '<polygon class="st1" points="-127.3,-58.2 -127.5,-59.1 -128.3,-58.9"/>';
3875 $source .= '<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="295.8044" y1="887.3397" x2="295.8044" y2="537.4772" gradientTransform="matrix(0.9805 -0.1964 0.1964 0.9805 -567.5302 -509.0906)"><stop offset="0" style="stop-color:' . $color1 . '"/><stop offset="1" style="stop-color:' . $color2 . '"/></linearGradient>';
3876 $source .= '<polygon class="st2" points="-108.3,219.3 -130.7,223.8 -126.2,246.3 -103.8,241.8"/>';
3877 $source .= '<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="442.4363" y1="887.3397" x2="442.4363" y2="537.4772" gradientTransform="matrix(0.9805 -0.1964 0.1964 0.9805 -567.5302 -509.0906)"><stop offset="0" style="stop-color:' . $color1 . '"/><stop offset="1" style="stop-color:' . $color2 . '"/></linearGradient>';
3878 $source .= '<polygon class="st3" points="-27.8,190 71.3,170.1 66.8,147.7 -32.3,167.5"/>';
3879 $source .= '<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="367.5056" y1="887.3397" x2="367.5056" y2="537.4772" gradientTransform="matrix(0.9805 -0.1964 0.1964 0.9805 -567.5302 -509.0906)"><stop offset="0" style="stop-color:' . $color1 . '"/><stop offset="1" style="stop-color:' . $color2 . '"/></linearGradient>';
3880 $source .= '<polygon class="st4" points="-67.5,174.6 -63,197 -40.5,192.5 -45,170.1"/>';
3881 $source .= '<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="331.6549" y1="887.3397" x2="331.6549" y2="537.4772" gradientTransform="matrix(0.9805 -0.1964 0.1964 0.9805 -567.5302 -509.0906)"><stop offset="0" style="stop-color:' . $color1 . '"/><stop offset="1" style="stop-color:' . $color2 . '"/></linearGradient>';
3882 $source .= '<polygon class="st5" points="-68.6,234.7 -73.1,212.3 -95.6,216.8 -91.1,239.2"/>';
3883 $source .= '<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="295.8044" y1="887.3397" x2="295.8044" y2="537.4772" gradientTransform="matrix(0.9805 -0.1964 0.1964 0.9805 -567.5302 -509.0906)"><stop offset="0" style="stop-color:' . $color1 . '"/><stop offset="1" style="stop-color:' . $color2 . '"/></linearGradient>';
3884 $source .= '<polygon class="st6" points="-133.3,211.1 -110.8,206.6 -115.3,184.2 -137.8,188.7"/>';
3885 $source .= '<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="442.4363" y1="887.3397" x2="442.4363" y2="537.4772" gradientTransform="matrix(0.9805 -0.1964 0.1964 0.9805 -567.5302 -509.0906)"><stop offset="0" style="stop-color:' . $color1 . '"/><stop offset="1" style="stop-color:' . $color2 . '"/></linearGradient>';
3886 $source .= '<polygon class="st7" points="73.8,182.8 -25.3,202.7 -20.8,225.1 78.3,205.3"/>';
3887 $source .= '<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="367.5056" y1="887.3397" x2="367.5056" y2="537.4772" gradientTransform="matrix(0.9805 -0.1964 0.1964 0.9805 -567.5302 -509.0906)"><stop offset="0" style="stop-color:' . $color1 . '"/><stop offset="1" style="stop-color:' . $color2 . '"/></linearGradient>';
3888 $source .= '<polygon class="st8" points="-60.4,209.7 -55.9,232.2 -33.5,227.7 -38,205.2"/>';
3889 $source .= '<linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="331.6549" y1="887.3397" x2="331.6549" y2="537.4772" gradientTransform="matrix(0.9805 -0.1964 0.1964 0.9805 -567.5302 -509.0906)"><stop offset="0" style="stop-color:' . $color1 . '"/><stop offset="1" style="stop-color:' . $color2 . '"/></linearGradient>';
3890 $source .= '<polygon class="st9" points="-98.1,204.1 -75.7,199.6 -80.2,177.1 -102.6,181.6"/>';
3891 $source .= '<linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="289.1909" y1="880.5443" x2="289.1909" y2="548.7296" gradientTransform="matrix(0.9805 -0.1964 0.1964 0.9805 -567.5302 -509.0906)"><stop offset="0" style="stop-color:' . $color1 . '"/><stop offset="1" style="stop-color:' . $color2 . '"/></linearGradient>';
3892 $source .= '<polygon class="st10" points="-140.3,176 -130.8,174.1 -166.8,-5.6 -176.3,-3.7"/>';
3893 $source .= '<linearGradient id="SVGID_11_" gradientUnits="userSpaceOnUse" x1="302.4872" y1="889.7463" x2="302.4872" y2="533.4922" gradientTransform="matrix(0.9805 -0.1964 0.1964 0.9805 -567.5302 -509.0906)"><stop offset="0" style="stop-color:' . $color1 . '"/><stop offset="1" style="stop-color:' . $color2 . '"/></linearGradient>';
3894 $source .= '<polygon class="st11" points="-127.3,173.4 -117.8,171.5 -156.4,-21.4 -165.9,-19.5"/>';
3895 $source .= '<linearGradient id="SVGID_12_" gradientUnits="userSpaceOnUse" x1="325.1889" y1="908.8145" x2="325.1889" y2="501.9178" gradientTransform="matrix(0.9805 -0.1964 0.1964 0.9805 -567.5302 -509.0906)"><stop offset="0" style="stop-color:' . $color1 . '"/><stop offset="1" style="stop-color:' . $color2 . '"/></linearGradient>';
3896 $source .= '<polygon class="st12" points="-105,168.9 -95.5,167 -139.7,-53.3 -149.2,-51.4"/>';
3897 $source .= '<linearGradient id="SVGID_13_" gradientUnits="userSpaceOnUse" x1="338.4852" y1="896.2529" x2="338.4852" y2="522.7181" gradientTransform="matrix(0.9805 -0.1964 0.1964 0.9805 -567.5302 -509.0906)"><stop offset="0" style="stop-color:' . $color1 . '"/><stop offset="1" style="stop-color:' . $color2 . '"/></linearGradient>';
3898 $source .= '<polygon class="st13" points="-92,166.3 -82.5,164.4 -123,-37.9 -132.5,-36"/>';
3899 $source .= '<linearGradient id="SVGID_14_" gradientUnits="userSpaceOnUse" x1="360.8988" y1="870.7903" x2="360.8988" y2="564.8808" gradientTransform="matrix(0.9805 -0.1964 0.1964 0.9805 -567.5302 -509.0906)"><stop offset="0" style="stop-color:' . $color1 . '"/><stop offset="1" style="stop-color:' . $color2 . '"/></linearGradient>';
3900 $source .= '<polygon class="st14" points="-70,161.9 -60.5,160 -93.7,-5.7 -103.2,-3.8"/>';
3901 $source .= '<linearGradient id="SVGID_15_" gradientUnits="userSpaceOnUse" x1="374.1951" y1="875.2039" x2="374.1951" y2="557.5726" gradientTransform="matrix(0.9805 -0.1964 0.1964 0.9805 -567.5302 -509.0906)"><stop offset="0" style="stop-color:' . $color1 . '"/><stop offset="1" style="stop-color:' . $color2 . '"/></linearGradient>';
3902 $source .= '<polygon class="st15" points="-57,159.3 -47.5,157.4 -81.9,-14.6 -91.4,-12.7"/>';
3903 $source .= '</g>';
3904 $source .= '</svg>';
3905 // phpcs:ignore
3906 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3907 }
3908
3909 /**
3910 * Returns a base64 svg resource for the Grafana icon.
3911 *
3912 * @param string $color1 Optional. Color of the icon.
3913 * @param string $color2 Optional. Color of the icon.
3914 * @return string The svg resource as a base64.
3915 * @since 2.4.0
3916 */
3917 private function get_base64_grafana_icon( $color1 = '#FFF100', $color2 = '#F05A28' ) {
3918 $source = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256px" height="256px" viewBox="0 0 256 256">';
3919 $source .= '<style type="text/css">.st5{fill:url(#SVGID_5_);}</style>';
3920 $source .= '<g transform="translate(26,26) scale(2.2,2.2)">';
3921 $source .= '<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="42.7746" y1="113.8217" x2="42.7746" y2="28.9256"><stop offset="0" style="stop-color:' . $color1 . '"/><stop offset="1" style="stop-color:' . $color2 . '"/></linearGradient>';
3922 $source .= '<path class="st5" d="M85.43,41c-0.14-1.56-0.41-3.36-0.93-5.35c-0.52-1.98-1.29-4.15-2.4-6.41C80.97,27,79.5,24.66,77.6,22.4 c-0.74-0.89-1.55-1.76-2.43-2.62c1.31-5.2-1.59-9.7-1.59-9.7c-5-0.31-8.18,1.55-9.36,2.41c-0.2-0.08-0.39-0.17-0.59-0.25 c-0.85-0.35-1.73-0.67-2.63-0.95c-0.9-0.28-1.82-0.54-2.76-0.77c-0.94-0.22-1.9-0.41-2.87-0.56c-0.17-0.03-0.34-0.05-0.51-0.07 C52.68,2.91,46.41,0,46.41,0c-6.98,4.43-8.31,10.63-8.31,10.63s-0.03,0.14-0.07,0.37c-0.39,0.11-0.77,0.22-1.16,0.34 c-0.54,0.16-1.06,0.36-1.6,0.55c-0.53,0.21-1.06,0.41-1.59,0.64c-1.05,0.45-2.1,0.96-3.12,1.53c-0.99,0.56-1.96,1.17-2.91,1.83 c-0.14-0.06-0.24-0.11-0.24-0.11c-9.67-3.69-18.26,0.75-18.26,0.75c-0.78,10.29,3.86,16.77,4.78,17.94 c-0.23,0.64-0.44,1.28-0.64,1.93c-0.72,2.33-1.25,4.72-1.58,7.2c-0.05,0.35-0.09,0.71-0.13,1.07C2.65,49.08,0,58.13,0,58.13 c7.46,8.58,16.15,9.11,16.15,9.11c0.01-0.01,0.02-0.01,0.02-0.02c1.11,1.97,2.39,3.85,3.82,5.6c0.6,0.73,1.24,1.44,1.89,2.12 c-2.72,7.77,0.38,14.25,0.38,14.25c8.3,0.31,13.76-3.63,14.9-4.54c0.83,0.28,1.66,0.53,2.51,0.75c2.55,0.66,5.16,1.04,7.77,1.16 c0.65,0.03,1.3,0.04,1.96,0.04l0.32,0l0.21-0.01l0.41-0.01l0.41-0.02l0.01,0.01c3.91,5.58,10.79,6.37,10.79,6.37 c4.89-5.16,5.17-10.27,5.17-11.38l0,0c0,0,0-0.04,0-0.07c0-0.09,0-0.16,0-0.16s0,0,0,0c0-0.08-0.01-0.15-0.01-0.24 c1.03-0.72,2.01-1.49,2.93-2.32c1.96-1.77,3.67-3.79,5.09-5.96c0.13-0.2,0.26-0.41,0.39-0.62c5.54,0.32,9.44-3.43,9.44-3.43 c-0.92-5.77-4.21-8.58-4.89-9.12l0,0c0,0-0.03-0.02-0.07-0.05c-0.04-0.03-0.06-0.05-0.06-0.05c0,0,0,0,0,0 c-0.04-0.02-0.08-0.05-0.12-0.08c0.03-0.35,0.06-0.69,0.08-1.04c0.04-0.62,0.06-1.24,0.06-1.86l0-0.46l0-0.23l0-0.12 c0-0.16,0-0.1,0-0.16l-0.02-0.39l-0.03-0.52c-0.01-0.18-0.02-0.34-0.04-0.5c-0.01-0.16-0.03-0.32-0.05-0.48l-0.06-0.48l-0.07-0.48 c-0.09-0.63-0.22-1.26-0.36-1.89c-0.58-2.49-1.55-4.85-2.83-6.97c-1.28-2.12-2.88-4-4.67-5.58c-1.8-1.59-3.81-2.86-5.92-3.81 c-2.11-0.95-4.33-1.56-6.54-1.84c-1.1-0.14-2.21-0.2-3.3-0.19l-0.41,0.01l-0.1,0c-0.03,0-0.15,0-0.14,0l-0.17,0.01l-0.4,0.03 c-0.15,0.01-0.31,0.02-0.45,0.04c-0.56,0.05-1.12,0.13-1.66,0.24c-2.19,0.41-4.26,1.2-6.09,2.29c-1.82,1.09-3.41,2.46-4.7,4 c-1.29,1.55-2.29,3.26-2.98,5.03c-0.69,1.77-1.07,3.6-1.18,5.38c-0.03,0.44-0.04,0.89-0.03,1.32c0,0.11,0,0.22,0.01,0.33l0.01,0.36 c0.02,0.21,0.03,0.43,0.05,0.64c0.09,0.9,0.25,1.76,0.49,2.6c0.48,1.66,1.25,3.17,2.21,4.45c0.95,1.28,2.09,2.34,3.3,3.17 c1.21,0.83,2.5,1.42,3.78,1.79c1.28,0.38,2.55,0.54,3.75,0.54c0.15,0,0.3,0,0.45-0.01c0.08,0,0.16-0.01,0.24-0.01 c0.08,0,0.16-0.01,0.24-0.01c0.13-0.01,0.25-0.03,0.38-0.04c0.03,0,0.07-0.01,0.11-0.01l0.12-0.02c0.08-0.01,0.15-0.02,0.23-0.03 c0.16-0.02,0.29-0.05,0.44-0.08c0.14-0.03,0.28-0.05,0.42-0.09c0.28-0.06,0.54-0.14,0.8-0.23c0.52-0.17,1.01-0.38,1.47-0.61 c0.46-0.24,0.88-0.5,1.27-0.77c0.11-0.08,0.22-0.16,0.33-0.25c0.42-0.33,0.49-0.94,0.15-1.35c-0.29-0.36-0.8-0.45-1.2-0.23 c-0.1,0.05-0.2,0.11-0.3,0.16c-0.35,0.17-0.71,0.32-1.1,0.45c-0.39,0.12-0.79,0.22-1.21,0.3c-0.21,0.03-0.42,0.06-0.64,0.08 c-0.11,0.01-0.22,0.02-0.32,0.02c-0.11,0-0.22,0.01-0.32,0.01c-0.1,0-0.21,0-0.31-0.01c-0.13-0.01-0.26-0.01-0.39-0.02 c0,0-0.07,0-0.01,0l-0.04,0l-0.09-0.01c-0.06-0.01-0.12-0.01-0.17-0.02c-0.12-0.01-0.23-0.03-0.35-0.04 c-0.94-0.13-1.89-0.4-2.8-0.82c-0.92-0.41-1.8-0.99-2.59-1.7c-0.79-0.71-1.48-1.57-2.02-2.54c-0.54-0.97-0.92-2.04-1.1-3.17 c-0.09-0.56-0.13-1.15-0.11-1.72c0.01-0.16,0.01-0.31,0.02-0.47c0,0.04,0-0.02,0-0.03l0-0.06l0.01-0.12 c0.01-0.08,0.01-0.15,0.02-0.23c0.03-0.31,0.08-0.62,0.13-0.93c0.43-2.46,1.66-4.86,3.57-6.68c0.48-0.45,0.99-0.88,1.54-1.25 c0.55-0.38,1.13-0.71,1.73-0.99c0.61-0.28,1.24-0.51,1.89-0.68c0.65-0.17,1.32-0.29,1.99-0.35c0.34-0.03,0.68-0.04,1.02-0.04 c0.09,0,0.16,0,0.23,0l0.28,0.01l0.17,0.01c0.07,0,0,0,0.03,0l0.07,0l0.28,0.02c0.73,0.06,1.46,0.16,2.18,0.33 c1.44,0.32,2.84,0.85,4.15,1.57c2.61,1.45,4.84,3.71,6.2,6.44c0.69,1.36,1.17,2.82,1.41,4.33c0.06,0.38,0.1,0.76,0.13,1.14 l0.02,0.29l0.01,0.29c0.01,0.1,0.01,0.19,0.01,0.29c0,0.1,0.01,0.2,0,0.27l0,0.25l-0.01,0.28c-0.01,0.19-0.02,0.49-0.03,0.68 c-0.03,0.42-0.07,0.83-0.12,1.25c-0.05,0.41-0.12,0.82-0.19,1.23c-0.08,0.41-0.17,0.81-0.27,1.21c-0.2,0.8-0.46,1.6-0.77,2.37 c-0.61,1.55-1.43,3.02-2.41,4.38c-1.97,2.71-4.66,4.92-7.72,6.32c-1.53,0.69-3.15,1.2-4.8,1.47c-0.83,0.14-1.67,0.22-2.51,0.25 l-0.16,0.01l-0.13,0l-0.27,0l-0.41,0l-0.21,0c0.11,0-0.02,0-0.01,0l-0.08,0c-0.45-0.01-0.9-0.03-1.35-0.07 c-1.8-0.13-3.57-0.45-5.29-0.95c-1.72-0.5-3.39-1.17-4.97-2.01c-3.16-1.69-5.98-4-8.19-6.79c-1.11-1.39-2.08-2.88-2.88-4.45 c-0.8-1.57-1.43-3.22-1.9-4.9c-0.46-1.69-0.75-3.41-0.86-5.15l-0.02-0.33l-0.01-0.08l0-0.07l0-0.14l-0.01-0.29l0-0.07l0-0.1l0-0.2 l-0.01-0.4l0-0.08c0,0.01,0,0.01,0-0.03l0-0.16c0-0.21,0.01-0.42,0.01-0.64c0.03-0.86,0.1-1.74,0.22-2.62 c0.11-0.88,0.26-1.77,0.44-2.65c0.18-0.88,0.4-1.75,0.64-2.6c0.49-1.71,1.1-3.37,1.83-4.94c1.45-3.14,3.35-5.91,5.64-8.13 c0.57-0.56,1.16-1.09,1.78-1.58c0.61-0.49,1.25-0.95,1.91-1.38c0.65-0.43,1.33-0.83,2.03-1.19c0.34-0.19,0.7-0.35,1.05-0.52 c0.18-0.08,0.36-0.16,0.54-0.24c0.18-0.08,0.36-0.16,0.54-0.23c0.72-0.31,1.47-0.56,2.22-0.8c0.19-0.06,0.38-0.11,0.57-0.17 c0.19-0.06,0.38-0.1,0.57-0.16c0.38-0.11,0.77-0.2,1.15-0.29c0.19-0.05,0.39-0.09,0.58-0.13c0.19-0.04,0.39-0.08,0.58-0.12 c0.2-0.04,0.39-0.07,0.59-0.11l0.29-0.05l0.29-0.04c0.2-0.03,0.39-0.06,0.59-0.09c0.22-0.04,0.44-0.05,0.66-0.09 c0.18-0.02,0.48-0.06,0.66-0.08c0.14-0.01,0.28-0.03,0.42-0.04l0.28-0.03l0.14-0.01l0.16-0.01c0.22-0.01,0.44-0.03,0.67-0.04 l0.33-0.02c0,0,0.12,0,0.02,0l0.07,0l0.14-0.01c0.19-0.01,0.38-0.02,0.57-0.03c0.75-0.02,1.5-0.02,2.25,0 c1.49,0.06,2.95,0.22,4.37,0.49c2.84,0.53,5.51,1.44,7.93,2.64c2.42,1.18,4.59,2.64,6.47,4.22c0.12,0.1,0.23,0.2,0.35,0.3 c0.11,0.1,0.23,0.2,0.34,0.3c0.23,0.2,0.45,0.41,0.67,0.61c0.22,0.2,0.43,0.41,0.64,0.62c0.21,0.21,0.42,0.42,0.61,0.63 c0.8,0.85,1.54,1.7,2.2,2.56c1.34,1.72,2.41,3.46,3.26,5.1c0.05,0.1,0.11,0.2,0.16,0.31c0.05,0.1,0.1,0.2,0.15,0.31 c0.1,0.2,0.2,0.4,0.29,0.6c0.09,0.2,0.19,0.4,0.27,0.59c0.09,0.2,0.17,0.39,0.25,0.58c0.32,0.77,0.61,1.5,0.84,2.19 c0.39,1.11,0.68,2.12,0.9,3c0.09,0.35,0.42,0.58,0.78,0.55c0.37-0.03,0.66-0.34,0.67-0.71C85.56,43.36,85.54,42.26,85.43,41z"/>';
3923 $source .= '</g>';
3924 $source .= '</svg>';
3925 // phpcs:ignore
3926 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3927 }
3928
3929 /**
3930 * Returns a base64 svg resource for the Prometheus icon.
3931 *
3932 * @param string $color1 Optional. Color of the icon.
3933 * @return string The svg resource as a base64.
3934 * @since 3.0.0
3935 */
3936 private function get_base64_prometheus_icon( $color1 = '#DA4E31' ) {
3937 $source = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256px" height="256px" viewBox="0 0 256 256">';
3938 $source .= '<style type="text/css">.st5{fill:url(#SVGID_5_);}</style>';
3939 $source .= '<g transform="translate(23,23) scale(0.81,0.81)">';
3940 $source .= '<path d="M128.001.667C57.311.667 0 57.971 0 128.664c0 70.69 57.311 127.998 128.001 127.998S256 199.354 256 128.664C256 57.97 198.689.667 128.001.667zm0 239.56c-20.112 0-36.419-13.435-36.419-30.004h72.838c0 16.566-16.306 30.004-36.419 30.004zm60.153-39.94H67.842V178.47h120.314v21.816h-.002zm-.432-33.045H68.185c-.398-.458-.804-.91-1.188-1.375-12.315-14.954-15.216-22.76-18.032-30.716-.048-.262 14.933 3.06 25.556 5.45 0 0 5.466 1.265 13.458 2.722-7.673-8.994-12.23-20.428-12.23-32.116 0-25.658 19.68-48.079 12.58-66.201 6.91.562 14.3 14.583 14.8 36.505 7.346-10.152 10.42-28.69 10.42-40.056 0-11.769 7.755-25.44 15.512-25.907-6.915 11.396 1.79 21.165 9.53 45.4 2.902 9.103 2.532 24.423 4.772 34.138.744-20.178 4.213-49.62 17.014-59.784-5.647 12.8.836 28.818 5.27 36.518 7.154 12.424 11.49 21.836 11.49 39.638 0 11.936-4.407 23.173-11.84 31.958 8.452-1.586 14.289-3.016 14.289-3.016l27.45-5.355c.002-.002-3.987 16.401-19.314 32.197z" fill="' . $color1 . '"/>';
3941 $source .= '</g>';
3942 $source .= '</svg>';
3943 // phpcs:ignore
3944 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3945 }
3946
3947 /**
3948 * Returns a base64 svg resource for the influxDB icon.
3949 *
3950 * @param string $color1 Optional. Color of the icon.
3951 * @return string The svg resource as a base64.
3952 * @since 3.0.0
3953 */
3954 private function get_base64_infuxdb_icon( $color1 = '#22ADF6' ) {
3955 $source = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256px" height="256px" viewBox="0 0 900 900">';
3956 $source .= '<style type="text/css">.st0{fill:none;}.st1{fill:' . $color1 . ';}</style>';
3957 $source .= '<g transform="translate(220,200) scale(0.84,0.84)">';
3958 $source .= '<path class="st1" d="M694.1,394.9l-81-352.7C608.5,22.9,591,3.6,571.7-2L201.5-116.2c-4.6-1.8-10.1-1.8-15.7-1.8 c-15.7,0-32.2,6.4-43.3,15.7l-265.2,246.8c-14.7,12.9-22.1,38.7-17.5,57.1l86.6,377.6c4.6,19.3,22.1,38.7,41.4,44.2l346.2,106.8 c4.6,1.8,10.1,1.8,15.7,1.8c15.7,0,32.2-6.4,43.3-15.7L676.6,453C691.4,439.2,698.7,414.3,694.1,394.9z M240.2-32.4l254.1,78.3 c10.1,2.8,10.1,7.4,0,10.1L360.8,86.4c-10.1,2.8-23.9-1.8-31.3-9.2l-93-100.4C228.2-31.4,230-35.1,240.2-32.4z M398.5,423.5 c2.8,10.1-3.7,15.7-13.8,12.9l-274.4-84.7c-10.1-2.8-12-11.1-4.6-18.4L315.7,138c7.4-7.4,15.7-4.6,18.4,5.5L398.5,423.5z M-53.6,174.8L169.3-32.4c7.4-7.4,19.3-6.4,26.7,0.9L307.4,89.2c7.4,7.4,6.4,19.3-0.9,26.7L83.6,323.1c-7.4,7.4-19.3,6.4-26.7-0.9 L-54.5,201.6C-61.9,193.3-60.9,181.3-53.6,174.8z M0.8,503.6l-58.9-258.8c-2.8-10.1,1.8-12,8.3-4.6l93,100.4 c7.4,7.4,10.1,22.1,7.4,32.2L10,503.6C7.2,513.7,2.6,513.7,0.8,503.6z M326.7,654.6l-291-89.3c-10.1-2.8-15.7-13.8-12.9-23.9 l48.8-156.6c2.8-10.1,13.8-15.7,23.9-12.9l291,89.3c10.1,2.8,15.7,13.8,12.9,23.9l-48.8,156.6C347,651.9,336.9,657.4,326.7,654.6z M584.5,442.8L390.3,623.3c-7.4,7.4-11,4.6-8.3-5.5L422.5,487c2.8-10.1,13.8-20.3,23.9-22.1l133.5-30.4 C590.1,431.8,591.9,436.4,584.5,442.8z M605.7,404.2L445.5,441c-10.1,2.8-20.3-3.7-23-13.8l-68.1-296.5c-2.8-10.1,3.7-20.3,13.8-23 l160.2-36.8c10.1-2.8,20.3,3.7,23,13.8l68.1,296.5C622.3,392.2,615.9,402.3,605.7,404.2z"/>';
3959 $source .= '</g>';
3960 $source .= '</svg>';
3961 // phpcs:ignore
3962 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3963 }
3964
3965 /**
3966 * Returns a base64 svg resource for the Tempo icon.
3967 *
3968 * @param string $color1 Optional. Color 1 of the icon.
3969 * @param string $color2 Optional. Color 2 of the icon.
3970 * @return string The svg resource as a base64.
3971 * @since 3.0.0
3972 */
3973 private function get_base64_tempo_icon( $color1 = '#fff100', $color2 = '#f05a28' ) {
3974 $source = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256px" height="256px" viewBox="0 0 256 256">';
3975 $source .= '<defs>';
3976 $source .= '<style>.cls-1{fill:url(#linear-gradient);}</style>';
3977 $source .= '<linearGradient id="linear-gradient" x1="168.55" y1="13.4" x2="27.2" y2="57" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="' . $color1 . '"/><stop offset="1" stop-color="' . $color2 . '"/></linearGradient>';
3978 $source .= '</defs>';
3979 $source .= '<g transform="translate(20,50) scale(1.6,1.6)">';
3980 $source .= '<path class="cls-1" d="M4.66,25H2.37a2.37,2.37,0,0,0,0,4.74H4.66a2.37,2.37,0,1,0,0-4.74ZM48.48,59.57H46.19a2.37,2.37,0,1,0,0,4.74h2.29a2.37,2.37,0,1,0,0-4.74ZM46.56,37a2.37,2.37,0,0,0-2.37-2.37H36.27a2.37,2.37,0,0,0,0,4.74h7.92A2.37,2.37,0,0,0,46.56,37ZM121.73,22.1,119.32,8.56A9.88,9.88,0,0,0,109.07,0H16.24A6.28,6.28,0,0,0,9.9,7.7l2.54,14.4a3.38,3.38,0,0,0,.08.34v0c.3,1.76-.59,2.47-1.39,2.73h0a2.37,2.37,0,0,0,.79,4.6H115.39A6.28,6.28,0,0,0,121.73,22.1ZM90.15,76.42c-1-5.25-4-7.2-7.39-7.2H58.24a2.39,2.39,0,0,0-2.37,2.4A2.37,2.37,0,0,0,58,74h0c.78.14,1.62,1.16,2.15,3.68l2.52,14a9.59,9.59,0,0,0,9.19,7.54l14.63-.07a6.28,6.28,0,0,0,6.44-7.61ZM57.73,64.48H84.34a2.27,2.27,0,0,0,.59-.09c2.46-.52,2.58-2.52,2.26-4.51L83.8,41.27c-.93-4.84-3.74-6.75-7.43-6.75H52a2.37,2.37,0,0,0-.28,4.72h0c.81.15,1.7,1.24,2.22,4l2.57,14.24v0A1.92,1.92,0,0,1,55,59.87h0a2.36,2.36,0,0,0,.79,4.59h1.9Z"/>';
3981 $source .= '</g>';
3982 $source .= '</svg>';
3983 // phpcs:ignore
3984 return 'data:image/svg+xml;base64,' . base64_encode( $source );
3985 }
3986
3987 /**
3988 * Returns a base64 svg resource for the Zipkin icon.
3989 *
3990 * @param string $color1 Optional. Color of the icon.
3991 * @return string The svg resource as a base64.
3992 * @since 3.0.0
3993 */
3994 private function get_base64_zipkin_icon( $color1 = '#EC7849' ) {
3995 $source = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256px" height="256px" viewBox="0 0 256 256">';
3996 $source .= '<g transform="translate(30,230) scale(0.42,-0.42)">';
3997 $source .= '<path fill="' . $color1 . '" d="M 234.211449 488.107623 C 239.634903 482.710159 401.677949 218.057731 412.854954 197.300455 C 418.997748 185.892389 468.280990 109.385719 466.890808 106.605395 C 465.196477 103.216691 418.127666 82.892278 410.949111 79.026913 C 366.194146 54.928075 318.589380 36.193670 273.841501 12.098648 C 266.575754 8.186333 258.530663 5.703510 250.467055 1.000000 L 249.345979 1.000000 C 249.345979 64.434230 249.345979 126.747384 249.345979 189.060538 C 249.345979 217.880629 248.000525 247.072987 249.906517 276.784753 C 266.869879 243.418568 286.603606 212.116360 303.998445 179.811659 C 306.099312 175.910048 321.306539 150.535207 320.422205 148.589679 C 319.499178 146.559013 280.974769 128.000953 274.570194 124.318386 L 274.570194 92.367713 C 285.622304 97.333230 366.916871 131.416054 368.124019 134.071763 C 369.063292 136.138180 340.039976 180.702500 336.565696 187.154695 C 328.562239 202.018296 239.419598 347.961619 234.211449 354.699552 C 233.114905 354.699552 233.041977 355.491962 231.969297 354.699552 C 230.027907 346.933992 198.612516 300.798969 192.563474 289.565016 C 185.119859 275.741178 103.324846 141.217561 98.561225 134.968610 C 98.973614 134.968610 98.775434 135.034670 99.121763 134.408072 C 108.488844 131.256651 186.186518 95.362249 190.489476 92.367713 C 190.489476 92.780102 190.423416 92.581922 191.050014 92.928251 C 191.050014 103.248175 190.218068 114.824680 192.171091 124.878924 C 184.895875 132.392687 155.962373 140.419258 146.767503 147.860987 C 146.767503 150.418632 183.890379 218.965209 187.686786 222.973094 C 190.570024 229.500653 213.606392 270.798639 217.955844 277.345291 L 218.516382 277.345291 C 218.516382 239.695815 218.516382 203.167414 218.516382 165.237668 C 216.429930 159.943687 217.395306 19.458654 217.395306 1.000000 C 164.380046 26.947092 109.612928 49.313485 58.594856 76.784760 C 51.315327 80.704500 2.696352 101.642303 1.027593 104.979821 C 0.036551 106.961903 26.050578 146.966774 29.278715 152.961870 C 36.003914 165.451540 119.973805 304.150251 123.785440 308.174888 C 125.941644 312.703104 194.105594 423.982925 200.018624 432.614350 C 203.329323 440.317426 227.912459 477.451361 234.211449 488.107623 Z"/>';
3998 $source .= '</g>';
3999 $source .= '</svg>';
4000 // phpcs:ignore
4001 return 'data:image/svg+xml;base64,' . base64_encode( $source );
4002 }
4003
4004 /**
4005 * Returns a base64 svg resource for the Jaeger icon.
4006 *
4007 * @param string $color1 Optional. Color of the icon.
4008 * @param string $color2 Optional. Color of the icon.
4009 * @param string $color3 Optional. Color of the icon.
4010 * @param string $color4 Optional. Color of the icon.
4011 * @return string The svg resource as a base64.
4012 * @since 3.0.0
4013 */
4014 private function get_base64_jaeger_icon( $color1 = '#231f20', $color2 = '#67cfe3', $color3 = '#dfcaa3', $color4 = '#648c1a' ) {
4015 $source = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256px" height="256px" viewBox="0 0 256 256">';
4016 $source .= '<defs>';
4017 $source .= '<style>.st0{fill:none}.st1{fill:' . $color1 . '}.st2{fill:' . $color2 . '}.st3{fill:' . $color3 . '}</style>';
4018 $source .= '</defs>';
4019 $source .= '<g transform="translate(24,20) scale(0.42,0.42)">';
4020 $source .= '<path d="M274.853 195.985c-23.21 0-42.027 18.817-42.027 42.028 0 23.21 18.816 42.027 42.027 42.027 23.21 0 42.027-18.816 42.027-42.027 0-23.211-18.816-42.028-42.027-42.028zm-5.68 69.289c-7.318 0-13.251-5.933-13.251-13.252 0-7.319 5.933-13.252 13.252-13.252 7.318 0 13.252 5.933 13.252 13.252 0 7.319-5.934 13.252-13.252 13.252zm-1.832 30.332c-6.783-2.773-15.704-4.225-26.515-4.316l-4.746-.04c-2.79-5.183-11.735-8.03-21.926-6.765 10.19-1.265 19.136 1.582 21.925 6.764a7.319 7.319 0 0 1 .896 3.616c-.087 6.223-8.003 12.439-18.768 14.654a40.55 40.55 0 0 1-.804.157c-.243.045-.485.091-.73.132-11.605 1.927-21.962-1.483-24.075-7.684l-3.892 1.315c-2.416.816-23.664 8.403-25.649 23.284-.66 4.949.675 9.488 3.86 13.125 3.833 4.379 10.096 6.993 16.753 6.993 3.602 0 6.946-.796 9.668-2.3 1.699-.939 3.513-2.076 5.434-3.28 6.576-4.12 14.76-9.247 24.674-10.552.887-.117 2.365-.176 4.392-.176 2.209 0 4.861.068 7.669.14 3.241.084 6.914.179 10.477.179 10.495 0 16.8-.816 21.08-2.728 9.065-4.051 13.566-11.942 12.038-21.107-.763-4.57-4.94-8.623-11.761-11.411zm-2.893 26.664c-3.937 1.758-11.067 2.17-18.464 2.17-6.508 0-13.221-.319-18.146-.319-2.132 0-3.929.06-5.229.231-14.387 1.893-25.178 10.601-32.372 14.577-1.815 1.003-4.135 1.5-6.567 1.5-7.208 0-15.39-4.366-14.257-12.859 1.514-11.358 21.345-18.057 21.345-18.057 2.547 3.147 6.879 6.77 17.889 6.77 2.9 0 6.262-.251 10.176-.829 20.692-3.05 21.949-17.753 21.949-17.753 22.338.19 31.376 6.594 32.005 10.37.568 3.408.568 10.223-8.33 14.199z" class="st0"/>';
4021 $source .= '<path d="M216.328 337.591c-5.387 2.072-10.163 5.023-14.296 7.61l-.186.117c.952 4.416 4.141 14.599 12.995 11.961 4.58-1.364 4.671-6.963 3.681-12.077-.587-3.038-1.556-5.905-2.194-7.61zm23.091-2.301a959.6 959.6 0 0 1-2.474-.062c-2.792-.072-5.427-.14-7.6-.14-2.38 0-3.512.083-4.043.153-1.08.142-2.14.34-3.181.574.375 2.361 1.048 5.996 2.058 9.387 1.19 3.998 2.851 7.656 5.05 8.48 2.31.867 11.159 1.642 11.03-8.48a18.821 18.821 0 0 0-.05-1.174c-.304-4.057-.571-6.829-.79-8.738zm-65.029-37.338c7.566-7.6 12.244-18.078 12.244-29.65 0-23.21-18.816-42.027-42.027-42.027s-42.028 18.817-42.028 42.028 18.816 42.027 42.028 42.027a41.82 41.82 0 0 0 21.27-5.784 42.186 42.186 0 0 0 8.512-6.594zm-33.57-1.631c-7.319 0-13.252-5.933-13.252-13.252 0-7.319 5.933-13.252 13.252-13.252 7.319 0 13.252 5.933 13.252 13.252 0 7.319-5.933 13.252-13.252 13.252z" class="st0"/>';
4022 $source .= '<path d="M142.819 451.05c-7.194 1.645-28.364 13.155-46.657 16.649-18.292 3.494-34.119 5.344-39.668 7.399s-9.866 6.166 1.028 10.277c10.893 4.11 63.716 5.55 68.443 0 4.727-5.55-3.26-7.955-14.799-7.81-8.221.102-7.213-2.763-7.193-3.084 0 0 .514-3.596 13.154-5.344 12.62-1.744 68.443-6.988 67.416-12.948-1.028-5.96-34.53-6.783-41.724-5.139z" class="st1"/><ellipse cx="106.593" cy="495.035" class="st1" rx="10.945" ry="3.186" transform="rotate(-12.278 106.593 495.035)"/><ellipse cx="81.261" cy="493.596" class="st1" rx="11.51" ry="3.083" transform="rotate(-4.551 81.26 493.596)"/><ellipse cx="61.016" cy="491.078" class="st1" rx="7.708" ry="2.415" transform="rotate(-7.758 61.016 491.078)"/><ellipse cx="46.063" cy="488.766" class="st1" rx="7.451" ry="1.953" transform="rotate(-8.26 46.063 488.766)"/><ellipse cx="42.672" cy="484.553" class="st1" rx="7.451" ry="1.953" transform="rotate(-8.26 42.672 484.552)"/><ellipse cx="41.785" cy="479.788" class="st1" rx="6.477" ry="1.697" transform="rotate(-8.261 41.785 479.788)"/>';
4023 $source .= '<path d="M252.575 456.805c-12.538.617-40.902-.822-44.807 5.755-3.905 6.577 11.51 9.044 35.764 6.988 24.253-2.055 58.577-4.727 60.016-12.126 1.439-7.4-6.372-5.96-7.194-10.688-.822-4.727 8.633-4.727 10.482-11.716 1.85-6.988-12.743-6.166-25.692-6.166-12.948 0-34.53 1.234-36.585 8.016-2.055 6.783 9.866 6.783 18.293 8.427 8.427 1.645 5.96 4.728 5.96 4.728-.41 4.316-3.7 6.166-16.237 6.782z" class="st1"/><ellipse cx="219.047" cy="474.841" class="st1" rx="10.868" ry="3.545"/><ellipse cx="247.026" cy="474.07" class="st1" rx="7.245" ry="3.237"/><ellipse cx="269.609" cy="471.758" class="st1" rx="7.939" ry="2.621"/><ellipse cx="287.028" cy="468.829" class="st1" rx="5.781" ry="2.775"/><ellipse cx="302.058" cy="465.669" class="st1" rx="5.858" ry="2.698"/>';
4024 $source .= '<path d="M46.47 389.879c0 3.504 7.645 6.818 21.222 9.767-.967-7.032-.37-14.125.537-19.65-13.913 2.978-21.758 6.332-21.758 9.883zm400.637-9.081a31.8 31.8 0 0 1-.66 1.683 30.59 30.59 0 0 1-7.122 10.25c-6.133 5.808-11.51 9.289-16.312 10.558 26.534-3.73 42.285-8.374 42.285-13.41 0-3.235-6.515-6.308-18.19-9.081z" class="st1"/>';
4025 $source .= '<path d="M401.72 373.427c-1.687-12.369-6.963-17.917-11.617-22.813-4.334-4.56-8.429-8.865-7.11-16.771 1.218-7.309 7.033-11.806 16.533-12.975-5.77-39.002-14.225-88.207-25.095-130.183-5.428-20.964-14.013-35.525-25.526-45.206-13.176 6.74-29.025 14.15-46.717 21.821a1223.516 1223.516 0 0 1-38.532 15.908c-10.104 10.84-21.144 21.524-27.91 24.569-4.817 2.167-9.098 3.03-12.818 3.03-8.055 0-13.493-4.04-16.126-7.634-3.052.807-5.49 1.33-7.147 1.505-1.983.208-4.906.456-8.56.72 1.404 3.677.845 7.982-1.848 11.226-2.962 3.569-7.735 5.361-14.5 5.361-9.734 0-23.592-3.712-42.122-11.197-2.726-1.1-5.23-2.08-7.528-2.951-1.42.007-2.838.012-4.256.012h-.013c-17.703 0-31.538-.557-42.384-1.445-11.879 24.59-6.717 51.863-2.369 74.393 4.167 21.591 18.623 60.008 32.032 93.016a2069.253 2069.253 0 0 0 13.91 33.364c36.3 3.211 82.84 5.14 133.585 5.14 60.39 0 114.785-2.736 153.09-7.108-2.79-11.486-6.326-27.467-6.934-31.532l-.038-.25zM102.58 268.303c0-23.211 18.815-42.028 42.027-42.028s42.027 18.817 42.027 42.028c0 11.571-4.678 22.05-12.245 29.65a42.186 42.186 0 0 1-8.512 6.593 41.82 41.82 0 0 1-21.27 5.784c-23.212 0-42.028-18.816-42.028-42.027zm112.261 88.976c-8.854 2.638-12.043-7.545-12.995-11.96.06-.04.125-.08.186-.117 4.133-2.588 8.909-5.54 14.296-7.61.638 1.705 1.607 4.572 2.194 7.61.99 5.114.899 10.713-3.68 12.077zm14.388-3.597c-2.199-.824-3.86-4.482-5.05-8.48-1.01-3.39-1.683-7.026-2.058-9.387 1.041-.235 2.1-.432 3.18-.574.532-.07 1.664-.153 4.043-.153 2.174 0 4.81.068 7.6.14.801.02 1.63.042 2.475.062.219 1.91.486 4.681.79 8.738.03.408.045.796.05 1.174.129 10.122-8.72 9.347-11.03 8.48zm37.834-25.558c-4.28 1.912-10.584 2.728-21.08 2.728-3.562 0-7.235-.095-10.476-.178-2.808-.073-5.46-.14-7.669-.14-2.027 0-3.505.058-4.392.175-9.914 1.305-18.098 6.432-24.674 10.553-1.92 1.203-3.735 2.34-5.434 3.279-2.722 1.504-6.066 2.3-9.668 2.3-6.657 0-12.92-2.614-16.753-6.993-3.185-3.637-4.52-8.176-3.86-13.125 1.985-14.88 23.233-22.468 25.65-23.284l3.89-1.315a7.292 7.292 0 0 1-.295-1.16c-1.15-6.927 7.896-14.2 20.205-16.244a41.82 41.82 0 0 1 1.647-.235c10.19-1.265 19.137 1.582 21.926 6.764l4.746.04c10.81.092 19.732 1.544 26.515 4.317 6.822 2.788 10.998 6.84 11.76 11.411 1.529 9.165-2.972 17.056-12.038 21.107zm7.79-48.084c-23.21 0-42.027-18.816-42.027-42.027 0-23.211 18.816-42.028 42.027-42.028 23.21 0 42.027 18.817 42.027 42.028 0 23.21-18.816 42.027-42.027 42.027z" class="st2"/>';
4026 $source .= '<path d="M328.68 96.41l-.314-.548-.415-.526c-.39-.626-1.93-1.593-2.05-1.603l-.157-.084-.08-.042-.3-.13-.026-.01-.053-.02-.427-.15-.859-.294c-.565-.21-1.21-.283-1.82-.41-.62-.11-1.277-.106-1.917-.147-.645.023-1.301.067-1.942.159-2.582.455-4.86 1.705-6.595 3.192-1.762 1.484-3.083 3.184-4.155 4.87-2.13 3.39-3.327 6.77-4.119 9.685a40.4 40.4 0 0 0-1.242 7.155c-.09.867-.083 1.565-.102 2.031-.007.47.007.723.007.723l1.316-2.39c.836-1.504 2.008-3.639 3.453-6.096 1.456-2.44 3.194-5.238 5.302-7.774 1.056-1.257 2.215-2.429 3.438-3.335 1.233-.895 2.494-1.509 3.75-1.71.317-.04.632-.07.952-.097.325.035.644-.002.976.058.332.081.662.077 1.004.188l.806.218.255.116c-.012-.01-.025-.019-.034-.031a.128.128 0 0 0 .043.008c.007.015.018.027.028.04l.034.016.073.035-.035-.004a.248.248 0 0 1-.049-.016c.04.025.076.085.11.165.174.31.301.924.363 1.603.08 1.402-.09 3.02-.353 4.552a67.319 67.319 0 0 1-.906 4.422c-.656 2.776-1.282 5.138-1.695 6.812-.43 1.668-.657 2.652-.657 2.652s.72-.71 1.804-2.081a42.869 42.869 0 0 0 4.026-6.03 36.571 36.571 0 0 0 2.1-4.476c.631-1.675 1.211-3.521 1.392-5.76.07-1.135.037-2.396-.448-3.842a5.392 5.392 0 0 0-.482-1.094z"/>';
4027 $source .= '<path d="M323.403 99.457l-.037-.018c.015.014.026.033.045.043l.015.005-.008-.009c-.006-.006-.01-.014-.015-.021z"/>';
4028 $source .= '<path d="M68.017 176.726h.577a97.188 97.188 0 0 1-.577-1.04v1.04zm5.148-16.286a33.069 33.069 0 0 0 3.542 5.618c.474.64.911 1.103 1.188 1.428.286.32.452.481.452.481s-.168-.908-.484-2.443c-.298-1.539-.754-3.712-1.168-6.241-.204-1.262-.391-2.618-.484-3.99-.075-1.35-.075-2.793.221-3.854.148-.526.342-.934.53-1.14.182-.186.33-.247.595-.341l.197-.04.32-.065c.092-.014-.025.052-.034.06a.213.213 0 0 1-.108.026.185.185 0 0 1-.052-.009l.04.023c.057.025.11.029.175.036.31.116.784.367 1.281.744 1.036.75 2.108 1.916 3.135 3.098a79.387 79.387 0 0 1 2.951 3.757c1.878 2.554 3.615 5.051 5.141 7.195a179.068 179.068 0 0 0 3.808 5.195 57.627 57.627 0 0 0 1.542 1.965l-.074-.656c-.067-.42-.133-1.054-.297-1.828a48.738 48.738 0 0 0-1.643-6.35 53.163 53.163 0 0 0-3.646-8.567c-.824-1.517-1.749-3.07-2.88-4.583-1.13-1.524-2.415-3.022-4.198-4.394-.925-.66-1.991-1.298-3.36-1.71a14.285 14.285 0 0 0-1.116-.214l-.282-.038-.38-.005c-.254.001-.51.013-.763.034-.225.02-.564.057-.685.088l-.315.085-.315.086-.417.122-.122.054-.245.11c-1.295.531-2.563 1.597-3.283 2.834-.738 1.228-1.026 2.466-1.128 3.565-.21 2.216.224 3.994.662 5.613a27.17 27.17 0 0 0 1.699 4.25z" class="st1"/>';
4029 $source .= '<path d="M92.545 418.614c9.853 0 16.79-5.363 21.66-12.324-5.572-12.92-14.741-34.693-23.434-57.607-2.354 2.002-5.073 5.025-8.015 9.585-7.324 11.352-13.356 37.765-5.759 51.706 3.167 5.815 8.254 8.64 15.548 8.64zm347.847-65.447c-5.776-14.944-18.059-25.552-29.869-25.799l-.423-.036c-.018-.004-2.288-.342-5.337-.342-6.433 0-14.329 1.373-15.419 7.911-.756 4.537 1.228 6.861 5.425 11.276 4.797 5.044 11.364 11.952 13.331 26.38 2.253 16.523 6.288 24.903 11.99 24.904 2.663 0 7.519-1.596 15.546-9.2 9.886-9.366 8.939-24.269 4.756-35.094z" class="st3"/><circle cx="140.82" cy="283.069" r="13.252" class="st1"/><circle cx="269.174" cy="252.022" r="13.252" class="st1"/>';
4030 $source .= '<path fill="' . $color4 . '" d="M104.872 135.026c10.341 2.791 22.033 4.206 34.752 4.206 20.436 0 63.826-3.97 124.812-30.561l1.373-.599c-.191-3.097.06-6.493.84-10.048 1.354-6.15 4.033-11.363 7.322-14.816-.635-2.359-1.157-4.082-1.52-4.957-7.038-3.752-65.056-25.363-95.313-25.363-3.023 0-5.663.225-7.846.67-26.817 5.474-67.563 52.092-69.026 58.701-.44 2.86-.306 11.836.015 21.528l4.591 1.24zm-.522 66.202c-1.466-.306-2.287-.4-2.624-.428-5.591.345-10.717-3.565-11.75-9.236a11.274 11.274 0 0 1-.164-1.717c-3.042 1.726-6.086 3.592-8.935 5.564l-5.066 3.508-3.728-4.907c-1.123-1.48-6.309-8.476-11.088-17.68-8.976 4.235-15.988 8.864-17.7 13.25-.324.832-.193 1.28.143 1.772 1.465 2.145 10.155 8.701 60.911 9.874zm105.388-14.372c4.457-2.837 10.15-2.15 13.813 1.336.565-.089 1.524-.33 2.946-.97 5.557-2.64 25.598-24.037 40.824-42.36a11.102 11.102 0 0 1 1.811-1.731c-34.795 15.035-83.414 31.467-129.707 31.467-7.44 0-14.505-.434-21.063-1.283l1.016 2.993-5.789 2.217c-.042.016-1.037.4-2.702 1.092 7.452 1.741 17.525 5.163 30.177 10.273 23.158 9.352 32.014 9.71 34.23 9.577 3.15-1.668 6.954-1.733 10.211-.142 6.007-.385 10.68-.758 13.475-1.052 1.271-.134 3.16-.53 5.563-1.15a11.265 11.265 0 0 1 5.195-10.267zm134.793-68.77c-1.686 10.05-4.927 21.082-7.076 24.092l-2.017 2.82c9.132-4.446 17.278-8.663 24.193-12.54 24.043-13.481 27.032-19.384 27.376-20.873.225-.975-.014-1.276-.117-1.404-.261-.329-1.95-1.967-9.544-1.967-8.298 0-19.916 1.898-32.04 4.529a117.98 117.98 0 0 1-.775 5.343zm-9.374 27.049l-3.467-.282c-.063-.005-6.429-.516-15.061-.516-8.968 0-20.793.542-30.496 2.839 1.853 3.851 1.433 8.59-1.477 12.091a631.95 631.95 0 0 1-11.206 13.104 1201.72 1201.72 0 0 0 26.176-10.979c12.961-5.62 24.91-11.092 35.53-16.257z"/>';
4031 $source .= '<path d="M267.01 114.574c-24.37 10.625-77.765 31.098-127.386 31.098-12.563 0-24.883-1.312-36.43-4.429a103.396 103.396 0 0 1 3.58 5.843c4.291 7.539 7.43 14.986 9.14 19.381 6 .938 13.83 1.691 23.511 1.691 28.503 0 73.052-6.524 134.181-34.037.96-3.015 2.238-6.79 3.822-10.985-.124.006-.247.027-.371.027-.65 0-1.3-.07-1.93-.208-3.794-.834-6.602-3.928-8.117-8.381z" class="st3"/>';
4032 $source .= '<path d="M68.594 176.726c4.402 7.838 8.618 13.39 8.618 13.39 14.766-10.222 34.076-17.605 34.076-17.605s-.496-1.457-1.426-3.837a145.917 145.917 0 0 0-1.76-4.311 161.363 161.363 0 0 0-2.005-4.504 150.289 150.289 0 0 0-1.055-2.222 135.584 135.584 0 0 0-2.482-4.863c-1.49-2.772-3.144-5.594-4.946-8.295-5.927-8.887-13.44-16.448-21.853-16.446-2.652 0-5.396.753-8.204 2.45-15.458 9.347-7.48 30.75.46 45.204.192.35.385.697.577 1.04zm2.21-26.15c.102-1.099.39-2.337 1.128-3.565.72-1.237 1.988-2.303 3.283-2.834l.245-.11.122-.054.417-.122.315-.086.315-.085c.12-.03.46-.068.685-.088.254-.021.51-.033.763-.034l.38.005.282.038c.373.058.753.128 1.116.214 1.369.412 2.435 1.05 3.36 1.71 1.783 1.372 3.067 2.87 4.197 4.394 1.132 1.513 2.057 3.066 2.881 4.583a53.163 53.163 0 0 1 3.646 8.566 48.738 48.738 0 0 1 1.643 6.35c.164.775.23 1.408.297 1.829l.074.656s-.592-.71-1.542-1.965a179.068 179.068 0 0 1-3.808-5.195c-1.526-2.144-3.263-4.64-5.141-7.195a79.387 79.387 0 0 0-2.951-3.757c-1.027-1.182-2.1-2.347-3.135-3.098-.497-.377-.97-.628-1.28-.744-.066-.007-.119-.01-.175-.036l-.04-.023a.185.185 0 0 0 .051.01.213.213 0 0 0 .108-.028c.009-.007.126-.073.034-.059l-.32.065-.197.04c-.264.094-.413.155-.595.34-.188.207-.382.615-.53 1.141-.296 1.06-.296 2.505-.22 3.853.092 1.373.279 2.729.483 3.99.414 2.53.87 4.703 1.168 6.242.316 1.535.484 2.443.484 2.443s-.166-.16-.452-.48c-.277-.326-.714-.79-1.188-1.429a33.069 33.069 0 0 1-3.542-5.618 27.216 27.216 0 0 1-1.699-4.251c-.438-1.62-.873-3.397-.662-5.613zm4.96-25.763v3.22z" class="st2"/>';
4033 $source .= '<path d="M282.872 78.738a9 9 0 0 1 1.93.208c4.725 1.04 7.918 5.588 8.992 11.897 9.009-12.652 18.833-19.05 29.334-19.05 4.426 0 8.311 1.044 11.57 3.059 5.54-6.738 9.065-11.385 9.065-11.385-4.165.757-12.874 1.893-12.874 1.893 32.94-12.116 30.29-45.056 30.29-45.056 0 5.68-17.038 19.31-17.038 19.31.758-4.922-1.893-11.359-1.893-11.359.758 6.437-19.688 23.096-19.688 23.096 1.514-3.029.378-8.33.378-8.33-1.136 6.058-10.222 8.33-10.222 8.33 5.679-6.815 16.28-42.784 8.33-45.056-7.952-2.272-18.932 23.475-18.932 23.475-.379-6.058-3.786-6.058-3.786-6.058 1.514 18.93-13.63 34.076-13.63 34.076-1.136-3.786-7.195-5.68-7.195-5.68 1.945 4.214-.27 23.395-.95 28.836 2.01-1.42 4.158-2.206 6.319-2.206z" class="st3"/>';
4034 $source .= '<path d="M274.777 115.57l.026.025c.162.177.33.336.503.473.063.05.13.083.194.128.125.087.25.176.38.241.205.103.414.181.629.228h.001a2.998 2.998 0 0 0 1.057.02c.992-.153 2.083-.77 3.175-1.787a173.277 173.277 0 0 1 3.22-7.09 144.189 144.189 0 0 1 3.213-6.276c1.617-8.56-.56-15.593-3.757-16.296a2.48 2.48 0 0 0-.546-.059c-3.286 0-8.061 5.718-9.933 14.23-1.357 6.178-.73 11.668.871 14.736l.006.012c.29.554.613 1.03.96 1.415z"/>';
4035 $source .= '<path d="M323.375 99.416a.128.128 0 0 1-.043-.008c.009.012.022.02.034.031l.037.018c-.01-.014-.02-.026-.028-.041zm.135.091l-.073-.035-.034-.015c.005.007.009.015.015.021l.008.009a.248.248 0 0 0 .05.016l.034.004z" class="st2"/>';
4036 $source .= '<path d="M323.128 78.234c-18.752 0-32.548 28.226-39.758 47.402a215.436 215.436 0 0 0-3.516 10.104 189.136 189.136 0 0 0-1.614 5.282c.906.184 1.792.492 2.645.904 10.926-3.27 25.066-4.028 35.744-4.028 9.036 0 15.586.537 15.586.537 2.84-3.976 19.31-60.201-9.087-60.201zm6.482 23.111c-.18 2.24-.76 4.086-1.393 5.76a36.571 36.571 0 0 1-2.099 4.477 42.869 42.869 0 0 1-4.026 6.03c-1.085 1.37-1.804 2.08-1.804 2.08s.228-.983.657-2.651c.413-1.674 1.04-4.036 1.695-6.812.325-1.386.652-2.88.906-4.422.263-1.532.432-3.15.353-4.552-.062-.679-.19-1.293-.363-1.603-.034-.08-.07-.14-.11-.165l-.015-.005c-.02-.01-.03-.029-.045-.043l-.255-.116-.806-.218c-.342-.111-.672-.107-1.004-.188-.332-.06-.651-.023-.976-.058-.32.028-.635.057-.952.096-1.256.202-2.517.816-3.75 1.711-1.223.906-2.382 2.078-3.438 3.335-2.108 2.536-3.846 5.333-5.302 7.774-1.445 2.457-2.617 4.592-3.453 6.096l-1.316 2.39s-.014-.253-.007-.723c.019-.466.013-1.164.102-2.031a40.4 40.4 0 0 1 1.242-7.155c.792-2.916 1.99-6.296 4.119-9.686 1.072-1.685 2.393-3.385 4.155-4.869 1.735-1.487 4.013-2.737 6.595-3.192a18.468 18.468 0 0 1 1.942-.159c.64.04 1.297.038 1.916.147.61.127 1.256.2 1.821.41l.86.294.426.15.053.02.026.01.3.13.08.042.158.084c.12.01 1.659.977 2.05 1.603l.414.526.314.548c.22.373.366.736.482 1.094.485 1.446.518 2.707.448 3.841z" class="st2"/>';
4037 $source .= '<path d="M222.928 203.992c3.066 0 6.438-.817 10.022-2.43 7.47-3.362 25.709-21.674 46.465-46.65a4.422 4.422 0 0 0 1.009-3.257 4.424 4.424 0 0 0-1.588-3.016 4.397 4.397 0 0 0-2.84-1.029 4.449 4.449 0 0 0-3.434 1.608c-9.036 10.874-34.4 40.007-43.138 44.16l-.13.06c-1.7.765-3.277 1.265-4.685 1.486l-3.32.522-2.435-2.317a4.501 4.501 0 0 0-3.078-1.221 4.43 4.43 0 0 0-2.38.699 4.423 4.423 0 0 0-1.957 2.79 4.428 4.428 0 0 0 .592 3.358c.34.536 3.544 5.237 10.897 5.237zm-42.348.98c-.731 0-1.455.18-2.094.518l-1.308.693-1.479.087c-.285.017-.637.03-1.065.03-4.158 0-14.381-1.31-36.122-10.09-23.975-9.683-33.472-11.13-37-11.13-.67 0-1.065.055-1.245.087a4.427 4.427 0 0 0-2.865 1.847 4.42 4.42 0 0 0-.72 3.329c.38 2.088 2.254 3.663 4.358 3.663.088 0 .176-.003.266-.008l.493-.031.491.04c2.644.22 11.14 1.68 32.887 10.462 17.58 7.1 30.894 10.701 39.57 10.701 4.545 0 7.659-.975 9.256-2.9a4.422 4.422 0 0 0 1.007-3.255 4.424 4.424 0 0 0-1.588-3.015 4.406 4.406 0 0 0-2.842-1.028z"/>';
4038 $source .= '<path d="M240.772 297.701s-1.257 14.703-21.949 17.753c-3.914.578-7.277.829-10.176.829-11.01 0-15.342-3.623-17.889-6.77 0 0-19.83 6.699-21.345 18.057-1.133 8.493 7.05 12.859 14.257 12.859 2.432 0 4.752-.497 6.567-1.5 7.194-3.976 17.985-12.684 32.372-14.577 1.3-.17 3.097-.23 5.23-.23 4.924 0 11.637.318 18.145.318 7.397 0 14.527-.412 18.464-2.17 8.897-3.976 8.897-10.791 8.33-14.199-.63-3.776-9.668-10.18-32.006-10.37z" class="st3"/>';
4039 $source .= '<path d="M216.672 309.808c.246-.04.488-.087.73-.132.27-.05.539-.102.805-.157 10.765-2.215 18.681-8.431 18.768-14.654a7.319 7.319 0 0 0-.896-3.616c-2.789-5.182-11.734-8.03-21.925-6.764a42.09 42.09 0 0 0-1.647.235c-12.31 2.044-21.355 9.317-20.205 16.245.066.397.167.783.296 1.16 2.113 6.2 12.47 9.61 24.074 7.683z" class="st1"/>';
4040 $source .= '</g>';
4041 $source .= '</svg>';
4042 // phpcs:ignore
4043 return 'data:image/svg+xml;base64,' . base64_encode( $source );
4044 }
4045
4046 /**
4047 * Returns a base64 svg resource for the Zipkin icon.
4048 *
4049 * @param string $color1 Optional. Color of the icon.
4050 * @return string The svg resource as a base64.
4051 * @since 3.0.0
4052 */
4053 private function get_base64_datadog_icon( $color1 = '#632CA6' ) {
4054 $source = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256px" height="256px" viewBox="0 0 256 256">';
4055 $source .= '<defs>';
4056 $source .= '<style>.st0{fill-rule:evenodd;clip-rule:evenodd;fill:' . $color1 . '}</style>';
4057 $source .= '</defs>';
4058 $source .= '<g transform="translate(28,24) scale(0.25,0.25)">';
4059 $source .= '<path class="st0" d="M670.38,608.27l-71.24-46.99l-59.43,99.27l-69.12-20.21l-60.86,92.89l3.12,29.24l330.9-60.97l-19.22-206.75 L670.38,608.27z M361.79,519.13l53.09-7.3c8.59,3.86,14.57,5.33,24.87,7.95c16.04,4.18,34.61,8.19,62.11-5.67 c6.4-3.17,19.73-15.36,25.12-22.31l217.52-39.46l22.19,268.56l-372.65,67.16L361.79,519.13z M765.85,422.36l-21.47,4.09L703.13,0.27 L0.27,81.77l86.59,702.68l82.27-11.94c-6.57-9.38-16.8-20.73-34.27-35.26c-24.23-20.13-15.66-54.32-1.37-75.91 c18.91-36.48,116.34-82.84,110.82-141.15c-1.98-21.2-5.35-48.8-25.03-67.71c-0.74,7.85,0.59,15.41,0.59,15.41 s-8.08-10.31-12.11-24.37c-4-5.39-7.14-7.11-11.39-14.31c-3.03,8.33-2.63,17.99-2.63,17.99s-6.61-15.62-7.68-28.8 c-3.92,5.9-4.91,17.11-4.91,17.11s-8.59-24.62-6.63-37.88c-3.92-11.54-15.54-34.44-12.25-86.49c21.45,15.03,68.67,11.46,87.07-15.66 c6.11-8.98,10.29-33.5-3.05-81.81c-8.57-30.98-29.79-77.11-38.06-94.61l-0.99,0.71c4.36,14.1,13.35,43.66,16.8,57.99 c10.44,43.47,13.24,58.6,8.34,78.64c-4.17,17.42-14.17,28.82-39.52,41.56c-25.35,12.78-58.99-18.32-61.12-20.04 c-24.63-19.62-43.68-51.63-45.81-67.18c-2.21-17.02,9.81-27.24,15.87-41.16c-8.67,2.48-18.34,6.88-18.34,6.88 s11.54-11.94,25.77-22.27c5.89-3.9,9.35-6.38,15.56-11.54c-8.99-0.15-16.29,0.11-16.29,0.11s14.99-8.1,30.53-14 c-11.37-0.5-22.25-0.08-22.25-0.08s33.45-14.96,59.87-25.94c18.17-7.45,35.92-5.25,45.89,9.17c13.09,18.89,26.84,29.15,55.98,35.51 c17.89-7.93,23.33-12.01,45.81-18.13c19.79-21.76,35.33-24.58,35.33-24.58s-7.71,7.07-9.77,18.18 c11.22-8.84,23.52-16.22,23.52-16.22s-4.76,5.88-9.2,15.22l1.03,1.53c13.09-7.85,28.48-14.04,28.48-14.04s-4.4,5.56-9.56,12.76 c9.87-0.08,29.89,0.42,37.66,1.3c45.87,1.01,55.39-48.99,72.99-55.26c22.04-7.87,31.89-12.63,69.45,24.26 c32.23,31.67,57.41,88.36,44.91,101.06c-10.48,10.54-31.16-4.11-54.08-32.68c-12.11-15.13-21.27-33.01-25.56-55.74 c-3.62-19.18-17.71-30.31-17.71-30.31S520,92.95,520,109.01c0,8.77,1.1,41.56,15.16,59.96c-1.39,2.69-2.04,13.31-3.58,15.34 c-16.36-19.77-51.49-33.92-57.22-38.09c19.39,15.89,63.96,52.39,81.08,87.37c16.19,33.08,6.65,63.4,14.84,71.25 c2.33,2.25,34.82,42.73,41.07,63.07c10.9,35.45,0.65,72.7-13.62,95.81l-39.85,6.21c-5.83-1.62-9.76-2.43-14.99-5.46 c2.88-5.1,8.61-17.82,8.67-20.44l-2.25-3.95c-12.4,17.57-33.18,34.63-50.44,44.43c-22.59,12.8-48.63,10.83-65.58,5.58 c-48.11-14.84-93.6-47.35-104.57-55.89c0,0-0.34,6.82,1.73,8.35c12.13,13.68,39.92,38.43,66.78,55.68l-57.26,6.3l27.07,210.78 c-12,1.72-13.87,2.56-27.01,4.43c-11.58-40.91-33.73-67.62-57.94-83.18c-21.35-13.72-50.8-16.81-78.99-11.23l-1.81,2.1 c19.6-2.04,42.74,0.8,66.51,15.85c23.33,14.75,42.13,52.85,49.05,75.79c8.86,29.32,14.99,60.68-8.86,93.92 c-16.97,23.63-66.51,36.69-106.53,8.44c10.69,17.19,25.14,31.25,44.59,33.9c28.88,3.92,56.29-1.09,75.16-20.46 c16.11-16.56,24.65-51.19,22.4-87.66l25.49-3.7l9.2,65.46l421.98-50.81L765.85,422.36z M509.12,244.59 c-1.18,2.69-3.03,4.45-0.25,13.2l0.17,0.5l0.44,1.13l1.16,2.62c5.01,10.24,10.51,19.9,19.7,24.83c2.38-0.4,4.84-0.67,7.39-0.8 c8.63-0.38,14.08,0.99,17.54,2.85c0.31-1.72,0.38-4.24,0.19-7.95c-0.67-12.97,2.57-35.03-22.36-46.64 c-9.41-4.37-22.61-3.02-27.01,2.43c0.8,0.1,1.52,0.27,2.08,0.46C514.82,239.55,510.31,241.84,509.12,244.59 M578.99,365.61 c-3.27-1.8-18.55-1.09-29.29,0.19c-20.46,2.41-42.55,9.51-47.39,13.29c-8.8,6.8-4.8,18.66,1.7,23.53 c18.23,13.62,34.21,22.75,51.08,20.53c10.36-1.36,19.49-17.76,25.96-32.64C585.48,380.26,585.48,369.2,578.99,365.61 M397.85,260.65 c5.77-5.48-28.74-12.68-55.52,5.58c-19.75,13.47-20.38,42.35-1.47,58.72c1.89,1.62,3.45,2.77,4.91,3.71 c5.52-2.6,11.81-5.23,19.05-7.58c12.23-3.97,22.4-6.02,30.76-7.11c4-4.47,8.65-12.34,7.49-26.59 C401.49,268.05,386.84,271.12,397.85,260.65"/>';
4060 $source .= '</g>';
4061 $source .= '</svg>';
4062 // phpcs:ignore
4063 return 'data:image/svg+xml;base64,' . base64_encode( $source );
4064 }
4065
4066 /**
4067 * Returns a base64 svg resource for the New Relic icon.
4068 *
4069 * @param string $color1 Optional. Color 1 of the icon.
4070 * @param string $color2 Optional. Color 2 of the icon.
4071 * @return string The svg resource as a base64.
4072 * @since 3.2.0
4073 */
4074 private function get_base64_newrelic_icon( $color1 = '#008c99', $color2 = '#70ccd3' ) {
4075 $source = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256px" height="256px" viewBox="0 0 256 256">';
4076 $source .= '<g transform="translate(24,48) scale(1.26,1.26)">';
4077 $source .= '<path fill="' . $color1 . '" d="M168.72,55.82C161.07,20.67,118.92,0,74.56,9.64S.45,55.6,8.09,90.74s49.8,55.83,94.15,46.18S176.36,91,168.72,55.82ZM88.41,105.68a32.4,32.4,0,1,1,32.4-32.4A32.4,32.4,0,0,1,88.41,105.68Z" transform="translate(-6.9 -7.27)"/>';
4078 $source .= '<path fill="' . $color2 . '" d="M95.57,27.92A46.52,46.52,0,1,0,142.1,74.44,46.52,46.52,0,0,0,95.57,27.92Zm-7.17,73.66a28.3,28.3,0,1,1,28.3-28.3A28.3,28.3,0,0,1,88.41,101.58Z" transform="translate(-6.9 -7.27)"/>';
4079 $source .= '</g>';
4080 $source .= '</svg>';
4081 // phpcs:ignore
4082 return 'data:image/svg+xml;base64,' . base64_encode( $source );
4083 }
4084
4085 /**
4086 * Returns a base64 svg resource for the Tracy icon.
4087 *
4088 * @param string $color1 Optional. Color 1 of the icon.
4089 * @param string $color2 Optional. Color 2 of the icon.
4090 * @return string The svg resource as a base64.
4091 * @since 3.2.0
4092 */
4093 private function get_base64_tracy_icon( $color1 = '#cc1817', $color2 = '#ebacac', $color3 = '#fbfaf9', $color4 = '#5fade9', $color5 = '#9da09f', $color6 = '#faf4ce' ) {
4094 $source = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" height="500" viewBox="0 0 500 500">';
4095 $source .= '<g transform="scale(0.8,-0.8) translate(110,-530)">';
4096 $source .= '<path d="M 1.000000 128.192982 L 501.000000 128.192982 L 501.000000 51.438596 L 25.122807 51.438596 L 25.122807 25.122807 L 501.000000 25.122807 L 501.000000 1.000000 L 1.000000 1.000000 Z M 25.122807 104.070175 L 25.122807 82.140351 L 108.456140 82.140351 L 108.456140 104.070175 L 25.122807 104.070175 Z" transform="scale(0.8,0.8) translate(-1.000000,371.807018)" fill="' . $color1 . '"></path>';
4097 $source .= '<path d="M 1.000000 22.929825 L 84.333333 22.929825 L 84.333333 1.000000 L 1.000000 1.000000 L 1.000000 22.929825 Z" transform="scale(0.8,0.8) translate(23.122807,452.947368)" fill="' . $color2 . '"></path>';
4098 $source .= '<path d="M 1.000000 27.315789 L 476.877193 27.315789 L 476.877193 1.000000 L 1.000000 1.000000 Z" transform="scale(0.8,0.8) translate(23.122807,395.929825)" fill="' . $color2 . '"></path>';
4099 $source .= '<path d="M 1.000000 373.807018 L 501.000000 373.807018 L 501.000000 267.447368 L 499.903509 267.447368 L 498.807018 267.447368 L 497.710526 267.447368 L 496.614035 267.447368 L 495.517544 267.447368 L 494.421053 267.447368 L 493.324561 267.447368 L 492.228070 267.447368 L 491.131579 267.447368 L 490.035088 267.447368 L 488.938596 267.447368 L 488.938596 268.543860 L 487.842105 268.543860 L 486.745614 268.543860 L 485.649123 268.543860 L 484.552632 268.543860 L 483.456140 268.543860 L 482.359649 268.543860 L 481.263158 268.543860 L 480.166667 268.543860 L 479.070175 268.543860 L 477.973684 268.543860 L 476.877193 268.543860 L 475.780702 268.543860 L 474.684211 268.543860 L 473.587719 268.543860 L 472.491228 268.543860 L 471.394737 268.543860 L 470.298246 268.543860 L 469.201754 268.543860 L 468.105263 268.543860 L 467.008772 268.543860 L 465.912281 268.543860 L 464.815789 268.543860 L 463.719298 268.543860 L 462.622807 268.543860 L 461.526316 268.543860 L 460.429825 268.543860 L 459.333333 268.543860 L 458.236842 268.543860 L 457.140351 268.543860 L 456.043860 268.543860 L 454.947368 268.543860 L 453.850877 268.543860 L 452.754386 268.543860 L 451.657895 268.543860 L 450.561404 268.543860 L 449.464912 268.543860 L 448.368421 268.543860 L 447.271930 268.543860 L 446.175439 268.543860 L 445.078947 268.543860 L 443.982456 268.543860 L 442.885965 268.543860 L 441.789474 268.543860 L 440.692982 268.543860 L 439.596491 268.543860 L 438.500000 268.543860 L 437.403509 268.543860 L 436.307018 268.543860 L 435.210526 268.543860 L 434.114035 268.543860 L 433.017544 268.543860 L 431.921053 268.543860 L 430.824561 268.543860 L 429.728070 268.543860 L 428.631579 268.543860 L 427.535088 268.543860 L 426.438596 268.543860 L 425.342105 268.543860 L 424.245614 268.543860 L 423.149123 268.543860 L 422.052632 268.543860 L 420.956140 268.543860 L 419.859649 268.543860 L 418.763158 268.543860 L 417.666667 268.543860 L 416.570175 268.543860 L 415.473684 268.543860 L 414.377193 268.543860 L 413.280702 268.543860 L 412.184211 268.543860 L 411.087719 268.543860 L 409.991228 268.543860 L 408.894737 268.543860 L 407.798246 268.543860 L 406.701754 268.543860 L 405.605263 268.543860 L 404.508772 268.543860 L 403.412281 268.543860 L 402.315789 268.543860 L 401.219298 268.543860 L 400.122807 268.543860 L 399.026316 268.543860 L 397.929825 268.543860 L 396.833333 268.543860 L 395.736842 268.543860 L 394.640351 268.543860 L 393.543860 268.543860 L 392.447368 268.543860 L 391.350877 268.543860 L 390.254386 268.543860 L 389.157895 268.543860 L 388.061404 268.543860 L 386.964912 268.543860 L 385.868421 268.543860 L 384.771930 268.543860 L 383.675439 268.543860 L 382.578947 268.543860 L 381.482456 268.543860 L 380.385965 268.543860 L 379.289474 268.543860 L 378.192982 268.543860 L 377.096491 268.543860 L 376.000000 268.543860 L 374.903509 268.543860 L 373.807018 268.543860 L 372.710526 268.543860 L 371.614035 268.543860 L 370.517544 268.543860 L 369.421053 268.543860 L 368.324561 268.543860 L 367.228070 268.543860 L 366.131579 268.543860 L 365.035088 268.543860 L 363.938596 268.543860 L 362.842105 268.543860 L 361.745614 268.543860 L 360.649123 268.543860 L 359.552632 268.543860 L 358.456140 268.543860 L 357.359649 268.543860 L 356.263158 268.543860 L 355.166667 268.543860 L 354.070175 268.543860 L 352.973684 268.543860 L 351.877193 268.543860 L 350.780702 268.543860 L 349.684211 268.543860 L 348.587719 268.543860 L 347.491228 268.543860 L 346.394737 268.543860 L 345.298246 268.543860 L 344.201754 268.543860 L 343.105263 268.543860 L 342.008772 268.543860 L 340.912281 268.543860 L 339.815789 268.543860 L 338.719298 268.543860 L 337.622807 268.543860 L 336.526316 268.543860 L 335.429825 268.543860 L 334.333333 268.543860 L 333.236842 268.543860 L 332.140351 268.543860 L 331.043860 268.543860 L 329.947368 268.543860 L 328.850877 268.543860 L 327.754386 268.543860 L 326.657895 268.543860 L 325.561404 268.543860 L 324.464912 268.543860 L 323.368421 268.543860 L 322.271930 268.543860 L 321.175439 268.543860 L 320.078947 268.543860 L 318.982456 268.543860 L 317.885965 268.543860 L 316.789474 268.543860 L 315.692982 268.543860 L 314.596491 268.543860 L 313.500000 268.543860 L 312.403509 268.543860 L 311.307018 268.543860 L 310.210526 268.543860 L 309.114035 268.543860 L 308.017544 268.543860 L 306.921053 268.543860 L 305.824561 268.543860 L 304.728070 268.543860 L 303.631579 268.543860 L 302.535088 268.543860 L 301.438596 268.543860 L 300.342105 268.543860 L 299.245614 268.543860 L 298.149123 268.543860 L 297.052632 268.543860 L 295.956140 268.543860 L 294.859649 268.543860 L 293.763158 268.543860 L 292.666667 268.543860 L 291.570175 268.543860 L 290.473684 268.543860 L 289.377193 268.543860 L 288.280702 268.543860 L 287.184211 268.543860 L 286.087719 268.543860 L 284.991228 268.543860 L 283.894737 268.543860 L 282.798246 268.543860 L 281.701754 268.543860 L 280.605263 268.543860 L 279.508772 268.543860 L 278.412281 268.543860 L 277.315789 268.543860 L 276.219298 268.543860 L 275.122807 268.543860 L 274.026316 268.543860 L 272.929825 268.543860 L 271.833333 268.543860 L 270.736842 268.543860 L 269.640351 268.543860 L 268.543860 268.543860 L 267.447368 268.543860 L 266.350877 268.543860 L 265.254386 268.543860 L 264.157895 268.543860 L 263.061404 268.543860 L 261.964912 268.543860 L 260.868421 268.543860 L 259.771930 268.543860 L 258.675439 268.543860 L 257.578947 268.543860 L 256.482456 268.543860 L 255.385965 268.543860 L 254.289474 268.543860 L 253.192982 268.543860 L 252.096491 268.543860 L 251.000000 268.543860 L 249.903509 268.543860 L 248.807018 268.543860 L 247.710526 268.543860 L 246.614035 268.543860 L 245.517544 268.543860 L 244.421053 268.543860 L 243.324561 268.543860 L 242.228070 268.543860 L 241.131579 268.543860 L 240.035088 268.543860 L 238.938596 268.543860 L 237.842105 268.543860 L 236.745614 268.543860 L 235.649123 268.543860 L 234.552632 268.543860 L 233.456140 268.543860 L 232.359649 268.543860 L 231.263158 268.543860 L 230.166667 268.543860 L 229.070175 268.543860 L 227.973684 268.543860 L 226.877193 268.543860 L 225.780702 268.543860 L 224.684211 268.543860 L 223.587719 268.543860 L 222.491228 268.543860 L 221.394737 268.543860 L 220.298246 268.543860 L 219.201754 268.543860 L 218.105263 268.543860 L 217.008772 268.543860 L 215.912281 268.543860 L 214.815789 268.543860 L 213.719298 268.543860 L 212.622807 268.543860 L 211.526316 268.543860 L 210.429825 268.543860 L 209.333333 268.543860 L 208.236842 268.543860 L 207.140351 268.543860 L 206.043860 268.543860 L 204.947368 268.543860 L 203.850877 268.543860 L 202.754386 268.543860 L 201.657895 268.543860 L 200.561404 268.543860 L 199.464912 268.543860 L 198.368421 268.543860 L 197.271930 268.543860 L 196.175439 268.543860 L 195.078947 268.543860 L 193.982456 268.543860 L 192.885965 268.543860 L 191.789474 268.543860 L 190.692982 268.543860 L 189.596491 268.543860 L 188.500000 268.543860 L 187.403509 268.543860 L 186.307018 268.543860 L 185.210526 268.543860 L 184.114035 268.543860 L 183.017544 268.543860 L 181.921053 268.543860 L 180.824561 268.543860 L 179.728070 268.543860 L 178.631579 268.543860 L 177.535088 268.543860 L 176.438596 268.543860 L 175.342105 268.543860 L 174.245614 268.543860 L 173.149123 268.543860 L 172.052632 268.543860 L 170.956140 268.543860 L 169.859649 268.543860 L 168.763158 268.543860 L 167.666667 268.543860 L 166.570175 268.543860 L 165.473684 268.543860 L 164.377193 268.543860 L 163.280702 268.543860 L 162.184211 268.543860 L 161.087719 268.543860 L 159.991228 268.543860 L 158.894737 268.543860 L 157.798246 268.543860 L 156.701754 268.543860 L 155.605263 268.543860 L 154.508772 268.543860 L 153.412281 268.543860 L 152.315789 268.543860 L 151.219298 268.543860 L 150.122807 268.543860 L 149.026316 268.543860 L 147.929825 268.543860 L 146.833333 268.543860 L 145.736842 268.543860 L 144.640351 268.543860 L 143.543860 268.543860 L 142.447368 268.543860 L 141.350877 268.543860 L 140.254386 268.543860 L 139.157895 268.543860 L 138.061404 268.543860 L 136.964912 268.543860 L 135.868421 268.543860 L 134.771930 268.543860 L 133.675439 268.543860 L 132.578947 268.543860 L 131.482456 268.543860 L 130.385965 268.543860 L 129.289474 268.543860 L 128.192982 268.543860 L 127.096491 268.543860 L 126.000000 268.543860 L 124.903509 268.543860 L 123.807018 268.543860 L 122.710526 268.543860 L 121.614035 268.543860 L 120.517544 268.543860 L 119.421053 268.543860 L 118.324561 268.543860 L 117.228070 268.543860 L 116.131579 268.543860 L 115.035088 268.543860 L 113.938596 268.543860 L 112.842105 268.543860 L 111.745614 268.543860 L 110.649123 268.543860 L 109.552632 268.543860 L 108.456140 268.543860 L 107.359649 268.543860 L 106.263158 268.543860 L 105.166667 268.543860 L 104.070175 268.543860 L 102.973684 268.543860 L 101.877193 268.543860 L 100.780702 268.543860 L 99.684211 268.543860 L 98.587719 268.543860 L 97.491228 268.543860 L 96.394737 268.543860 L 95.298246 268.543860 L 94.201754 268.543860 L 93.105263 268.543860 L 92.008772 268.543860 L 90.912281 268.543860 L 89.815789 268.543860 L 88.719298 268.543860 L 87.622807 268.543860 L 86.526316 268.543860 L 85.429825 268.543860 L 84.333333 268.543860 L 83.236842 268.543860 L 82.140351 268.543860 L 81.043860 268.543860 L 79.947368 268.543860 L 78.850877 268.543860 L 77.754386 268.543860 L 76.657895 268.543860 L 75.561404 268.543860 L 74.464912 268.543860 L 73.368421 268.543860 L 72.271930 268.543860 L 71.175439 268.543860 L 70.078947 268.543860 L 68.982456 268.543860 L 67.885965 268.543860 L 66.789474 268.543860 L 65.692982 268.543860 L 64.596491 268.543860 L 63.500000 268.543860 L 62.403509 268.543860 L 61.307018 268.543860 L 60.210526 268.543860 L 59.114035 268.543860 L 58.017544 268.543860 L 56.921053 268.543860 L 55.824561 268.543860 L 54.728070 268.543860 L 53.631579 268.543860 L 52.535088 268.543860 L 51.438596 268.543860 L 50.342105 268.543860 L 49.245614 268.543860 L 48.149123 268.543860 L 47.052632 268.543860 L 45.956140 268.543860 L 44.859649 268.543860 L 43.763158 268.543860 L 43.763158 267.447368 L 42.666667 267.447368 L 41.570175 267.447368 L 40.473684 267.447368 L 40.473684 266.350877 L 39.377193 266.350877 L 39.377193 265.254386 L 38.280702 265.254386 L 38.280702 264.157895 L 38.280702 263.061404 L 37.184211 263.061404 L 37.184211 261.964912 L 37.184211 260.868421 L 37.184211 259.771930 L 37.184211 258.675439 L 37.184211 257.578947 L 36.087719 257.578947 L 36.087719 256.482456 L 36.087719 255.385965 L 36.087719 254.289474 L 36.087719 253.192982 L 37.184211 253.192982 L 37.184211 252.096491 L 37.184211 251.000000 L 37.184211 249.903509 L 37.184211 248.807018 L 37.184211 247.710526 L 37.184211 246.614035 L 37.184211 245.517544 L 37.184211 244.421053 L 37.184211 243.324561 L 37.184211 242.228070 L 37.184211 241.131579 L 37.184211 240.035088 L 37.184211 238.938596 L 37.184211 237.842105 L 37.184211 236.745614 L 37.184211 235.649123 L 37.184211 234.552632 L 37.184211 233.456140 L 37.184211 232.359649 L 37.184211 231.263158 L 37.184211 230.166667 L 37.184211 229.070175 L 37.184211 227.973684 L 37.184211 226.877193 L 37.184211 225.780702 L 37.184211 224.684211 L 37.184211 223.587719 L 37.184211 222.491228 L 37.184211 221.394737 L 37.184211 220.298246 L 37.184211 219.201754 L 37.184211 218.105263 L 37.184211 217.008772 L 37.184211 215.912281 L 37.184211 214.815789 L 37.184211 213.719298 L 37.184211 212.622807 L 37.184211 211.526316 L 37.184211 210.429825 L 37.184211 209.333333 L 37.184211 208.236842 L 37.184211 207.140351 L 37.184211 206.043860 L 37.184211 204.947368 L 37.184211 203.850877 L 37.184211 202.754386 L 37.184211 201.657895 L 37.184211 200.561404 L 37.184211 199.464912 L 37.184211 198.368421 L 37.184211 197.271930 L 37.184211 196.175439 L 37.184211 195.078947 L 37.184211 193.982456 L 37.184211 192.885965 L 37.184211 191.789474 L 37.184211 190.692982 L 37.184211 189.596491 L 37.184211 188.500000 L 37.184211 187.403509 L 37.184211 186.307018 L 37.184211 185.210526 L 37.184211 184.114035 L 37.184211 183.017544 L 37.184211 181.921053 L 37.184211 180.824561 L 37.184211 179.728070 L 37.184211 178.631579 L 37.184211 177.535088 L 37.184211 176.438596 L 37.184211 175.342105 L 37.184211 174.245614 L 37.184211 173.149123 L 37.184211 172.052632 L 37.184211 170.956140 L 37.184211 169.859649 L 37.184211 168.763158 L 36.087719 168.763158 L 36.087719 167.666667 L 37.184211 167.666667 L 37.184211 166.570175 L 37.184211 165.473684 L 37.184211 164.377193 L 37.184211 163.280702 L 37.184211 162.184211 L 37.184211 161.087719 L 37.184211 159.991228 L 37.184211 158.894737 L 37.184211 157.798246 L 37.184211 156.701754 L 37.184211 155.605263 L 37.184211 154.508772 L 37.184211 153.412281 L 37.184211 152.315789 L 37.184211 151.219298 L 38.280702 151.219298 L 38.280702 150.122807 L 38.280702 149.026316 L 38.280702 147.929825 L 38.280702 146.833333 L 38.280702 145.736842 L 38.280702 144.640351 L 38.280702 143.543860 L 38.280702 142.447368 L 38.280702 141.350877 L 38.280702 140.254386 L 38.280702 139.157895 L 38.280702 138.061404 L 38.280702 136.964912 L 38.280702 135.868421 L 38.280702 134.771930 L 38.280702 133.675439 L 38.280702 132.578947 L 38.280702 131.482456 L 38.280702 130.385965 L 38.280702 129.289474 L 38.280702 128.192982 L 38.280702 127.096491 L 38.280702 126.000000 L 37.184211 126.000000 L 37.184211 124.903509 L 37.184211 123.807018 L 37.184211 122.710526 L 37.184211 121.614035 L 37.184211 120.517544 L 37.184211 119.421053 L 37.184211 118.324561 L 37.184211 117.228070 L 37.184211 116.131579 L 37.184211 115.035088 L 37.184211 113.938596 L 37.184211 112.842105 L 37.184211 111.745614 L 37.184211 110.649123 L 37.184211 109.552632 L 37.184211 108.456140 L 37.184211 107.359649 L 37.184211 106.263158 L 37.184211 105.166667 L 37.184211 104.070175 L 37.184211 102.973684 L 37.184211 101.877193 L 37.184211 100.780702 L 37.184211 99.684211 L 37.184211 98.587719 L 37.184211 97.491228 L 37.184211 96.394737 L 37.184211 95.298246 L 37.184211 94.201754 L 37.184211 93.105263 L 37.184211 92.008772 L 37.184211 90.912281 L 37.184211 89.815789 L 37.184211 88.719298 L 37.184211 87.622807 L 37.184211 86.526316 L 37.184211 85.429825 L 37.184211 84.333333 L 37.184211 83.236842 L 37.184211 82.140351 L 37.184211 81.043860 L 37.184211 79.947368 L 37.184211 78.850877 L 37.184211 77.754386 L 37.184211 76.657895 L 37.184211 75.561404 L 37.184211 74.464912 L 37.184211 73.368421 L 37.184211 72.271930 L 37.184211 71.175439 L 37.184211 70.078947 L 37.184211 68.982456 L 37.184211 67.885965 L 37.184211 66.789474 L 37.184211 65.692982 L 37.184211 64.596491 L 37.184211 63.500000 L 37.184211 62.403509 L 37.184211 61.307018 L 37.184211 60.210526 L 37.184211 59.114035 L 37.184211 58.017544 L 37.184211 56.921053 L 37.184211 55.824561 L 37.184211 54.728070 L 37.184211 53.631579 L 37.184211 52.535088 L 37.184211 51.438596 L 37.184211 50.342105 L 37.184211 49.245614 L 37.184211 48.149123 L 37.184211 47.052632 L 37.184211 45.956140 L 37.184211 44.859649 L 36.087719 44.859649 L 36.087719 43.763158 L 36.087719 42.666667 L 37.184211 42.666667 L 37.184211 41.570175 L 37.184211 40.473684 L 37.184211 39.377193 L 37.184211 38.280702 L 37.184211 37.184211 L 37.184211 36.087719 L 37.184211 34.991228 L 38.280702 34.991228 L 38.280702 33.894737 L 38.280702 32.798246 L 39.377193 32.798246 L 39.377193 31.701754 L 40.473684 31.701754 L 40.473684 30.605263 L 41.570175 30.605263 L 42.666667 30.605263 L 42.666667 29.508772 L 43.763158 29.508772 L 44.859649 29.508772 L 45.956140 29.508772 L 47.052632 29.508772 L 48.149123 29.508772 L 49.245614 29.508772 L 50.342105 29.508772 L 51.438596 29.508772 L 52.535088 29.508772 L 53.631579 29.508772 L 54.728070 29.508772 L 55.824561 29.508772 L 56.921053 29.508772 L 58.017544 29.508772 L 59.114035 29.508772 L 60.210526 29.508772 L 61.307018 29.508772 L 62.403509 29.508772 L 63.500000 29.508772 L 64.596491 29.508772 L 65.692982 29.508772 L 66.789474 29.508772 L 67.885965 29.508772 L 68.982456 29.508772 L 70.078947 29.508772 L 71.175439 29.508772 L 72.271930 29.508772 L 73.368421 29.508772 L 74.464912 29.508772 L 75.561404 29.508772 L 76.657895 29.508772 L 77.754386 29.508772 L 78.850877 29.508772 L 79.947368 29.508772 L 81.043860 29.508772 L 82.140351 29.508772 L 83.236842 29.508772 L 84.333333 29.508772 L 85.429825 29.508772 L 86.526316 29.508772 L 87.622807 29.508772 L 88.719298 29.508772 L 89.815789 29.508772 L 90.912281 29.508772 L 92.008772 29.508772 L 93.105263 29.508772 L 94.201754 29.508772 L 95.298246 29.508772 L 96.394737 29.508772 L 97.491228 29.508772 L 98.587719 29.508772 L 99.684211 29.508772 L 100.780702 29.508772 L 101.877193 29.508772 L 102.973684 29.508772 L 104.070175 29.508772 L 105.166667 29.508772 L 106.263158 29.508772 L 107.359649 29.508772 L 108.456140 29.508772 L 109.552632 29.508772 L 110.649123 29.508772 L 111.745614 29.508772 L 112.842105 29.508772 L 113.938596 29.508772 L 115.035088 29.508772 L 116.131579 29.508772 L 117.228070 29.508772 L 118.324561 29.508772 L 119.421053 29.508772 L 120.517544 29.508772 L 121.614035 29.508772 L 122.710526 29.508772 L 123.807018 29.508772 L 124.903509 29.508772 L 126.000000 29.508772 L 127.096491 29.508772 L 128.192982 29.508772 L 129.289474 29.508772 L 130.385965 29.508772 L 131.482456 29.508772 L 132.578947 29.508772 L 133.675439 29.508772 L 134.771930 29.508772 L 135.868421 29.508772 L 136.964912 29.508772 L 138.061404 29.508772 L 139.157895 29.508772 L 140.254386 29.508772 L 141.350877 29.508772 L 142.447368 29.508772 L 143.543860 29.508772 L 144.640351 29.508772 L 145.736842 29.508772 L 146.833333 29.508772 L 147.929825 29.508772 L 149.026316 29.508772 L 150.122807 29.508772 L 151.219298 29.508772 L 152.315789 29.508772 L 153.412281 29.508772 L 154.508772 29.508772 L 155.605263 29.508772 L 156.701754 29.508772 L 157.798246 29.508772 L 158.894737 29.508772 L 159.991228 29.508772 L 161.087719 29.508772 L 162.184211 29.508772 L 163.280702 29.508772 L 164.377193 29.508772 L 165.473684 29.508772 L 166.570175 29.508772 L 167.666667 29.508772 L 168.763158 29.508772 L 169.859649 29.508772 L 170.956140 29.508772 L 172.052632 29.508772 L 173.149123 29.508772 L 174.245614 29.508772 L 175.342105 29.508772 L 176.438596 29.508772 L 177.535088 29.508772 L 178.631579 29.508772 L 179.728070 29.508772 L 180.824561 29.508772 L 181.921053 29.508772 L 183.017544 29.508772 L 184.114035 29.508772 L 185.210526 29.508772 L 186.307018 29.508772 L 187.403509 29.508772 L 188.500000 29.508772 L 189.596491 29.508772 L 190.692982 29.508772 L 191.789474 29.508772 L 192.885965 29.508772 L 193.982456 29.508772 L 195.078947 29.508772 L 196.175439 29.508772 L 197.271930 29.508772 L 198.368421 29.508772 L 199.464912 29.508772 L 200.561404 29.508772 L 201.657895 29.508772 L 202.754386 29.508772 L 203.850877 29.508772 L 204.947368 29.508772 L 206.043860 29.508772 L 207.140351 29.508772 L 208.236842 29.508772 L 209.333333 29.508772 L 210.429825 29.508772 L 211.526316 29.508772 L 212.622807 29.508772 L 213.719298 29.508772 L 214.815789 29.508772 L 215.912281 29.508772 L 217.008772 29.508772 L 218.105263 29.508772 L 219.201754 29.508772 L 220.298246 29.508772 L 221.394737 29.508772 L 222.491228 29.508772 L 223.587719 29.508772 L 224.684211 29.508772 L 225.780702 29.508772 L 226.877193 29.508772 L 227.973684 29.508772 L 229.070175 29.508772 L 230.166667 29.508772 L 231.263158 29.508772 L 232.359649 29.508772 L 233.456140 29.508772 L 234.552632 29.508772 L 235.649123 29.508772 L 236.745614 29.508772 L 237.842105 29.508772 L 238.938596 29.508772 L 240.035088 29.508772 L 241.131579 29.508772 L 242.228070 29.508772 L 243.324561 29.508772 L 244.421053 29.508772 L 245.517544 29.508772 L 246.614035 29.508772 L 247.710526 29.508772 L 248.807018 29.508772 L 249.903509 29.508772 L 251.000000 29.508772 L 252.096491 29.508772 L 253.192982 29.508772 L 254.289474 29.508772 L 255.385965 29.508772 L 256.482456 29.508772 L 257.578947 29.508772 L 258.675439 29.508772 L 259.771930 29.508772 L 260.868421 29.508772 L 261.964912 29.508772 L 263.061404 29.508772 L 264.157895 29.508772 L 265.254386 29.508772 L 266.350877 29.508772 L 267.447368 29.508772 L 268.543860 29.508772 L 269.640351 29.508772 L 270.736842 29.508772 L 271.833333 29.508772 L 272.929825 29.508772 L 274.026316 29.508772 L 275.122807 29.508772 L 276.219298 29.508772 L 277.315789 29.508772 L 278.412281 29.508772 L 279.508772 29.508772 L 280.605263 29.508772 L 281.701754 29.508772 L 282.798246 29.508772 L 283.894737 29.508772 L 284.991228 29.508772 L 286.087719 29.508772 L 287.184211 29.508772 L 288.280702 29.508772 L 289.377193 29.508772 L 290.473684 29.508772 L 291.570175 29.508772 L 292.666667 29.508772 L 293.763158 29.508772 L 294.859649 29.508772 L 295.956140 29.508772 L 297.052632 29.508772 L 298.149123 29.508772 L 299.245614 29.508772 L 300.342105 29.508772 L 301.438596 29.508772 L 302.535088 29.508772 L 303.631579 29.508772 L 304.728070 29.508772 L 305.824561 29.508772 L 306.921053 29.508772 L 308.017544 29.508772 L 309.114035 29.508772 L 310.210526 29.508772 L 311.307018 29.508772 L 312.403509 29.508772 L 313.500000 29.508772 L 314.596491 29.508772 L 315.692982 29.508772 L 316.789474 29.508772 L 317.885965 29.508772 L 318.982456 29.508772 L 320.078947 29.508772 L 321.175439 29.508772 L 322.271930 29.508772 L 323.368421 29.508772 L 324.464912 29.508772 L 325.561404 29.508772 L 326.657895 29.508772 L 327.754386 29.508772 L 328.850877 29.508772 L 329.947368 29.508772 L 331.043860 29.508772 L 332.140351 29.508772 L 333.236842 29.508772 L 334.333333 29.508772 L 335.429825 29.508772 L 336.526316 29.508772 L 337.622807 29.508772 L 338.719298 29.508772 L 339.815789 29.508772 L 340.912281 29.508772 L 342.008772 29.508772 L 343.105263 29.508772 L 344.201754 29.508772 L 345.298246 29.508772 L 346.394737 29.508772 L 347.491228 29.508772 L 348.587719 29.508772 L 349.684211 29.508772 L 350.780702 29.508772 L 351.877193 29.508772 L 352.973684 29.508772 L 354.070175 29.508772 L 355.166667 29.508772 L 356.263158 29.508772 L 357.359649 29.508772 L 358.456140 29.508772 L 359.552632 29.508772 L 360.649123 29.508772 L 361.745614 29.508772 L 362.842105 29.508772 L 363.938596 29.508772 L 365.035088 29.508772 L 366.131579 29.508772 L 367.228070 29.508772 L 368.324561 29.508772 L 369.421053 29.508772 L 370.517544 29.508772 L 371.614035 29.508772 L 372.710526 29.508772 L 373.807018 29.508772 L 374.903509 29.508772 L 376.000000 29.508772 L 377.096491 29.508772 L 378.192982 29.508772 L 379.289474 29.508772 L 380.385965 29.508772 L 381.482456 29.508772 L 382.578947 29.508772 L 383.675439 29.508772 L 384.771930 29.508772 L 385.868421 29.508772 L 386.964912 29.508772 L 388.061404 29.508772 L 389.157895 29.508772 L 390.254386 29.508772 L 391.350877 29.508772 L 392.447368 29.508772 L 393.543860 29.508772 L 394.640351 29.508772 L 395.736842 29.508772 L 396.833333 29.508772 L 397.929825 29.508772 L 399.026316 29.508772 L 400.122807 29.508772 L 401.219298 29.508772 L 402.315789 29.508772 L 403.412281 29.508772 L 404.508772 29.508772 L 405.605263 29.508772 L 406.701754 29.508772 L 407.798246 29.508772 L 408.894737 29.508772 L 409.991228 29.508772 L 411.087719 29.508772 L 412.184211 29.508772 L 413.280702 29.508772 L 414.377193 29.508772 L 415.473684 29.508772 L 416.570175 29.508772 L 417.666667 29.508772 L 418.763158 29.508772 L 419.859649 29.508772 L 420.956140 29.508772 L 422.052632 29.508772 L 423.149123 29.508772 L 424.245614 29.508772 L 425.342105 29.508772 L 426.438596 29.508772 L 427.535088 29.508772 L 428.631579 29.508772 L 429.728070 29.508772 L 430.824561 29.508772 L 431.921053 29.508772 L 433.017544 29.508772 L 434.114035 29.508772 L 435.210526 29.508772 L 436.307018 29.508772 L 437.403509 29.508772 L 438.500000 29.508772 L 439.596491 29.508772 L 440.692982 29.508772 L 441.789474 29.508772 L 442.885965 29.508772 L 443.982456 29.508772 L 445.078947 29.508772 L 446.175439 29.508772 L 447.271930 29.508772 L 448.368421 29.508772 L 449.464912 29.508772 L 450.561404 29.508772 L 451.657895 29.508772 L 452.754386 29.508772 L 453.850877 29.508772 L 454.947368 29.508772 L 456.043860 29.508772 L 457.140351 29.508772 L 458.236842 29.508772 L 459.333333 29.508772 L 460.429825 29.508772 L 461.526316 29.508772 L 462.622807 29.508772 L 463.719298 29.508772 L 464.815789 29.508772 L 465.912281 29.508772 L 467.008772 29.508772 L 468.105263 29.508772 L 469.201754 29.508772 L 470.298246 29.508772 L 471.394737 29.508772 L 472.491228 29.508772 L 473.587719 29.508772 L 474.684211 29.508772 L 475.780702 29.508772 L 476.877193 29.508772 L 477.973684 29.508772 L 479.070175 29.508772 L 480.166667 29.508772 L 481.263158 29.508772 L 482.359649 29.508772 L 483.456140 29.508772 L 484.552632 29.508772 L 485.649123 29.508772 L 486.745614 29.508772 L 487.842105 29.508772 L 488.938596 29.508772 L 490.035088 29.508772 L 491.131579 29.508772 L 492.228070 29.508772 L 493.324561 29.508772 L 494.421053 29.508772 L 495.517544 29.508772 L 496.614035 29.508772 L 497.710526 29.508772 L 498.807018 29.508772 L 499.903509 29.508772 L 501.000000 29.508772 L 501.000000 1.000000 L 1.000000 1.000000 Z M 29.508772 354.070175 L 29.508772 327.754386 L 169.859649 327.754386 L 169.859649 354.070175 L 29.508772 354.070175 Z M 38.280702 303.631579 L 38.280702 277.315789 L 485.649123 277.315789 L 485.649123 303.631579 L 38.280702 303.631579 Z" transform="scale(0.8,0.8) translate(-1.000000,-1.000000)" fill="' . $color3 . '"></path>';
4100 $source .= '<path d="M 1.000000 27.315789 L 141.350877 27.315789 L 141.350877 1.000000 L 1.000000 1.000000 L 1.000000 27.315789 Z" transform="scale(0.8,0.8) translate(27.508772,325.754386)" fill="' . $color4 . '"></path>';
4101 $source .= '<path d="M 1.000000 27.315789 L 448.368421 27.315789 L 448.368421 1.000000 L 1.000000 1.000000 L 1.000000 27.315789 Z" transform="scale(0.8,0.8) translate(36.280702,275.315789)" fill="' . $color5 . '"></path>';
4102 $source .= '<path d="M 8.675439 240.035088 L 9.771930 240.035088 L 10.868421 240.035088 L 11.964912 240.035088 L 13.061404 240.035088 L 14.157895 240.035088 L 15.254386 240.035088 L 16.350877 240.035088 L 17.447368 240.035088 L 18.543860 240.035088 L 19.640351 240.035088 L 20.736842 240.035088 L 21.833333 240.035088 L 22.929825 240.035088 L 24.026316 240.035088 L 25.122807 240.035088 L 26.219298 240.035088 L 27.315789 240.035088 L 28.412281 240.035088 L 29.508772 240.035088 L 30.605263 240.035088 L 31.701754 240.035088 L 32.798246 240.035088 L 33.894737 240.035088 L 34.991228 240.035088 L 36.087719 240.035088 L 37.184211 240.035088 L 38.280702 240.035088 L 39.377193 240.035088 L 40.473684 240.035088 L 41.570175 240.035088 L 42.666667 240.035088 L 43.763158 240.035088 L 44.859649 240.035088 L 45.956140 240.035088 L 47.052632 240.035088 L 48.149123 240.035088 L 49.245614 240.035088 L 50.342105 240.035088 L 51.438596 240.035088 L 52.535088 240.035088 L 53.631579 240.035088 L 54.728070 240.035088 L 55.824561 240.035088 L 56.921053 240.035088 L 58.017544 240.035088 L 59.114035 240.035088 L 60.210526 240.035088 L 61.307018 240.035088 L 62.403509 240.035088 L 63.500000 240.035088 L 64.596491 240.035088 L 65.692982 240.035088 L 66.789474 240.035088 L 67.885965 240.035088 L 68.982456 240.035088 L 70.078947 240.035088 L 71.175439 240.035088 L 72.271930 240.035088 L 73.368421 240.035088 L 74.464912 240.035088 L 75.561404 240.035088 L 76.657895 240.035088 L 77.754386 240.035088 L 78.850877 240.035088 L 79.947368 240.035088 L 81.043860 240.035088 L 82.140351 240.035088 L 83.236842 240.035088 L 84.333333 240.035088 L 85.429825 240.035088 L 86.526316 240.035088 L 87.622807 240.035088 L 88.719298 240.035088 L 89.815789 240.035088 L 90.912281 240.035088 L 92.008772 240.035088 L 93.105263 240.035088 L 94.201754 240.035088 L 95.298246 240.035088 L 96.394737 240.035088 L 97.491228 240.035088 L 98.587719 240.035088 L 99.684211 240.035088 L 100.780702 240.035088 L 101.877193 240.035088 L 102.973684 240.035088 L 104.070175 240.035088 L 105.166667 240.035088 L 106.263158 240.035088 L 107.359649 240.035088 L 108.456140 240.035088 L 109.552632 240.035088 L 110.649123 240.035088 L 111.745614 240.035088 L 112.842105 240.035088 L 113.938596 240.035088 L 115.035088 240.035088 L 116.131579 240.035088 L 117.228070 240.035088 L 118.324561 240.035088 L 119.421053 240.035088 L 120.517544 240.035088 L 121.614035 240.035088 L 122.710526 240.035088 L 123.807018 240.035088 L 124.903509 240.035088 L 126.000000 240.035088 L 127.096491 240.035088 L 128.192982 240.035088 L 129.289474 240.035088 L 130.385965 240.035088 L 131.482456 240.035088 L 132.578947 240.035088 L 133.675439 240.035088 L 134.771930 240.035088 L 135.868421 240.035088 L 136.964912 240.035088 L 138.061404 240.035088 L 139.157895 240.035088 L 140.254386 240.035088 L 141.350877 240.035088 L 142.447368 240.035088 L 143.543860 240.035088 L 144.640351 240.035088 L 145.736842 240.035088 L 146.833333 240.035088 L 147.929825 240.035088 L 149.026316 240.035088 L 150.122807 240.035088 L 151.219298 240.035088 L 152.315789 240.035088 L 153.412281 240.035088 L 154.508772 240.035088 L 155.605263 240.035088 L 156.701754 240.035088 L 157.798246 240.035088 L 158.894737 240.035088 L 159.991228 240.035088 L 161.087719 240.035088 L 162.184211 240.035088 L 163.280702 240.035088 L 164.377193 240.035088 L 165.473684 240.035088 L 166.570175 240.035088 L 167.666667 240.035088 L 168.763158 240.035088 L 169.859649 240.035088 L 170.956140 240.035088 L 172.052632 240.035088 L 173.149123 240.035088 L 174.245614 240.035088 L 175.342105 240.035088 L 176.438596 240.035088 L 177.535088 240.035088 L 178.631579 240.035088 L 179.728070 240.035088 L 180.824561 240.035088 L 181.921053 240.035088 L 183.017544 240.035088 L 184.114035 240.035088 L 185.210526 240.035088 L 186.307018 240.035088 L 187.403509 240.035088 L 188.500000 240.035088 L 189.596491 240.035088 L 190.692982 240.035088 L 191.789474 240.035088 L 192.885965 240.035088 L 193.982456 240.035088 L 195.078947 240.035088 L 196.175439 240.035088 L 197.271930 240.035088 L 198.368421 240.035088 L 199.464912 240.035088 L 200.561404 240.035088 L 201.657895 240.035088 L 202.754386 240.035088 L 203.850877 240.035088 L 204.947368 240.035088 L 206.043860 240.035088 L 207.140351 240.035088 L 208.236842 240.035088 L 209.333333 240.035088 L 210.429825 240.035088 L 211.526316 240.035088 L 212.622807 240.035088 L 213.719298 240.035088 L 214.815789 240.035088 L 215.912281 240.035088 L 217.008772 240.035088 L 218.105263 240.035088 L 219.201754 240.035088 L 220.298246 240.035088 L 221.394737 240.035088 L 222.491228 240.035088 L 223.587719 240.035088 L 224.684211 240.035088 L 225.780702 240.035088 L 226.877193 240.035088 L 227.973684 240.035088 L 229.070175 240.035088 L 230.166667 240.035088 L 231.263158 240.035088 L 232.359649 240.035088 L 233.456140 240.035088 L 234.552632 240.035088 L 235.649123 240.035088 L 236.745614 240.035088 L 237.842105 240.035088 L 238.938596 240.035088 L 240.035088 240.035088 L 241.131579 240.035088 L 242.228070 240.035088 L 243.324561 240.035088 L 244.421053 240.035088 L 245.517544 240.035088 L 246.614035 240.035088 L 247.710526 240.035088 L 248.807018 240.035088 L 249.903509 240.035088 L 251.000000 240.035088 L 252.096491 240.035088 L 253.192982 240.035088 L 254.289474 240.035088 L 255.385965 240.035088 L 256.482456 240.035088 L 257.578947 240.035088 L 258.675439 240.035088 L 259.771930 240.035088 L 260.868421 240.035088 L 261.964912 240.035088 L 263.061404 240.035088 L 264.157895 240.035088 L 265.254386 240.035088 L 266.350877 240.035088 L 267.447368 240.035088 L 268.543860 240.035088 L 269.640351 240.035088 L 270.736842 240.035088 L 271.833333 240.035088 L 272.929825 240.035088 L 274.026316 240.035088 L 275.122807 240.035088 L 276.219298 240.035088 L 277.315789 240.035088 L 278.412281 240.035088 L 279.508772 240.035088 L 280.605263 240.035088 L 281.701754 240.035088 L 282.798246 240.035088 L 283.894737 240.035088 L 284.991228 240.035088 L 286.087719 240.035088 L 287.184211 240.035088 L 288.280702 240.035088 L 289.377193 240.035088 L 290.473684 240.035088 L 291.570175 240.035088 L 292.666667 240.035088 L 293.763158 240.035088 L 294.859649 240.035088 L 295.956140 240.035088 L 297.052632 240.035088 L 298.149123 240.035088 L 299.245614 240.035088 L 300.342105 240.035088 L 301.438596 240.035088 L 302.535088 240.035088 L 303.631579 240.035088 L 304.728070 240.035088 L 305.824561 240.035088 L 306.921053 240.035088 L 308.017544 240.035088 L 309.114035 240.035088 L 310.210526 240.035088 L 311.307018 240.035088 L 312.403509 240.035088 L 313.500000 240.035088 L 314.596491 240.035088 L 315.692982 240.035088 L 316.789474 240.035088 L 317.885965 240.035088 L 318.982456 240.035088 L 320.078947 240.035088 L 321.175439 240.035088 L 322.271930 240.035088 L 323.368421 240.035088 L 324.464912 240.035088 L 325.561404 240.035088 L 326.657895 240.035088 L 327.754386 240.035088 L 328.850877 240.035088 L 329.947368 240.035088 L 331.043860 240.035088 L 332.140351 240.035088 L 333.236842 240.035088 L 334.333333 240.035088 L 335.429825 240.035088 L 336.526316 240.035088 L 337.622807 240.035088 L 338.719298 240.035088 L 339.815789 240.035088 L 340.912281 240.035088 L 342.008772 240.035088 L 343.105263 240.035088 L 344.201754 240.035088 L 345.298246 240.035088 L 346.394737 240.035088 L 347.491228 240.035088 L 348.587719 240.035088 L 349.684211 240.035088 L 350.780702 240.035088 L 351.877193 240.035088 L 352.973684 240.035088 L 354.070175 240.035088 L 355.166667 240.035088 L 356.263158 240.035088 L 357.359649 240.035088 L 358.456140 240.035088 L 359.552632 240.035088 L 360.649123 240.035088 L 361.745614 240.035088 L 362.842105 240.035088 L 363.938596 240.035088 L 365.035088 240.035088 L 366.131579 240.035088 L 367.228070 240.035088 L 368.324561 240.035088 L 369.421053 240.035088 L 370.517544 240.035088 L 371.614035 240.035088 L 372.710526 240.035088 L 373.807018 240.035088 L 374.903509 240.035088 L 376.000000 240.035088 L 377.096491 240.035088 L 378.192982 240.035088 L 379.289474 240.035088 L 380.385965 240.035088 L 381.482456 240.035088 L 382.578947 240.035088 L 383.675439 240.035088 L 384.771930 240.035088 L 385.868421 240.035088 L 386.964912 240.035088 L 388.061404 240.035088 L 389.157895 240.035088 L 390.254386 240.035088 L 391.350877 240.035088 L 392.447368 240.035088 L 393.543860 240.035088 L 394.640351 240.035088 L 395.736842 240.035088 L 396.833333 240.035088 L 397.929825 240.035088 L 399.026316 240.035088 L 400.122807 240.035088 L 401.219298 240.035088 L 402.315789 240.035088 L 403.412281 240.035088 L 404.508772 240.035088 L 405.605263 240.035088 L 406.701754 240.035088 L 407.798246 240.035088 L 408.894737 240.035088 L 409.991228 240.035088 L 411.087719 240.035088 L 412.184211 240.035088 L 413.280702 240.035088 L 414.377193 240.035088 L 415.473684 240.035088 L 416.570175 240.035088 L 417.666667 240.035088 L 418.763158 240.035088 L 419.859649 240.035088 L 420.956140 240.035088 L 422.052632 240.035088 L 423.149123 240.035088 L 424.245614 240.035088 L 425.342105 240.035088 L 426.438596 240.035088 L 427.535088 240.035088 L 428.631579 240.035088 L 429.728070 240.035088 L 430.824561 240.035088 L 431.921053 240.035088 L 433.017544 240.035088 L 434.114035 240.035088 L 435.210526 240.035088 L 436.307018 240.035088 L 437.403509 240.035088 L 438.500000 240.035088 L 439.596491 240.035088 L 440.692982 240.035088 L 441.789474 240.035088 L 442.885965 240.035088 L 443.982456 240.035088 L 445.078947 240.035088 L 446.175439 240.035088 L 447.271930 240.035088 L 448.368421 240.035088 L 449.464912 240.035088 L 450.561404 240.035088 L 451.657895 240.035088 L 452.754386 240.035088 L 453.850877 240.035088 L 453.850877 238.938596 L 454.947368 238.938596 L 456.043860 238.938596 L 457.140351 238.938596 L 458.236842 238.938596 L 459.333333 238.938596 L 460.429825 238.938596 L 461.526316 238.938596 L 462.622807 238.938596 L 463.719298 238.938596 L 464.815789 238.938596 L 465.912281 238.938596 L 465.912281 126.000000 L 11.964912 126.000000 L 11.964912 95.298246 L 465.912281 95.298246 L 465.912281 1.000000 L 464.815789 1.000000 L 463.719298 1.000000 L 462.622807 1.000000 L 461.526316 1.000000 L 460.429825 1.000000 L 459.333333 1.000000 L 458.236842 1.000000 L 457.140351 1.000000 L 456.043860 1.000000 L 454.947368 1.000000 L 453.850877 1.000000 L 452.754386 1.000000 L 451.657895 1.000000 L 450.561404 1.000000 L 449.464912 1.000000 L 448.368421 1.000000 L 447.271930 1.000000 L 446.175439 1.000000 L 445.078947 1.000000 L 443.982456 1.000000 L 442.885965 1.000000 L 441.789474 1.000000 L 440.692982 1.000000 L 439.596491 1.000000 L 438.500000 1.000000 L 437.403509 1.000000 L 436.307018 1.000000 L 435.210526 1.000000 L 434.114035 1.000000 L 433.017544 1.000000 L 431.921053 1.000000 L 430.824561 1.000000 L 429.728070 1.000000 L 428.631579 1.000000 L 427.535088 1.000000 L 426.438596 1.000000 L 425.342105 1.000000 L 424.245614 1.000000 L 423.149123 1.000000 L 422.052632 1.000000 L 420.956140 1.000000 L 419.859649 1.000000 L 418.763158 1.000000 L 417.666667 1.000000 L 416.570175 1.000000 L 415.473684 1.000000 L 414.377193 1.000000 L 413.280702 1.000000 L 412.184211 1.000000 L 411.087719 1.000000 L 409.991228 1.000000 L 408.894737 1.000000 L 407.798246 1.000000 L 406.701754 1.000000 L 405.605263 1.000000 L 404.508772 1.000000 L 403.412281 1.000000 L 402.315789 1.000000 L 401.219298 1.000000 L 400.122807 1.000000 L 399.026316 1.000000 L 397.929825 1.000000 L 396.833333 1.000000 L 395.736842 1.000000 L 394.640351 1.000000 L 393.543860 1.000000 L 392.447368 1.000000 L 391.350877 1.000000 L 390.254386 1.000000 L 389.157895 1.000000 L 388.061404 1.000000 L 386.964912 1.000000 L 385.868421 1.000000 L 384.771930 1.000000 L 383.675439 1.000000 L 382.578947 1.000000 L 381.482456 1.000000 L 380.385965 1.000000 L 379.289474 1.000000 L 378.192982 1.000000 L 377.096491 1.000000 L 376.000000 1.000000 L 374.903509 1.000000 L 373.807018 1.000000 L 372.710526 1.000000 L 371.614035 1.000000 L 370.517544 1.000000 L 369.421053 1.000000 L 368.324561 1.000000 L 367.228070 1.000000 L 366.131579 1.000000 L 365.035088 1.000000 L 363.938596 1.000000 L 362.842105 1.000000 L 361.745614 1.000000 L 360.649123 1.000000 L 359.552632 1.000000 L 358.456140 1.000000 L 357.359649 1.000000 L 356.263158 1.000000 L 355.166667 1.000000 L 354.070175 1.000000 L 352.973684 1.000000 L 351.877193 1.000000 L 350.780702 1.000000 L 349.684211 1.000000 L 348.587719 1.000000 L 347.491228 1.000000 L 346.394737 1.000000 L 345.298246 1.000000 L 344.201754 1.000000 L 343.105263 1.000000 L 342.008772 1.000000 L 340.912281 1.000000 L 339.815789 1.000000 L 338.719298 1.000000 L 337.622807 1.000000 L 336.526316 1.000000 L 335.429825 1.000000 L 334.333333 1.000000 L 333.236842 1.000000 L 332.140351 1.000000 L 331.043860 1.000000 L 329.947368 1.000000 L 328.850877 1.000000 L 327.754386 1.000000 L 326.657895 1.000000 L 325.561404 1.000000 L 324.464912 1.000000 L 323.368421 1.000000 L 322.271930 1.000000 L 321.175439 1.000000 L 320.078947 1.000000 L 318.982456 1.000000 L 317.885965 1.000000 L 316.789474 1.000000 L 315.692982 1.000000 L 314.596491 1.000000 L 313.500000 1.000000 L 312.403509 1.000000 L 311.307018 1.000000 L 310.210526 1.000000 L 309.114035 1.000000 L 308.017544 1.000000 L 306.921053 1.000000 L 305.824561 1.000000 L 304.728070 1.000000 L 303.631579 1.000000 L 302.535088 1.000000 L 301.438596 1.000000 L 300.342105 1.000000 L 299.245614 1.000000 L 298.149123 1.000000 L 297.052632 1.000000 L 295.956140 1.000000 L 294.859649 1.000000 L 293.763158 1.000000 L 292.666667 1.000000 L 291.570175 1.000000 L 290.473684 1.000000 L 289.377193 1.000000 L 288.280702 1.000000 L 287.184211 1.000000 L 286.087719 1.000000 L 284.991228 1.000000 L 283.894737 1.000000 L 282.798246 1.000000 L 281.701754 1.000000 L 280.605263 1.000000 L 279.508772 1.000000 L 278.412281 1.000000 L 277.315789 1.000000 L 276.219298 1.000000 L 275.122807 1.000000 L 274.026316 1.000000 L 272.929825 1.000000 L 271.833333 1.000000 L 270.736842 1.000000 L 269.640351 1.000000 L 268.543860 1.000000 L 267.447368 1.000000 L 266.350877 1.000000 L 265.254386 1.000000 L 264.157895 1.000000 L 263.061404 1.000000 L 261.964912 1.000000 L 260.868421 1.000000 L 259.771930 1.000000 L 258.675439 1.000000 L 257.578947 1.000000 L 256.482456 1.000000 L 255.385965 1.000000 L 254.289474 1.000000 L 253.192982 1.000000 L 252.096491 1.000000 L 251.000000 1.000000 L 249.903509 1.000000 L 248.807018 1.000000 L 247.710526 1.000000 L 246.614035 1.000000 L 245.517544 1.000000 L 244.421053 1.000000 L 243.324561 1.000000 L 242.228070 1.000000 L 241.131579 1.000000 L 240.035088 1.000000 L 238.938596 1.000000 L 237.842105 1.000000 L 236.745614 1.000000 L 235.649123 1.000000 L 234.552632 1.000000 L 233.456140 1.000000 L 232.359649 1.000000 L 231.263158 1.000000 L 230.166667 1.000000 L 229.070175 1.000000 L 227.973684 1.000000 L 226.877193 1.000000 L 225.780702 1.000000 L 224.684211 1.000000 L 223.587719 1.000000 L 222.491228 1.000000 L 221.394737 1.000000 L 220.298246 1.000000 L 219.201754 1.000000 L 218.105263 1.000000 L 217.008772 1.000000 L 215.912281 1.000000 L 214.815789 1.000000 L 213.719298 1.000000 L 212.622807 1.000000 L 211.526316 1.000000 L 210.429825 1.000000 L 209.333333 1.000000 L 208.236842 1.000000 L 207.140351 1.000000 L 206.043860 1.000000 L 204.947368 1.000000 L 203.850877 1.000000 L 202.754386 1.000000 L 201.657895 1.000000 L 200.561404 1.000000 L 199.464912 1.000000 L 198.368421 1.000000 L 197.271930 1.000000 L 196.175439 1.000000 L 195.078947 1.000000 L 193.982456 1.000000 L 192.885965 1.000000 L 191.789474 1.000000 L 190.692982 1.000000 L 189.596491 1.000000 L 188.500000 1.000000 L 187.403509 1.000000 L 186.307018 1.000000 L 185.210526 1.000000 L 184.114035 1.000000 L 183.017544 1.000000 L 181.921053 1.000000 L 180.824561 1.000000 L 179.728070 1.000000 L 178.631579 1.000000 L 177.535088 1.000000 L 176.438596 1.000000 L 175.342105 1.000000 L 174.245614 1.000000 L 173.149123 1.000000 L 172.052632 1.000000 L 170.956140 1.000000 L 169.859649 1.000000 L 168.763158 1.000000 L 167.666667 1.000000 L 166.570175 1.000000 L 165.473684 1.000000 L 164.377193 1.000000 L 163.280702 1.000000 L 162.184211 1.000000 L 161.087719 1.000000 L 159.991228 1.000000 L 158.894737 1.000000 L 157.798246 1.000000 L 156.701754 1.000000 L 155.605263 1.000000 L 154.508772 1.000000 L 153.412281 1.000000 L 152.315789 1.000000 L 151.219298 1.000000 L 150.122807 1.000000 L 149.026316 1.000000 L 147.929825 1.000000 L 146.833333 1.000000 L 145.736842 1.000000 L 144.640351 1.000000 L 143.543860 1.000000 L 142.447368 1.000000 L 141.350877 1.000000 L 140.254386 1.000000 L 139.157895 1.000000 L 138.061404 1.000000 L 136.964912 1.000000 L 135.868421 1.000000 L 134.771930 1.000000 L 133.675439 1.000000 L 132.578947 1.000000 L 131.482456 1.000000 L 130.385965 1.000000 L 129.289474 1.000000 L 128.192982 1.000000 L 127.096491 1.000000 L 126.000000 1.000000 L 124.903509 1.000000 L 123.807018 1.000000 L 122.710526 1.000000 L 121.614035 1.000000 L 120.517544 1.000000 L 119.421053 1.000000 L 118.324561 1.000000 L 117.228070 1.000000 L 116.131579 1.000000 L 115.035088 1.000000 L 113.938596 1.000000 L 112.842105 1.000000 L 111.745614 1.000000 L 110.649123 1.000000 L 109.552632 1.000000 L 108.456140 1.000000 L 107.359649 1.000000 L 106.263158 1.000000 L 105.166667 1.000000 L 104.070175 1.000000 L 102.973684 1.000000 L 101.877193 1.000000 L 100.780702 1.000000 L 99.684211 1.000000 L 98.587719 1.000000 L 97.491228 1.000000 L 96.394737 1.000000 L 95.298246 1.000000 L 94.201754 1.000000 L 93.105263 1.000000 L 92.008772 1.000000 L 90.912281 1.000000 L 89.815789 1.000000 L 88.719298 1.000000 L 87.622807 1.000000 L 86.526316 1.000000 L 85.429825 1.000000 L 84.333333 1.000000 L 83.236842 1.000000 L 82.140351 1.000000 L 81.043860 1.000000 L 79.947368 1.000000 L 78.850877 1.000000 L 77.754386 1.000000 L 76.657895 1.000000 L 75.561404 1.000000 L 74.464912 1.000000 L 73.368421 1.000000 L 72.271930 1.000000 L 71.175439 1.000000 L 70.078947 1.000000 L 68.982456 1.000000 L 67.885965 1.000000 L 66.789474 1.000000 L 65.692982 1.000000 L 64.596491 1.000000 L 63.500000 1.000000 L 62.403509 1.000000 L 61.307018 1.000000 L 60.210526 1.000000 L 59.114035 1.000000 L 58.017544 1.000000 L 56.921053 1.000000 L 55.824561 1.000000 L 54.728070 1.000000 L 53.631579 1.000000 L 52.535088 1.000000 L 51.438596 1.000000 L 50.342105 1.000000 L 49.245614 1.000000 L 48.149123 1.000000 L 47.052632 1.000000 L 45.956140 1.000000 L 44.859649 1.000000 L 43.763158 1.000000 L 42.666667 1.000000 L 41.570175 1.000000 L 40.473684 1.000000 L 39.377193 1.000000 L 38.280702 1.000000 L 37.184211 1.000000 L 36.087719 1.000000 L 34.991228 1.000000 L 33.894737 1.000000 L 32.798246 1.000000 L 31.701754 1.000000 L 30.605263 1.000000 L 29.508772 1.000000 L 28.412281 1.000000 L 27.315789 1.000000 L 26.219298 1.000000 L 25.122807 1.000000 L 24.026316 1.000000 L 22.929825 1.000000 L 21.833333 1.000000 L 20.736842 1.000000 L 19.640351 1.000000 L 18.543860 1.000000 L 17.447368 1.000000 L 16.350877 1.000000 L 15.254386 1.000000 L 14.157895 1.000000 L 13.061404 1.000000 L 11.964912 1.000000 L 10.868421 1.000000 L 9.771930 1.000000 L 8.675439 1.000000 L 7.578947 1.000000 L 7.578947 2.096491 L 6.482456 2.096491 L 5.385965 2.096491 L 5.385965 3.192982 L 4.289474 3.192982 L 4.289474 4.289474 L 3.192982 4.289474 L 3.192982 5.385965 L 3.192982 6.482456 L 2.096491 6.482456 L 2.096491 7.578947 L 2.096491 8.675439 L 2.096491 9.771930 L 2.096491 10.868421 L 2.096491 11.964912 L 2.096491 13.061404 L 2.096491 14.157895 L 1.000000 14.157895 L 1.000000 15.254386 L 1.000000 16.350877 L 2.096491 16.350877 L 2.096491 17.447368 L 2.096491 18.543860 L 2.096491 19.640351 L 2.096491 20.736842 L 2.096491 21.833333 L 2.096491 22.929825 L 2.096491 24.026316 L 2.096491 25.122807 L 2.096491 26.219298 L 2.096491 27.315789 L 2.096491 28.412281 L 2.096491 29.508772 L 2.096491 30.605263 L 2.096491 31.701754 L 2.096491 32.798246 L 2.096491 33.894737 L 2.096491 34.991228 L 2.096491 36.087719 L 2.096491 37.184211 L 2.096491 38.280702 L 2.096491 39.377193 L 2.096491 40.473684 L 2.096491 41.570175 L 2.096491 42.666667 L 2.096491 43.763158 L 2.096491 44.859649 L 2.096491 45.956140 L 2.096491 47.052632 L 2.096491 48.149123 L 2.096491 49.245614 L 2.096491 50.342105 L 2.096491 51.438596 L 2.096491 52.535088 L 2.096491 53.631579 L 2.096491 54.728070 L 2.096491 55.824561 L 2.096491 56.921053 L 2.096491 58.017544 L 2.096491 59.114035 L 2.096491 60.210526 L 2.096491 61.307018 L 2.096491 62.403509 L 2.096491 63.500000 L 2.096491 64.596491 L 2.096491 65.692982 L 2.096491 66.789474 L 2.096491 67.885965 L 2.096491 68.982456 L 2.096491 70.078947 L 2.096491 71.175439 L 2.096491 72.271930 L 2.096491 73.368421 L 2.096491 74.464912 L 2.096491 75.561404 L 2.096491 76.657895 L 2.096491 77.754386 L 2.096491 78.850877 L 2.096491 79.947368 L 2.096491 81.043860 L 2.096491 82.140351 L 2.096491 83.236842 L 2.096491 84.333333 L 2.096491 85.429825 L 2.096491 86.526316 L 2.096491 87.622807 L 2.096491 88.719298 L 2.096491 89.815789 L 2.096491 90.912281 L 2.096491 92.008772 L 2.096491 93.105263 L 2.096491 94.201754 L 2.096491 95.298246 L 2.096491 96.394737 L 2.096491 97.491228 L 3.192982 97.491228 L 3.192982 98.587719 L 3.192982 99.684211 L 3.192982 100.780702 L 3.192982 101.877193 L 3.192982 102.973684 L 3.192982 104.070175 L 3.192982 105.166667 L 3.192982 106.263158 L 3.192982 107.359649 L 3.192982 108.456140 L 3.192982 109.552632 L 3.192982 110.649123 L 3.192982 111.745614 L 3.192982 112.842105 L 3.192982 113.938596 L 3.192982 115.035088 L 3.192982 116.131579 L 3.192982 117.228070 L 3.192982 118.324561 L 3.192982 119.421053 L 3.192982 120.517544 L 3.192982 121.614035 L 3.192982 122.710526 L 2.096491 122.710526 L 2.096491 123.807018 L 2.096491 124.903509 L 2.096491 126.000000 L 2.096491 127.096491 L 2.096491 128.192982 L 2.096491 129.289474 L 2.096491 130.385965 L 2.096491 131.482456 L 2.096491 132.578947 L 2.096491 133.675439 L 2.096491 134.771930 L 2.096491 135.868421 L 2.096491 136.964912 L 2.096491 138.061404 L 2.096491 139.157895 L 1.000000 139.157895 L 1.000000 140.254386 L 2.096491 140.254386 L 2.096491 141.350877 L 2.096491 142.447368 L 2.096491 143.543860 L 2.096491 144.640351 L 2.096491 145.736842 L 2.096491 146.833333 L 2.096491 147.929825 L 2.096491 149.026316 L 2.096491 150.122807 L 2.096491 151.219298 L 2.096491 152.315789 L 2.096491 153.412281 L 2.096491 154.508772 L 2.096491 155.605263 L 2.096491 156.701754 L 2.096491 157.798246 L 2.096491 158.894737 L 2.096491 159.991228 L 2.096491 161.087719 L 2.096491 162.184211 L 2.096491 163.280702 L 2.096491 164.377193 L 2.096491 165.473684 L 2.096491 166.570175 L 2.096491 167.666667 L 2.096491 168.763158 L 2.096491 169.859649 L 2.096491 170.956140 L 2.096491 172.052632 L 2.096491 173.149123 L 2.096491 174.245614 L 2.096491 175.342105 L 2.096491 176.438596 L 2.096491 177.535088 L 2.096491 178.631579 L 2.096491 179.728070 L 2.096491 180.824561 L 2.096491 181.921053 L 2.096491 183.017544 L 2.096491 184.114035 L 2.096491 185.210526 L 2.096491 186.307018 L 2.096491 187.403509 L 2.096491 188.500000 L 2.096491 189.596491 L 2.096491 190.692982 L 2.096491 191.789474 L 2.096491 192.885965 L 2.096491 193.982456 L 2.096491 195.078947 L 2.096491 196.175439 L 2.096491 197.271930 L 2.096491 198.368421 L 2.096491 199.464912 L 2.096491 200.561404 L 2.096491 201.657895 L 2.096491 202.754386 L 2.096491 203.850877 L 2.096491 204.947368 L 2.096491 206.043860 L 2.096491 207.140351 L 2.096491 208.236842 L 2.096491 209.333333 L 2.096491 210.429825 L 2.096491 211.526316 L 2.096491 212.622807 L 2.096491 213.719298 L 2.096491 214.815789 L 2.096491 215.912281 L 2.096491 217.008772 L 2.096491 218.105263 L 2.096491 219.201754 L 2.096491 220.298246 L 2.096491 221.394737 L 2.096491 222.491228 L 2.096491 223.587719 L 2.096491 224.684211 L 1.000000 224.684211 L 1.000000 225.780702 L 1.000000 226.877193 L 1.000000 227.973684 L 1.000000 229.070175 L 2.096491 229.070175 L 2.096491 230.166667 L 2.096491 231.263158 L 2.096491 232.359649 L 2.096491 233.456140 L 2.096491 234.552632 L 3.192982 234.552632 L 3.192982 235.649123 L 3.192982 236.745614 L 4.289474 236.745614 L 4.289474 237.842105 L 5.385965 237.842105 L 5.385965 238.938596 L 6.482456 238.938596 L 7.578947 238.938596 L 8.675439 238.938596 Z" transform="scale(0.8,0.8) translate(34.087719,27.508772)" fill="' . $color6 . '"></path>';
4103 $source .= '<path d="M 1.000000 31.701754 L 454.947368 31.701754 L 454.947368 1.000000 L 1.000000 1.000000 Z" transform="scale(0.8,0.8) translate(45.052632,121.807018)" fill="' . $color1 . '"></path>';
4104 $source .= '</g>';
4105 $source .= '</svg>';
4106 // phpcs:ignore
4107 return 'data:image/svg+xml;base64,' . base64_encode( $source );
4108 }
4109
4110 /**
4111 * Returns a base64 svg resource for the Zipkin icon.
4112 *
4113 * @return string The svg resource as a base64.
4114 * @since 3.4.0
4115 */
4116 private function get_base64_spatieray_icon() {
4117 $source = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" viewBox="0 0 512 192">';
4118 $source .= '<defs>';
4119 $source .= '<style type="text/css">.st0{fill:url(#SVGID_1_);}.st1{fill:url(#SVGID_2_);}.st2{fill:#FF5500;}</style>';
4120 $source .= '</defs>';
4121 $source .= '<g transform="translate(55,20) scale(0.8,0.8)">';
4122 $source .= '<radialGradient id="SVGID_1_" cx="431.374" cy="143.7958" r="242.8345" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#4F2FA3"/><stop offset="0.4537" style="stop-color:#33157F"/><stop offset="0.7749" style="stop-color:#1E0063"/><stop offset="0.9788" style="stop-color:#271059"/></radialGradient>';
4123 $source .= '<path class="st0" d="M123.9,122.8l37.2,65.9H96.8l-29-54.2h-9.3v54.2H1.4V2.7h76.5c28.7,0,48.6,7.2,61.1,19.7 c10.9,10.9,16.7,25,16.7,44.4v1.6C155.8,95.2,143,112.5,123.9,122.8z M232.5,1.7l-64.3,187.1H228l34-117.4l34.3,117.4h60.9 L292.9,1.7H232.5z M449.3,2.7l-25.8,61.1L398.1,2.7h-62.7l59,120.4v65.6h57.4v-66.2L511,2.7H449.3z"/>';
4124 $source .= '<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="58.5183" y1="101.1163" x2="451.7476" y2="101.1163"><stop offset="1.189721e-03" style="stop-color:#FF3400"/><stop offset="5.678343e-02" style="stop-color:#FF4A00"/><stop offset="8.036564e-02" style="stop-color:#FF5500"/><stop offset="0.3478" style="stop-color:#FF5703"/><stop offset="0.5101" style="stop-color:#FF5C0B"/><stop offset="0.6444" style="stop-color:#FF6619"/><stop offset="0.7633" style="stop-color:#FF732E"/><stop offset="0.8712" style="stop-color:#FF8548"/><stop offset="0.8895" style="stop-color:#FF884D"/><stop offset="1" style="stop-color:#FFD8C4"/></linearGradient>';
4125 $source .= '<path class="st1" d="M77.1,92.3c12.8,0,21-6.9,21-19.9V71c0-13.3-8.2-19.9-20.7-19.9H58.5v41.2H77.1z M268.2,92.4l10.4,35.6 l60.5,8.1l-8.3-24.2L268.2,92.4 M207.8,73.5L193,116.6l53.8,7.2l10.1-34.9L207.8,73.5 M394.4,131.8l57.4,17.9v1.4l-57.4-7.7V131.8"/>';
4126 $source .= '<path class="st2" d="M457,146.7"/>';
4127 $source .= '<path class="st2" d="M456.4,155.6"/>';
4128 $source .= '<path class="st2" d="M458.1,150.8"/>';
4129 $source .= '</g>';
4130 $source .= '</svg>';
4131 // phpcs:ignore
4132 return 'data:image/svg+xml;base64,' . base64_encode( $source );
4133 }
4134
4135 }
4136